summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
AgeCommit message (Collapse)Author
2010-03-31Minor cleanups in ast_function_definition::hirIan Romanick
2010-03-31Add ir_function::iterator to iterate over function signaturesIan Romanick
2010-03-31Use ir_function::add_signature to create link between function and signatureIan Romanick
ir_function_signature now has a pointer back to the ir_function that owns it.
2010-03-31Move type_specifier_to_glsl_type to ast_type_specifier::glsl_typeIan Romanick
This make is easily accessible from other modules.
2010-03-31Test that const declarations include initializers.Eric Anholt
Fixes dataType6.frag, and also array2.frag for an unexpected but valid reason.
2010-03-31Reject declarations with 'in' or 'out' qualifiersIan Romanick
'in' and 'out' can only be used in function parameter lists or at global scope (1.30 and later). This change enforces this.
2010-03-31Fix comment bug and printf bug in previous commitIan Romanick
2010-03-31Require that 'uniform' and 'varying' variables be declared at global scopeIan Romanick
This causes the following tests to pass: glslparsertest/shaders/uniform.frag glslparsertest/shaders/varying.frag
2010-03-31Slightly refector checks for declarations that must be at global scopeIan Romanick
2010-03-31Implement logical operators.Eric Anholt
Fixes parser9.frag.
2010-03-31Test that variable names don't use the reserved gl_ prefix.Eric Anholt
Fixes identifier2.frag.
2010-03-30Test that discard only appears in the fragment shader.Eric Anholt
Fixes fragmentOnly4.vert.
2010-03-30Test that main doesn't take any parameters.Eric Anholt
Fixes main2.vert.
2010-03-30Test that a non-void function returns a value.Eric Anholt
2010-03-30Test that a void function doesn't return a value.Eric Anholt
Fixes function1.frag.
2010-03-30Fix unused variable warning.Eric Anholt
2010-03-30Forbid array comparisons in GLSL 1.10Ian Romanick
This causes the following tests to pass: glslparsertest/shaders/array3.frag
2010-03-30Begin handling array declarationsIan Romanick
This causes the following tests to pass: glslparsertest/shaders/array4.frag glslparsertest/shaders/array5.frag This causes the following tests to fail. These shaders were previously failing to compile, but they were all failing for the wrong reasons. glslparsertest/shaders/array3.frag
2010-03-29Arrays are not allowed as vertex shader inputs in GLSL 1.30 eitherIan Romanick
2010-03-29Add some checking for vertex shader inputs / attributesIan Romanick
This causes the following tests to pass: glslparsertest/shaders/attribute.vert glslparsertest/shaders/attribute1.vert glslparsertest/shaders/attribute2.vert
2010-03-29Use call-by-reference for apply_implicit_conversionIan Romanick
I'm not sure if this is a win or not. It makes the code in apply_implicit_conversion more clear, but it obscures the fact that it may change the pointers.
2010-03-29Apply implicit conversions to ?: operatorIan Romanick
2010-03-29Apply implicit conversions to equality operatorsIan Romanick
2010-03-29Apply implicit conversions to relational operatorsIan Romanick
2010-03-29Apply implicit conversions to arithmetic operatorsIan Romanick
2010-03-29Implement HIR conversion for ?: operatorIan Romanick
2010-03-29Add generate_temporary to generate an anonymous temporaryIan Romanick
2010-03-29Implement HIR conversion for ast_nequal and ast_equalIan Romanick
The following tests now pass: shaders/glsl-unused-varying.frag shaders/glsl-fs-sqrt-branch.frag
2010-03-29Add missing break-statements in ast_expression::hirIan Romanick
The ast_conditional case was flowing right into ast_pre_inc.
2010-03-29Implement ir_if (for if-statments) and conversion from ASTIan Romanick
The following tests now pass: glslparsertest/shaders/if1.frag glslparsertest/shaders/if2.frag The following tests that used to pass now fail. It appears that most of these fail because ast_nequal and ast_equal are not converted to HIR. shaders/glsl-unused-varying.frag shaders/glsl-fs-sqrt-branch.frag
2010-03-29Add a variable to the symbol table after processing the initializerIan Romanick
2010-03-29Reject main() declarations with a non-void return value.Eric Anholt
Fixes main3.vert.
2010-03-29Reject variables marked with attribute in the fragment shader.Eric Anholt
Fixes attribute.frag.
2010-03-29Implement the first builtin function: exp().Eric Anholt
2010-03-28Generate more correctly diagnostics from some invalid initializersIan Romanick
2010-03-27Initial bits to process initializers in variable declarationsIan Romanick
As a result, the following tests pass: glslparsertest/array3.frag glslparsertest/CGStandardLibrary.frag glslparsertest/ConstantConversions.frag glslparsertest/constructor1.frag glslparsertest/constructor2.frag glslparsertest/constructor3.V110.frag glslparsertest/dataType4.frag glslparsertest/dataType5.frag glslparsertest/dataType13.frag glslparsertest/dataType19.frag glslparsertest/matrix.V110.frag glslparsertest/parser7.frag glslparsertest/swizzle3.frag The following tests also pass, but it is just by dumb luck. In these cases the shader fails to compile, but it fails for the wrong reason: glslparsertest/array6.frag glslparsertest/comma2.frag glslparsertest/conditional1.frag glslparsertest/conditional2.frag glslparsertest/conditional3.frag glslparsertest/constFunc.frag glslparsertest/ParseTest3.frag glslparsertest/ParseTest4.frag glslparsertest/varying3.frag glslparsertest/parser8.frag (also segfaults) glslparsertest/parser9.frag (also segfaults) The following tests now fail. As far as I can tell, these are all cases where the shader was failing to compile, but it was failing for the wrong reason. glslparsertest/CorrectMatComma.frag glslparsertest/CorrectModule.frag glslparsertest/CorrectSwizzle2.vert glslparsertest/shaders/glsl-fs-bug25902.frag
2010-03-26Reject uniform initializers in GLSL 1.10 modeIan Romanick
Now both glslparsertest/dataType3.frag and glslparsertest/dataType2.frag pass.
2010-03-26Set the var_type for arrays to error_type until it's implemented.Eric Anholt
"Fixes" segfaults in array tests.
2010-03-26Add support for ast_to_hir of pre inc/dec.Eric Anholt
2010-03-26Add support for ast_to_hir of post inc/dec.Eric Anholt
2010-03-26Add support for %= in ast_to_hir.Eric Anholt
2010-03-26Factor out assignment setup in ast_to_hir.Eric Anholt
2010-03-26Replace remaining use of is_error_type with glsl_type::is_errorIan Romanick
2010-03-26Replace remaining uses of is_numeric_base_type with glsl_type::is_numericIan Romanick
2010-03-26Replace is_integer_base_type macro with glsl_type::is_integer methodIan Romanick
2010-03-26Make glsl_*_type glsl_type class static dataIan Romanick
2010-03-26Use glsl_type::is_error instead of comparison with glsl_error_type pointerIan Romanick
2010-03-26Move swizzles out of ir_dereference and into their own class.Kenneth Graunke
Also turn generate_swizzle into a static "create" method of the new class; we'll want to use it for the IR reader as well. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-26Add new abstract ir_rvalue class; rework accordingly.Kenneth Graunke
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-26Replace "mode" type tag with virtual as_foo() downcasting functions.Kenneth Graunke
These should work well even in a non-flat IR hierarchy. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>