Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
Unfortunately, we still have two kinds of matching - one, with implicit
conversions (for use in calls) and another without them (for finding a
prototype to overwrite when processing a function body). This commit
does not attempt to coalesce the two.
|
|
|
|
Now, ir_function is emitted as part of the IR instructions, rather than
simply existing in the symbol table. Individual ir_function_signatures
are not emitted themselves, but only as part of ir_function.
|
|
|
|
Fixes new test function-05.glsl, where the second function has matching
parameter types, but less of them.
|
|
This will be important to optimization passes. We don't want to
dead-code eliminate writes to out varyings, or propagate uninitialized
values of uniforms.
|
|
|
|
It was breaking constant expression detection for constant
initializers, i.e. CorrectParse2.frag, CorrectParse2.vert.
|
|
|
|
Doesn't fix any testcases, but fixes a FINISHME.
|
|
Fixes function9.frag.
|
|
|
|
Previously, generating inlined function bodies was going to be
difficult, as there was no mapping between the body's declaration of
variables where parameter values were supposed to live and the
parameter variables that a caller would use in paramater setup.
Presumably this also have been a problem for actual codegen.
|
|
This will let us know the length of function bodies for the purpose of
inlining (among other uses).
|
|
|
|
Previously the same code was generated for a while loop and a do-while
loop. This pulls the code that generates the conditional break into a
separate method. This method is called either at the beginning or the
end depending on the loop type.
Reported-by: Kenneth Graunke <kenneth@whitecape.org>
|
|
Specifically, handle 'break' and 'continue' inside loops.
This causes the following tests to pass:
glslparsertest/shaders/break.frag
glslparsertest/shaders/continue.frag
|
|
|
|
|
|
This causes the following tests to pass:
glslparsertest/shaders/dowhile.frag
glslparsertest/shaders/while.frag
glslparsertest/shaders/while1.frag
glslparsertest/shaders/while2.frag
|
|
Fixes CorrectParse1.frag and makes for a ton of folding in
CorrectParse2.frag.
|
|
When an unsized array is accessed with a constant extension index this
sets a lower bound on the allowable sizes. When the unsized array
gets a size set due to a whole-array assignment, this size must be at
least as large as the implied lower bound.
This causes the following tests to pass:
glslparsertest/glsl2/array-16.vert
|
|
This causes the following tests to pass:
glslparsertest/glsl2/matrix-11.vert
glslparsertest/glsl2/matrix-12.vert
glslparsertest/shaders/CorrectParse2.vert
glslparsertest/shaders/CorrectSwizzle2.frag
|
|
|
|
In GLSL 1.10 this was not allowed, but in GLSL 1.20 and later it is.
This causes the following tests to pass:
glslparsertest/glsl2/array-09.vert
glslparsertest/glsl2/array-13.vert
|
|
If there is a void parameter it must not have a name, and it must be
the only parameter.
|
|
|
|
|
|
|
|
Fixes CorrectFuncOverload.frag.
|
|
Fixes varying2.frag.
|
|
They were always throwing a type error because type wasn't being set.
|
|
|
|
|
|
|
|
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
Fixes constFunc.frag.
|
|
This regresses constFunc.frag, but that's just unexpectedly passing
because of the FINISHME just above.
|
|
Fixes segfaults in a shader consisting of just:
void main(void) { }
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
For unsized arrays, we can't flag out-of-bounds accesses until the
array is redeclared with a size. Track the maximum accessed element
and generate an error if the declaration specifies a size that would
cause that access to be out-of-bounds.
This causes the following tests to pass:
glslparsertest/shaders/array10.frag
|
|
This causes the following tests to pass:
glslparsertest/shaders/parser3.frag
glslparsertest/shaders/varying3.frag (also generates spurious error)
|
|
Test glslparsertest/shaders/array11.frag now passes for the right reason.
|
|
ast_function::hir consists of bits pulled out of
ast_function_definition::hir. In fact, the later uses the former to
do a lot of its processing. Several class private data fields were
added to ast_function to facilitate communicate between the two.
This causes the following tests to pass:
glslparsertest/shaders/CorrectModule.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/function9.frag
glslparsertest/shaders/function10.frag
|
|
Several other code movements were also done. This partitions this
function into two halves. The first half processes the prototype
part, and the second have processes the actual function definition.
The coming patch series will parition ast_function_definition::hir
into (at least) two separate functions.
|