summaryrefslogtreecommitdiff
path: root/assembler/gram.y
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/gram.y
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/gram.y')
-rw-r--r--assembler/gram.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/assembler/gram.y b/assembler/gram.y
index 9d58fe6a..50d71d14 100644
--- a/assembler/gram.y
+++ b/assembler/gram.y
@@ -81,7 +81,7 @@ static struct src_operand ip_src =
.reg.dw1.bits.swizzle = BRW_SWIZZLE_NOOP,
};
-static int get_type_size(GLuint type);
+static int get_type_size(unsigned type);
static void set_instruction_opcode(struct brw_program_instruction *instr,
unsigned opcode);
static int set_instruction_dest(struct brw_program_instruction *instr,
@@ -339,7 +339,7 @@ static bool validate_src_reg(struct brw_instruction *insn,
return true;
}
-static int get_subreg_address(GLuint regfile, GLuint type, GLuint subreg, GLuint address_mode)
+static int get_subreg_address(unsigned regfile, unsigned type, unsigned subreg, unsigned address_mode)
{
int unit_size = 1;
@@ -370,7 +370,7 @@ static int get_subreg_address(GLuint regfile, GLuint type, GLuint subreg, GLuint
* a0.12 6 invalid input
* a0.14 7 invalid input
*/
-static int get_indirect_subreg_address(GLuint subreg)
+static int get_indirect_subreg_address(unsigned subreg)
{
return advanced_flag == 0 ? subreg / 2 : subreg;
}
@@ -2744,7 +2744,7 @@ void yyerror (char *msg)
++errors;
}
-static int get_type_size(GLuint type)
+static int get_type_size(unsigned type)
{
int size = 1;