summaryrefslogtreecommitdiff
path: root/src/glsl
AgeCommit message (Collapse)Author
2011-01-31glsl/builtins: Uncomment prototypes for texture*Offset functions.Kenneth Graunke
2011-01-31texture_builtins.py: Generate texture*Offset functions.Kenneth Graunke
2011-01-31texture_builtins.py: Generalize the "use_proj" field to support offsets.Kenneth Graunke
Rather than passing "True", pass a bitfield describing the particular variant's features - either projection or offset. This should make the code a bit more readable ("Proj" instead of "True") and make it easier to support offsets in the future.
2011-01-31texture_builtins.py: Refactor coordinate dimension calculations.Kenneth Graunke
For offsets, we'll want the straight sampler dimensionality, without the +1 for array types. Create a new function to do that; refactor.
2011-01-31glsl: Introduce a new "const_in" variable mode.Kenneth Graunke
This annotation is for an "in" function parameter for which it is only legal to pass constant expressions. The only known example of this, currently, is the textureOffset functions. This should never be used for globals.
2011-01-31glsl: Change texel offsets to a single vector rvalue.Kenneth Graunke
Having these as actual integer values makes it difficult to implement the texture*Offset built-in functions, since the offset is actually a function parameter (which doesn't have a constant value). The original rationale was that some hardware needs these offset baked into the instruction opcode. However, at least i965 should be able to support non-constant offsets. Others should be able to rely on inlining and constant propagation.
2011-01-31glsl: Re-synchronize ir_variable_mode and the printer's string array.Kenneth Graunke
Since the introduction of ir_var_system_value, system variables would be printed as "temporary" and temporaries would result in out-of-bounds array access, showing up as garbage in printed IR.
2011-01-31Remove talloc from the SCons build system.Kenneth Graunke
2011-01-31Remove talloc from the make and automake build systems.Kenneth Graunke
2011-01-31ralloc: a new MIT-licensed recursive memory allocator.Kenneth Graunke
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke
2011-01-31ralloc: Add a fake implementation of ralloc based on talloc.Kenneth Graunke
2011-01-29Revert "glcpp: Demote "macro redefined" from an error to a warning"Carl Worth
This reverts commit d3df641f0aba99b0b65ecd4d9b06798bca090a29. The original commit had sat unpushed on my machine for months. By the time I found it again, I had forgotten that we had decided not to use this change after all, (the relevant test was removed long ago).
2011-01-28glcpp: Demote "macro redefined" from an error to a warningCarl Worth
The GLSL specification is vague here, (just says "as is standard for C++"), though the C specifications seem quite clear that this should be an error. However, an existing piglit test (CorrectPreprocess11.frag) expects this to be a warning, not an error, so we change this, and document in README the deviation from the specification.
2011-01-26glsl: Refresh autogenerated lexer fileChad Versace
For previous commit.
2011-01-26glsl: Remove extraneously extraneous parensChad Versace
I found this parenthetical usage of parentheses to be extraneously extraneous: (yyextra->ARB_fragment_coord_conventions_enable)
2011-01-26glsl: Enable AMD_conservative_depth in parserChad Versace
All the necessary compiler infrastructure for AMD_conservative_depth is in place, so it's safe to enable it in the parser.
2011-01-26glsl: Raise linking error if gl_FragDepth layout is inconsistentChad Versace
From the AMD_conservative_depth spec: If gl_FragDepth is redeclared in any fragment shader in a program, it must be redeclared in all fragment shaders in that program that have static assignments to gl_FragDepth. All redeclarations of gl_FragDepth in all fragment shaders in a single program must have the same set of qualifiers.
2011-01-26glsl: Propagate depth layout qualifier from AST to IRChad Versace
2011-01-26glsl: Define enum ir_depth_layoutChad Versace
2011-01-26glsl: Refresh autogenerated parser filesChad Versace
For commits titled: glcpp: Conditionally define macro GL_AMD_conservative_depth glsl: Add support for AMD_conservative_depth to parser
2011-01-26glsl: Add support for AMD_conservative_depth to parserChad Versace
When AMD_conservative_depth is enabled: * Let 'layout' be a token. * Extend the production rule of layout_qualifier_id to process the tokens: depth_any depth_greater depth_less depth_unchanged
2011-01-26glsl: Add depth layout qualifiers to ast_type_qualifierChad Versace
2011-01-26glcpp: Conditionally define macro GL_AMD_conservative_depthChad Versace
Define macro GL_AMD_conservative_depth to 1 when its extension is enabled.
2011-01-25linker: Propagate max_array_access while linking functionsIan Romanick
Update the max_array_access of a global as functions that use that global are pulled into the linked shader. Fixes piglit test glsl-fs-implicit-array-size-01 and bugzilla #33219. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-25linker: Set sizes for non-global arrays as wellIan Romanick
Previously only global arrays with implicit sizes would be patched. This causes all arrays that are actually accessed to be sized. Fixes piglit test glsl-fs-implicit-array-size-02. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-25glsl: silence uninitialized var warning in read_texture()Brian Paul
And generate an error if the texture pattern is not matched.
2011-01-25glsl: Fix mingw crosscompileJakob Bornecrantz
2011-01-24glsl: Remove long unused 'configure.ac' file.Kenneth Graunke
This was from way back when glsl2 lived in its own repository.
2011-01-22glsl: Don't assert when the value returned by a function has no rvalueIan Romanick
The rvalue of the returned value can be NULL if the shader says 'return foo();' and foo() is a function that returns void. Existing GLSL specs do *NOT* say that this is an error. The type of the return value is void. If the return type of the function is also void, then this should compile without error. I expect that future versions of the GLSL spec will fix this (wink, wink, nudge, nudge). Fixes piglit test glsl-1.10/compiler/expressions/return-01.vert and bugzilla #33308. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-21glcpp: Regenerate parser files.Kenneth Graunke
2011-01-21glcpp: Remove use of talloc reference counting.Kenneth Graunke
We almost always want to simply steal; we only need to copy when copying a token list (in which case we're already cloning stuff anyway).
2011-01-21glsl, i965: Remove unnecessary talloc includes.Kenneth Graunke
These are already picked up by ir.h or glsl_types.h.
2011-01-21glsl: Improve error message when read-only vars are writtenChad Versace
Improves the cases when: * an explicit assignment references the read-only variable * an 'out' or 'inout' function parameter references the read-only variable
2011-01-21glsl: Mark 'in' variables at global scope as read-onlyChad Versace
Fixes Piglit tests: spec/glsl-1.30/compiler/storage-qualifiers/static-write-centroid-in-01.frag spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-01.frag spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-02.frag
2011-01-21glsl: Remove unused class ast_declaration_statmentChad Versace
2011-01-19Add machine generated files to .gitignoretwied
2011-01-19glsl: Don't bother unsetting a destructor that was never set.Kenneth Graunke
This was totally copied and pasted from glsl_symbol_table.
2011-01-18glsl: Fix segfault due to missing printf argumentChad Versace
Fixes the following Piglit tests: glslparsertest/shaders/array2.frag glslparsertest/shaders/dataType6.frag NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-18glsl: Fix semantic checks on precision qualifiersChad Versace
The check for Precision qualifiers only apply to floating point and integer types. was incomplete. It rejected only type 'bool' and structures.
2011-01-18glsl: Skip the rest of loop unrolling if no loops were found.Eric Anholt
Shaves 1.6% (+/- 1.0%) off of ff_fragment_shader glean texCombine time (n=5).
2011-01-17glsl: Refresh autogenerated parser filesChad Versace
2011-01-17glsl: Remove redundant semantic check in parserChad Versace
The removed semantic check also exists in ast_type_specifier::hir(), which is a more natural location for it. The check verified that precision statements are applied only to types float and int.
2011-01-17glsl: Add support for default precision statementsChad Versace
* Add new field ast_type_specifier::is_precision_statement. * Add semantic checks in ast_type_specifier::hir(). * Alter parser rules accordingly.
2011-01-17glsl: Add semantic checks for precision qualifiersChad Versace
* Check that precision qualifiers only appear in language versions 1.00, 1.30, and later. * Check that precision qualifiers do not apply to bools and structs. Fixes the following Piglit tests: * spec/glsl-1.30/precision-qualifiers/precision-bool-01.frag * spec/glsl-1.30/precision-qualifiers/precision-struct-01.frag * spec/glsl-1.30/precision-qualifiers/precision-struct-02.frag
2011-01-17glsl: Fix parser rule for type_specifierChad Versace
Do not assign a value to ast_type_specifier::precision when no precision qualifier is present.
2011-01-17glsl: Change default value of ast_type_specifier::precisionChad Versace
Change default value to ast_precision_none, which denotes the absence of a precision of a qualifier. Previously, the default value was ast_precision_high. This made it impossible to detect if a precision qualifier was present or not.
2011-01-17glsl: Check that 'centroid in' does not occur in vertex shaderChad Versace
The check is performed only in GLSL versions >= 1.30. From section 4.3.4 of the GLSL 1.30 spec: "It is an error to use centroid in in a vertex shader." Fixes Piglit test spec/glsl-1.30/compiler/storage-qualifiers/vs-centroid-in-01.vert
2011-01-17glsl: Check that interpolation quals only apply to vertex ins and fragment outsChad Versace
The check is performed only in GLSL versions >= 1.30. Fixes the following Piglit tests: * spec/glsl-1.30/compiler/interpolation-qualifiers/fs-smooth-02.frag * spec/glsl-1.30/compiler/interpolation-qualifiers/vs-smooth-01.vert
2011-01-17glsl: Check that interpolation qualifiers do not precede 'varying'Chad Versace
... and 'centroid varying'. The check is performed only in GLSL versions >= 1.30. From page 29 (page 35 of the PDF) of the GLSL 1.30 spec: "interpolation qualifiers may only precede the qualifiers in, centroid in, out, or centroid out in a declaration. They do not apply to the deprecated storage qualifiers varying or centroid varying." Fixes Piglit test spec/glsl-1.30/compiler/interpolation-qualifiers/smooth-varying-01.frag.