summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
* mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul2010-02-044-12/+36
| | | | | | | | | | | | | GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
* mesa: check/clamp texture/program matrix accessesBrian Paul2010-02-031-2/+6
| | | | Further testing should reveal if any these assertions are hit...
* mesa: change _mesa_find_free_register() to find multiple free regsBrian Paul2010-02-013-29/+62
| | | | | | | | | | | | | | | | | Before, _mesa_find_free_register() would scan the given shader to find a free/unused register of the given type. But subsequent calls would return the same register again. This caused a failure in the _mesa_remove_output_reads() function which sometimes needs several free temps. Now use a new function which build a vector of 'used' flags and another function which searches that vector for an unused register starting at a position that's incremented for each call. Fixes fd.o bug 26317. Note that a regression test for this has been added to the glean/glsl1 test. (cherry picked from commit e0d01c9d7f46ccd531f8dd1a04c5ac067200ef1e)
* mesa: added _mesa_print_vp/p_inputs() functions (debug aids)Brian Paul2010-02-012-0/+47
|
* mesa: fix double->float assignment warnings, int/uint comparison warningsBrian Paul2010-01-276-14/+14
| | | | Reported by Karl Schultz.
* mesa: use memcpy() in _mesa_ProgramEnv/LocalParameters4fvEXT()Brian Paul2010-01-221-15/+5
|
* mesa: use switch in _mesa_DeletePrograms()Brian Paul2010-01-221-7/+8
|
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-222-32/+73
|\ | | | | | | | | | | Conflicts: src/mesa/shader/prog_execute.c
| * mesa: re-implement _mesa_ProgramEnvParameter4fvARB() with memcpy()Brian Paul2010-01-221-3/+30
| | | | | | | | | | | | | | | | | | This is faster and ensures that NaN floats get stored properly. Before, NaN values (which might be used with UP2H, UP2US, UP4B and UP4UB) weren't getting stored properly with gcc -O3. This is the second part of the fix for the piglit fp-unpack-01 failure (bug 25973).
| * mesa: use new fetch_vector1ui() function for 'unpack' GPU instructionsBrian Paul2010-01-221-24/+42
| | | | | | | | | | | | | | The UP2H, UP2US, UP4B and UP4UB instructions interpret the float registers as integers. With gcc -O3 some bits were getting mixed up somewhere. This is part of the fix for the piglit fp-unpack-01 test failure (bug 25973).
* | Merge branch 'mesa_7_7_branch'Brian Paul2010-01-2210-14/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
| * mesa: Remove unnecessary headers from arbprogparse.c.Vinson Lee2010-01-161-3/+0
| |
| * mesa: Remove unnecessary header from nvvertparse.c.Vinson Lee2010-01-161-1/+0
| |
| * glsl: Remove unnecessary header from prog_execute.c.Vinson Lee2010-01-161-1/+0
| |
| * glsl: Remove unnecessary header from prog_statevars.c.Vinson Lee2010-01-161-1/+0
| |
| * glsl: Remove unnecessary headers from shader_api.c.Vinson Lee2010-01-161-2/+0
| |
| * glsl: Remove unnecessary header from slang_emit.c.Vinson Lee2010-01-161-1/+0
| |
| * glsl: Remove unnecessary header from slang_builtin.c.Vinson Lee2010-01-161-1/+0
| |
| * glsl: Remove unnecessary headers from slang_compile.c.Vinson Lee2010-01-161-3/+0
| |
| * glsl: Remove unnecessary header from slang_link.c.Vinson Lee2010-01-161-1/+0
| |
| * glsl: Remove unnecessary header from slang_log.c.Vinson Lee2010-01-161-1/+0
| |
* | mesa: Add "shader/" path to #include statements in shader parser/lexer sourcesAlan Coopersmith2010-01-224-26/+26
| | | | | | | | | | | | | | | | Signed-off-by: Alan Coopersmith <[email protected]> Note sure why the compiler's -I paths aren't doing the job, but this is OK. Signed-off-by: Brian Paul <[email protected]>
* | mesa: support for GL_ARB_fragment_coord_conventionsLuca Barbieri2010-01-213-0/+16
| | | | | | | | Signed-off-by: Brian Paul <[email protected]>
* | Merge branch 'mesa_7_7_branch'Brian Paul2010-01-082-2/+2
|\| | | | | | | | | | | Conflicts: src/mesa/drivers/dri/i965/brw_wm_emit.c
| * mesa: test index bounds before array elementRoel Kluin2010-01-062-2/+2
| | | | | | | | | | | | | | Check whether the index is within bounds before accessing the array. Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* | Merge remote branch 'origin/mesa_7_7_branch'José Fonseca2010-01-065-301/+319
|\| | | | | | | | | | | | | Conflicts: configs/default src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/mesa/main/version.h
| * ARB prog parser: regenerated parser fileBrian Paul2010-01-051-2/+5
| |
| * ARB prog parser: fix parameter binding typeBrian Paul2010-01-051-2/+5
| | | | | | | | | | | | | | | | | | | | References to program local and enviroment parameters are put into the unified program parameters list as PROGRAM_STATE_VAR entries which point into the local or environment arrays. So the param_binding_type field should be PROGRAM_STATE_VAR. This fixes the piglit vpfp-generic vp-arl-env-array.vpfp and vp-arl-local-array.vpfp test failures.
| * ARB prog parser: regenerated parser filesBrian Paul2010-01-052-275/+285
| |
| * ARB prog parser: add allowSwizzle param to initialize_symbol_from_const()Brian Paul2010-01-051-8/+14
| | | | | | | | | | | | | | | | We need to disable constant consolidation when building an array of constants which might be indexed indirectly. Fixes regression in piglit vpfp-generic vp-arl-constant-array.vpfp test caused by earlier constant consolidation patch.
| * mesa: whitespace changes and commentsBrian Paul2010-01-051-10/+6
| |
| * mesa: change constant search behaviour in _mesa_add_unnamed_constant()Brian Paul2010-01-051-4/+4
| | | | | | | | | | | | Only search for an existing, matching constant if swizzleOut is non-null. We need to be able to disable constant consolidation when building an array of constants which will be indexed indirectly.
* | Merge branch 'mesa_7_7_branch'Brian Paul2010-01-042-3/+8
|\| | | | | | | | | | | | | | | | | Conflicts: docs/relnotes.html src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/r300/r300_cs.h src/mesa/drivers/dri/i965/brw_wm_surface_state.c src/mesa/main/enums.c
| * glsl: use varName variable in _slang_gen_assignment()Brian Paul2010-01-041-3/+4
| |
| * ARB prog parser: Silence unused variable warnings.Vinson Lee2010-01-011-0/+4
| |
* | Merge branch 'mesa_7_7_branch'Brian Paul2009-12-318-295/+390
|\| | | | | | | | | | | | | | | Conflicts: configs/darwin src/gallium/auxiliary/util/u_clear.h src/gallium/state_trackers/xorg/xorg_exa_tgsi.c src/mesa/drivers/dri/i965/brw_draw_upload.c
| * glsl: added uniform initializer checkBrian Paul2009-12-293-0/+12
| | | | | | | | | | | | | | | | | | GLSL 1.10 disallows initializers for uniforms but GLSL 1.20 and later allows them. This patch uses the #version directive to allow/disallow uniform initializers. This addresses bug 25807, but piglit also needs to be fixed to specify the GLSL version in the shader.
| * ARB prog parser: use _mesa_add_unnamed_constant() to use fewer constant slotsBrian Paul2009-12-294-295/+377
| | | | | | | | | | | | | | | | | | This function will search the constant parameters in an effort to re-use constant slots. For example, {1,2,3,4} and {4,1,1,2} can be stored in one constant slot and accessed with different swizzles. The swizzle info must be propogated though the parsing code in a few places. Fixes Piglit "vpfp-generic tests/shaders/generic/big-param.vpfp" failure.
| * Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul2009-12-271-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/util/u_network.c src/gallium/auxiliary/util/u_network.h src/gallium/drivers/i915/i915_state.c src/gallium/drivers/trace/tr_rbug.c src/gallium/state_trackers/vega/bezier.c src/gallium/state_trackers/vega/vg_context.c src/gallium/state_trackers/xorg/xorg_crtc.c src/gallium/state_trackers/xorg/xorg_driver.c src/gallium/winsys/xlib/xlib_brw_context.c src/mesa/main/mtypes.h
| | * glsl: Initialize member a_obj of struct slang_operation.Vinson Lee2009-12-231-0/+1
| | |
| | * mesa: Include <unistd.h> only when one is available.Michal Krol2009-12-212-0/+8
| | | | | | | | | | | | (cherry picked from commit 970823978c2f7d2cf0757aa6ddbd6289b34c476f)
* | | mesa: remove gratuitous stores I added in remove_instructions.Eric Anholt2009-12-281-1/+0
| | |
* | | Merge branch 'mesa_7_7_branch'Brian Paul2009-12-271-3/+5
|\| |
| * | mesa: fix binary() function, printf format stringBrian Paul2009-12-221-3/+5
| | | | | | | | | | | | | | | Need to use the constant 1ULL and 0xllx format string. This fixes incorrect results and a NULL pointer/parameter bug.
* | | mesa: Fix a NULL deref in glDeleteFragmentShaderATI(badname);Eric Anholt2009-12-221-3/+5
| | | | | | | | | | | | Fixes piglit ati-fs-bad-delete. Caught by clang.
* | | mesa: adjust OPCODE_IF/ELSE BranchTarget fields to point to ELSE/ENDIF instr.Brian Paul2009-12-222-7/+25
| | | | | | | | | | | | This is a little more logical. Suggested in bug report 25654.
* | | mesa: adjust BRK/CONT BranchTarget to always point to ENDLOOP instructionBrian Paul2009-12-222-6/+20
| | | | | | | | | | | | To be more consistant.
* | | mesa: added some assertions in BNGLOOP/ENDLOOP casesBrian Paul2009-12-221-0/+4
| | |
* | | glsl: assorted clean-ups in slang_compile.cBrian Paul2009-12-211-36/+9
| | |
* | | Merge branch 'mesa_7_7_branch'Brian Paul2009-12-212-11/+14
|\| | | | | | | | | | | | | | | | | Conflicts: src/mesa/main/version.h src/mesa/state_tracker/st_atom_shader.c