aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mesa_7_6_branch'Brian Paul2009-10-288-941/+793
|\ | | | | | | | | | | | | Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_lexer.l
| * mesa: remove unneeded #includesBrian Paul2009-10-282-9/+0
| |
| * mesa: include imports.h to silence warningBrian Paul2009-10-281-0/+1
| |
| * ARB prog parser: Fix epic memory leak in lexer / parser interfaceIan Romanick2009-10-275-207/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Anything that matched IDENTIFIER was strdup'ed and returned to the parser. However, almost every case of IDENTIFIER in the parser just dropped the returned string on the floor. Every swizzle string, every option string, every use of a variable, etc. leaked memory. Create a temporary buffer in the parser state (string_dumpster and dumpster_size). Return strings from the lexer to the parser in the buffer. Grow the buffer as needed. When the parser needs to keep a string (i.e., delcaring a new variable), let it make a copy then. The only leak that valgrind now detects is /occasionally/ the copy of the program string in gl_program::String is leaked. I'm not seeing how. :(
| * ARB prog parser: Don't leak program stringIan Romanick2009-10-271-0/+4
| | | | | | | | | | The program string is kept in the program object. On the second call into glProgramStringARB the previous kept string would be leaked.
| * ARB prog parser: Don't leak symbol table header structuresIan Romanick2009-10-271-0/+16
| |
| * glsl: fix memory leakBrian Paul2009-10-271-2/+6
| | | | | | | | A slightly modified version of a patch from Vinson Lee.
* | glsl: avoid redundant state changes in _mesa_use_program()Brian Paul2009-10-271-3/+4
| |
* | glsl: fix memory leakBrian Paul2009-10-271-2/+6
| | | | | | | | A slightly modified version of a patch from Vinson Lee.
* | mesa: refactor, new print_shader_info()Brian Paul2009-10-231-25/+36
| |
* | Merge remote branch 'origin/mesa_7_6_branch'Eric Anholt2009-10-232-2/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/intel/intel_fbo.c src/mesa/drivers/dri/intel/intel_mipmap_tree.c src/mesa/drivers/dri/intel/intel_mipmap_tree.h src/mesa/drivers/dri/intel/intel_tex_copy.c src/mesa/drivers/dri/intel/intel_tex_image.c
| * ARB prog parser: Fix parameter array size comparisonIan Romanick2009-10-222-2/+2
| | | | | | | | | | | | | | | | Array indexes are invalid when >= the maximum, but array sizes are only in valid when > the maximum. This prevented programs from declaring a single maximum size array. See the piglit vp-max-array test.
* | Merge branch 'mesa_7_6_branch' of ↵Alex Deucher2009-10-192-198/+187
|\| | | | | | | | | | | git+ssh://[email protected]/git/mesa/mesa regenerated lex.yy.c
| * mesa: regenerated lex.yy.c w/ _mesa_strtod()Brian Paul2009-10-151-192/+193
| |
| * mesa: Use _mesa_strtod in the lexer for assembly shadersNeil Roberts2009-10-151-4/+5
| | | | | | | | See bug 24531.
* | mesa: added MESA_GLSL=useprog debug flagBrian Paul2009-10-161-6/+21
| | | | | | | | This logs glUseProgram() calls to stderr.
* | mesa: minor tweak to printf stringBrian Paul2009-10-131-1/+1
| |
* | mesa: don't print pointer in _mesa_fprint_parameter_list()Brian Paul2009-10-131-1/+2
| |
* | mesa: print program Id when printingBrian Paul2009-10-121-2/+2
| |
* | Merge branch 'mesa_7_6_branch'Nicolai Hähnle2009-10-071-9/+22
|\|
| * shader_api: Fix bounds checking of glUniform and glUniformMatrixNicolai Hähnle2009-10-071-9/+22
| | | | | | | | | | Signed-off-by: Nicolai Hähnle <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
| * prog_parameter: Document the fact that Size may be > 4Nicolai Hähnle2009-10-071-1/+7
| | | | | | | | Signed-off-by: Nicolai Hähnle <[email protected]>
* | Merge branch 'mesa_7_6_branch'Brian Paul2009-10-052-0/+5
|\| | | | | | | | | | | Conflicts: src/gallium/auxiliary/util/u_cpu_detect.c
| * mesa: fix mem leaksBrian Paul2009-10-011-0/+4
| |
| * glsl: fix mem leakBrian Paul2009-10-011-0/+1
| |
* | prog_parameter: Document the fact that Size may be > 4Nicolai Hähnle2009-10-031-1/+7
| | | | | | | | Signed-off-by: Nicolai Hähnle <[email protected]>
* | Merge branch 'mesa_7_6_branch'Brian Paul2009-10-017-84/+104
|\|
| * mesa: Return -FLT_MAX instead of 0 for LG2(0).Vinson Lee2009-10-011-1/+1
| | | | | | | | | | lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0 for LG2(0).
| * glsl: regenerated fileBrian Paul2009-09-291-49/+57
| |
| * glsl: rewrite sqrt(x) intrinsic to handle x=0Brian Paul2009-09-291-34/+42
| | | | | | | | | | | | 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.
| * glsl: add support for CMP instructionBrian Paul2009-09-294-0/+4
| |
* | mesa: added nopfrag/nopvert options for MESA_GLSLBrian Paul2009-09-292-0/+14
| | | | | | | | | | These options can be used to force vertex/fragment shaders to be no-op shaders (actually, simple pass-through shaders). For debug/test purposes.
* | mesa: added _mesa_nop_vertex/fragment_program()Brian Paul2009-09-292-0/+98
| | | | | | | | For debug/test purposes.
* | Merge branch 'asm-shader-rework-2'Ian Romanick2009-09-257-2124/+3019
|\ \ | | | | | | | | | | | | Conflicts: src/mesa/shader/program_parse.tab.c
| * | NV fp lexer: Add UP4B and UP4UB instructions that were previously missingIan Romanick2009-09-242-667/+686
| | |
| * | 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
| * | | 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_6_branch'Brian Paul2009-09-251-2/+3
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/intel/intel_clear.c
| * | | mesa: move declaration before codeVinson Lee2009-09-251-2/+3
| | | |
* | | | mesa: remove: unused gl_vertex_program::TnlData fieldBrian Paul2009-09-241-7/+0
| | | |
* | | | Merge branch 'mesa_7_6_branch'Brian Paul2009-09-244-0/+105
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/vbo/vbo_exec_array.c