Commit graph

38399 commits

Author SHA1 Message Date
Dave Airlie
85e401d8bf r600g: fix LIT tests 2010-08-31 10:46:58 +10:00
Dave Airlie
5ea238b799 r600g: add missing literals
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>
2010-08-31 09:43:48 +10:00
Ian Romanick
df869d9163 linker: Handle varying arrays, matrices, and arrays of matrices
Fixes piglit test case glsl-array-varying-01.
2010-08-30 16:02:51 -07:00
Eric Anholt
a3c2bd416a Don't pass -ffast-math to clang, since it ignores it and complains. 2010-08-30 14:20:05 -07:00
nobled
2a50187a92 Make configure work with clang
It was mistaking clang for gcc and deciding its version
was too low.
2010-08-30 13:59:18 -07:00
Jon TURNEY
e637f8b40c Add talloc to osmesa library dependencies
also link osmesa with C++ standard libraries, as it now contains C++ code

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-08-30 13:41:39 -07:00
Jon TURNEY
6356303de6 Add talloc to dependencies for libGL built with xlib driver
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-08-30 13:41:36 -07:00
Eric Anholt
8b3d36d563 glsl: Clear the static values of builtin function profiles at release.
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.
2010-08-30 13:12:24 -07:00
Ian Romanick
33fe364e5a glsl2: Commit generated files changed by previous commit 2010-08-30 12:52:42 -07:00
Ian Romanick
bea3963f59 glsl2: Parse #pragma lines
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).
2010-08-30 12:52:42 -07:00
Kenneth Graunke
9b0ba68b44 Fix inverted version checks in check_extra.
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>
2010-08-30 12:29:22 -07:00
Jerome Glisse
de0b76cab2 r600g: precompute some of the hw state
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>
2010-08-30 15:00:55 -04:00
Jerome Glisse
0bba7796a3 r600g: fix depth buffer decompression after states rework
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-30 15:00:55 -04:00
Dave Airlie
69c30f5d6d r600g: fixup states generation in winsys.
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>
2010-08-30 15:00:55 -04:00
Luca Barbieri
699c82e30c glapi: fix generator which got out of sync with the codebase
The __GLapi typedef was removed in c356f5867f,
but the code generator hasn't been updated.
2010-08-30 20:51:49 +02:00
Eric Anholt
5360c48317 i965: Clear the cached constant buffer entry in the VS at control flow.
Fixes the 7 regressions with constant buffers forced on with piglit -t
glsl (glsl-vs-if-*).
2010-08-30 11:19:30 -07:00
Eric Anholt
3bae20bbc9 i965: Align the number of payload regs to 2 again in 16-wide mode.
Fixes a regression in point-line-no-cull and glean/paths tests since
501c9dc627.
2010-08-30 10:47:05 -07:00
Cedric Vivier
e1aa3c234f i965: Apply the rest of the old-libdrm guard patch.
Bug #29855
2010-08-30 10:42:20 -07:00
Eric Anholt
1fcb5a9858 i965: Add support for loops to the new FS backend.
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.
2010-08-30 10:26:05 -07:00
Eric Anholt
352dff62f8 i965: Make brw_CONT and brw_BREAK take the pop count.
We always need to set it, so pass it in.
2010-08-30 10:26:05 -07:00
Eric Anholt
b0a933a4d9 i965: Add "discard" support to the new FS backend.
Fixes 3 testcases related to discard.
2010-08-30 10:26:05 -07:00
Eric Anholt
4ff25c2106 i965: Fix the new implementation of ir_unop_sign to match brw_wm_emit.c
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.
2010-08-30 10:26:05 -07:00
Eric Anholt
40aadafa91 i965: Add support for texturing with bias to i965 FS backend.
Fixes 5 piglit tests for bias.  Note that LOD is a 1.30 feature and
not yet supported.
2010-08-30 10:26:05 -07:00
José Fonseca
f3eebb8465 glut: Silence missing initializer warning. 2010-08-30 14:12:01 +01:00
José Fonseca
4841c0a15a mesa: Return after assertion failure.
Addresses the warnings:
warning: ‘target’ may be used uninitialized in this function
warning: ‘target_string’ may be used uninitialized in this function
2010-08-30 13:59:24 +01:00
José Fonseca
0a6c908e0d gallivm: Compute the 4 texel offsets for linear filtering en ensemble. 2010-08-30 13:58:09 +01:00
José Fonseca
ccd8b935e4 glsl: Silence unused variable warning. 2010-08-30 13:53:15 +01:00
José Fonseca
128237927d mesa: Fix _mesa_lookup_parameter_constant's return value.
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.
2010-08-30 13:48:21 +01:00
José Fonseca
e4c3e7f9d8 gallivm: Disable LLVM's pretty stack trace dumper.
By default LLVM adds a signal handler to output a pretty stack trace.
This signal handler is never removed, causing problems when unloading
the shared object where the gallium driver resides.

Thanks to Chris Li for finding this.
2010-08-30 13:27:28 +01:00
José Fonseca
7a08dbcf55 gallivm: Correct copy'n'pasted comments. 2010-08-30 13:27:03 +01:00
José Fonseca
e18c7f68b4 gallivm: Fix lp_build_sum_vector.
The result is scalar, so when argument is zero/undef we can pass vector
zero/undef.

Also, support the scalar case.
2010-08-30 13:26:29 +01:00
Michal Krol
1bb97610e9 svga: Fix CMP translation for vertex shader targets.
SVGA3DOP_CMP is not supported for vertex shaders;
use SLT + LRP instead.
2010-08-30 13:01:58 +01:00
José Fonseca
5a70db6432 svga: Re-emit bound rendertargets and texture samplers at the beginning of every command buffer.
Only non null resources.

To ensure that relocations are emitted for every resource currently
referred.
2010-08-30 13:01:57 +01:00
Marek Olšák
007bac8331 st/mesa: set the MaxVarying GLSL constant 2010-08-30 13:27:36 +02:00
Marek Olšák
77dac1945f r300g: fix warning in winsys 2010-08-30 13:25:07 +02:00
Dave Airlie
57eecbbf6c r600g: add DST opcode support. 2010-08-30 16:22:54 +10:00
Dave Airlie
92f5c7a597 r600g: add SCS support. 2010-08-30 16:09:39 +10:00
Dave Airlie
db92a03aac r600g: fix warning introduced by last commit. 2010-08-30 15:50:52 +10:00
Dave Airlie
47d5a19df1 r600g: add initial relative support to assembler
passes another ~20 piglits.

/me starts to run out low hanging fruit around now.
2010-08-30 15:47:49 +10:00
Ian Romanick
a2711d6968 linker: Treat sized and unsized array types as the same
If two shaders contain variables declared with array types that have
the same base type but one is sized and the other is not, linking
should succeed.  I'm not super pleased with the way this is
implemented, and I am more convinced than ever that we need more
linker tests.  We especially need "negative" tests.

Fixes bugzilla #29697 and piglit test glsl-link-array-01.
2010-08-29 22:11:35 -07:00
Dave Airlie
4502b17901 r600g: add KILP support
passes glsl1-discard tests
2010-08-30 15:04:40 +10:00
Dave Airlie
cb08b9fa84 r600g: fix SSG and op3 neg writing
8 more piglits, mainly the two SSG tests.
2010-08-30 14:22:12 +10:00
Dave Airlie
09547e1bce r600g : add basic loop support.
Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c.

17 piglits more on r300g.tests.
2010-08-30 13:38:33 +10:00
Bas Nieuwenhuizen
cd4bd4fb53 r600g: use the values from the correct literals
Created an array for literals as we should not always use the last declared literal.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 09:41:02 +10:00
Bas Nieuwenhuizen
e77b1e777d r600g: added literals where needed for POW instruction
Fixes size calculation for the bytecode buffer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 09:41:02 +10:00
Richard Li
b3d41844c7 evergreen : fix shader const allocation and instruction bugs. 2010-08-29 19:27:46 -04:00
Vinson Lee
0c93e69b25 glsl: Initialize data in ast_function_expression::hir.
Completely initialize data that is passed to ir_constant constructor.

Fixes piglit glsl-orangebook-ch06-bump valgrind uninitialized variable
error on softpipe and llvmpipe.
2010-08-29 14:05:07 -07:00
Vinson Lee
30a0865528 glsl: Completely initialize value member in ir_constant constructor.
The
ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
did not completely initialize the entire value member.

Fixes piglit glsl-fs-sampler-numbering-2 valgrind uninitialized value
error in softpipe and llvmpipe.
2010-08-29 13:15:56 -07:00
Vinson Lee
2d0ef6bfee glsl: Initialize variable in ir_swizzle::constant_expression_value.
Complete initialize data passed to ir_constant constructor.

Fixes piglit glsl-mat-from-int-ctor-02 valgrind unintialized variable
error with softpipe and llvmpipe.
2010-08-29 12:19:57 -07:00
Vinson Lee
b43611b79c glsl: Initialize data in read_constant.
Completely initialize data that is passed into a ir_constant constructor.

Fixes piglit glsl-fs-mix valgrind uninitialized variable error on
softpipe and llvmpipe.
2010-08-29 11:48:02 -07:00