summaryrefslogtreecommitdiff
path: root/src/mesa/shader
AgeCommit message (Collapse)Author
2010-02-17glsl: Silence unused value warning.Vinson Lee
2010-02-15mesa: Remove pointless comparison of unsigned integer with a negative constant.Vinson Lee
2010-02-14glsl: use new program cloning functionsBrian Paul
2010-02-14mesa: added _mesa_clone_vertex/fragment_program()Brian Paul
To reduce casting elsewhere...
2010-02-13mesa: Fix compiler warningsKarl Schultz
Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio.
2010-02-13glsl: implement layout qualifiersBrian Paul
For GL_ARB_fragment_coord_conventions. This only applies to gl_FragCoord and controls pixel center origin and pixel center integer. For example: layout (origin_upper_left, pixel_center_integer) varying vec4 gl_FragCoord; This features introduces the idea of re-declaring variables with a changed type. This may also apply to arrays in some cases but that's not implemented at this time.
2010-02-13glsl: added type layout field and new type compare funcBrian Paul
Note: because of a weird dependency checking bug, a 'make clean' may be needed before recompiling.
2010-02-13mesa: copy frag coord layout fields tooBrian Paul
2010-02-10scons: User friendly message for code generated filesJosé Fonseca
2010-02-10Simplify GLSL extension mechanism.Michal Krol
Since extension name and extension name string are the same, collapse them into one name.
2010-02-10glsl: GLSL extensions have the GL_ prefixBrian Paul
Both the #extension directive name and the preprocessor symbol start with the GL_ prefix. For example: ... New glean/glsl1 tests have been added to test the #extension feature.
2010-02-09Merge branch 'gallium-nopointsizeminmax'Roland Scheidegger
Conflicts: src/gallium/drivers/nv10/nv10_state.c src/gallium/drivers/nv20/nv20_state.c src/gallium/drivers/nv50/nv50_program.c
2010-02-09mesa: add back-door support for cylindrical texture wrap modeBrian Paul
If the texture priority field is 0.125 set the PROG_PARAM_BIT_CYL_WRAP flag. The gallium state tracker will look for this flag. This feature is only for testing purposes and may be remove at some point. But if it's useful we could write a GL/Mesa extension to expose it properly.
2010-02-05mesa: debug output for ARLBrian Paul
2010-02-04mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul
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.
2010-02-04gallium: add point size clamp to implementation limits in vertex shaderRoland Scheidegger
The point size min/max registers (unused by mesa state tracker) were removed since most hardware couldn't do much with them. However, we don't want to have to rely on hw to do point size clamping correctly to implementation dependent limits, hence have to do that in the vertex shader. This should also solve a potential problem with (non-AA) points smaller than 1.0 which according to OGL still have size 1.0. Note that OGL point rendering is odd, in particular point sprites are rasterized differently to points. Some hardware might support those different modes, but in any case the different clamping values used for smooth/multisampled/sprite enabled points might help a bit for hw which rasterizes points the same as point sprites. Also tweak mesa's ff to vertex shader translation so don't have to clamp twice in case of point attenuation.
2010-02-03mesa: check/clamp texture/program matrix accessesBrian Paul
Further testing should reveal if any these assertions are hit...
2010-02-01mesa: change _mesa_find_free_register() to find multiple free regsBrian Paul
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)
2010-02-01mesa: added _mesa_print_vp/p_inputs() functions (debug aids)Brian Paul
2010-01-27mesa: fix double->float assignment warnings, int/uint comparison warningsBrian Paul
Reported by Karl Schultz.
2010-01-22mesa: use memcpy() in _mesa_ProgramEnv/LocalParameters4fvEXT()Brian Paul
2010-01-22mesa: use switch in _mesa_DeletePrograms()Brian Paul
2010-01-22Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/shader/prog_execute.c
2010-01-22mesa: re-implement _mesa_ProgramEnvParameter4fvARB() with memcpy()Brian Paul
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).
2010-01-22mesa: use new fetch_vector1ui() function for 'unpack' GPU instructionsBrian Paul
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).
2010-01-22Merge branch 'mesa_7_7_branch'Brian Paul
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
2010-01-22mesa: Add "shader/" path to #include statements in shader parser/lexer sourcesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Note sure why the compiler's -I paths aren't doing the job, but this is OK. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-21mesa: support for GL_ARB_fragment_coord_conventionsLuca Barbieri
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-16mesa: Remove unnecessary headers from arbprogparse.c.Vinson Lee
2010-01-16mesa: Remove unnecessary header from nvvertparse.c.Vinson Lee
2010-01-16glsl: Remove unnecessary header from prog_execute.c.Vinson Lee
2010-01-16glsl: Remove unnecessary header from prog_statevars.c.Vinson Lee
2010-01-16glsl: Remove unnecessary headers from shader_api.c.Vinson Lee
2010-01-16glsl: Remove unnecessary header from slang_emit.c.Vinson Lee
2010-01-16glsl: Remove unnecessary header from slang_builtin.c.Vinson Lee
2010-01-16glsl: Remove unnecessary headers from slang_compile.c.Vinson Lee
2010-01-16glsl: Remove unnecessary header from slang_link.c.Vinson Lee
2010-01-16glsl: Remove unnecessary header from slang_log.c.Vinson Lee
2010-01-08Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/i965/brw_wm_emit.c
2010-01-06mesa: test index bounds before array elementRoel Kluin
Check whether the index is within bounds before accessing the array. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-06Merge remote branch 'origin/mesa_7_7_branch'José Fonseca
Conflicts: configs/default src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/mesa/main/version.h
2010-01-05ARB prog parser: regenerated parser fileBrian Paul
2010-01-05ARB prog parser: fix parameter binding typeBrian Paul
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.
2010-01-05ARB prog parser: regenerated parser filesBrian Paul
2010-01-05ARB prog parser: add allowSwizzle param to initialize_symbol_from_const()Brian Paul
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.
2010-01-05mesa: whitespace changes and commentsBrian Paul
2010-01-05mesa: change constant search behaviour in _mesa_add_unnamed_constant()Brian Paul
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.
2010-01-04Merge branch 'mesa_7_7_branch'Brian Paul
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
2010-01-04glsl: use varName variable in _slang_gen_assignment()Brian Paul
2010-01-01ARB prog parser: Silence unused variable warnings.Vinson Lee