8 Commits

Author SHA1 Message Date
Damien Lespiau
f0365d40b4 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>
2013-03-04 15:54:42 +00:00
Damien Lespiau
28ff66a13c assembler: Put struct opcode_desc back in brw_context.h
I originally moved struct opcode_desc from brw_context.h to brw_eu.h on
the mesa side, but that was before the realization we needed struct
brw_context if we wanted to not touch the code too much.

So put it back there now that the mesa patch has been dropped.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
e75faa3e43 assembler: Don't pollute the library files with gen4asm.h
gen4asm.h is assembler specific while we want the library files to be
somewhat of a proper library.

This means that we have to redefine the GL* typedefs for brw_structs.h,
not using any of thet GL typedef will be for a future commit.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
a2a6583518 assembler: Expose setters for 3src operands
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
112075f8c2 assembler: Import brw_eu_compact.c
To be able to import brw_eu.c and brw_eu_emit.c later on. This could be
used to get the assembler generate compact instructions at some point.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:37 +00:00
Damien Lespiau
609a8453fb assembler: Introduce struct brw_context
A lot of the mesa code use struct brw_context to get the GPU generation
and various information. Let's stub this structure and initialize it
ourselves to be able to resuse mesa's code untouched.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:37 +00:00
Damien Lespiau
3ee5808d63 assembler: Remove white space from brw_eu.h
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:37 +00:00
Damien Lespiau
4ca1a04b85 assembler: Update the disassembler code
From Mesa. This imports a bit more the of brw_eu* infrastructure (which
is going towards the right direction!) from mesa and the update is quite
a significant improvement over what we had.

I also verified that the changes that were done on the assembler old
version of brw_disasm.c were already supported by the Mesa version, and
indeed they were.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:37 +00:00