summaryrefslogtreecommitdiff
path: root/src/mesa/shader
AgeCommit message (Collapse)Author
2009-09-15Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-15ARB prog parser: regenerated fileBrian Paul
2009-09-15ARB prog parser: more detailed error message for out of bounds ADDR offsetsBrian Paul
2009-09-14glsl: added some link debug code (disabled)Brian 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-09-12mesa: remove unused SATURATE_PLUS_MINUS_ONE flagKeith Whitwell
Never set in mesa. Remove from tgsi translation as well.
2009-09-10Merge branch 'master' into asm-shader-rework-2Ian Romanick
Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.tab.h
2009-09-10NV fp parser: Add support for condition codesIan Romanick
Conditional write masks and the condition-code based KIL instruction are all supported. The specific behavior of KIL in the following shader may or may not match the behavior of other implementations: !!ARBfp1.0 TEMP GT; MOVC GT, fragment.texcoord[0]; KIL GT.x; END Should be it interpreted as 'KIL srcReg' or as 'KIL ccTest'? The current parser will interpret it as 'KIL srcReg'.
2009-09-10ARB prog lexer: Add missing #include to silence compile warningIan Romanick
2009-09-10ARB prog parser: Differentiate between used and unused names in the lexerIan Romanick
The lexer will return IDENTIFIER only when the name does not have an associated symbol. Otherwise USED_IDENTIFIER is returned.
2009-09-07mesa: Include <unistd.h> only when one is available.Michal Krol
2009-09-04NV fp parser: Support instruction and TEMP / OUTPUT sizesIan Romanick
Adds support for declaring TEMP and OUTPUT variables as 'LONG' or 'SHORT' precision. The precision specifiers are parsed, but they are currently ignored. Some support for this may be added in the future, but neither Intel hardware nor, as far as I'm aware, Radeon hardware support multiple precisions. Also adds support for instruction precision ('X', 'H', and 'R') suffixes and instruction condition code output ('C') suffix. This results in a fairly major change to the lexer. Instructions are matched with all the possible suffix strings. The suffix string are then carved off by a context (i.e., which program mode and options are set) aware parser that converts the suffixes to bits in prog_instruction. This could have been handled in the same way _SAT was originally handled in the lexer, but it would have resulted in a very large lexer with lots of opportunity for cut-and-paste errors.
2009-09-04ARB prog parser: Add new constructor for asm_instructionIan Romanick
The new constructor copies fields from the prog_instruction that the parser expects the lexer to set.
2009-09-04ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul
Fixes compilation warnings with MSVC.
2009-09-04ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul
Fixes symbol collisions with typedefs in Microsoft headers. Perhaps we should prefix/suffix all the lexer tokens to avoid this.
2009-09-03NV fp parser: Add support for absolute value operator on instruction operandsIan Romanick
2009-09-03NV fp parser: Support new scalar constant behaviorIan Romanick
ARBfp requires scalar constants have a '.x' suffix, but NVfp_option does not. This shows up with instructions that require a scalar parameter (e.g., COS).
2009-09-01NV fp parser: Parse TXD instructionIan Romanick
2009-09-01ARB prog parser: Fix handling of stateOptModMatNumIan Romanick
The optional array index should clearly be enclosed in square brackets. This helps the oglconform test vp_binding.c get a bit farther, but it still fails.
2009-08-31mesa: debug printf for KILBrian Paul
2009-08-31NV fp lexer: Add new opcodesIan Romanick
2009-08-31NV fp: Parse 'OPTION NV_fragment_program' in ARB assembly shadersIan Romanick
2009-08-27Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-27mesa: direct program debug output to stderr instead of stdoutmarvin24
2009-08-27mesa: move decls before codeVinson Lee
2009-08-26Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-26glsl: asst. clean-ups in set_program_uniform()Brian Paul
Remove redunant type check for samplers (assert instead). Move some local vars. Update comments.
2009-08-26glsl: signal that the program needs to be re-translated when samplers changeBrian Paul
2009-08-26mesa: var renaming, new assertionBrian Paul
2009-08-26mesa: additional instruction field size assertionsBrian Paul
2009-08-26Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-26glsl: fix bug in sampler array indexingBrian Paul
Need to add the 'offset' parameter when indexing the parameter array. Before, if we were setting arrays of samplers, we were actually only setting the 0th sampler's value. Because of how progs/glsl/samplers.c is constructed, this wasn't showing up as a failure in the samplers_array output.
2009-08-25glsl: update a texture/sampler commentBrian Paul
2009-08-25glsl: implement shader sampler validationBrian Paul
Shader validation should fail if there are two samplers of different types which reference the same texture unit. For example, if a cubemap sampler and a 2D sampler both reference texture unit 0, that's invalid.
2009-08-25mesa: print some program fields in binary tooBrian Paul
2009-08-24ARB prog: Set error instead of falling through with incorrect valueBrian Paul
If a fragment program only parameter was queried of a vertex program (e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and a random value would be returned. This caused 'glxinfo -l' to show the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for GL_MAX_PROGRAM_ENV_PARAMETERS_ARB. This is confusing and incorrect. (cherry picked from master, commit 4bccd693a72a0b42dffc849034263a68e779ca91)
2009-08-24ARB prog: Set error instead of falling through with incorrect valueIan Romanick
If a fragment program only parameter was queried of a vertex program (e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and a random value would be returned. This caused 'glxinfo -l' to show the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for GL_MAX_PROGRAM_ENV_PARAMETERS_ARB. This is confusing and incorrect.
2009-08-24glsl: Silence gcc uninitialized variable warning.Vinson Lee
2009-08-24ARB prog parser: Regenerate parser from previous commitIan Romanick
2009-08-24ARB prog parser: use correct context limitsBrian Paul
2009-08-24glsl: Silence gcc uninitialized variable warning.Vinson Lee
2009-08-24mesa: _mesa_layout_parameters() returns a boolean valueBrian Paul
2009-08-23ARB prog lexer: Fix lexer to eat both DOS and Unix line endingsIan Romanick
2009-08-22ARB prog parser: include imports.h to kill some compiler warningsLuo Jinghua
2009-08-20ARB prog parser: Revert part of previous change to constant parsingIan Romanick
The commit "ARP prog parser: Implement the spec, not what makes sense" broke the parsing of scalar constants. This commit reverts that part of that commit. Now vp_swizzle.c passes.
2009-08-18Merge branch 'master' into asm-shader-rework-1Ian Romanick
Conflicts: src/mesa/shader/arbprogparse.c
2009-08-18ARB prog parser: Delete the old parserIan Romanick
2009-08-18ARB prog: Revert some changes to debug outputIan Romanick
2009-08-14mesa: also pass the GPU program to _mesa_append_uniforms_to_file()Brian Paul
We want the post-link program at this points.
2009-08-14Merge branch 'mesa_7_5_branch'Brian Paul