Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Make two passes over the constructor parameters. Write all of the
constants in a single write, then write the non-constants one at a
time. This causes the fragment shader
varying float g;
void main()
{
gl_FragColor = vec4(0.0, g, 0.0, 1.0);
}
to generate
(function main
(signature void (parameters )
(
(declare (temporary ) vec4 vec_ctor@0x8580058)
(assign (constant bool (1)) (xzw) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (y) (var_ref vec_ctor@0x8580058) (swiz xxxx (var_ref g@0x8580218) ))
(assign (constant bool (1)) (xyzw) (var_ref gl_FragColor@0x84d32a0) (var_ref vec_ctor@0x8580058) )
))
)
instead of
(function main
(signature void (parameters )
(
(declare (temporary ) vec4 vec_ctor@0x8580058)
(assign (constant bool (1)) (x) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (y) (var_ref vec_ctor@0x8580058) (swiz xxxx (var_ref g@0x8580218) ))
(assign (constant bool (1)) (z) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (w) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (xyzw) (var_ref gl_FragColor@0x84d32a0) (var_ref vec_ctor@0x8580058) )
))
)
A similar optimization could be done for matrix constructors, but it
is a little more complicate there.
|
|
Fixes glsl-uniform-linking-1 and failure to link a shader in Unigine.
An alternative here would be to just ditch using _mesa_add_parameter
and build the initial params list on our own, but that would require
two walks of the list as well.
Bug #29822
|
|
|
|
cond_update wasn't being set by emit_op3, leading to valgrind
complaints, and failures in several piglit tests when built with
clang.
|
|
Previously, using bit-wise operators in some larger expression would
crash on a NULL pointer dereference. This code at least doesn't crash.
Fixes piglit test bitwise-01.frag.
|
|
|
|
EGL_MESA_drm_{display,image} can achieve the same functionality.
|
|
For some reason r600c, emits extra instructions in the FP to do the depth write output swizzle,
I'm not sure this is required, so here I'm doing it in the exports.
this fixes the mesa trivial demos tri-depthwrite and tri-depthwrite2, it doesn't fix
the glsl1 gl_FragDepth writing test however.
|
|
|
|
|
|
this fixes a few if the fs shader tests, 10 more piglits
|
|
|
|
sqrt(x) = 1/rsq(x) = x*rsq(x)
This optimization already was in the old GLSL compiler.
Acked on irc by Eric Anholt.
|
|
Fixes piglit test glsl-override-builtin. The linker incorrectly found
the prototype for the float signature, rather than adding a new
prototype with the int return type. This caused ir_calls with type int
to have their callees set to the float signature, triggering an assert.
|
|
this is a bit of a workaround, something is wrong with the literal emits here
so we just use the trig copy function to copy the immd to a temp at start of op.
fix VP/FP LIT tests
|
|
This includes several corrections for fixing depth test on sandybridge.
Fix wrong bits definition in depth stencil state. Fix wrong order of
state buffer offset in 3DSTATE_CC_STATE_POINTERS command. Correctly use
buffer width parameter in depth buffer setting.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
|
|
So as the trig functions used up the literal spots for the PI work, if the arg0 was an immediate
we'd hit failure, so copy the literal before starting.
add some tracking of max temp used to avoid trashing temp regs.
5 more piglits, fp1 COS,SCS,SIN tests
|
|
|
|
constant splitting was broken for multi-constant cases, fixes fp1 CMP+MAD, vp1 CMP.
|
|
|
|
Also add an error if we hit this problem again, we need to do this better
possibly tying the literal addition to the last flag.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Fixes piglit test case glsl-array-varying-01.
|
|
|
|
It was mistaking clang for gcc and deciding its version
was too low.
|
|
also link osmesa with C++ standard libraries, as it now contains C++ code
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
When releasing the builtin functions, we were just freeing the memory,
not telling the builtin function loader that we had freed its memory.
I wish I had done ARB_ES2_compatibility so we had regression testing
of this path. Fixes segfault on changing video options in nexuiz.
|
|
|
|
All pragmas are currently ignored. Also, the error messages when a
pragma is used incorrectly (i.e., '#pragma debug(on)' inside a
function) are crap, but I think this is sufficient for now.
Fixes piglit test cases pragma-0[1-8].(vert|frag).
|
|
Previously, if an attribute was enabled by either a specific GL version
or an extension, the check would require -both- to be enabled. This bug
was not discovered earlier because version checks are currently only ever
used on their own.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
|
|
Idea is to build hw state at pipe state creation and
reuse them while keeping a non PM4 packet interface
btw winsys & pipe driver. This commit also force rebuild
of pm4 packet on each call to radeon_state_pm4 which
in turn slow down everythings, this will be addressed.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
The current states code had an unhealthy relationship between
that had to somehow magically align themselves, editing either
place meant renumbering all states after the one you were on,
and it was pretty unapproachable code.
This replaces the huge types structures with a simple type + sub
type struct, which is keyed on an stype enum in radeon.h. Each
stype can have a per-shader type subclassing (4 types supported,
PS/VS/GS/FS), and also has a number of states per-subtype. So you
have 256 constants per 4 shaders per one CONSTANT stype.
The interface from the driver is changed to pass in the tuple,
(stype, id, shader_type), and we look for this. If
radeon_state_shader ever shows up on profile, it could use a
hashtable based on stype/shader_type to speed things up.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
The __GLapi typedef was removed in c356f5867f2c1fad7155df538b9affa8dbdcf869,
but the code generator hasn't been updated.
|
|
Fixes the 7 regressions with constant buffers forced on with piglit -t
glsl (glsl-vs-if-*).
|
|
Fixes a regression in point-line-no-cull and glean/paths tests since
501c9dc62774a73c080d500a1eab773b0da9577e.
|
|
Bug #29855
|
|
This includes a handy little safety check to prevent the loop from
going "too long", as permitted by the spec. I haven't gone out of my
way to test it, though…
Fixes 20 more piglit tests.
|
|
We always need to set it, so pass it in.
|
|
Fixes 3 testcases related to discard.
|
|
Like the comparison operations, this suffered from CMP only setting
the low bit. Doing the AND instructions would be the same instruction
count as the more obvious conditional moves, so do cond moves.
Fixes glsl-fs-sign and 6 other cases, like trig functions that use
sign() internally.
|
|
Fixes 5 piglit tests for bias. Note that LOD is a 1.30 feature and
not yet supported.
|
|
|
|
Addresses the warnings:
warning: ‘target’ may be used uninitialized in this function
warning: ‘target_string’ may be used uninitialized in this function
|
|
|
|
|
|
Fixes gcc warning
In function ‘_mesa_add_unnamed_constant’:
warning: ‘pos’ may be used uninitialized in this function
but also what appears to be a bug.
|