summaryrefslogtreecommitdiff
path: root/src/mesa/shader
AgeCommit message (Collapse)Author
2009-03-25slang: ensure structure elements have their array length setAlan Hourihane
2009-03-20mesa: add new internal state var for window sizeBrian Paul
Actually, window width - 1, height - 1
2009-03-20mesa: linear scan register allocation for shader programsBrian Paul
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).
2009-03-20slang: Use _mesa_snprintf() wrapper.Michal Krol
2009-03-19slang: initialize the contextAlan Hourihane
2009-03-19slang: support uniform arraysAlan Hourihane
2009-03-19glsl: change GLSL #pragma initializationBrian Paul
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.
2009-03-19glsl: when debug pragma is on, emit comments about function calls/inlinesBrian Paul
BTW, the debug pragma syntax is "#pragma debug(on)"
2009-03-19slang: if/else/break & if/else/continue work for unrolled loopsAlan Hourihane
2009-03-18slang: redo the last commit for if/break & if/continue tests as itAlan Hourihane
wasn't good enough for deeply nested if's.
2009-03-18Revert "slang: if we detect an if/break or if/continue within a loop and we're"Alan Hourihane
This reverts commit 752296b8f311c5e3844f3ce89d17ba57224ce5ba.
2009-03-18slang: if we detect an if/break or if/continue within a loop and we'reAlan Hourihane
trying to unroll, bail, and fallback to doing the real loop.
2009-03-17mesa: update/fix doxygen commentsVinson Lee
2009-03-16mesa: Silence compiler warnings.Michal Krol
2009-03-13mesa: glUseProgram() debug code (disabled)Brian Paul
2009-03-12mesa: add support for ATI_envmap_bumpmapRoland Scheidegger
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)
2009-03-11mesa: remove some last remnants of GL_MESA_program_debugBrian Paul
2009-03-10glsl: remove _slang_attach_storage() functionBrian Paul
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).
2009-03-10glsl: some clean-ups, remove old assertions, add new assertionsBrian Paul
2009-03-10glsl: remove stray/unneeded totalSize assignmentBrian Paul
2009-03-10mesa: fix dumb sizeof() vs. strlen() mix-upBrian Paul
2009-03-10glsl: fix typo: s/vec4_tex1d_proj/vec4_tex_1d_proj/Brian Paul
This regression came from commit c0b59420eec5ffdf22a5919d38851c3620b97c09.
2009-03-07mesa: gl_register_file enum typedefBrian Paul
2009-03-07mesa: remove GL_MESA_program_debug extensionBrian Paul
This was never fully fleshed out and hasn't been used.
2009-03-06glsl: call the program optimizerBrian Paul
This still needs more testing bug glean and Mesa GLSL tests seem OK.
2009-03-06mesa: add new program optimizer codeBrian Paul
This is pretty simplistic for now, but helps with certain shaders.
2009-03-05mesa: added some assertionsBrian Paul
2009-03-05mesa: when printing src regs, use |reg| for absolute valueBrian Paul
And check opcode number to avoid crashing on driver-private opcodes.
2009-03-04mesa: include mfeatures.hBrian Paul
See bug 20319.
2009-02-28mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul
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).
2009-02-27mesa: update fragResults array in arb_output_attrib_string()Brian Paul
Plus add some comments.
2009-02-26mesa: replace old prog_instruction::Sampler field with Aux fieldBrian Paul
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...
2009-02-24glsl: silence warningBrian Paul
2009-02-23glsl: yet another swizzled expression fixBrian Paul
This fixes swizzled conditional expressions such "(b ? p : q).x"
2009-02-23glsl: fix another swizzle-related bugBrian Paul
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.
2009-02-21mesa: re-org texgen stateBrian Paul
New gl_texgen struct allows quite a bit of code reduction.
2009-02-20glsl: use new IR opcodes for TEX instructions with shadow comparisonBrian Paul
Such TEX instructions will have the TexShadow flag set. The gl_program::ShadowSamplers field is now set in the linker. We missed that before.
2009-02-20mesa: add TexShadow field to prog_instructionBrian Paul
If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if the instruction is a texture fetch with shadow compare.
2009-02-20mesa: freshen-up comments, move some fields in prog_instructionBrian Paul
2009-02-20glsl: rename GLSL texture assembly instructions to be more legibleBrian Paul
2009-02-20glsl: fix vec4_texp_rect IR code (need projective version)Brian Paul
2009-02-18glsl: asst improvements, clean-ups in set_program_uniform()Brian Paul
Move the is_boolean/integer_type() calls out of the loops. Move the is_sampler_type() function near the bool/int functions. Add a bunch of comments.
2009-02-18glsl: fix inequality in set_program_uniform()Brian Paul
We were off by one when checking for too many uniform values.
2009-02-18glsl: fix link failure for variable-indexed varying output arraysBrian Paul
If the vertex shader writes to a varying array with a variable index, mark all the elements of that array as being written. For example, if the vertex shader does: for (i = 0; i < 4; i++) gl_TexCoord[i] = expr; Mark all texcoord outputs as being written, not just the first. Linking will fail if a fragment shader tries to read an input that's not written by the vertex shader. Before this fix, this linker test could fail.
2009-02-18mesa: improved error msgBrian Paul
2009-02-18mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)Brian Paul
Old limit was 256. Note that no arrays are declared to this size. The only place we have to be careful about raising this limit is the prog_src/dst_register Index bitfields. These have been bumped up too. Added assertions to check we don't exceed the bitfield in the future too.
2009-02-18glsl: fix a swizzle-related regressionBrian Paul
This new issue was exposed by commit 6eabfc27f19a10dfc2663e99f9560966ba1ff697
2009-02-17glsl: fix mistake in a commentBrian Paul
2009-02-17glsl: fix an array indexing bugBrian Paul
This fixes a bug found with swizzled array indexes such as in "array[index.z]" where "index" is an ivec4.
2009-02-17mesa: when printing/dumping instruction, include relative addressing infoBrian Paul
Not all cases were handled before.