Commit graph

37181 commits

Author SHA1 Message Date
Vinson Lee
00fb58ed5d r600: Remove unnecessary header.
Fixes r600_emit.h -> r600_cmdbuf.h -> r600_emit.h include recursion.
2010-07-09 18:59:01 -07:00
Zack Rusin
7b8726a99d mesa: temporarily enable printing of Mesa's GPU instructions 2010-07-09 21:20:50 -04:00
Zack Rusin
b4855288e4 mesa: add basic support for 2D register arrays to mesa
just like in Gallium it's a basic functionality needed by a lot
of modern graphcis extensions
2010-07-09 21:19:28 -04:00
Vinson Lee
308f52d573 r600: Fix include recursion.
r700_chip.h included r600_context.h, which included r700_chip.h.

Remove the unnecessary r600_context.h inclusion and add missing
headers.
2010-07-09 18:09:26 -07:00
Vinson Lee
0c767b9ae6 glslcompiler: Fix GCC warn_unused_result warning. 2010-07-09 17:34:40 -07:00
Vinson Lee
16def30870 glslcompiler: Fix memory leaks on error paths. 2010-07-09 16:20:32 -07:00
Vinson Lee
011e6794e3 glslcompiler: Remove unnecessary headers. 2010-07-09 16:05:42 -07:00
Vinson Lee
343b38a692 mesa: Move [UN]CLAMPED_FLOAT_TO_UBYTE from imports.h to macros.h.
The other similar integer/float conversion macros are in macros.h.
2010-07-09 15:06:19 -07:00
Marek Olšák
347c00c46e r300g: allow the GTT domain for samplers
This fixes sluggishness in vdrift.
2010-07-09 20:28:13 +02:00
Kenneth Graunke
284d821206 ast_function: Fix non-float constructors with matrix arguments.
Previously, code like ivec4(mat2(...)) would fail because the compiler
would naively try to convert a mat2 to an imat2...which doesn't exist.
Now, a separate pass breaks such matrices down to their columns, which
can be converted from vec2 to ivec2.

Fixes piglit tests constructor-11.vert, constructor-14.vert,
constructor-15.vert, and CorrectConstFolding2.frag.
2010-07-09 09:46:29 -07:00
Kenneth Graunke
f58bbd134e ast_function: Move error return earlier and don't indent the world.
This has no functional changes.
2010-07-09 09:46:29 -07:00
Kenneth Graunke
59df3385e1 ast_function: Remove unnecessary check for empty constructors.
This case is already caught by a later check that ensures sufficient
components were provided, based on the type.
2010-07-09 09:46:29 -07:00
Kenneth Graunke
a4dde28ee6 glsl2: Use new foreach_list_safe abstraction. 2010-07-09 09:46:29 -07:00
Kenneth Graunke
f3290e950c glsl2: Add foreach_list_safe which works even when mutating the list.
In particular, with foreach_list_safe, one can remove and free the current
node without crashes; if new nodes are added after the current node,
they will be properly visited as well.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-07-09 09:46:07 -07:00
Tom Stellard
8a8e311d8c r300/compiler: Add a register rename pass.
This pass renames register in order to make it easier for the pair
scheduler to group TEX instructions together.

This fixes fdo bug #28606
2010-07-08 21:11:03 -07:00
Tom Stellard
3724a2e65f r300/compiler: Fix scheduling of TEX instructions.
The following instruction sequence will no longer be emitted in separate
TEX blocks:

0: TEX temp[0].xyz, temp[1].xy__, 2D[0];
1: TEX temp[1].xyz, temp[2].xy__, 2D[0];

This fixes fdo bug #25109
2010-07-08 21:11:03 -07:00
Marek Olšák
75d0e95a3a r300g/swtcl: fix out-of-bounds write
This is a typo fix, the generated code should be the same.
2010-07-09 03:53:47 +02:00
Vinson Lee
f8f1c629d6 draw: Fix off-by-one error in assert.
textures is an array of size PIPE_MAX_VERTEX_SAMPLERS.
2010-07-08 17:54:47 -07:00
Brian Paul
41f66915ab glsl: fix indirect addressing of gl_TextureMatrix[] arrays
The code to emit an array of OpenGL state vars lacked the code
to handle the gl_TextureMatrix[] array.

Fixes fd.o bug 28967

NOTE: this is a candidate for the 7.8 branch.
2010-07-08 18:42:45 -06:00
Kristian Høgsberg
2168b87b51 egl_dri2: Support _EGL_PLATFORM_DRM
This lets the egl_dri2 driver initialize on just a DRM fd.
2010-07-08 20:10:37 -04:00
Vinson Lee
7595733677 glslcompiler: Fix build. 2010-07-08 16:06:01 -07:00
Vinson Lee
6dd7d654db Merge branches 'master' and 'master' of ssh://git.freedesktop.org/git/mesa/mesa 2010-07-08 15:58:23 -07:00
Kenneth Graunke
dfd30ca6a9 glsl2: Remove generate_temporary and global temporary counter.
Most places in the code simply use a static name, which works because
names are never used to look up an ir_variable.  generate_temporary is
simply unnecessary (and looks like it would leak memory, and isn't
thread safe...)
2010-07-08 15:44:19 -07:00
Marek Olšák
392a2515c0 r300g: fix texturing with negative lod bias
This should fix FDO bugs #28437 and #28625.
2010-07-09 00:16:49 +02:00
Marek Olšák
61a26cdfdc r300g: store/return the stride for winsys_handle in winsys 2010-07-08 22:39:52 +02:00
Eric Anholt
8a3f2eb9e6 i965: Add disasm for SEND mlen/rlen on Sandybridge. 2010-07-08 13:30:56 -07:00
Zhenyu Wang
20be3ff576 i965: Add 'wait' instruction support
When EU executes 'wait' instruction, it stalls and sets notification
register state. Host can issue MMIO write to clear notification
register state to allow EU continue on executing again.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-07-08 12:50:53 -07:00
Eric Anholt
a3cc7585ea i965: Fix disasm of a SEND's mlen and rlen on Ironlake. 2010-07-08 12:50:53 -07:00
Zhenyu Wang
3f906621da i965: Add decode for Sandybridge DP write messages. 2010-07-08 12:50:53 -07:00
Zhenyu Wang
0446679551 i965: Add definitions for Sandybridge DP write/read messages. 2010-07-08 12:50:53 -07:00
Marek Olšák
9cc6b5b043 r300g: fix transfering compressed textures 2010-07-08 21:37:04 +02:00
Eric Anholt
e72b87736d intel: Update intel_decode.c from intel-gpu-tools.
This came from commit cf255e382d147fe3ca450f0dcec3525190e7dcbc
2010-07-08 12:12:54 -07:00
Brian Paul
b273928140 gallium: bump PIPE_MAX_SHADER_INPUTS/OUTPUTS to 32 2010-07-08 11:03:54 -06:00
Marek Olšák
62c631b205 r300g: add a function for marking framebuffer atoms as dirty 2010-07-08 18:02:30 +02:00
Marek Olšák
f9e8cdc145 r300g: minor fixups 2010-07-08 18:02:30 +02:00
Brian Paul
3751e6e1fc glsl: fix 'if ((x=foo()) > 1.0)' bug
Fixes fd.o bug 27216.  May also be the root cause of fd.o bug 28950.

We weren't propogating the storage info for the x=foo() expression up
through the IR tree to the inequality expression.

NOTE: This is a candidate for the Mesa 7.8 branch.
2010-07-08 09:22:54 -06:00
Brian Paul
7c6a897275 st/mesa: additional assertions in st_translate_mesa_program() 2010-07-08 08:51:22 -06:00
Eric Anholt
25cda5039d mesa: Extend register lifetimes to the end of the largest loop required.
Previously, a register defined at main scope and used in a loop in a
loop could end up getting marked as needed only from the definition
outside of the loops to the end of the inner loop, and we would
cleverly slot in something else in its register in the end of the
outer loop.

Fixes glsl-vs-loop-nested and glsl-fs-loop-nested on glsl2.  This
doesn't happen much on master because the original compiler does its
own register allocation, so we find little we can do with linear scan
register (re)allocation.
2010-07-07 21:33:38 -07:00
Zack Rusin
396f2cd94f slang: fix typos 2010-07-08 00:33:31 -04:00
Zack Rusin
f11e25ee95 slang: add some comments related to geometry shaders 2010-07-08 00:28:29 -04:00
Zack Rusin
7c42390453 gs: inject const int gl_VerticesIn at link time 2010-07-08 00:28:29 -04:00
Eric Anholt
f632a330ec mesa: Fix documentation of BranchTarget for BRK.
It was changed in 2009 and the comment wasn't updated.
2010-07-07 21:00:32 -07:00
Eric Anholt
152b55e74d glsl2: Add support for gl_PointCoord in 1.20.
Fixes glsl-fs-pointcoord on swrast (remains broken on 965, like master)
2010-07-07 19:45:22 -07:00
Brian Paul
6988f65e43 mesa: initial support for new GL 3.0 texture formats 2010-07-07 20:26:33 -06:00
Eric Anholt
ea2a03f0a5 ir_to_mesa: Fix the assertion on LHS array derefs to DWIM.
This allows array derefs of matrices now, which makes idr's GLSL demo
happy.
2010-07-07 17:59:50 -07:00
Eric Anholt
ffd24b0a68 ir_to_mesa: Add support for constant matrices (untested). 2010-07-07 17:49:05 -07:00
Eric Anholt
b4d0c0e0ee ir_to_mesa: Add support for adding/subtracting matrices.
This isn't really tested, but didn't break normal vector add/sub.
2010-07-07 17:27:06 -07:00
Eric Anholt
69676fc6a3 ir_to_mesa: Don't assert that we can't assign matrices. It should work now. 2010-07-07 17:27:04 -07:00
Eric Anholt
9968f1b23c ir_to_mesa: Only allocate a vector per column of a matrix. 2010-07-07 16:37:48 -07:00
Eric Anholt
7d8091f7cc ir_to_mesa: Add support for assignment of aggregates. 2010-07-07 16:37:48 -07:00