aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
...
* mesa: fix parameter counting in ARB vertex/fragment program parsingBrian Paul2009-04-031-5/+2
| | | | Duplicated unnamed constants were getting counted more than once.
* mesa: replace >= with > when testing if we've exceeded max local paramsBrian Paul2009-04-031-2/+2
| | | | Now a program that uses 256 locals works as it should.
* mesa: for OPCODE_LIT, use _mesa_pow() instead of exp() and log()Brian Paul2009-04-031-2/+2
| | | | Also, s/pow/_mesa_pow/
* mesa: rename some gl_light fields to be clearerBrian Paul2009-04-031-2/+2
| | | | | EyeDirection -> SpotDirection _NormDirection -> _NormSpotDirection
* mesa: replace assertion with conditional in _mesa_opcode_string()Brian Paul2009-04-031-2/+4
|
* mesa: clean up formatting and use 'return' instead of 'break' consistantlyBrian Paul2009-04-031-51/+67
|
* glsl: fix segfault in linker when vertex or fragment shader was missingBrian Paul2009-04-021-9/+14
|
* glsl: implement compiling/linking of separate compilation unitsBrian Paul2009-04-015-23/+138
| | | | | | | | | A shader program may consist of multiple shaders (source code units). If we find there are unresolved functions after compiling the unit that defines main(), we'll concatenate all the respective vertex or fragment shaders then recompile. This isn't foolproof but should work in most cases.
* mesa: use correct tex unit lod bias for TXB instructionBrian Paul2009-04-011-2/+2
|
* glsl: fix texgen state variable tokens in emit_statevars()Brian Paul2009-04-011-8/+16
| | | | | This fixes broken variable indexing into the gl_Eye/ObjectPlaneS/T/R/Q arrays. See bug 20986.
* mesa: minor tweaks in append_token() for printing state var stringsBrian Paul2009-04-011-8/+8
|
* slang: ensure structure elements have their array length setAlan Hourihane2009-03-251-0/+1
|
* mesa: add new internal state var for window sizeBrian Paul2009-03-202-0/+14
| | | | Actually, window width - 1, height - 1
* mesa: linear scan register allocation for shader programsBrian Paul2009-03-201-21/+407
| | | | | | | | | | | | | | This is a check-point commit; not turned on yet. Use the linear scan register allocation algorithm to re-allocate temporary registers. This is done by computing the live intervals for registers and reallocating temps with that information. For some shaders this dramatically reduces the number of temp registers needed. For the time being we give up on a few cases such as relative-indexed temps and subroutine calls (but we inline most GLSL functions anyway).
* slang: Use _mesa_snprintf() wrapper.Michal Krol2009-03-201-1/+1
|
* slang: initialize the contextAlan Hourihane2009-03-191-2/+3
|
* slang: support uniform arraysAlan Hourihane2009-03-191-1/+13
|
* glsl: change GLSL #pragma initializationBrian Paul2009-03-193-14/+22
| | | | | | Initialize the shader's pragma settings before calling the compiler. Added pragma "Ignore" fields to allow overriding the #pragma directives found in shader source code.
* glsl: when debug pragma is on, emit comments about function calls/inlinesBrian Paul2009-03-193-0/+13
| | | | BTW, the debug pragma syntax is "#pragma debug(on)"
* slang: if/else/break & if/else/continue work for unrolled loopsAlan Hourihane2009-03-192-7/+38
|
* slang: redo the last commit for if/break & if/continue tests as itAlan Hourihane2009-03-181-1/+8
| | | | wasn't good enough for deeply nested if's.
* Revert "slang: if we detect an if/break or if/continue within a loop and we're"Alan Hourihane2009-03-181-28/+17
| | | | This reverts commit 752296b8f311c5e3844f3ce89d17ba57224ce5ba.
* slang: if we detect an if/break or if/continue within a loop and we'reAlan Hourihane2009-03-181-17/+28
| | | | trying to unroll, bail, and fallback to doing the real loop.
* mesa: update/fix doxygen commentsVinson Lee2009-03-172-2/+2
|
* mesa: Silence compiler warnings.Michal Krol2009-03-161-0/+1
|
* mesa: glUseProgram() debug code (disabled)Brian Paul2009-03-131-0/+11
|
* mesa: add support for ATI_envmap_bumpmapRoland Scheidegger2009-03-122-0/+30
| | | | | | | | add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
* mesa: remove some last remnants of GL_MESA_program_debugBrian Paul2009-03-112-12/+6
|
* glsl: remove _slang_attach_storage() functionBrian Paul2009-03-101-52/+21
| | | | | | | | | This was used to handle both variable declarations and references to variables. Instead, just do storage allocation and assignment for declarations and references, respectively. This is a step toward better var/uniform allocation (only allocate storage for vars/uniforms that are actually referenced by the code).
* glsl: some clean-ups, remove old assertions, add new assertionsBrian Paul2009-03-101-7/+6
|
* glsl: remove stray/unneeded totalSize assignmentBrian Paul2009-03-101-1/+1
|
* mesa: fix dumb sizeof() vs. strlen() mix-upBrian Paul2009-03-101-1/+1
|
* glsl: fix typo: s/vec4_tex1d_proj/vec4_tex_1d_proj/Brian Paul2009-03-102-24/+24
| | | | This regression came from commit c0b59420eec5ffdf22a5919d38851c3620b97c09.
* mesa: gl_register_file enum typedefBrian Paul2009-03-0711-43/+43
|
* mesa: remove GL_MESA_program_debug extensionBrian Paul2009-03-077-365/+0
| | | | This was never fully fleshed out and hasn't been used.
* glsl: call the program optimizerBrian Paul2009-03-061-0/+5
| | | | This still needs more testing bug glean and Mesa GLSL tests seem OK.
* mesa: add new program optimizer codeBrian Paul2009-03-062-0/+460
| | | | This is pretty simplistic for now, but helps with certain shaders.
* mesa: added some assertionsBrian Paul2009-03-051-0/+2
|
* mesa: when printing src regs, use |reg| for absolute valueBrian Paul2009-03-051-7/+16
| | | | And check opcode number to avoid crashing on driver-private opcodes.
* mesa: include mfeatures.hBrian Paul2009-03-041-0/+3
| | | | See bug 20319.
* mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul2009-02-288-51/+28
| | | | | | | s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
* mesa: update fragResults array in arb_output_attrib_string()Brian Paul2009-02-271-1/+12
| | | | Plus add some comments.
* mesa: replace old prog_instruction::Sampler field with Aux fieldBrian Paul2009-02-261-8/+3
| | | | | | The i965 driver needs an extra instruction field for color output information. It was using the Sampler field for this. Use the Aux field instead. This will probaby be revisited at some point...
* glsl: silence warningBrian Paul2009-02-241-1/+1
|
* glsl: yet another swizzled expression fixBrian Paul2009-02-231-2/+5
| | | | This fixes swizzled conditional expressions such "(b ? p : q).x"
* glsl: fix another swizzle-related bugBrian Paul2009-02-231-13/+8
| | | | | | | This fixes the case of "infinitely" nested swizzles such as EXPR.wzyx.yxwz.xxyz This doesn't appear in typical shaders but with function inlining and the compiler's internal use of swizzles it can happen. New glean glsl1 test case added for this.
* mesa: re-org texgen stateBrian Paul2009-02-211-8/+8
| | | | New gl_texgen struct allows quite a bit of code reduction.
* glsl: use new IR opcodes for TEX instructions with shadow comparisonBrian Paul2009-02-2011-171/+213
| | | | | | Such TEX instructions will have the TexShadow flag set. The gl_program::ShadowSamplers field is now set in the linker. We missed that before.
* mesa: add TexShadow field to prog_instructionBrian Paul2009-02-203-0/+8
| | | | | If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if the instruction is a texture fetch with shadow compare.
* mesa: freshen-up comments, move some fields in prog_instructionBrian Paul2009-02-201-25/+15
|