José Fonseca
247b253d32
util: Add util_format_srgb().
...
To convert RGB -> SRGB format.
2010-08-10 16:37:19 +01:00
Brian Paul
f263fdee81
gallivm: fix non-SSE4.1 case in lp_build_pack2()
...
Since there's no SSE instruction for this case, fall through to the
generic shuffle code.
Fixes bug fd.o 29468.
2010-08-10 08:56:57 -06:00
nobled
20b3e40f16
gallivm: Fix bitwise operations for floats, division for integers
...
http://bugs.freedesktop.org/29407
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-10 10:24:26 +01:00
nobled
a44a6960fa
gallivm: Even more type checking
...
http://bugs.freedesktop.org/29407
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-10 10:24:26 +01:00
nobled
e9f3994b16
llvmpipe: Always use floating-point operators for floating-point types
...
See:
http://bugs.freedesktop.org/29404
http://bugs.freedesktop.org/29407
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-10 10:24:26 +01:00
José Fonseca
6e1f9bc8f6
gallivm: More type checks.
2010-08-09 17:31:18 +01:00
José Fonseca
8a3a971743
gallivm: Don't call LLVMBuildFNeg on llvm-2.6.
...
It didn't exist yet.
2010-08-09 17:31:18 +01:00
nobled
fc9a49b638
gallivm: Always use floating-point operators for floating-point types
...
This fixes the assert added in LLVM 2.8:
assert(getType()->isIntOrIntVectorTy() &&
"Tried to create an integer operation on a non-integer type!")
But it also fixes some subtle bugs, since we should've been doing this
since LLVM 2.6 anyway.
Includes a modified patch from steckdenis@yahoo.fr for the
FNeg instructions in emit_fetch(); thanks for pointing those out.
http://bugs.freedesktop.org/29404
http://bugs.freedesktop.org/29407
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-09 17:31:18 +01:00
José Fonseca
65b9747a54
util: Move _mm_shuffle_epi8() to u_sse.h.
...
It's bound to be useful elsewhere.
2010-08-09 17:31:18 +01:00
Jerome Glisse
95fb0bf58d
r600g: fix r600 context structure, avoid segfault when no scissor
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-09 11:33:25 -04:00
Marek Olšák
29b7d26401
r300g: do not print shader compiler errors by default
2010-08-09 17:18:45 +02:00
Marek Olšák
2cad5350f9
r600g: fix some warnings
2010-08-09 15:00:19 +02:00
Marek Olšák
00963589b4
r600g: fill out some missing caps and sort them
...
The shader caps need additional corrections.
(based on a patch from netkas at Phoronix)
2010-08-09 14:59:54 +02:00
Dave Airlie
771ad67414
r300g: fix hiz/zmask offset emissions.
...
ofs is in dwords, so need to shift it for registers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-09 19:56:45 +10:00
Luca Barbieri
3bb0719fe1
nouveau: fix maps with PIPE_TRANSFER_UNSYNCHRONIZED | PIPE_TRANSFER_DONTBLOCK
...
In this case, we were incorrectly prioritizing PIPE_TRANSFER_DONTBLOCK over
PIPE_TRANSFER_UNSYNCHRONIZED.
This can lead to failure in the Mesa VBO draw paths that end up specifying
both, but don't expect map to fail (in particular, the problem manifested as
a leak of buffer objects in teapot with other changes).
2010-08-09 05:02:12 +02:00
Marek Olšák
aef0fbd5b6
r300g: remove a flush
...
Ooops, it wasn't supposed to be there.
2010-08-08 23:20:43 +02:00
José Fonseca
12f5c0f9ce
gallivm: Fix more integer operations.
2010-08-08 22:18:53 +01:00
nobled
cd5af8c703
gallivm: Use the correct context for integers
...
See:
http://bugs.freedesktop.org/29407
2010-08-08 22:08:52 +01:00
Marek Olšák
4f5e51068b
r300g: flush zmasks of zbuffers we are going to use as samplers
...
It sometimes works, sometimes not. I guess we have the zmask offsets wrong.
2010-08-08 22:53:31 +02:00
Marek Olšák
363b74f132
r300g: do not allocate a zmask block for 3D textures and cubemaps
2010-08-08 22:29:00 +02:00
Marek Olšák
757c78afe7
r300g: generalize the way we ask for hyperz
...
This makes it compatible with the modified DRM interface in drm-radeon-testing.
Also, now you need to set RADEON_HYPERZ=1 to be able to use hyperz.
It's not bug-free yet.
2010-08-08 22:28:35 +02:00
José Fonseca
d827972816
gallivm: Add type checks for the basic operations.
2010-08-08 21:02:59 +01:00
José Fonseca
b9a21fd6ca
draw: Remove unused variable.
2010-08-08 13:58:23 +01:00
nobled
445e59057f
draw: Use the correct type for integers
...
Two integers were being operated on as
a vector of floats in draw_llvm_generate().
This bug got uncovered by fixing this bug:
http://bugs.freedesktop.org/29407
2010-08-08 12:19:07 +01:00
Dave Airlie
b55f627937
r300g: take hiz/zmask offsets into a/c when clearing.
...
Need to add a test for multi-hiz/zmask db in a single context.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-08 19:12:14 +10:00
Marek Olšák
ab0a3f30b8
r300g: fix cbzb clears when hyperz is off
2010-08-07 02:00:21 +02:00
Maarten Maathuis
a838cee6bc
nouveau: fix potential NULL-ptr dereference in nouveau_stateobj.h
...
- This can only be triggered when DEBUG_NOUVEAU_STATEOBJ is active.
- Also remove a redundant pointer assignment.
Reported-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
2010-08-06 23:56:31 +02:00
Jerome Glisse
d9f72b9f90
r600g: add PA_CL_CLIP_CNTL definition
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 17:27:36 -04:00
Jerome Glisse
32251c34f0
r600g: fix rendering, only enable target we write too
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 17:23:43 -04:00
Jerome Glisse
b474478f20
r600g: really fix multi target support
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 17:13:28 -04:00
Brian Paul
14e9fbee1c
gallium: remove stray semicolons
2010-08-06 15:09:41 -06:00
Jerome Glisse
c3ad060488
r600g: finish multi target rendering support
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 16:12:22 -04:00
Vinson Lee
69d450856a
targets/egl: Fix build by including missing headers.
2010-08-06 11:46:16 -07:00
Chia-I Wu
e34c52da87
draw: Add an assertion to varray's version of trim().
...
Assert that "first" is always smaller than "count" and add reasoning.
It would be better to simply fix trim(), but it is used in tight loops
right now.
2010-08-07 02:20:06 +08:00
Chia-I Wu
600cd858d4
draw: Fix draw_pt_split_prim for primitives with adjacency.
...
Some primitives with adjacency have their "incr" wrong.
2010-08-07 02:16:50 +08:00
Chia-I Wu
6ae39f6dca
draw: Assert that only the first vetex may have flags set.
...
642d5ba79a removed flags masking for
vertices other than the first one. Add assertions to be on the safe
side.
2010-08-07 02:14:50 +08:00
Jerome Glisse
27041d7cb3
r600g: fix color format, indentation, defines
...
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-06 11:28:33 -04:00
Jerome Glisse
6e6103004c
Revert "r600g: don't use dynamic state allocation for states"
...
This reverts commit 9c949d4a4d .
Conflicts:
src/gallium/drivers/r600/r600_context.h
src/gallium/drivers/r600/r600_draw.c
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state.c
2010-08-06 10:59:27 -04:00
Chia-I Wu
d38afcd2f2
draw: Avoid mixed declarations and code.
...
Do not expand LOCAL_VARS to void expression. Otherwise, declarations
and code will be mixed when more variables are declared in FUNC_ENTER.
This fixes fdo bug #29416 .
2010-08-06 17:14:21 +08:00
Vinson Lee
a6859f5ccc
r300g: Remove unnecessary headers.
2010-08-05 23:58:00 -07:00
Dave Airlie
5f6ab5e259
r600g: start to fix up multiple targets.
...
fixup exports from pixel shader for multi-cbs + depth buffer writing.
Still crashes GPU running any of the multi-buffer or depth writing
2010-08-06 16:05:24 +10:00
Chia-I Wu
642d5ba79a
draw: Remove unnecessary vertex flag ANDs.
...
Vertex flags are a contract between vcache and the pipeline. They are
set only for the first vertex of a primitive.
2010-08-06 13:39:37 +08:00
Chia-I Wu
f1fc444bb0
draw: Mask out vertex flags in GS and stream output.
...
This fixes out-of-bound access to the vertices.
2010-08-06 13:39:37 +08:00
Chia-I Wu
eb3c6ddafb
draw: Include draw_decompose_tmp.h in draw_pt_decompose.h.
...
Use draw_decompose_tmp.h to replace pipeline primitive decomposer.
2010-08-06 13:39:36 +08:00
Chia-I Wu
94d256591d
draw: Include draw_decompose_tmp.h in draw_so_emit_tmp.h.
...
Use draw_decompose_tmp.h to replace stream out primitive decomposer.
2010-08-06 13:39:36 +08:00
Chia-I Wu
23176779f8
draw: Include draw_decompose_tmp.h in draw_gs_tmp.h.
...
Use draw_decompose_tmp.h to replace GS primitive decomposer.
2010-08-06 13:39:36 +08:00
Chia-I Wu
8a41b18b7d
draw: Include draw_decompose_tmp.h in draw_pt_vcache_tmp.h.
...
Use draw_decompose_tmp.h to replace vcache primitive decomposer. As the
new decomposer supports primitives with adjacency, vcache_triangle_adj
and vcache_line_adj (and their variants that have flags) are added.
2010-08-06 13:39:36 +08:00
Chia-I Wu
524b2626c2
draw: Add draw_decompose_tmp.h.
...
Including draw_decompose_tmp.h defines a primitive decomposer. It is
intended to replace the existing vcache/so/gs/pipe decomposers.
This is based on draw_pt_vcache_tmp.h.
2010-08-06 13:39:36 +08:00
Dave Airlie
0a2a6c75bf
r600g: add SRGB support.
...
This enables GL2.1 and passes glean's texture_srgb test.
2010-08-06 15:21:44 +10:00
Dave Airlie
fc47cb9d71
r600g: fixup z format translations.
...
this enables GL_EXT_packed_depth_stencil. fbo-d24s8 passes
2010-08-06 15:06:25 +10:00