Commit graph

37181 commits

Author SHA1 Message Date
Eric Anholt
c8d0a9f006 ir_to_mesa: Add support for MESA_GLSL=dump environment var. 2010-07-22 12:11:36 -07:00
Brian Paul
ca3238f3fc draw: added new assertions to clipping code 2010-07-22 11:18:54 -06:00
Eric Anholt
63ba1ec3c1 i965: Respect VS/VP point size result when enabled.
Fixes glsl-vs-point-size.
2010-07-22 10:06:55 -07:00
Eric Anholt
4ea71cbd0e i965: Fix the disasm output for da16 src widths.
This has confused me twice now.  It's a fixed width of 4 (usually a
region description of <4,4,1>), not 1.  If it was 1, we'd have been
skipping all over register space.
2010-07-22 10:06:55 -07:00
Eric Anholt
86fb92f59c i965: Avoid extra MOV in VS indirect register reads. 2010-07-22 10:06:55 -07:00
Eric Anholt
b69ef5744a i965: Fix up VS temporary array access for fixed index offset != 0. 2010-07-22 10:06:55 -07:00
Henri Verbeet
2fdff50999 r600: Flip point sprite coordinates when rendering to an FBO.
This supersedes http://lists.freedesktop.org/archives/mesa-dev/2010-July/001442.html.
2010-07-22 11:10:11 -04:00
Eric Anholt
7095e2f860 glsl2: Use talloc on InfoLog handling in ValidateProgram
Fixes a segfault in Regnum Online.
2010-07-21 23:21:23 -07:00
Eric Anholt
c686ee0fa7 i965: In the VS, multiply the address reg by the appropriate register size.
The ARL value is increments of vec4 in the register file.  But
PROGRAM_TEMPORARY or PROGRAM_INPUT are stored as vec4s interleaved
between the two verts being executed (thus a vec8 each), compared to
PROGRAM_STATE_VAR being packed vec4s.

Fixes:
glsl-vs-arrays-2
glsl-vs-mov-after-deref
(without regressing glsl-vs-arrays-3)
2010-07-21 22:05:30 -07:00
Eric Anholt
21eaa62ba4 i965: Clean up brw_dp_READ_4_vs() now that it has fewer options to support. 2010-07-21 20:17:24 -07:00
Eric Anholt
96b11f1e3e i965: Support relative addressed VS constant reads using the appropriate msg.
The previous support was overly complicated by trying to use the same
1-OWORD message for both offsets.
2010-07-21 20:17:24 -07:00
Eric Anholt
9e9e87a9b2 i965: Fix the DP read msg_control definitions other than plain OWORD. 2010-07-21 20:17:24 -07:00
Eric Anholt
d0326e0e4e i965: Clean up dead code from the VS get_constant/get_reladdr_constant split. 2010-07-21 20:17:24 -07:00
Eric Anholt
04de6861c1 i956: Set the execution size correctly for scratch space writes.
Otherwise, the second half isn't written, and we end up reading back
black.

Fixes the remaining junk drawn in glsl-max-varyings, and will likely
help with a number of large real-world shaders.
2010-07-21 20:17:24 -07:00
Eric Anholt
ff81a1dd92 i965: Set the GEM domain flags for the scratch space.
They go into the render cache, so while we don't care about their
contents after execution, failing to note them could cause the writes
to be flushed over important buffer contents later.
2010-07-21 20:17:24 -07:00
Eric Anholt
a3bfb2f755 i965: Use the pretty define for 4-oword DP reads. 2010-07-21 20:17:24 -07:00
Eric Anholt
d2f3eac8ff i965: Set the send commit bit on register spills as required pre-gen6.
Otherwise, the subsequent read may not get the written value.
2010-07-21 20:17:24 -07:00
Eric Anholt
0ecf5128a4 i965: Add disasm for dataport reads (register unspilling). 2010-07-21 20:17:24 -07:00
Kristian Høgsberg
7a66e54958 glx: Move last few dri_interface.h types out of glxclient.h and drop include 2010-07-21 22:17:24 -04:00
Kristian Høgsberg
f679640868 glx: Move __driContext field out of __GLXcontextRec 2010-07-21 22:17:24 -04:00
Kenneth Graunke
e9384d1d7f glsl2: Update TODO. 2010-07-21 16:38:33 -07:00
Kenneth Graunke
9a6d40fbfb ir_constant_expression: Add support for array == and !=.
Piglit parser tests const-array-03.frag and const-array-04.frag now
generate the correct code.
2010-07-21 16:38:33 -07:00
Kenneth Graunke
a096fa7476 ir_constant_expression: Add support for constant arrays.
Fixes piglit test const-array-02.frag.
2010-07-21 16:38:33 -07:00
Kenneth Graunke
ef2c38b245 ir_reader: Add support for reading constant arrays. 2010-07-21 16:38:33 -07:00
Kenneth Graunke
9930d18c2a ir_print_visitor: Print out constant arrays. 2010-07-21 16:38:33 -07:00
Kenneth Graunke
7ea977a15c ir_print_visitor: Remove commas between ir_constant's components.
The IR reader does not expect commas.
2010-07-21 16:38:33 -07:00
Kenneth Graunke
74e1802f5d glsl2: Extend ir_constant to store constant arrays, and generate them.
Since GLSL permits arrays of structures, we need to store each element
as an ir_constant*, not just ir_constant_data.

Fixes parser tests const-array-01.frag, const-array-03.frag,
const-array-04.frag, const-array-05.frag, though 03 and 04 generate the
wrong code.
2010-07-21 16:38:33 -07:00
Kenneth Graunke
13a19745d4 glsl2: Emit array constructors inline. 2010-07-21 16:38:32 -07:00
Kenneth Graunke
e1d71850fa ast_to_hir: Fix bug in constant initializers.
Implicit conversions were not being performed, nor was there any
type checking - it was possible to have, say, var->type == float
and var->constant_value->type == int.  Later use of the constant
expression would trigger an assertion.

Fixes piglit test const-implicit-conversion.frag.
2010-07-21 16:38:32 -07:00
Kenneth Graunke
46d6b8d1ba ir_constant_expression: Add support for ir_unop_u2f.
Also make ir_unop_i2f only operate on signed integers.
2010-07-21 16:38:32 -07:00
Kenneth Graunke
3163f87463 ir_constant_expression: Remove open coded equality comparisons.
The ir_constant::has_value method already does this.
2010-07-21 16:38:32 -07:00
Kenneth Graunke
0048c7aef8 glsl2: Add some comments. 2010-07-21 16:37:57 -07:00
Kenneth Graunke
c7a18da690 glsl2: Replace insert_before/remove pairs with exec_node::replace_with. 2010-07-21 16:37:57 -07:00
Ian Romanick
d5be2acae3 linker: Link built-in functions instead of including them in every shader
This is an invasive set of changes.  Each user shader tracks a set of other
shaders that contain built-in functions.  During compilation, function
prototypes are imported from these shaders.  During linking, the
shaders are linked with these built-in-function shaders just like with
any other shader.
2010-07-21 15:52:58 -07:00
Ian Romanick
4ccd3c548b glsl2: Add function to import function prototypes from one IR tree to another 2010-07-21 15:52:58 -07:00
Brian Paul
7cd6a6cc99 softpipe: add missing support for PIPE_FORMAT_S8_USCALED surfaces
And remove checks of surface depth bits.  The state tracker should
not turn on depth/stencil testing if the framebuffer doesn't have
depth/stencil.
2010-07-21 16:52:01 -06:00
Brian Paul
ef2d10cd45 softpipe: fix sp_tile_cache_flush_clear() regression 2010-07-21 16:00:52 -06:00
Jerome Glisse
600c85efdb Revert "dri2: Remove an unused variable."
glx_info is used if X_DRI2SwapBuffers is defined
This reverts commit c0ca2bfb2a.
2010-07-21 17:40:37 -04:00
Jerome Glisse
0bca8fbfda r600g: add support for all R6XX/R7XX asic
This configure some of the value properly based on
asic so others asic than RV710 works too.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-21 17:05:37 -04:00
Dave Airlie
4b2820534e r600g: add r600 compile mode to compiler.
some of the ALU instructions are different on r6xx vs r7xx,
separate the alu translation to separate files, and use family
to pick which compile stage to use.
2010-07-21 17:05:37 -04:00
Dave Airlie
9433d0e801 r600g: add family retrival
allow pipe driver to get the family of the gpu.
2010-07-21 17:05:36 -04:00
Marek Olšák
1a3fa3e910 llvmpipe: say no to depth clamp
The other drivers just return 0 without the assert.
2010-07-21 22:54:34 +02:00
Marek Olšák
ca7ead03da r300g: implement depth clamp
Depth clamping seems to be implicit if clipping is disabled.

It's not perfect, but it's good enough for wine and passes
the corresponding piglit tests.
2010-07-21 22:54:34 +02:00
Marek Olšák
5725738ef6 r300g: cleanup clip state emission 2010-07-21 22:54:34 +02:00
Marek Olšák
9ca48de106 draw: disable depth clipping if depth clamp is enabled 2010-07-21 22:54:34 +02:00
Marek Olšák
c304869ec0 st/mesa: implement depth clamp 2010-07-21 22:54:34 +02:00
Marek Olšák
4460e9f0a1 cso: handle depth clamp 2010-07-21 22:54:34 +02:00
Marek Olšák
f47c9b0880 gallium: add depth clamp to the interface 2010-07-21 22:54:34 +02:00
Carl Worth
56d33f8e2b ir_to_mesa: Add missing initializion of lod_info variable.
To quiet a compiler warning.
2010-07-21 13:52:33 -07:00
Carl Worth
a0cfe8c440 glsl: Fix missing initialization of yylloc.source
In both the preprocessor and in the compiler proper, we use a custom
yyltype struct to allow tracking the source-string number in addition
to line and column. However, we were previously relying on bison's
default initialization of the yyltype struct which of course is not
aware of the source field and leaves it uninitialized.

We fix this by defining our own YYLLOC_DEFAULT macro expanding on the
default version (as appears in the bison manual) and adding
initialization of yylloc.source.
2010-07-21 13:52:33 -07:00