summaryrefslogtreecommitdiff
path: root/src/mesa/shader
AgeCommit message (Collapse)Author
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.
2009-02-16mesa: remove old commentsBrian Paul
Note: the default value for EmitCondCodes is FALSE. This means the GLSL compiler will emit code like this: SEQ TEMP[0].x, A, B; IF TEMP[0].x; ... ENDIF But if EmitCondCodes is TRUE, condition codes will be used instead: SEQ.C TEMP[0].x, A, B; IF (NE.xxxx); ... ENDIF
2009-02-16glsl: silence some uninit var warningsBrian Paul
2009-02-11glsl: allow setting arrays of samplers in set_program_uniform()Brian Paul
Arrays of sampler vars haven't been tested much and might actually be broken. Will need to be revisited someday. Another fix for bug 20056.
2009-02-11glsl: raise GL_INVALID_OPERATION for glUniform(location < -1)Brian Paul
location = -1 is silently ignored, but other negative values should raise an error. Another fix for bug 20056.
2009-02-11glsl: rework _mesa_get_uniform[fi]v() to avoid using a fixed size ↵Brian Paul
intermediate array
2009-02-11glsl: fix glUniform() array bounds error checkingBrian Paul
If too many array elements are specified, they're to be silently ignored (don't raise a GL error). Fixes another issue in bug 20056.
2009-02-11glsl: fix incorrect size returned by glGetActiveUniform() for array elements.Brian Paul
Fixes one of the issues in bug 20056.
2009-02-11mesa: Use the stdio wrappers.José Fonseca
snprint symbol does not exist in Windows.
2009-02-09re-add MSAA supportBrian Paul
(cherry picked from commit f7d80aa00611917bc8ce637136d982b151b8f44f) This also involved adding the new MSAA fields to driCreateConfigs(). Also, re-add prog_instructions->Sampler field for i965 driver. Will have to revisit that.
2009-02-09mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul
Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
2009-02-06glsl: new MESA_GLSL env var for GLSL debugging featuresBrian Paul
Replaces the VERBOSE_GLSL, VERBOSE_GLSL_DUMP flags which only worked in debug builds. MESA_GLSL will work both in debug and non-debug builds. Also add facility to dump glUniform() calls to stdout.
2009-02-06mesa: tweak output of _mesa_write_shader_to_file()Brian Paul
Enclose GPU code in comments to the file can be re-fed back into GLSL compiler.