summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang
AgeCommit message (Collapse)Author
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-04glsl: use varName variable in _slang_gen_assignment()Brian Paul
2009-12-29glsl: added uniform initializer checkBrian Paul
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.
2009-12-27Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul
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
2009-12-23glsl: Initialize member a_obj of struct slang_operation.Vinson Lee
2009-12-21Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul
Conflicts: configure.ac progs/demos/morph3d.c progs/demos/textures.c progs/glsl/shtest.c progs/glsl/texaaline.c progs/tests/packedpixels.c progs/xdemos/corender.c src/mesa/main/version.h
2009-12-18glsl: clear out shader code before compilingBrian Paul
When we start compiling a shader, first free the existing gl_program. This (mostly) fixes the piglit glsl-reload-source test. Without this change, we were actually appending the new GPU code onto the previous program.
2009-12-16mesa: remove //-style commentsBrian Paul
2009-12-12glsl: Initialize member label of struct slang_operation to NULL.Vinson Lee
2009-12-10glsl: Increase size of array in_slang_lookup_constant from 4 to 16.Vinson Lee
For some cases, _mesa_GetIntegerv reads up to params[15].
2009-12-10glsl: Fix array out-of-bounds access by _slang_lookup_constant.Vinson Lee
2009-12-09glsl: Remove unused member x from struct slang_operation.Vinson Lee
2009-10-27glsl: fix memory leakBrian Paul
A slightly modified version of a patch from Vinson Lee.
2009-10-01glsl: fix mem leakBrian Paul
2009-09-29glsl: regenerated fileBrian Paul
2009-09-29glsl: rewrite sqrt(x) intrinsic to handle x=0Brian Paul
Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a divide by zero if x=0 and wind up with unpredictable results. Now use CMP instruction to test for x<=0 and return zero in that case.
2009-09-29glsl: add support for CMP instructionBrian Paul
2009-09-24glsl: init var to silence warningBrian Paul
2009-09-24glsl: fix missing initializers warningBrian Paul
2009-09-15Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-14glsl: remove extra #version directives from concatenated shader sourcesBrian Paul
When we concatenate shaders to do our form of poor-man linking, if there's multiple #version directives, preprocessing fails. This change disables the extra #version directives by changing the first two chars to //. This should help with some Wine issues such as bug 23946.
2009-08-25glsl: update a texture/sampler commentBrian Paul
2009-08-24glsl: Silence gcc uninitialized variable warning.Vinson Lee
2009-08-24glsl: Silence gcc uninitialized variable warning.Vinson Lee
2009-08-13glsl: fix incorrect attribute sizeBrian Paul
2009-08-12glsl: remove duplicate frag input entryBrian Paul
2009-08-12Merge branch 'new-frag-attribs'Brian Paul
This branch introduces new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs for GLSL gl_FrontFacing and gl_PointCoord. Before, these attributes were packed with the FOG attribute. That made things complicated elsewhere.
2009-08-12glsl: add gl_Vertex, gl_Normal, etc to list of active attributesBrian Paul
If a vertex shader uses gl_Vertex, gl_Normal, etc, we need to include them when the user queries the list of active attributes. Before this we were just including the user-defined attributes.
2009-08-12glsl: move predefined shader input/output info/code to slang_builtin.cBrian Paul
This is a more logical place for this code. Also add some functions for querying vertex shader input names, types, etc.
2009-07-29mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul
Previously, the FOGC attribute contained the fragment fog coord, front/back- face flag and the gl_PointCoord.xy values. Now each of those things are separate fragment program attributes. This simplifies quite a few things in Mesa and gallium. Need to test i965 driver and fix up point coord handling in the gallium/draw module...
2009-12-15Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick
Conflicts: src/gallium/drivers/softpipe/sp_quad_blend.c
2009-12-11Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul
2009-11-17Merge branch 'outputswritten64'Ian Romanick
Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
2009-11-17mesa: fix assorted compiler warningsBrian Paul
2009-11-10slang: Fix return value check.Michal Krol
2009-11-10slang: Check OOM conditions for alloc_node_storage().Michal Krol
2009-11-10slang: Check return value from new_instruction().Michal Krol
2009-11-10slang: Fix signed/unsigned int handling in _slang_free_temp().Michal Krol
2009-11-10slang: Handle OOM condition in new_instruction().Michal Krol
2009-10-27glsl: fix memory leakBrian Paul
A slightly modified version of a patch from Vinson Lee.
2009-10-05Merge branch 'mesa_7_6_branch'Brian Paul
Conflicts: src/gallium/auxiliary/util/u_cpu_detect.c
2009-10-01Merge branch 'mesa_7_6_branch'Brian Paul
2009-09-29mesa: added nopfrag/nopvert options for MESA_GLSLBrian Paul
These options can be used to force vertex/fragment shaders to be no-op shaders (actually, simple pass-through shaders). For debug/test purposes.
2009-07-09Merge branch 'mesa_7_5_branch'Brian Paul
2009-07-09glsl: do const parameter optimization for array element actual parametersBrian Paul
When a function parameter is const-qualified we can avoid making a copy of the actual parameter (we basically do a search/replace when inlining). This is now done for array element params too, resulting in better code (fewer MOV instructions). We should allow some other types of function arguments here but let's be conservative for the moment.
2009-07-09glsl: fix incorrect indexing for gl_TextureMatrix[i][j]Brian Paul
The two indexes were mixed up when accessing a row of a matrix in an array of matrices.
2009-07-03Merge branch 'mesa_7_5_branch'Jakob Bornecrantz
Conflicts: src/mesa/main/dlist.c src/mesa/vbo/vbo_save_api.c
2009-07-03mesa/shaders: fix gl_NormalMatrix state parametersKeith Whitwell
gl_NormalMatrix is the inverse transpose of the modelview matrix, but as every matrix here needs to be transposed, we end up with {MODELVIEW_MATRIX, INVERSE}.