| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is necessary for GLSL 1.30+ shadow sampling functions, which return
a single float rather than splatting the value to a vec4 based on
GL_DEPTH_TEXTURE_MODE.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It would be nice if we handled optimized uniform math like this in
some generic way, since people often end up doing uniform expressions
in shaders, but for now keep this hard-coded like it was in the
texenvprogram code.
|
|
|
|
|
|
|
| |
For fixed function fragment processing in GLSL IR, we want to be able
to reference this state value. gl_* not explicitly permitted is
reserved, so using this variable name internally shouldn't be any
issue.
|
| |
|
| |
|
|
|
|
|
|
| |
Fixes piglit test glsl-function-chain16 and bugzilla #34203.
NOTE: This is a candidate for stable release branches.
|
|
|
|
|
|
|
|
| |
The signature list in a function must contain only ir_function_signature nodes.
The target of an ir_call must be an ir_function_signature.
These were added while trying to debug Mesa bugzilla #34203.
|
|
|
|
|
| |
The return type can be void, and this is the case where a `_ret_val'
variable should not be declared.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an array redeclaration includes an initializer, the initializer
would previously be dropped on the floor. Instead, directly apply the
initializer to the correct ir_variable instance and append the
generated instructions.
Fixes bugzilla #34374 and piglit tests glsl-{vs,fs}-array-redeclaration.
NOTE: This is a candidate for stable release branches. 0292ffb8 and
8e6cb9fe are also necessary.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
These are now unnecessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the rule deleted by this commit was matched every single
time (being the longest match). If not skipping, it used REJECT to
continue on to the actual correct rule.
The flex manual advises against using REJECT where possible, as it is
one of the most expensive lexer features. So using it on every match
seems undesirable. Perhaps more importantly, it made it necessary for
the #if directive rules to contain a look-ahead pattern to make them
as long as the (now deleted) "skip the whole line" rule.
This patch introduces an exclusive start state, SKIP, to avoid REJECTs.
Each time the lexer is called, the code at the top of the rules section
will run, implicitly switching the state to the correct one.
Fixes piglit tests 16384-consecutive-chars.frag and
16385-consecutive-chars.frag.
|
|
|
|
|
|
|
| |
The expected result has been out of sync with what glcpp produces for
some time; glcpp's actual result seems to be correct and is very close to
GCC's cpp. Updating this will make it easier to catch regressions in
upcoming commits.
|
| |
|
| |
|
|
|
|
| |
This is a remnant of when glsl2 lived in its own repository.
|
|
|
|
| |
These have long since moved to piglit and aren't useful to have here.
|
|
|
|
|
| |
This gets it building again here; I'll leave it up to the SCons
maintainers to make further improvements.
|
|
|
|
|
| |
SCons has built-in support for .ll and .yy, but not .lpp and .ypp. Since
there's no real benefit to using the old names, change them.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Plugs a memory leak when compiling shaders with user defined structures.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
|
|
|
|
| |
A copy and paste error.
|
|
|
|
|
|
| |
Fixes bug #34346.
Signed-off-by: Kenneth Graunke <[email protected]>
|
| |
|
|
|
|
| |
Hopefully should fix bug #34468.
|
|
|
|
|
|
|
|
|
| |
Arrays are zero based. If the highest element accessed is 6, the
array needs to have 7 elements.
Fixes piglit test glsl-fs-implicit-array-size-03 and bugzilla #34198.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160
Commit e7c1f058d18f62aa4871aec623f994d7b68cb8c1 disabled constant-folding
when division-by-zero occured. This was a mistake, because the spec does
allow division by zero. (From section 5.9 of the GLSL 1.20 spec: Dividing
by zero does not cause an exception but does result in an unspecified
value.)
For floating-point division, the original pre-e7c1f05 behavior is
reinstated.
For integer division, constant-fold 1/0 to 0.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b3cf92aa916ee0537ee37723c23a9897ac9cd3e0.
The reverted commit prevented constant-folding of reciprocal expressions
when the reciprocated expression was 0. However, since the spec allows
division by zero, constant-folding *is* permissible in this case.
From Section 5.9 of the GLSL 1.20 spec:
Dividing by zero does not cause an exception but does result in an
unspecified value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This an adds --enable-shared-dricore option to configure. When enabled,
DRI modules will link against a shared copy of the common mesa routines
rather than statically linking these.
This saves about 30MB on disc with a full complement of classic DRI
drivers.
v2: Only enable with a gcc-compatible compiler that handles rpath
Handle DRI_CFLAGS without filter-out magic
Build shared libraries with the full mklib voodoo
Fix typos
v3: Resolve conflicts with talloc removal patches
Signed-off-by: Christopher James Halse Rogers <[email protected]>
|
|
|
|
|
| |
These should have been committed right after fd1252ab, but they were
missed. Soon, we'll never have to do this again...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Track variables, functions, and types during parsing. Use this
information in the lexer to return the currect "type" for identifiers.
Change the handling of structure constructors. They will now show up
in the AST as constructors (instead of plain function calls).
Fixes piglit tests constructor-18.vert, constructor-19.vert, and
constructor-20.vert. Also fixes bugzilla #29926.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
|
|
|
|
|
|
|
|
|
| |
This requires lexical disambiguation between variable and type
identifiers (as most C compilers do).
Signed-off-by: Keith Packard <[email protected]>
NOTE: This is a candidate for the 7.9 and 7.10 branches.
|
| |
|
| |
|
|
|
|
|
|
| |
Broken since e0c1fc32832b66b52e6352ba563288ee48a1face.
Signed-off-by: Kenneth Graunke <[email protected]>
|
|
|
|
|
| |
Also, add a 'glcpp' target so you can type 'make glcpp' instead of
'make glcpp/glcpp'.
|
|
|
|
| |
It apparently regressed a bunch of ES2 cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From section 5.9 of the GLSL 1.20 spec:
The operator modulus (%) is reserved for future use.
From section 5.8 of the GLSL 1.20 spec:
The assignments modulus into (%=), left shift by (<<=), right shift by
(>>=), inclusive or into ( |=), and exclusive or into ( ^=). These
operators are reserved for future use.
The GLSL ES 1.00 spec and GLSL 1.10 spec have similiar language.
Fixes bug:
https://bugs.freedesktop.org//show_bug.cgi?id=33916
Fixes Piglit tests:
spec/glsl-1.00/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.00/compiler/assignment-operators/modulus-assign-00.frag
spec/glsl-1.10/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.10/compiler/assignment-operators/modulus-assign-00.frag
spec/glsl-1.20/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.20/compiler/assignment-operators/modulus-assign-00.frag
|
|
|
|
|
|
| |
ES requires that a vertex shader and a fragment shader be present.
Fixes bugzilla #32214.
|