summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-06-09Add a python script to generate texture builtins.Kenneth Graunke
2010-06-09generate_builtins.pl: Support directiories for each extension.Kenneth Graunke
2010-06-09generate_builtins.pl: Support _fs directories as well as _vs.Kenneth Graunke
2010-06-09Set the type of ir_texture properly; infer it from the sampler type.Kenneth Graunke
2010-06-09ir_reader: Add support for reading ir_texture.Kenneth Graunke
2010-06-09ir_reader: Refactor reading of dereferences for later reuse.Kenneth Graunke
2010-06-09Add stub visitor support for ir_texture.Kenneth Graunke
2010-06-09ir_print_visitor: Add support for ir_texture.Kenneth Graunke
2010-06-09Add mappings between ir_texture_opcode and strings.Kenneth Graunke
2010-06-09Define IR instruction for texture look-upsIan Romanick
2010-06-09Use array delete operator to delete an arrayIan Romanick
This was detected by valgrind. I think GCC still does the right thing, but the C++ spec allows the compiler to do something stupid... like crash or only delete the first entry in the array.
2010-06-07Bump GL_MAX_TEXTURE_COORDS from 2 to 4Ian Romanick
Every platform that supports GLSL sets GL_MAX_TEXTURE_COORDS to at least 4, so hard-code 4 for now. This causes the following tests to pass: glslparsertest/glsl2/norsetto-bumptbn_sh_fp.vert glslparsertest/glsl2/xreal-lighting-d-omni.vert glslparsertest/glsl2/xreal-lighting-db-omni.vert glslparsertest/glsl2/xreal-lighting-dbs-omni.vert
2010-06-07Only allow global precision qualifier for int and floatIan Romanick
This causes the following tests to pass: glslparsertest/glsl2/precision-03.vert
2010-06-07Fix parsing of precision qualifiersIan Romanick
This causes the following tests to pass: glslparsertest/glsl2/precision-02.vert glslparsertest/glsl2/precision-04.vert glslparsertest/glsl2/precision-06.vert This causes the following test to fail. This shader was previously failing to compile, but it was failing for the wrong reasons. glslparsertest/glsl2/precision-03.vert
2010-06-07Don't process empty shadersIan Romanick
Some valid shaders, such as 'precision highp float;', evaluate to empty sets of instructions. This causes some of the optimization stages to enter infinite loops. Instead, don't bother processing the empty ones.
2010-06-07Generate an error on empty declaration listsIan Romanick
This causes an error for code such as 'float;'
2010-06-04Check variable mode when comparing qualifier lists.Kenneth Graunke
Fixes function-05.vert.
2010-06-02ir_dereference_array always operates on an r-valueIan Romanick
ir_dereference_array::array is always an r-value. If the dereference is of a varaible, that r-value will be an ir_dereference_variable. This simplifies the code a bit.
2010-06-02There is no class ir_label, so there's no need for ir_instruction::as_labelIan Romanick
2010-06-02Remove some cruft from the MakefileIan Romanick
This was affecting the build, but the files don't actually exist.
2010-06-01Add builtin gl_LightSource[].Eric Anholt
Fixes gst-gl-bumper.vert parsing.
2010-06-01builtins: Add support for reflect().Eric Anholt
Fixes glsl-orangebook-ch06.frag parsing.
2010-06-01builtins: Add ftransform().Eric Anholt
Fixes glsl-orangebook-ch06-bump.vert.
2010-06-01Allow arrays of floats as varyings.Eric Anholt
The comment just above the code said arrays were OK, then it didn't handle arrays. Whoops. Partially fixes CorrectUnsizedArray.frat.
2010-06-01gl_Normal is a vec3 not a vec4.Eric Anholt
Fixes CorrectSwizzle1.vert.
2010-06-01builtins: Add the mix(gentype, gentype, float) variant.Eric Anholt
The broken-in-mesa Regnum Online shader now parses, except for its preprocessor usage.
2010-06-01Handle GLSL 1.20 implicit type conversions.Eric Anholt
We were nicely constructing a new expression for the implicit type conversion, but then checking that the previous types matched instead of the new expression's type. Fixes errors in Regnum Online shaders.
2010-06-01builtins: Add atan().Eric Anholt
2010-06-01builtins: Add asin().Eric Anholt
2010-06-01ir_constant_expression: Handle several floating point unops.Eric Anholt
Cleans up a bunch of pointless operations in a GStreamer fragment shader.
2010-06-01ir_constant_variable: New pass to mark constant-assigned variables constant.Eric Anholt
This removes a bunch of gratuitous moving around of constant values from constructors. Makes a shader ir I was looking at for structure handling almost readable.
2010-06-01ir_constant_folding: Look at instructions in functions.Eric Anholt
This was broken in the ir_label -> ir_function rework.
2010-06-01ir_swizzle_swizzle: Reduce swizzle chains to a single swizzle.Eric Anholt
2010-06-01ir_vec_index_to_swizzle: Pass to convert indexing of vectors to swizzles.Eric Anholt
This should remove the burden of handling constant vector indexing well from backend codegen, and could help with swizzle optimizations.
2010-06-01ir_expression_flattening: Handle flattening values out of swizzles, too.Eric Anholt
Fixes an uninlined normalize() in CorrectSwizzle2.vert.
2010-06-01ir_expression_flattening: Fix breakage from hierarchichal visitor.Eric Anholt
Similar to other situations where the visitor pattern doesn't fit, in this case we need the pointer to the base instruction in the instruction stream for where to insert any new instructions we generate (not the instruction in the tree we're looking at). By removing the code for setting the base_ir, flattened expressions would end up, for example, before the function definition where they had appeared.
2010-05-26Reimplement ir_function_inlining_visitor using ir_hierarchical_vistorIan Romanick
2010-05-26Reimplement ir_copy_propagation_visitor using ir_hierarchical_vistorIan Romanick
2010-05-26Reimplement ir_expression_flattening_visitor using ir_hierarchical_vistorIan Romanick
2010-05-26ir_reader: Read record_refs.Kenneth Graunke
Also changes the print visitor to not emit extraneous parenthesis.
2010-05-26ir_reader: Fix reading of array deferences and correct error messages.Kenneth Graunke
Previously, the syntax was (array_ref <variable name> <index>), but the subject is now a general rvalue (not a name). In particular, it might be a (var_ref ...). Also, remove "expected ... or (swiz)" from error messages; swiz is not allowed inside a var_ref.
2010-05-26Fix setting the maximum accessed array elementIan Romanick
Array dereferences now point to variable dereferences instead of pointing directly to variables. This necessitated some changes to the way the variable is accessed when setting the maximum index array element.
2010-05-26ir_dereference::mode is no longer used, kill with fireIan Romanick
2010-05-26Refactor whole-variable assigment checking into member functionIan Romanick
2010-05-26Refactor ir_dereference data fields to subclassesIan Romanick
2010-05-26Replace open coded deref navigation with hierarchical visitorsIan Romanick
2010-05-26Refactor ir_dereference support for ir_visitorIan Romanick
Move the accept method for visitors from ir_dereference to the derived classes.
2010-05-26Refactor ir_dereference support for ir_hierarchical_visitorIan Romanick
Move the accept method for hierarchical visitors from ir_dereference to the derived classes. This was mostly straight-forward, but I suspect that ir_dead_code_local may be broken now.
2010-05-26Begin refactoring ir_dereferenceIan Romanick
Create separate subclasses of ir_dereference for variable, array, and record dereferences. As a side effect, array and record dereferences no longer point to ir_variable objects directly. Instead they each point to an ir_dereference_variable object. This is the first of several steps in the refactoring process. The intention is that ir_dereference will eventually become an abstract base class.
2010-05-18Use ir_rvalue::variable_referenced instead of open coding itIan Romanick