summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_link.c
AgeCommit message (Collapse)Author
2009-01-15glsl: use _mesa_sprintf()Brian Paul
2009-01-14glsl: support sampler arrays.Alan Hourihane
2009-01-07glsl: check that the fragment shader does not write both gl_FragColor and ↵Brian Paul
gl_FragData[]
2009-01-07mesa: Add _mesa_snprintf.José Fonseca
On Windows snprintf is renamed as _snprintf. (cherry picked from commit f8f9a1b620d31d1a59855fd502caed325d4a324f)
2009-01-02mesa: fix another "out of samplers" problemBrian Paul
Now only the samplers that are actually used by texture() functions are saved in the uniform variable list. Before, we could run out of samplers if too many were declared while only some of them were actually used.
2008-12-31mesa: increase max texture image units and GLSL samplers to 16Brian Paul
The max texture coord units is still 8. All the fixed-function paths are still limited to 8 too. But GLSL shaders can use more samplers now. Note that some texcoord-related data structures are declared to be 16 elements in size rather than 8. This just simplifies the code in a few places; the extra elements aren't accessible to the user. These changes haven't been extensively tested yet, but sanity checking has been done. It should be possible to increase the max image units/samplers to 32 without doing anything special. Beyond that we'll need longer bitfields in a few places.
2008-12-30mesa: better error message when running out of GLSL samplersBrian Paul
2008-12-15mesa: in slang linker, replace assertion with link error when max samplers ↵Brian Paul
exceeded
2008-11-24mesa: add gl_program::Input/OutputFlags[] arrayBrian Paul
These arrays will indicate per-input or per-output options for vertex/fragment programs such as centroid-sampling and invariance.
2008-11-24mesa: check that varying variable qualifiers agreeBrian Paul
2008-11-24mesa: dump/debug varying vars listBrian Paul
2008-11-24mesa: add Flags field to gl_program_parameterBrian Paul
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
2008-11-10mesa: track initialization status of uniform variables. Plus, asst clean-ups.Brian Paul
2008-11-10mesa: fix logic error in GLSL linker when looking for main() shadersBrian Paul
2008-11-06mesa: update the shader programs->TexturesUsed array at link timeBrian Paul
If an application never calls glUniform() to set sampler variable values they'll remain 0 (the default value/unit). Now call _mesa_update_shader_textures_used() at link time in case glUniform() is never called. program->TextureUsed[] will then be correct for state validation.
2008-11-05mesa: Fix compiler warnings on Windows.Brian Paul
cherry-picked subset of a77976d2ee578d0483c64f2aa41719bbae9c1c97
2008-11-01mesa: additional debug flags for glsl debug/disassemblyBrian Paul
2008-09-23mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs()Brian Paul
2008-09-23mesa: new gl_fragment_program fields indicating use of fog, front-facing, ↵Brian Paul
point coord (cherry picked from commit d7a7b0a10dd355fbeb7a404091a42d4ab558c820)
2008-09-17mesa: fix bug in previous changes to _slang_resolve_attributes()Brian Paul
2008-09-16mesa: rework GLSL vertex attribute bindingBrian Paul
Calls to glBindAttribLocation() should not take effect until the next time that glLinkProgram() is called. gl_shader_program::Attributes now just contains user-defined bindings. gl_shader_program::VertexProgram->Attributes contains the actual/final bindings.
2008-08-25mesa: glsl: grab latest fixes from gallium-0.1 branchBrian Paul
Includes: 1. Fixes failed asserting about bad swizzles in src reg emit. 2. Tracks uniform var usage. 3. Emit exp() in terms of EXP2 instruction.
2008-08-16mesa: import latest GLSL code from gallium-0.1 branchBrian Paul
2008-08-06disable debug code accidentally enabled by prev commitBrian Paul
2008-08-06mesa: glsl: count number of temp regs usedHaihao Xiang
2008-07-29mesa: glsl: only try to link shaders defining main()Brian Paul
2008-07-29mesa: assorted glsl uniform/attribute fixesBrian Paul
Fix incorrect uniform/attribute size query results. Add missing error checking for glUniform, glUniformMatrix params Fix an array size/allocation error.
2008-07-02mesa: when linking a shader program, make sure all the shaders compiled OKBrian Paul
2008-07-02generate a link error if the vertex shader references too many texturesBrian Paul
2008-06-04Set the attribute as used.Brian Paul
cherry-picked from gallium-0.1
2008-05-16Fix a program refcounting error, don't share program parameter lists.Brian Paul
The refcounting bug was causing a memleak (unfreed programs). The old parameter list sharing is not needed since the change in how uniforms are handled.
2008-05-14Updated GLSL uniform/sampler handling from gallium-0.1 branchBrian Paul
Previously, the shader linker combined the uniforms used by the vertex and fragment shaders into a combined set of uniforms. This made the implementation of glUniform*() simple, but was rather inefficient otherwise. Now each shader gets its own set of uniforms (no more modelview matrix showing up in the fragment shader uniforms, for example). cherry-picked by hand from gallium-0.1 branch
2008-05-06implement full reference counting for vertex/fragment programsBrian
Use _mesa_reference_vert/fragprog() wherever we assign program pointers. Fixes a memory corruption bug found with glean/api2 test.
2007-07-31glGetAttribLocation always returned 1 (bug 11774)Brian
2007-07-04Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian
of -I flags.
2007-04-26Added error check that all varying vars needed by the fragment shader are ↵Brian
produced by vertex shader.
2007-04-21move allocation of shProg->Attributes earlier in functionBrian
2007-04-18Start fixing some issues with uniform variables and their types.Brian
2007-04-18call ProgramStringNotify() after linkingBrian
2007-04-12use _mesa_clear_shader_program_data()Brian
2007-03-26remove debug abort() callsBrian
2007-03-26disable printing shader program debug infoBrian
2007-03-22In _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow ↵Brian
swizzleOut==NULL. There are times when we don't want to allow swizzling when searching for or adding vector constants. Passing NULL for swizzleOut disables swizzling. This fixes a constant/swizzle bug in link_uniform_vars().
2007-03-07fix incorrect HPOS write testBrian
2007-03-07Generate an error if the vertex shader does not write to gl_Position.Brian
2007-03-06fix vert/frag typoBrian
2007-02-23replace GLint with gl_state_indexBrian
2007-02-23Re-implement branching with slang_labels.Brian
This eliminates the NOP instructions that had been used as placeholders for branch targets. Also, fix "return" statement bug.
2007-02-16remove dead codeBrian
2007-02-16s/_slang_link2/_slang_link/Brian