summaryrefslogtreecommitdiff
path: root/src/mesa/program
AgeCommit message (Collapse)Author
2010-08-23mesa: Add new ir_unop_any() expression operation.Eric Anholt
The previous any() implementation would generate arg0.x || arg0.y || arg0.z. Having an expression operation for this makes it easy for the backend to generate something easier (DPn + SNE for 915 FS, .any predication on 965 VS)
2010-08-23ir_to_mesa: Implement f2b by comparing the arg to 0, not the result.Eric Anholt
Fixes: glsl-fs-any
2010-08-23ir_to_mesa: Fix constant array handling to return the temp we created.Eric Anholt
We ended up returning CONST[loc] rather than TEMP[loc2]. Things would *usually* end up working out OK, since the constants often ended up getting allocated to CONST[loc..loc+columns] with no swizzle. But for the case where the contigous temporary copy of the swizzled constant vec4 args was actually needed, we'd end up reading some other constant values, possibly including ones not actually allocated. Fixes: glsl-varying-mat3x2.
2010-08-22mesa: Initialize member variables in ir_to_mesa_src_reg constructor.Vinson Lee
The default constructor did not initialize some member variables.
2010-08-21mesa: Initialize variables in mesa_src_reg_from_ir_src_reg.Vinson Lee
2010-08-20glsl: Remove bogus "ambient" field from vec4 gl_TextureEnvColor.Kenneth Graunke
2010-08-20glsl: add missing ambient field to gl_LightModelLuca Barbieri
Again, this is a one-element struct that was incorrectly missing the field.
2010-08-20glsl: don't crash if a field is specified for a non-struct uniformLuca Barbieri
This was triggered by the previous bug, but is a separate problem in the general sense.
2010-08-20glsl: add missing sceneColor field to gl_{Front, Back}LightModelProductLuca Barbieri
According to both GLSL 1.20 and 4.0, these are a struct with one field called "sceneColor". Fixes a crash on loading in FlightGear.
2010-08-18mesa: Fix the whining for link failures to actually be under MESA_GLSL=dump.Eric Anholt
2010-08-18mesa: Don't try to free components of a NULL uniform list.Eric Anholt
This might happen if we manage to trigger the right linker errors.
2010-08-18ir_to_mesa: Fix leak by improper freeing of a uniform list.Eric Anholt
2010-08-18ir_to_mesa: Don't leak the whole linked assembly program.Eric Anholt
2010-08-18ir_to_mesa: Fix leak of set_branchtargets temp data.Eric Anholt
2010-08-18ir_to_mesa: Stop leaking the ir_instruction * annotation of our compile.Eric Anholt
2010-08-18mesa: Free old linked shaders when relinking new shaders.Eric Anholt
2010-08-18ir_to_mesa: Free the ir_to_mesa temporary storage when we're done.Eric Anholt
2010-08-18mesa: Hang the compiled shader off the shader->ir, not the shader.Eric Anholt
Otherwise, with repeated program recompile, we never free the results of the previous compile.
2010-08-18mesa: Make MESA_GLSL=dump include when compile/link fails, and the info log.Eric Anholt
2010-08-17ir_to_mesa: Allow ir_return in main().Eric Anholt
I didn't expect that this would really work, but it turns out there are shaders in the wild that do it. Fixes: (with swrast) glsl-fs-main-return glsl-vs-main-return
2010-08-17ir_to_mesa: Fix implementation of ir_binop_equal, ir_binop_notequal.Eric Anholt
These binops are the vector-to-bool comparisons, not vec-to-bvec. We likely want both operations avilable as expression, since 915 and 965 FS naturally does the vector version, while 965 VS can also naturally do the scalar version. However, we can save that until later. Fixes: glsl-fs-vec4-operator-equal.shader_test glsl-fs-vec4-operator-notequal.shader_test glsl-vs-vec4-operator-equal.shader_test glsl-vs-vec4-operator-notequal.shader_test
2010-08-17prog_optimize: Only merge writes to temporary registersBenjamin Segovia
In one optimization pass, register files may have been messed therefore merging instructions which use the same index in two different register files.
2010-08-17mesa: Dump shader source before validating the shader.Eric Anholt
This will make extracting source to produce minimal testcases for shader compile issues easier.
2010-08-16Merge branch 'glsl2'Ian Romanick
Conflicts: src/mesa/program/prog_optimize.c
2010-08-16ir_to_mesa: Silence unused variable warningsIan Romanick
2010-08-16ir_to_mesa: Clean up assertions in ir_to_mesa_visitor::visit(ir_texture *)Ian Romanick
2010-08-16ir_to_mesa: Support texture rectangle targetsIan Romanick
2010-08-14mesa: Silence gcc warning "control reaches end of non-void function".José Fonseca
2010-08-14mesa: Silence gcc warning "missing initializer for member".José Fonseca
2010-08-13Merge branch 'master' into glsl2Ian Romanick
2010-08-13glsl2: Move ir_to_mesa handling to driver CompileShader and LinkShader hooks.Eric Anholt
This lets drivers override ir_to_mesa with their own codegen, or at least have a native alternative.
2010-08-13glsl2: Move the common optimization passes to a helper function.Eric Anholt
These are passes that we expect all codegen to be happy with. The other lowering passes for Mesa IR are moved to the Mesa IR generator.
2010-08-13mesa: assorted clean-ups, var type changes, assertions in prog_optimize.cBrian Paul
2010-08-13mesa: more/better program optimizationsBenjamin Segovia
This is the patch from Benjamin's Aug 11, 2010 email with minor fixes (such as moving declarations before code) Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-12mesa: Include missing header in programopt.h.Vinson Lee
Include mtypes.h for GLcontext and gl_register_file symbols.
2010-08-12glsl2: Use Elements from main/compiler.h instead of open-codingIan Romanick
2010-08-12mesa: check for null shader->InfoLog before printingBrian Paul
2010-08-12mesa: Clean up header file inclusion in prog_uniform.h.Vinson Lee
Remove mtypes.h. Remove prog_statevars.h. Include glheader.h for GL symbols.
2010-08-12mesa: Include missing headers in prog_print.h.Vinson Lee
Include stdio.h for FILE symbol. Include glheader.h for GL symbols. Include mtypes.h for GLcontext symbol. Add forward declarations.
2010-08-12mesa: Include missing header in prog_optimize.h.Vinson Lee
Include mtypes.h for GLcontext symbol.
2010-08-11glsl2: remove stray semicolonBrian Paul
2010-08-11mesa: Include missing header in prog_noise.h.Vinson Lee
Include glheader.h for GLfloat symbol.
2010-08-11mesa: Clean up header file inclusion in prog_instruction.h.Vinson Lee
Remove mfeatures.h. Include glheader.h for GL symbols.
2010-08-11mesa: Include missing header in prog_execute.h.Vinson Lee
Include mtypes.h for GLcontext symbol.
2010-08-11mesa: Include missing header in prog_cache.h.Vinson Lee
Include mtypes.h for GLcontext symbol.
2010-08-11mesa: Include missing header in nvvertparse.h.Vinson Lee
Include mtypes.h for GLcontext symbol.
2010-08-11mesa: Include missing header in nvfragparse.h.Vinson Lee
Include mtypes.h for GLcontext symbol.
2010-08-11mesa: Remove unnecessary header from hash_table.h.Vinson Lee
2010-08-10mesa: additional program limit assertionsBrian Paul
2010-08-09glsl2: Add a pass to transform ir_binop_sub to add(op0, neg(op1))Eric Anholt
All the current HW backends transform subtract to adding the negation, so I haven't bothered peepholing it back out in Mesa IR. This allows some subtract of subtract to get removed in ir_algebraic.