aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* glsl: rename GLSL texture assembly instructions to be more legibleBrian Paul2009-02-207-321/+327
|
* glsl: fix vec4_texp_rect IR code (need projective version)Brian Paul2009-02-201-1/+1
|
* glsl: asst improvements, clean-ups in set_program_uniform()Brian Paul2009-02-181-27/+36
| | | | | | 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.
* glsl: fix inequality in set_program_uniform()Brian Paul2009-02-181-1/+1
| | | | We were off by one when checking for too many uniform values.
* glsl: fix link failure for variable-indexed varying output arraysBrian Paul2009-02-181-0/+25
| | | | | | | | | | | | | | | 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.
* mesa: improved error msgBrian Paul2009-02-181-1/+2
|
* mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)Brian Paul2009-02-182-4/+21
| | | | | | | | 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.
* glsl: fix a swizzle-related regressionBrian Paul2009-02-181-1/+1
| | | | This new issue was exposed by commit 6eabfc27f19a10dfc2663e99f9560966ba1ff697
* glsl: fix mistake in a commentBrian Paul2009-02-171-1/+1
|
* glsl: fix an array indexing bugBrian Paul2009-02-171-10/+43
| | | | | This fixes a bug found with swizzled array indexes such as in "array[index.z]" where "index" is an ivec4.
* mesa: when printing/dumping instruction, include relative addressing infoBrian Paul2009-02-171-13/+11
| | | | Not all cases were handled before.
* mesa: remove old commentsBrian Paul2009-02-161-1/+1
| | | | | | | | | | | | | | | | | 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
* glsl: silence some uninit var warningsBrian Paul2009-02-162-2/+2
|
* glsl: allow setting arrays of samplers in set_program_uniform()Brian Paul2009-02-111-10/+19
| | | | | | | 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.
* glsl: raise GL_INVALID_OPERATION for glUniform(location < -1)Brian Paul2009-02-111-0/+10
| | | | | | | location = -1 is silently ignored, but other negative values should raise an error. Another fix for bug 20056.
* glsl: rework _mesa_get_uniform[fi]v() to avoid using a fixed size ↵Brian Paul2009-02-111-44/+59
| | | | intermediate array
* glsl: fix glUniform() array bounds error checkingBrian Paul2009-02-111-9/+21
| | | | | | | 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.
* glsl: fix incorrect size returned by glGetActiveUniform() for array elements.Brian Paul2009-02-111-8/+25
| | | | Fixes one of the issues in bug 20056.
* mesa: Use the stdio wrappers.José Fonseca2009-02-111-22/+22
| | | | snprint symbol does not exist in Windows.
* re-add MSAA supportBrian Paul2009-02-091-1/+1
| | | | | | | | | (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.
* mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul2009-02-0916-151/+186
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge commit 'origin/master' into gallium-0.2Alan Hourihane2009-01-222-0/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: windows/VC8/mesa/osmesa/osmesa.vcproj windows/VC8/progs/demos/gears.vcproj windows/VC8/progs/progs.sln
| * \ Merge commit 'origin/master' into gallium-0.2Alan Hourihane2009-01-165-10/+24
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/mesa/shader/slang/slang_compile.c
| * | | mesa: Fix merge conflictsJakob Bornecrantz2009-01-151-15/+0
| | | |
| * | | Merge commit 'origin/master' into gallium-0.2Alan Hourihane2009-01-1415-68/+260
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: docs/install.html docs/relnotes-7.3.html src/mesa/shader/slang/slang_codegen.c src/mesa/shader/slang/slang_compile.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_preprocess.c src/mesa/shader/slang/slang_preprocess.h
| * | | | glsl: fix regression from sampler arrays commitAlan Hourihane2009-01-141-3/+1
| | | | |
| * | | | glsl: fix a comment typoAlan Hourihane2009-01-131-1/+1
| | | | |
| * | | | glsl: support sampler arrays.Alan Hourihane2009-01-133-11/+49
| | | | |
| * | | | glsl: fix typo in the vec2 += operator functionBrian Paul2009-01-092-2/+2
| | | | |
| * | | | glsl: fix broken +=, -=, *=, /= operatorsBrian Paul2009-01-092-737/+786
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions need to return the final computed value. Now expressions such as a = (b += c) work properly. Also, no need to use __asm intrinsics in these functions. The resulting code is the same when using ordinary arithmetic operators and is more legible.
| * | | | mesa: fix off-by-one bug in _mesa_delete_instructions()Brian Paul2009-01-091-1/+1
| | | | |
| * | | | mesa: additional case in file_string()Brian Paul2009-01-091-0/+2
| | | | |
| * | | | glsl: pass GLcontext::Extension info down into GLSL preprocessorBrian Paul2009-01-093-35/+65
| | | | | | | | | | | | | | | | | | | | Now the #extension directives can be handled properly.
| * | | | glsl: bump up MAX_FOR_LOOP_UNROLL_COMPLEXITYBrian Paul2009-01-091-1/+1
| | | | |
| * | | | glsl: check that the fragment shader does not write both gl_FragColor and ↵Brian Paul2009-01-091-0/+11
| | | | | | | | | | | | | | | | | | | | gl_FragData[]
| * | | | glsl: disable some unused functions (but don't remove just yet)Brian Paul2009-01-091-1/+8
| | | | |
| * | | | glsl: also unroll loops with variable declarations such as "for (int i = 0; ..."Brian Paul2009-01-091-24/+58
| | | | |
| * | | | glsl: remove dead codeBrian Paul2009-01-091-13/+2
| | | | |
| * | | | glsl: loop unroll adjustmentsBrian Paul2009-01-091-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a "max complexity" heuristic to allow unrolling long loops with small bodies and short loops with large bodies. The loop unroll limits may need further tweaking...
| * | | | glsl: implement loop unrolling for simple 'for' loopsBrian Paul2009-01-091-24/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loops such as this will be unrolled: for (i = 0; i < 4; ++i) { body; } where 'body' isn't too large. This also helps to fix the issue reported in bug #19190. The problem there is indexing vector types with a variable index. For example: vec4 v; v[2] = 1.0; // equivalent to v.z = 1.0 v[i] = 2.0; // variable index into vector!! Since the for-i loop can be unrolled, we can avoid the problems associated with variable indexing into a vector (at least in this case).
| * | | | mesa: Move var declaration to top of scope.Brian Paul2009-01-091-0/+8
| | | | | | | | | | | | | | | | | | | | (cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1)
| * | | | mesa: Add _mesa_snprintf.José Fonseca2009-01-083-7/+7
| | | | | | | | | | | | | | | | | | | | On Windows snprintf is renamed as _snprintf.
| * | | | mesa: Move var declaration to top of scope.José Fonseca2009-01-081-1/+1
| | | | |