summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick2009-12-151-0/+1
|\ | | | | | | | | Conflicts: src/gallium/drivers/softpipe/sp_quad_blend.c
| * glsl: Initialize member label of struct slang_operation to NULL.Vinson Lee2009-12-121-0/+1
| |
* | Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul2009-12-111-9/+5
|\|
| * mesa: remove unnecessary loop in _mesa_remove_output_reads()Brian Paul2009-12-111-9/+5
| |
* | Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul2009-12-115-10/+24
|\|
| * mesa: check dst reg in _mesa_find_free_register()Brian Paul2009-12-111-3/+11
| | | | | | | | | | | | | | | | If a register was only being used as a destination (as will happen when generated condition-codes) we missed its use. So we'd errantly return a register index that was really in-use, not free. Fixes bug 25579.
| * mesa: Initialize variable in MatchInstruction.Vinson Lee2009-12-101-1/+7
| |
| * mesa: Assign _mesa_lookup_parameter_index return value to GLint.Vinson Lee2009-12-101-1/+1
| |
| * glsl: Increase size of array in_slang_lookup_constant from 4 to 16.Vinson Lee2009-12-101-1/+1
| | | | | | | | For some cases, _mesa_GetIntegerv reads up to params[15].
| * glsl: Fix array out-of-bounds access by _slang_lookup_constant.Vinson Lee2009-12-101-4/+5
| |
| * glsl: Remove unused member x from struct slang_operation.Vinson Lee2009-12-091-1/+0
| |
* | mesa: Fix NULL deref in optimizer when NumInstructions == 0.Eric Anholt2009-11-201-1/+1
| | | | | | | | Bug #24984.
* | Merge branch 'outputswritten64'Ian Romanick2009-11-175-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | mesa: fix assorted compiler warningsBrian Paul2009-11-172-2/+2
| |
* | mesa: Improve the eliminate-move-use to work across multiple instructions.Eric Anholt2009-11-131-41/+85
| | | | | | | | | | | | This shaves more instructions off of the VS of my GL demo, but no performance difference this time at n=6. This also fixes a regression that was in this path, which is now piglit's glsl-vs-mov-after-deref.
* | Merge remote branch 'origin/mesa_7_6_branch'Eric Anholt2009-11-102-7/+66
|\|
| * prog parse: Handle GL_VERTEX_PROGRAM_ARB in glLoadProgramNVIan Romanick2009-11-071-1/+13
| |
| * prog parse: Handle GL_VERTEX_PROGRAM_NV in glProgramStringARBIan Romanick2009-11-071-1/+23
| | | | | | | | | | Handle both NV vertex programs and NV vertex state programs passed to glProgramStringARB.
| * prog parse: Handle GL_FRAGMENT_PROGRAM_ARB in glLoadProgramNVIan Romanick2009-11-071-0/+15
| |
| * prog parse: Handle GL_FRAGMENT_PROGRAM_NV in glProgramStringARBIan Romanick2009-11-071-5/+15
| |
* | slang: Fix return value check.Michal Krol2009-11-101-1/+1
| |
* | slang: Check OOM conditions for alloc_node_storage().Michal Krol2009-11-101-4/+15
| |
* | slang: Check return value from new_instruction().Michal Krol2009-11-101-1/+3
| |
* | slang: Fix signed/unsigned int handling in _slang_free_temp().Michal Krol2009-11-101-2/+2
| |
* | slang: Handle OOM condition in new_instruction().Michal Krol2009-11-101-20/+81
| |
* | mesa: move code after declbrian2009-11-071-1/+2
| | | | | | | | Fixes bug 24967.
* | mesa: Reduce the source channels considered in optimization passes.Eric Anholt2009-11-061-1/+40
| | | | | | | | | | | | | | Depending on the writemask or the opcode, we can often trim the source channels considered used for dead code elimination. This saves actual instructions on 965 in the non-GLSL path for glean glsl1, and cleans up the writemasks of programs even further.
* | mesa: Fix remove_instructions to successfully remove when removeFlags[0].Eric Anholt2009-11-061-0/+6
| | | | | | | | | | This fixes the dead code elimination to work on the particular code mentioned in the previous commit.
* | mesa: Add an optimization path to remove use of pointless MOVs.Eric Anholt2009-11-061-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLSL code such as: vec4 result = {0, 1, 0, 0}; gl_FragColor = result; emits code like: 0: MOV TEMP[0], CONST[0]; 1: MOV OUTPUT[1], TEMP[0]; and this replaces it with: 0: MOV TEMP[0], CONST[0]; 1: MOV OUTPUT[1], CONST[0]; Even when the dead code eliminator fails to clean up a now-useless MOV instruction (since it doesn't do live/dead ranges), this should at reduce dependencies.
* | mesa: Fix up the remove_dead_code pass to operate on a channel basis.Eric Anholt2009-11-061-28/+56
| | | | | | | | | | | | | | This cleans up a bunch of instructions in GLSL programs to have limited writemasks, which would translate to wins in shaders that hit the i965 brw_wm_glsl.c path by depending less on in-driver optimizations. It will also help hit other optimization passes I'm looking at.
* | Merge branch 'mesa_7_6_branch'Ian Romanick2009-11-066-565/+503
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should fix the memory leaks in the assembly parser without the regressions. The conflicts in program_lexer.l were related to changes in returning strings between the branches (always return IDENTIFIER vs. returing either IDENTIFIER or USED_IDENTIFIER). The conflicts in program_parse.y were related to two changes in master One change prints a variable name in an error message. The other change adds outputVarSize to the OUTPUT_statement rule. The cause the position of the IDENTIFIER to change from $2 to $3. Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_lexer.l src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.y
| * ARB prog parser: Regenerate parser from previous commits.Ian Romanick2009-11-061-242/+268
| |
| * ARB prog parser: Release old program string in ↵Ian Romanick2009-11-062-4/+6
| | | | | | | | | | | | | | | | | | _mesa_parse_arb_{fragment,vertex}_program The program structure passed to _mesa_parse_arb_program is just a place holder. The stings that actually need to be released are only known to the functions calling _mesa_parse_arb_program, so they should be freed there.
| * ARB prog parser: Release strings returned from the lexer that don't need to ↵Ian Romanick2009-11-061-1/+27
| | | | | | | | be kept
| * Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"Ian Romanick2009-11-065-337/+207
| | | | | | | | | | | | | | | | This reverts commit 93dae6761bc90bbd43b450d2673620ec189b2c7a. This change was completely broken when the parser uses multiple strings in a single production. It would be nice if bug fixes could initially land somewhere other than the stable branch.
* | ARB prog parser: include variable name in error textBrian Paul2009-11-043-468/+749
| |
* | ARB prog parser: Fix a couple issues with previous merge from mesa_7_6_branchIan Romanick2009-11-022-190/+200
| | | | | | | | | | | | | | | | Since the addition of support for Nvidia condition codes, the lexer internally uses handle_ident to select between returning IDENTIFIER and USED_IDENTIFIER. Also, use return_string instead of strdup. Fixes bug #24809.
* | ARB prog parser: regenerated filesBrian Paul2009-10-302-294/+321
| |
* | ARB prog parser: new set_src_reg(), set_dst_reg() helpersBrian Paul2009-10-301-28/+55
| | | | | | | | These functions do sanity checks on the register file and index.
* | 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