summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into asm-shader-rework-2Ian Romanick2009-09-106-418/+431
|\ | | | | | | | | | | | | Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.tab.h
| * mesa: Include <unistd.h> only when one is available.Michal Krol2009-09-072-0/+8
| |
| * ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul2009-09-045-195/+195
| | | | | | | | Fixes compilation warnings with MSVC.
| * ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul2009-09-045-37/+23
| | | | | | | | | | Fixes symbol collisions with typedefs in Microsoft headers. Perhaps we should prefix/suffix all the lexer tokens to avoid this.
| * ARB prog parser: Fix handling of stateOptModMatNumIan Romanick2009-09-012-203/+203
| | | | | | | | | | | | 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.
| * mesa: debug printf for KILBrian Paul2009-08-311-0/+5
| |
* | NV fp parser: Add support for condition codesIan Romanick2009-09-104-881/+1183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* | ARB prog lexer: Add missing #include to silence compile warningIan Romanick2009-09-102-173/+175
| |
* | ARB prog parser: Differentiate between used and unused names in the lexerIan Romanick2009-09-105-834/+851
| | | | | | | | | | The lexer will return IDENTIFIER only when the name does not have an associated symbol. Otherwise USED_IDENTIFIER is returned.
* | NV fp parser: Support instruction and TEMP / OUTPUT sizesIan Romanick2009-09-046-1506/+1463
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ARB prog parser: Add new constructor for asm_instructionIan Romanick2009-09-043-334/+400
| | | | | | | | | | The new constructor copies fields from the prog_instruction that the parser expects the lexer to set.
* | NV fp parser: Add support for absolute value operator on instruction operandsIan Romanick2009-09-032-840/+942
| |
* | NV fp parser: Support new scalar constant behaviorIan Romanick2009-09-032-729/+770
| | | | | | | | | | | | 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).
* | NV fp parser: Parse TXD instructionIan Romanick2009-09-012-842/+941
| |
* | NV fp lexer: Add new opcodesIan Romanick2009-08-315-1191/+1455
| |
* | NV fp: Parse 'OPTION NV_fragment_program' in ARB assembly shadersIan Romanick2009-08-312-0/+12
|/
* Merge branch 'mesa_7_5_branch'Brian Paul2009-08-271-8/+8
|\
| * mesa: direct program debug output to stderr instead of stdoutmarvin242009-08-271-9/+9
| |
* | mesa: move decls before codeVinson Lee2009-08-271-2/+4
| |
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-261-4/+15
|\|
| * glsl: signal that the program needs to be re-translated when samplers changeBrian Paul2009-08-261-4/+15
| |
* | glsl: asst. clean-ups in set_program_uniform()Brian Paul2009-08-261-14/+7
| | | | | | | | | | Remove redunant type check for samplers (assert instead). Move some local vars. Update comments.
* | mesa: var renaming, new assertionBrian Paul2009-08-261-4/+5
| |
* | mesa: additional instruction field size assertionsBrian Paul2009-08-261-0/+6
| |
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-261-3/+7
|\|
| * glsl: fix bug in sampler array indexingBrian Paul2009-08-261-3/+7
| | | | | | | | | | | | | | | | | | 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.
| * ARB prog: Set error instead of falling through with incorrect valueBrian Paul2009-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * glsl: Silence gcc uninitialized variable warning.Vinson Lee2009-08-241-1/+1
| |
* | glsl: update a texture/sampler commentBrian Paul2009-08-251-1/+1
| |
* | glsl: implement shader sampler validationBrian Paul2009-08-252-11/+109
| | | | | | | | | | | | 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.
* | mesa: print some program fields in binary tooBrian Paul2009-08-251-2/+29
| |
* | ARB prog: Set error instead of falling through with incorrect valueIan Romanick2009-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | glsl: Silence gcc uninitialized variable warning.Vinson Lee2009-08-241-1/+1
| |
* | ARB prog parser: Regenerate parser from previous commitIan Romanick2009-08-241-6/+6
| |
* | ARB prog parser: use correct context limitsBrian Paul2009-08-241-6/+6
| |
* | mesa: _mesa_layout_parameters() returns a boolean valueBrian Paul2009-08-242-5/+10
| |
* | ARB prog lexer: Fix lexer to eat both DOS and Unix line endingsIan Romanick2009-08-232-304/+308
| |
* | ARB prog parser: include imports.h to kill some compiler warningsLuo Jinghua2009-08-221-0/+1
| |
* | ARB prog parser: Revert part of previous change to constant parsingIan Romanick2009-08-202-16/+16
| | | | | | | | | | | | 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.
* | Merge branch 'master' into asm-shader-rework-1Ian Romanick2009-08-1810-135/+276
|\ \ | | | | | | | | | | | | Conflicts: src/mesa/shader/arbprogparse.c
| * | mesa: also pass the GPU program to _mesa_append_uniforms_to_file()Brian Paul2009-08-142-3/+5
| | | | | | | | | | | | We want the post-link program at this points.
| * | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-141-2/+2
| |\|
| | * glsl: fix some uninitialized pointersBrian Paul2009-08-131-2/+2
| | |
| * | mesa: new _mesa_append_uniforms_to_file() debug/logging functionBrian Paul2009-08-142-0/+34
| | |
| * | glsl: fix incorrect attribute sizeBrian Paul2009-08-131-1/+1
| | |
| * | glsl: remove duplicate frag input entryBrian Paul2009-08-121-1/+0
| | |
| * | Merge branch 'new-frag-attribs'Brian Paul2009-08-124-24/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul2009-07-294-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
| * | | glsl: add gl_Vertex, gl_Normal, etc to list of active attributesBrian Paul2009-08-121-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | glsl: move predefined shader input/output info/code to slang_builtin.cBrian Paul2009-08-124-103/+199
| | | | | | | | | | | | | | | | | | | | This is a more logical place for this code. Also add some functions for querying vertex shader input names, types, etc.