mesa/src
Marek Olšák 4f7c21899a r600g: fix the representation of control-flow instructions
We need something that looks like a compiler and not like some hacker
put some functions together. /rant

This is a band-aid for these two problems:
- The R600 and EG control-flow instructions appear in switch statements
  next to each other, causing conflicts when adding new instructions.
- The ALU control-flow instructions are bitshifted by 3 (from CF_INST 26:29
  to CF_INST 23:29, as is defined by r600 ISA) even for EG, where CF_INST
  is 22:29.

To fix this mess, the 'inst' field is bitshifted to the left either by 22, 23,
or 26 (directly in the definitions), such that it can be just or'd when making
bytecode without any shifting. All switch statements have been divided into
two, one for R600 and the other for EG.

Of course, there is a better way to do this, but that is left for future
work.

Tested on RV730 and REDWOOD with no regressions.

v2: minor cleanup as per Alex's comment.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-15 00:04:43 +01:00
..
egl egl: silence unused var warning 2011-11-10 16:00:46 -07:00
gallium r600g: fix the representation of control-flow instructions 2011-11-15 00:04:43 +01:00
gbm gbm/dri: avoid crash in dri_screen_create 2011-08-04 14:09:34 +02:00
getopt getopt: Make code more portable. 2011-01-12 16:54:21 +00:00
glsl linker: Validate resource usage in the linker 2011-11-14 11:08:51 -08:00
glu glu: Fix deprecated conversion from string constant to ‘char*’ warning. 2011-11-09 10:24:37 +00:00
glx drisw: Enable SGI_make_current_read for direct contexts 2011-11-01 13:52:48 -04:00
mapi mesa,glsl,mapi: Put extern "C" { ... } where appropriate. 2011-11-09 10:24:37 +00:00
mesa glsl: Remove resource count checks from ir_to_mesa and st_glsl_to_tgsi 2011-11-14 11:08:53 -08:00
Makefile
SConscript scons: Unbreak mingw build. 2011-09-20 20:50:48 +01:00