summaryrefslogtreecommitdiff
path: root/assembler/brw_disasm.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-02-04 12:02:18 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:42 +0000
commitf0365d40b4e83d13c1865d48e571271737a58c65 (patch)
tree5bc8d94606f115b9fa4b91c03c08b9336ce8d4ec /assembler/brw_disasm.c
parent2d8b92a24b2d6aebe2ced1f014b6c3129f86b91c (diff)
assembler: Don't use GL types
sed -i -e 's/GLuint/unsigned/g' -e 's/GLint/int/g' \ -e 's/GLfloat/float/g' -e 's/GLubyte/uint8_t/g' \ -e 's/GLshort/int16_t/g' assembler/*.[ch] Drop the GL types here, they don't bring anything to the table. For instance, GLuint has no guarantee to be 32 bits, so it does not make too much sense to use it in structure describing hardware tables and opcodes. Of course, some bikeshedding can be applied to use uin32_t instead, I figured that some of the GLuint are used without size constraints, so a sed with uint32_t did not seem the right thing to do. On top of that initial sed, one bothered enough could change the structures with size constraints to actually use uint32_t. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'assembler/brw_disasm.c')
-rw-r--r--assembler/brw_disasm.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/assembler/brw_disasm.c b/assembler/brw_disasm.c
index 9781f6bd..de121e61 100644
--- a/assembler/brw_disasm.c
+++ b/assembler/brw_disasm.c
@@ -428,7 +428,7 @@ static int pad (FILE *f, int c)
}
static int control (FILE *file, const char *name, const char * const ctrl[],
- GLuint id, int *space)
+ unsigned id, int *space)
{
if (!ctrl[id]) {
fprintf (file, "*** invalid %s value %d ",
@@ -456,7 +456,7 @@ static int print_opcode (FILE *file, int id)
return 0;
}
-static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr)
+static int reg (FILE *file, unsigned _reg_file, unsigned _reg_nr)
{
int err = 0;
@@ -585,7 +585,7 @@ static int dest_3src (FILE *file, struct brw_instruction *inst)
}
static int src_align1_region (FILE *file,
- GLuint _vert_stride, GLuint _width, GLuint _horiz_stride)
+ unsigned _vert_stride, unsigned _width, unsigned _horiz_stride)
{
int err = 0;
string (file, "<");
@@ -598,9 +598,9 @@ static int src_align1_region (FILE *file,
return err;
}
-static int src_da1 (FILE *file, GLuint type, GLuint _reg_file,
- GLuint _vert_stride, GLuint _width, GLuint _horiz_stride,
- GLuint reg_num, GLuint sub_reg_num, GLuint __abs, GLuint _negate)
+static int src_da1 (FILE *file, unsigned type, unsigned _reg_file,
+ unsigned _vert_stride, unsigned _width, unsigned _horiz_stride,
+ unsigned reg_num, unsigned sub_reg_num, unsigned __abs, unsigned _negate)
{
int err = 0;
err |= control (file, "negate", negate, _negate, NULL);
@@ -617,16 +617,16 @@ static int src_da1 (FILE *file, GLuint type, GLuint _reg_file,
}
static int src_ia1 (FILE *file,
- GLuint type,
- GLuint _reg_file,
- GLint _addr_imm,
- GLuint _addr_subreg_nr,
- GLuint _negate,
- GLuint __abs,
- GLuint _addr_mode,
- GLuint _horiz_stride,
- GLuint _width,
- GLuint _vert_stride)
+ unsigned type,
+ unsigned _reg_file,
+ int _addr_imm,
+ unsigned _addr_subreg_nr,
+ unsigned _negate,
+ unsigned __abs,
+ unsigned _addr_mode,
+ unsigned _horiz_stride,
+ unsigned _width,
+ unsigned _vert_stride)
{
int err = 0;
err |= control (file, "negate", negate, _negate, NULL);
@@ -644,17 +644,17 @@ static int src_ia1 (FILE *file,
}
static int src_da16 (FILE *file,
- GLuint _reg_type,
- GLuint _reg_file,
- GLuint _vert_stride,
- GLuint _reg_nr,
- GLuint _subreg_nr,
- GLuint __abs,
- GLuint _negate,
- GLuint swz_x,
- GLuint swz_y,
- GLuint swz_z,
- GLuint swz_w)
+ unsigned _reg_type,
+ unsigned _reg_file,
+ unsigned _vert_stride,
+ unsigned _reg_nr,
+ unsigned _subreg_nr,
+ unsigned __abs,
+ unsigned _negate,
+ unsigned swz_x,
+ unsigned swz_y,
+ unsigned swz_z,
+ unsigned swz_w)
{
int err = 0;
err |= control (file, "negate", negate, _negate, NULL);
@@ -703,10 +703,10 @@ static int src_da16 (FILE *file,
static int src0_3src (FILE *file, struct brw_instruction *inst)
{
int err = 0;
- GLuint swz_x = (inst->bits2.da3src.src0_swizzle >> 0) & 0x3;
- GLuint swz_y = (inst->bits2.da3src.src0_swizzle >> 2) & 0x3;
- GLuint swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3;
- GLuint swz_w = (inst->bits2.da3src.src0_swizzle >> 6) & 0x3;
+ unsigned swz_x = (inst->bits2.da3src.src0_swizzle >> 0) & 0x3;
+ unsigned swz_y = (inst->bits2.da3src.src0_swizzle >> 2) & 0x3;
+ unsigned swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3;
+ unsigned swz_w = (inst->bits2.da3src.src0_swizzle >> 6) & 0x3;
err |= control (file, "negate", negate, inst->bits1.da3src.src0_negate, NULL);
err |= control (file, "abs", _abs, inst->bits1.da3src.src0_abs, NULL);
@@ -751,11 +751,11 @@ static int src0_3src (FILE *file, struct brw_instruction *inst)
static int src1_3src (FILE *file, struct brw_instruction *inst)
{
int err = 0;
- GLuint swz_x = (inst->bits2.da3src.src1_swizzle >> 0) & 0x3;
- GLuint swz_y = (inst->bits2.da3src.src1_swizzle >> 2) & 0x3;
- GLuint swz_z = (inst->bits2.da3src.src1_swizzle >> 4) & 0x3;
- GLuint swz_w = (inst->bits2.da3src.src1_swizzle >> 6) & 0x3;
- GLuint src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low |
+ unsigned swz_x = (inst->bits2.da3src.src1_swizzle >> 0) & 0x3;
+ unsigned swz_y = (inst->bits2.da3src.src1_swizzle >> 2) & 0x3;
+ unsigned swz_z = (inst->bits2.da3src.src1_swizzle >> 4) & 0x3;
+ unsigned swz_w = (inst->bits2.da3src.src1_swizzle >> 6) & 0x3;
+ unsigned src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low |
(inst->bits3.da3src.src1_subreg_nr_high << 2));
err |= control (file, "negate", negate, inst->bits1.da3src.src1_negate,
@@ -804,10 +804,10 @@ static int src1_3src (FILE *file, struct brw_instruction *inst)
static int src2_3src (FILE *file, struct brw_instruction *inst)
{
int err = 0;
- GLuint swz_x = (inst->bits3.da3src.src2_swizzle >> 0) & 0x3;
- GLuint swz_y = (inst->bits3.da3src.src2_swizzle >> 2) & 0x3;
- GLuint swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3;
- GLuint swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3;
+ unsigned swz_x = (inst->bits3.da3src.src2_swizzle >> 0) & 0x3;
+ unsigned swz_y = (inst->bits3.da3src.src2_swizzle >> 2) & 0x3;
+ unsigned swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3;
+ unsigned swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3;
err |= control (file, "negate", negate, inst->bits1.da3src.src2_negate,
NULL);
@@ -851,7 +851,7 @@ static int src2_3src (FILE *file, struct brw_instruction *inst)
return err;
}
-static int imm (FILE *file, GLuint type, struct brw_instruction *inst) {
+static int imm (FILE *file, unsigned type, struct brw_instruction *inst) {
switch (type) {
case BRW_REGISTER_TYPE_UD:
format (file, "0x%08xUD", inst->bits3.ud);