Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
These builtin functions are represented by ir_expression_operations, so
we can just create one of those and ask for its value.
|
|
These always return zero (the derivative of a constant).
|
|
|
|
|
|
|
|
|
|
This conveniently creates a zero value of whatever type you want.
|
|
Fixes:
glsl-arb-fragment-coord-conventions-define
|
|
Fixes:
glsl-arb-fragment-coord-conventions
|
|
The rest cannot be handled until built-in variables (i.e.,
gl_FragCoord) can be redeclared to add qualifiers.
|
|
|
|
Fixes:
glsl1-varying read but not written
glsl1-varying var mismatch
|
|
This fixes an assertion failure in ir_to_mesa, and the varying won't
take up varying space.
|
|
This is now consistent with other usage of flex/bison througout mesa,
(which is that these generated files are added to source control so
that the build system does not require external tools like flex/bison
for non-developers).
|
|
These are generated files where we can do the sane thing, and keep
them out of version control.
|
|
The mesa build environment does not (currently) accept external
dependencies such as flex and bison. The compromise is to commit the
generated output files, (in spite of the pain that comes from having
generated files under version control).
|
|
I simply forgot to add this file when adding the test case originally.
|
|
|
|
Cleans up some of the FINISHMEs in this file.
|
|
The "%expect 0" construct will make bison emit an error if any future
changes to the grammar introduce shift/reduce conflicts, (without also
increasing the number after "%expect").
|
|
Since we have productions to turn "defined FOO" and "defined ( FOO )"
into a conditional_token we don't need to list DEFINED as an operator
as well. Doing so just introduces the shift/reduce ambiguity with no
benefit.
|
|
Fixes:
glsl1-GLSL 1.20 uniform array constructor
|
|
I managed to revert the change from unlinked at some point while
cleaning up the changes. glsl-fs-raytrace-bug27060 drops from 389
instructions to 370.
|
|
If an undeclared variable was dereferenced in an expression that
needed constant expression handling, we would walk off a null ir->var
pointer.
Fixes:
glsl1-TIntermediate::addUnaryMath
|
|
glsl-fs-raytrace-bug27060 goes from 485 Mesa IR instructions to 389
before Mesa IR optimization.
|
|
If we don't walk into functions, we won't see any usage of variables
in the functions.
|
|
This way, we don't need to pass in a parse state, and the context
doesn't grow with the number of passes through optimization.
|
|
Otherwise, we end up losing structure names after compile time, and
dumping IR often ends up reporting some other mysterious string.
|
|
This cleans up the assembly output of almost all the non-logic tests
glsl-algebraic-*. glsl-algebraic-pow-two needs love (basically,
flattening to a temporary and squaring it).
|
|
|
|
|
|
|
|
Fixes a link-time crash in glsl-vs-cross-3.
|
|
|
|
This pulls in multiple i965 driver fixes which will help ensure better
testing coverage during development, and also gets past the conflicts
of the src/mesa/shader -> src/mesa/program move.
Conflicts:
src/mesa/Makefile
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.h
|
|
It's supposed to be x - y * floor(x/y), not (x - y) * floor(x/y).
|
|
|
|
|
|
|
|
|
|
Top-level instructions now get NULL as their default type (since type is
irrelevant for things like ir_function), while ir_rvalues get error_type
by default.
This should make it easier to tell if we've forgotten to set a type. It
also fixes some "Conditional jump or move depends on uninitialized
value" errors in valgrind caused by ir_validate examining the type of
top level ir_instructions, which weren't set.
|
|
Assignments can only exist at the top level instruction stream; the
residual value is handled by assigning the value to a temporary and
returning an ir_dereference_variable of that temporary.
|
|
ir_to_mesa was updated for the _mesa_glsl_parse_state constructor
changes, but main.cpp was not.
|
|
Variables with mode ir_var_temporary were causing an out of bounds array
access and filling my screen with rubbish. I'm not sure if "temporary"
is the right thing to print.
|
|
It's really hard to believe that this case has been broken, but apparently
no test previously exercised it. So this commit adds such a test and fixes
it by making a copy of the argument token-list before expanding it.
This fix causes the following glean tests to now pass:
glsl1-Preprocessor test 6 (#if 0, #define macro)
glsl1-Preprocessor test 7 (multi-line #define)
|