History log of /external/mesa3d/src/gallium/drivers/r300/r300_fs.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a52b3338c6e51421e3836ae210cd98d9c1ec337b 10-Apr-2012 Marek Olšák <maraeo@gmail.com> u_vbuf: remove u_vbuf_resource
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
7023ed9e622a3a080ccc6a2739ba1ccd8775a345 23-Jan-2012 Marek Olšák <maraeo@gmail.com> r300g: nuke the fallback for fragment color clamping
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
e945fb04d04c33da5e77d22d739c5740a522a61e 15-Jun-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Add support for the output modifier (OMOD)
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
be7407b75b12c70e1925c10117937ae2b9e6711f 02-Aug-2011 Marek Olšák <maraeo@gmail.com> gallium/util: add functions for manipulating swizzles

Some of those have been in drivers already.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
1c2c4ddbd1e97bfd13430521e5c09cb5ce8e36e6 26-Jul-2011 Marek Olšák <maraeo@gmail.com> r300g: copy the compiler from r300c

What a beast.

r300g doesn't depend on files from r300c anymore, so r300c is now left
to its own fate. BTW 'make test' can be invoked from the gallium/r300
directory to run some compiler unit tests.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
b3011ea60cc36a888da031ebac932d67473f4521 05-Apr-2011 Marek Olšák <maraeo@gmail.com> r300g: fix RG/LATC1_SNORM by doing UNORM->SNORM conversion in the shader
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
f03791467090db49e5c3d6111cd8d2a7cbe31d75 16-Feb-2011 Marek Olšák <maraeo@gmail.com> r300g: enable clamping controls
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
4b92c688a45480027390764b06077105298666c3 12-Mar-2011 Marek Olšák <maraeo@gmail.com> r300g: implement fragment color clamping in the shader

This finishes the implementation of the fragment color clamp control
for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
56ba7e913fef0ea2b1bead582108f9ab3ab8263d 10-Feb-2011 Marek Olšák <maraeo@gmail.com> r300g: consolidate buffers and textures to r300_resource

Transfers and create/destroy are still handled separately.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
c40ec20c273104198f7b3c52af2cd2328833b72b 13-Dec-2010 Tom Stellard <tstellar@gmail.com> r300g: Increase fragment shader limits for r400 cards

r400 fragment shaders now support up to 64 temporary registers,
512 ALU instructions, and 512 TEX instructions.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
ffcdd49c69811b9f768c0b32acef6527d5626a6e 23-Jan-2011 Marek Olšák <maraeo@gmail.com> r300/compiler: remove any code related to relative addressing of temporaries

The hw can't do it and the code was useless anyway (it's lowered
in the GLSL compiler).
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
4e52e8f746e3565bf3fe9ba8e4e3744ce0302478 18-Dec-2010 Dave Airlie <airlied@redhat.com> r300g: add support for color0 writes to all bound color buffers.

Thanks to Marek Olšák for making my initial attempt actually work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
a60a5b850bde94c9c0c21f07800ed57436525998 03-Dec-2010 Marek Olšák <maraeo@gmail.com> r300g: do not remove unused constants if we are not near the limit
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
f822cc22f223a0a4f9cf1cdd5871780e5df11d67 18-Oct-2010 Tom Stellard <tstellar@gmail.com> r300g: Add new debug option for logging vertex/fragment program stats
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
13359e6a4b732335cdd8da48276960d0b176ffe3 29-Aug-2010 Marek Olšák <maraeo@gmail.com> r300g: add support for 3D NPOT textures without mipmapping

The driver actually creates a 3D texture aligned to POT and does all
the magic with texture coordinates in the fragment shader. It first
emulates REPEAT and MIRRORED wrap modes in the fragment shader to get
the coordinates into the range [0, 1]. (already done for 2D NPOT)
Then it scales them to get the coordinates of the NPOT subtexture.

NPOT textures are now less of a lie and we can at least display
something meaningful even for the 3D ones.

Supported wrap modes:
- REPEAT
- MIRRORED_REPEAT
- CLAMP_TO_EDGE (NEAREST filtering only)
- MIRROR_CLAMP_TO_EDGE (NEAREST filtering only)
- The behavior of other CLAMP modes is undefined on borders, but they usually
give results very close to CLAMP_TO_EDGE with mirroring working perfectly.

This fixes:
- piglit/fbo-3d
- piglit/tex3d-npot
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
82f8e43bfa27b0318b01674e2a273c06becae263 28-Sep-2010 Marek Olšák <maraeo@gmail.com> r300g: code cleanups

Some random stuff I had here.

1) Fixed some misleading comments.
2) Removed fake_npot, since it's redundant.
3) lower_texture_rect -> scale_texcoords
4) Reordered and reindented some TEX transform code.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
63432ecfce5415fbf07f1781ec77b5ea3efff599 14-Jul-2010 Tom Stellard <tstellar@gmail.com> r300/compiler: Enable presubtract sources

The r300 compiler can now emit instructions that select from the presubtract
source. A peephole optimization has been added to convert instructions like:
ADD Temp[0].x, none.1, -Temp[1].x into the INV (1 - src0) presubtract
operation.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
cfc461fca6ad5656f58c48803d13052537063316 01-Sep-2010 Marek Olšák <maraeo@gmail.com> r300g: add a new debug option which disables compiler optimizations

Those are:
- dead-code elimination
- constant folding
- peephole (mainly copy propagation)
- register allocation

There are some bugs which I need to track down.

Also fix up the descriptions of all the debug options.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
f46fd041369a1c2c188cbd65918c900900724d37 01-Sep-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: make optimizations not use 0.5 swizzles in vertex shaders
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
3ba562e62af0db0318ecebb356d5a3c514f4d1c8 01-Sep-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: add new compiler parameter max_constants
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
56de72c78afdb14d842a8fabbe2613a4d5eebb8f 01-Sep-2010 Marek Olšák <maraeo@gmail.com> r300g: only check for an empty shader if there are no compile errors
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
313e95f0c792580f6051fedb67e65838405c88f8 01-Sep-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: add new compiler parameter max_alu_insts
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
0a21938de92a1f1e74be7c4559b03179bd657fcd 24-Aug-2010 Marek Olšák <maraeo@gmail.com> r300g: eliminate unused constants in FS
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
abae06ac85349a30996257f29f9c52c3f687d35d 23-Aug-2010 Marek Olšák <maraeo@gmail.com> r300g: eliminate unused constants in VS
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
2eeaf773fdd58c176f7cdbcd05b75ad3a5ecab4c 23-Aug-2010 Marek Olšák <maraeo@gmail.com> r300g: fix indentation
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
683ef52e19576f6e1263bc7d25fc9475c519eade 10-Aug-2010 Marek Olšák <maraeo@gmail.com> r300g: implement gl_FrontFacing
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
29b7d26401a77ee4f772233b003d942bba59bb63 09-Aug-2010 Marek Olšák <maraeo@gmail.com> r300g: do not print shader compiler errors by default
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
2824d5687a19e42ba0da8fd08e80610c4469a3b3 04-Aug-2010 Tom Stellard <tstellar@gmail.com> r300/compiler: r500 hw support for break and continue in loops.

The BGNLOOP and ENDLOOP instructions are now being used correctly, which
makes break and continue possible. The deadcode pass has been modified to
handle breaks, and the compiler is more careful about which loops are
unrolled.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
49330fc5ac13e25cb201e62995329cffaf5046f0 24-Jul-2010 Marek Olšák <maraeo@gmail.com> r300g: do not use TXPITCH_EN if the width is POT and the height is NPOT
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
d779a5d16ae6a17b3fc0c097f4eb477a80e54566 24-Jul-2010 Marek Olšák <maraeo@gmail.com> r300g: cleanup texture creation code

This decouples initializing a texture layout/miptree description
from an actual texture creation, it also partially unifies texture_create
and texture_from_handle.

r300_texture inherits r300_texture_desc, which inherits u_resource.

The CBZB clear criteria are moved to r300_texture_desc::cbzb_allowed[level].

And other minor cleanups.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
f381c52081b2cbff31c2f38abf16dffcc08f681c 19-Jun-2010 Tom Stellard <tstellar@gmail.com> r300/compiler: Use hardware flow control instructions for loops on r500.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
a2f14153cc2bcf0b2364e035dc788d65ea0fcd35 24-Jun-2010 Marek Olšák <maraeo@gmail.com> r300g: reorder and cleanup register writes everywhere
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
3da6487115216c47ce1be56b45be654ddb879d6f 13-Jun-2010 Marek Olšák <maraeo@gmail.com> r300g: turn fragment shader into a CB
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
5c067a63040cc66f0320f30482529a4ff1bd3811 26-May-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: move hardware caps to the radeon_compiler base struct

Needed for vertex shaders too.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
a650d7068a00f0a256ecb54112da0f4ab9204b86 23-May-2010 Marek Olšák <maraeo@gmail.com> r300g: extend compile error message
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
71584d0cc75dda3c579a2a0cb6c1ac9591f7d5c9 08-May-2010 Marek Olšák <maraeo@gmail.com> r300g: pass depth texture swizzle to the compiler if compare mode is enabled
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
78e881368b392d8a6945990c20493560fcd73231 08-May-2010 Marek Olšák <maraeo@gmail.com> r300g: respect compare mode regardless of sampler type
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
eb9dc2595f33f43e99c70dd69588f5573459fbca 08-May-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: generalize depth texture mode to support arbitrary swizzles
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
537d117ed57734d034560cc64fe1bed65a6375e3 26-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: use the dummy FS shader for shaders with zero instructions
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
411d5063323ccdb85ec090f1c852fcc8e9cd0e64 17-Apr-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: add emulation of all mirrored-clamp wrap modes for NPOT textures
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
80d89aa0d28ca987d958c1033eeb7e4a3c10368b 16-Apr-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: fix repeat wrap mode for TXP and NPOTs

No idea why st/mesa unnecessarily inserts TXP where TEX is sufficient.
Also re-enabling the NPOT fallback for repeat in r300g.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
17b41f80bd1e9306de625e4240e6d83c08eec7fd 15-Apr-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: kill off RC_WRAP_CLAMP

A variant thereof might be later reintroduced for the mirrored-clamp modes.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
6b46df961691a4cd5ebb155e29bd4f739b0a3840 15-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: disable the REPEAT NPOT fallback until it works

It causes regressions. I haven't tested the MIRROR wrap modes,
so not sure about that..
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
948ce60a267e8d4ef025816eeb7110d3e363c41a 15-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: do not use NPOT fallback for CLAMP wrap modes

These work just fine.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
6bd6f4cd4984e7afe7969e5dfe9796079c07b6bc 15-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: pick a new fragment shader when either a sampler state or view is changed
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
7d93f2bf8462948836491c004823feb7a1ce1445 15-Apr-2010 Dave Airlie <airlied@redhat.com> r300g: fix regression in texdepth.

texdepth stopped working when npot went in, this brings it back
to life.

< MostAwesomeDude> That looks like what I was going to do.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
d72f1c3b80f84e8bceb414439b679b3fe71ec5b9 14-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: fix possible crash when shader compilation fails

This hopefully fixes the crash in the FDO bug #27634, not the bug itself.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
6793506faa13c259b1f36fb4cbe21841f851e248 14-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: make setting up fragment depth output less hackish
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
36e0100e9e6afe7a00846514daffb8993dcc173e 14-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: kill off r300_fragment_shader::shadow_samplers and friends
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
d5af1dce8fc23dc3763773e3c0b7e0be128d2aa0 12-Apr-2010 Corbin Simpson <MostAwesomeDude@gmail.com> r300/compiler: Implement texcoord repeat and mirror for NPOT.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
f95ff1cf48a3da090dc999621f2d153af0c7db14 11-Apr-2010 Corbin Simpson <MostAwesomeDude@gmail.com> r300g: Setup external state for wrap modes.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
8f37f910bf9c3e34c6afc5a2ec8cc1828f792b16 11-Apr-2010 Corbin Simpson <MostAwesomeDude@gmail.com> r300g: Cleanup fragment program external state setup.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
34092c55d63e24a4f326bd9bb90765ea4ec7e17e 12-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: atomize fragment shader
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
953a309de9204490edcd011e700c06c7c25c0b9e 11-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: FS constants emission rework

* The constant buffer emission is separated from RC state variables emission.
* The immediates are emitted with FS code.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
69019afa67d66cf3e5d2b4d5b286bf2ac1bd87af 11-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: use a dummy replacement fragment shader if the shader compilation fails

Better than killing an application.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
146879284c6b844f35afe3a3ef3330726afbe8ac 11-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: revisit some assertions and fix potential failures

* Turn some assertions to error messages.
* At most 16 vertex elements can be set, others are ignored.
* Rasterize at most 8 vertex-shader generic outputs, others are ignored.
This includes fog and WPOS.
* Unknown shader semantic names are ignored.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
1c356ac95b6df0962dbd15311ff7e0ea172e1aea 11-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: cleanup handling of sampler views

The evolution of TX_FORMAT bits is as follows:
* When a texture is created, set bits independent of pipe_format.
* When a sampler view is created, add format-specific bits.
* When sampler states and views are getting merged, add min/max LOD.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
b71bfc4400e1d7c15a2bebbbd3b26a8770fbf546 05-Apr-2010 Marek Olšák <maraeo@gmail.com> r300g: simplify accessing screen from context
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
e41a64591bf1a74465bf0adc7d35c991c4cfb4fe 14-Feb-2010 Marek Olšák <maraeo@gmail.com> r300/compiler: make the max number of fragment shader temporaries adjustable
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
4b8d3480764daf45cbbc03d76cd8b7c81937f532 27-Mar-2010 Marek Olšák <maraeo@gmail.com> r300g: print errors even on non-debug builds

We really need to get these into bug reports.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
6f4a19ca562ccd7e4bc2f7ea32263391abaa16bd 07-Mar-2010 Marek Olšák <maraeo@gmail.com> r300g: abort if FS compilation fails on non-debug builds
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
d2ac3d5e79bdf5a32a2dca135403d963ac6c83e4 28-Feb-2010 Marek Olšák <maraeo@gmail.com> r300g: atomize texture and sampler states
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
229db2b8ade33571e4cece1d838234895db220c2 11-Feb-2010 Corbin Simpson <MostAwesomeDude@gmail.com> r300g: Work around "defect" in r300compiler.

r300compiler doesn't handle half swizzles for vert shaders, which don't
have them. So, for now, disable them.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
70f8aaa0c30c640d0cce7faea9402b4e53bbfff0 09-Feb-2010 Vinson Lee <vlee@vmware.com> r300g: Fix off-by-one errors in array bounds assertions.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
4769566500be1a53dd9b4cc1a613aef439a0e3d8 11-Nov-2009 Corbin Simpson <MostAwesomeDude@gmail.com> r300compiler, r300 classic, r300g: Add support for MRTs in the frag shader.

This maybe breaks the vert compiler. Hopefully not.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
bf60eb3fec844a7c3793aba0c70da56b74a17344 24-Dec-2009 Marek Olšák <maraeo@gmail.com> r300g: add WPOS
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
6ba83cd63f84a4d74dd679d62662d59533fd1bdb 16-Dec-2009 Marek Olšák <maraeo@gmail.com> r300g: add texture compare modes
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
f55c088f89eeaa6d16480f5f373887c6a2965e21 27-Nov-2009 Marek Olšák <maraeo@gmail.com> r300g: simplify allocations of FS input registers
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
cb90235135ef7c657053657f3bdfbda7ca70d708 26-Nov-2009 Marek Olšák <maraeo@gmail.com> r300g: clean up derived states

The state setups which aren't derived anymore have been moved to the VS
and FS objects.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
40247d87d215d0f1b6370b2888548544eedf0d89 22-Oct-2009 Corbin Simpson <MostAwesomeDude@gmail.com> r300g: Cleanup old static shader state.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
6a448a525baf81173f92ee8c3074b98baa54397b 21-Oct-2009 Corbin Simpson <MostAwesomeDude@gmail.com> r300g: Cleanup header includes.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
81e5188f66248424d54fcf1d85a81510694bd472 03-Oct-2009 Nicolai Hähnle <nhaehnle@gmail.com> r300g: Do not abort on fragment program compiler error

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
4b01e6f614052e48971f2b2ff474fb66afc4f752 06-Sep-2009 Nicolai Hähnle <nhaehnle@gmail.com> r300g: Debug flags infrastructure

So that debugging is no longer a full-spam-or-nothing approach, you are now
supposed to set the RADEON_DEBUG environment flag just like for classic Mesa.

The available debug flags are different, however. Just running an OpenGL
application with RADEON_DEBUG set to an arbitrary string will print out
helpful information.

Everything must be compiled with -DDEBUG for any of this to work
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
2cbd3fce8f6e97f85423f1b185f72e7fbc946e94 11-Aug-2009 Cooper Yuan <cooperyuan@gmail.com> r300g: a typo of debug message
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
d0c398a8e2985b855f923aec3470cef8734a622a 30-Jul-2009 Nicolai Hähnle <nhaehnle@gmail.com> r300g: Use radeon compiler for fragment programs

This is entirely untested on R500, and needs more testing on R300.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
07961bb05e5ba05205b9f53834863664f1023870 23-Jul-2009 Corbin Simpson <MostAwesomeDude@gmail.com> r300g: Actually mark shaders as translated/untranslated.

Also trust that Gallium will not give us TGSI that miscounts shader consts.

This creates a 20x speedup on glxgears, from 8 FPS to 160 FPS.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
fd31f92cea0ce8613a22d8f4b3c75b340bcc5689 22-Jul-2009 Keith Whitwell <keithw@vmware.com> gallium: simplify tgsi_full_immediate struct

Remove the need to have a pointer in this struct by just including
the immediate data inline. Having a pointer in the struct introduces
complications like needing to alloc/free the data pointed to, uncertainty
about who owns the data, etc. There doesn't seem to be a need for it,
and it is unlikely to make much difference plus or minus to performance.

Added some asserts as we now will trip up on immediates with more
than four elements. There were actually already quite a few such asserts,
but the >4 case could be used in the future to specify indexable immediate
ranges, such as lookup tables.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c
622858884fc5923c9e7a0c1bb0e80b53f0acb5a7 26-Jun-2009 Joakim Sindholt <opensource@zhasha.com> r300-gallium: organize fragment/vertex shaders

Appart from separating r3xx/r5xx fragment shaders, a more consistent
naming scheme has been applied. From now on:
r300 = all chips
r3xx = R300/R400 only
r5xx = R500 only
This way r300_fragment_shader is the master struct, and the structs
r3xx_fragment_shader and r5xx_fragment_shader inherits it.
/external/mesa3d/src/gallium/drivers/r300/r300_fs.c