Commit graph

41359 commits

Author SHA1 Message Date
Christian König
8cff56168d r600g: fix alu dumping 2010-12-17 22:57:36 +01:00
Christian König
01e3e7c7c3 r600g: fix tex and vtx joining 2010-12-16 22:23:48 +01:00
Christian König
f2fe373518 r600g: improve r600_bc_dump 2010-12-16 22:05:33 +01:00
Christian König
f780626c35 [g3dvl] move scaling completely into matrix and use less temp registers 2010-12-16 18:41:13 +01:00
Christian König
08c8cd26b8 r600g: implement output modifiers and use them to further optimize LRP 2010-12-16 16:42:14 +01:00
Christian König
f75578b31e r600g: use special constants for 0, 1, -1, 1.0f, 0.5f etc 2010-12-14 23:38:30 +01:00
Christian König
270f6d194c r600g: optimize temp register handling for LRP 2010-12-14 20:49:31 +01:00
Christian König
d98d2e7c6c [g3dvl] no need to swizzle a scalar 2010-12-14 20:20:36 +01:00
Christian König
9d967fc91e r600g: DP4 also supports writemasking 2010-12-14 19:32:08 +01:00
Christian König
d92e97d884 r600g: optimize away CF_INST_POP
If last instruction is an CF_INST_ALU we don't need to emit an
additional CF_INST_POP for stack clean up after an IF ELSE ENDIF.
2010-12-14 00:43:53 +01:00
Christian König
e13fecbbd6 [g3dvl] add reg_fixup_label to IF ELSE ENDIF 2010-12-13 00:04:58 +01:00
Christian König
be4de05c10 [g3dvl] move idct texture addr generation into vertex shader 2010-12-12 22:55:23 +01:00
Christian König
ebab090ed9 [g3dvl] seperate texture addr generation from fetching 2010-12-12 21:40:41 +01:00
Christian König
7bc9ab1181 r600g: texture instructions also work fine with TGSI_FILE_INPUT 2010-12-12 15:37:54 +01:00
Christian König
d5295552f5 r600g: Why all this fiddling with tgsi_helper_copy?
tgsi_helper_copy is used on several occasions to copy a temporary result
into the real destination register to emulate writemasks for OP3 and
reduction operations. According to R600 ISA that's unnecessary.

This patch fixes this use for MAD, CMP and DP4.
2010-12-12 15:37:14 +01:00
Christian König
ad643bfc12 [g3dvl] remove "Nouveau can't writemask tex dst regs" workaround
This now works with r600g, but will probably break Nouveau.
It's just way faster on r600 hardware, so let's fix Nouveau.
2010-12-11 14:34:01 +01:00
Christian König
dbe6454aa3 [g3dvl] move mv into vertex stream 2010-12-11 14:00:59 +01:00
Christian König
772b25e1f3 Merge remote branch 'origin/master' into pipe-video
Conflicts:
	src/gallium/drivers/r600/r600_pipe.c
	src/gallium/drivers/r600/r600_texture.c
2010-12-11 13:43:44 +01:00
Mathias Fröhlich
b3d2ec9942 vbo: Avoid the copy to current in dlists if not required.
The current state is allowed to be undefined past DrawElements et al.
Consequently omit that copying at least in the display list code.
This pays us some percents performance.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-12-10 10:17:48 -07:00
Brian Paul
2a4df8933e mesa/meta: fix broken assertion, rename stack depth var
assert(current_save_state < MAX_META_OPS_DEPTH) did not compile.

Rename current_save_state to SaveStackDepth to be more consistent with
the style of the other fields.
2010-12-10 10:02:37 -07:00
Jerome Glisse
b22c8e8bbc r600g: fix bo size when creating bo from handle
Spoted by Alex Diomin

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-10 11:17:27 -05:00
Christian König
ab130400cf [g3dvl] move z-coord generation for multiple render targets into vertex shader 2010-12-10 12:05:30 +01:00
Christian König
4a8420513d [g3dvl] move idct stage 1 scaling into matrix 2010-12-10 11:31:17 +01:00
Christian König
680f118138 [g3dvl] double buffering seems to be enough 2010-12-10 11:05:11 +01:00
Vinson Lee
d5810efca6 mesa: Clean up header file inclusion in arbprogparse.h. 2010-12-09 23:52:28 -08:00
Xiang, Haihao
e47eacdc53 i965: support for two-sided lighting on Sandybridge
VS places color attributes together so that SF unit can fetch the right
attribute according to object orientation. This fixes light issue in
mesa demo geartrain, projtex.
2010-12-10 13:25:22 +08:00
Xiang, Haihao
d1196bbc19 meta: allow nested meta operations
_mesa_meta_CopyPixels results in nested meta operations on Sandybridge.
Previoulsy the second meta operation overrides all states saved by the
first meta function.
2010-12-10 13:25:17 +08:00
Eric Anholt
3a3b1bd722 i965: Add support for gen6 reladdr VS constant loading. 2010-12-09 20:25:34 -08:00
Eric Anholt
15566183a6 i965: Add support for gen6 constant-index constant loading. 2010-12-09 20:25:34 -08:00
Chia-I Wu
83bdd402aa targets/egl: Improve st_GL.so loading.
When the application is not linked to any libGL*.so, loading st_GL.so
would give

  /usr/local/lib/egl/st_GL.so: undefined symbol: _glapi_tls_Context

In that case, load libGL.so and try again.  This works because
util_dl_open loads with RTLD_GLOBAL.

Fix "clear" OpenGL ES 1.1 demo.
2010-12-10 11:01:05 +08:00
Chia-I Wu
6efd963a23 target/egl: Fix misleading debug message.
When the name of the module is NULL, the process itself is dlopen()ed.
Do not print

  libEGL debug: searching for st module (null)
2010-12-10 11:00:31 +08:00
Christian König
9c296be7d6 [g3dvl] make render targets full configureable 2010-12-10 02:56:15 +01:00
Brian Paul
becc4bb90c draw/llvm: don't flush in vs_llvm_delete()
Fixes piglit glx-shader-sharing crash.

When shaders are shared by multiple contexts, the shader's draw context
pointer may point to a previously destroyed context.  Dereferencing the
context pointer will lead to a crash.

In this case, simply removing the flushing code avoids the crash (the
exec and sse shader paths don't flush here either).

There's a deeper issue here, however, that needs examination.  Shaders
should not keep pointers to contexts since contexts might get destroyed
at any time.

NOTE: This is a candidate for the 7.10 branch (after this has been
tested for a while).
2010-12-09 18:41:22 -07:00
Brian Paul
70ca064454 draw/llvm: remove redundant comment 2010-12-09 18:40:48 -07:00
Brian Paul
bd995cf6c0 draw/llvm: remove extraneous conditional 2010-12-09 18:40:48 -07:00
Luca Barbieri
0e50c21e24 glsl: Unroll loops with conditional breaks anywhere (not just the end)
Currently we only unroll loops with conditional breaks at the end, which is
the form that lower_jumps generates.

However, if breaks are not lowered, they tend to appear at the beginning, so
add support for a conditional break anywhere.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-12-09 16:42:05 -08:00
Kenneth Graunke
13c45c590b glsl: Consider the "else" branch when looking for loop breaks.
Found this bug by code inspection.  Based off the comments just before
this code, the intent is to find whether the break exists in the "then"
branch or the "else" branch.  However, the code actually looked at the
last instruction in the "then" branch twice.
2010-12-09 16:42:05 -08:00
Kenneth Graunke
528fa8ce32 glsl: Clean up code by adding a new is_break() function. 2010-12-09 16:42:05 -08:00
Christian König
593a2cf8c5 [g3dvl] move interlaced dct handling into vertex shader 2010-12-10 01:27:21 +01:00
Christian König
1fb4bf84d5 [g3dvl] move frame predition handling vom fragment into vertex shader 2010-12-10 00:29:59 +01:00
Christian König
cf234984f4 [g3dvl] avoid some ELSE blocks 2010-12-10 00:13:32 +01:00
Eric Anholt
b13a2e640f glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.
If you used a constant array index to access the matrix, we'd flag a
bunch of wrong inputs/outputs as being used because the index was
multiplied by matrix columns and the actual used index was left out.

Fixes glsl-mat-attribute.
2010-12-09 14:41:50 -08:00
Eric Anholt
3fb18d6775 intel: Set the swizzling for depth textures using the GL_RED depth mode.
Fixes depth-tex-modes-rg.
2010-12-09 14:41:50 -08:00
Eric Anholt
b4e8ec3a57 intel: Use plain R8 and RG8 for COMPRESSED_RED and COMPRESSED_RG.
Fixes texture-rg.
2010-12-09 14:41:50 -08:00
Vinson Lee
c3ca384e71 i965: Silence uninitialized variable warning.
Fixes this GCC warning.
brw_fs.cpp: In function 'brw_reg brw_reg_from_fs_reg(fs_reg*)':
brw_fs.cpp:3255: warning: 'brw_reg' may be used uninitialized in this function
2010-12-09 14:17:17 -08:00
Vinson Lee
af5f7b3260 r600g: Fix SCons build. 2010-12-09 14:03:58 -08:00
Christian König
00e60387fc [g3dvl] try a different buffer aproach 2010-12-09 22:34:43 +01:00
Christian König
25cdc79f32 [g3dvl] fix buffer handling in mc code 2010-12-09 22:28:31 +01:00
Christian König
7c4887f5ae [g3dvl] fix idct matrix upload 2010-12-09 22:27:03 +01:00
Jerome Glisse
121079bd67 r600g: indentation cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-09 16:16:22 -05:00