| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
I didn't expect that this would really work, but it turns out there
are shaders in the wild that do it.
Fixes: (with swrast)
glsl-fs-main-return
glsl-vs-main-return
|
|
|
|
|
| |
We'll need to use the HALT instruction to do this right, like returns
from other functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These binops are the vector-to-bool comparisons, not vec-to-bvec. We
likely want both operations avilable as expression, since 915 and 965
FS naturally does the vector version, while 965 VS can also naturally
do the scalar version. However, we can save that until later.
Fixes:
glsl-fs-vec4-operator-equal.shader_test
glsl-fs-vec4-operator-notequal.shader_test
glsl-vs-vec4-operator-equal.shader_test
glsl-vs-vec4-operator-notequal.shader_test
|
|
|
|
| |
Fixes glsl-fs-sign and many of the tests of trig builtins.
|
|
|
|
|
| |
Fixes glsl-unused-varying and many others, since we produce an output
reg read any time gl_FragColor is written inside an if statement.
|
|
|
|
| |
Fixes glsl-fs-dot-vec2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have glsl2 with if flattening in place, most shaders will
just work. Remaining failing shaders will mostly be due to loop
unrolling (in progress), some possible if flattening failures in
inlining functions (planning on fixing), and the register/instruction
count limits.
While the GLSL and GLSL-ES specs say that shaders shouldn't fail to
compile/link due to register/instruction limits, in practice we're not
the first vendor to expose GLSL on hardware with these limitations.
The benefit to application developers of providing a better language
for GPU programming is greater than the pain of having to handle
instruction limits (which they had to for ARB_fp on this hardware
anyway)
|
|
|
|
| |
with glsl2, reads from outputs are legal
|
|
|
|
|
|
| |
In one optimization pass, register files may have been messed therefore
merging instructions which use the same index in two different register
files.
|
|
|
|
| |
Fixes glsl-vs-dot-vec2.
|
|
|
|
|
| |
This will make extracting source to produce minimal testcases for
shader compile issues easier.
|
| |
|
|
|
|
| |
needed to add cpp rules and includes properly for es1/es2
|
|
|
|
|
|
|
|
| |
This saves an extra message reg move in the program, though I'm not
clear on whether it will have any performance impact other than cache
footprint. It will also fix those math calls on Sandybridge, where
the brw_eu_emit.c brw_math() support relies on the implied move being
used.
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
src/mesa/program/prog_optimize.c
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This is a GLSL2 regression fix.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This lets drivers override ir_to_mesa with their own codegen, or at
least have a native alternative.
|
| | |
| | |
| | |
| | |
| | | |
These are passes that we expect all codegen to be happy with. The
other lowering passes for Mesa IR are moved to the Mesa IR generator.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
All the current HW backends transform subtract to adding the negation,
so I haven't bothered peepholing it back out in Mesa IR. This allows
some subtract of subtract to get removed in ir_algebraic.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Whereas constant folding evaluates constant expressions at rvalue
nodes, constant propagation tracks constant components of vectors
across execution to replace (possibly swizzled) variable dereferences
with constant values, triggering possible constant folding or reduced
variable liveness.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This lets us handle arrays much better than trying to work backwards
from assembly.
Fixes fbo-drawbuffers-maxtargets on swrast (i965 needs loop unrolling)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support for samplers in general is still incomplete -- anything in a
uniform struct will still be broken. But that doesn't appear to be
any different from master.
Fixes:
glsl-fs-uniform-sampler-array.shader_test
|
| | |
| | |
| | |
| | | |
Fixes glean shaderAPI.
|
| | |
| | |
| | |
| | | |
Fixes a failure in glean shaderAPI.
|
| | |
| | |
| | |
| | | |
Fixes piglit test array_texture.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes ir_to_mesa handling of unop_log, which used the weird ARB_vp LOG
opcode that doesn't do what we want. This also lets the multiplication
coefficients in there get constant-folded, possibly.
Fixes:
glsl-fs-log
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Optimizations at compile time should generally be done with the goal
of reducing instruction count so that other work, particularly
linking, is less time-consuming if the shader is used multiple times.
However, function inlining increases instruction count for the inlined
function bodies without removing the original function body, since we
don't know if it will be used at link time or not.
Reduces the runtime of linking and executing a Yo Frankie fragment
shader from 0.9 seconds to 0.5 seconds (-45.9%, +/- 2.2%, n=5).
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Mixing stderr (_mesa_print_program, _mesa_print_instruction,
_mesa_print_alu) with stdout means that when writing both to a file,
there isn't a consistent ordering between the two.
|