Commit graph

37158 commits

Author SHA1 Message Date
Marek Olšák
fa3f1348e4 r300g: fix a race between CS and SET_TILING ioctls 2011-02-16 22:23:23 +01:00
Marek Olšák
2d1cc27729 r300g: fix blitting NPOT compressed textures 2011-02-16 21:40:54 +01:00
Marek Olšák
8513d3405b mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2 and 4_4
Oops, I copy-pasted a typo from 3_3_2.

The 3_3_2 part is a candidate for 7.9 and 7.10.
The 4_4 part isn't, because AL44 is in neither branches.
2011-02-16 20:44:46 +01:00
Marek Olšák
4d6994e40e mesa: fix mipmap generation for MESA_FORMAT_AL44
This was missed when implementing AL44.
2011-02-16 20:21:40 +01:00
José Fonseca
2a2b156ea5 mesa: Remove the DXT compression via blit path.
No longer used.
2011-02-16 16:50:24 +00:00
José Fonseca
697a3eb832 svga: Don't fake DXT compression ability. 2011-02-16 16:50:24 +00:00
Christoph Bumiller
3903e25a2c nvc0: fix blend factor mapping 2011-02-16 15:45:31 +01:00
Christoph Bumiller
3f1361e060 nvc0: fix emit_dfdx,dfdy 2011-02-16 15:45:31 +01:00
Christoph Bumiller
bb2c8e7099 nvc0: don't swap sources if either value is not in a GPR
The memory / immediate source should already be in the only valid
position.
2011-02-16 15:45:31 +01:00
Christoph Bumiller
2fa35eedd9 nvc0: add missing break statements in constant_operand 2011-02-16 15:45:31 +01:00
Christoph Bumiller
e7845e3196 nvc0: fix clipping and use VIEWPORT instead of SCISSOR 2011-02-16 15:45:31 +01:00
Christoph Bumiller
19f2272e94 nvc0: demagic the clear flags and fix region clears
The CLIP_RECTs always affect dedicated clears, and it's nicer than
having to mark the viewport or scissor state dirty after it.
2011-02-16 15:45:31 +01:00
Christoph Bumiller
293a8d1b60 nvc0: front stencil mask and func mask methods are swapped 2011-02-16 15:45:31 +01:00
Christoph Bumiller
a24e9bd497 nvc0: clone memory values with multiple refs before modifying them 2011-02-16 15:45:30 +01:00
Christoph Bumiller
80a7ae3cc5 nvc0: disable early fragment tests if KIL is used
Early-Z pass raises the occlusion counter.
2011-02-16 15:45:30 +01:00
Christoph Bumiller
17d680cc53 nvc0: force vertex data through FIFO if we need to convert it
We may want to put the converted vertex buffer in persistent
storage instead, but these are rare corner cases.
2011-02-16 15:45:30 +01:00
Christoph Bumiller
bf1ce9c64b nvc0: use format from the template on surface creation
Fixes piglit/fbo-srgb.
2011-02-16 15:45:30 +01:00
Christoph Bumiller
1b4c0c8ea0 nvc0: update the set of formats supported by the 2D engine 2011-02-16 15:45:30 +01:00
Christoph Bumiller
a3c62afa7c nvc0: fix user vertex buffer updates 2011-02-16 15:45:30 +01:00
Brian Paul
fc5ab1b197 mesa: use gl_format type instead of GLuint 2011-02-16 07:08:58 -07:00
Dave Airlie
f53436d821 r600g: fix typo in previous s3tc commit
pointed out by Marek on irc.
2011-02-16 16:51:41 +10:00
Marek Olšák
9e725b9123 r300g: fix texture border color for float formats 2011-02-16 07:46:36 +01:00
Dave Airlie
4ffef88899 Revert "util: fix DXT1 RGBA texture compression if the source color is (0, 0, 0, 0)"
This reverts commit 6e7d782da5.

Oops, I just had this locally for testing and forgot to remove it before pushing.
2011-02-16 16:13:58 +10:00
Dave Airlie
04903d1f63 r600g: add L8A8 SRGB formats.
this fixes the piglit mipmap generation sRGB on my rv730.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-16 16:09:43 +10:00
Marek Olšák
6e7d782da5 util: fix DXT1 RGBA texture compression if the source color is (0, 0, 0, 0)
This is a workaround for a bug in libtxc_dxtn.

Fixes:
- piglit/GL_EXT_texture_compression_s3tc/fbo-generatemipmap-formats

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-16 16:04:14 +10:00
Dave Airlie
4016a1b4c6 r600g: add L4A4 support.
this fixes piglit fbo-generatemipmap-formats on my rv730.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-16 16:01:36 +10:00
Dave Airlie
0863eaf91c r600g: fix s3tc-texsubimage
we need to translate the destination box as well.

fixes piglit's s3tc-texsubimage test.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-16 15:56:11 +10:00
Ian Romanick
25b36e8ff8 linker: Fix off-by-one error implicit array sizing
Arrays are zero based.  If the highest element accessed is 6, the
array needs to have 7 elements.

Fixes piglit test glsl-fs-implicit-array-size-03 and bugzilla #34198.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-15 18:22:33 -08:00
Vinson Lee
ae11707b83 st/python: add usage parameter to pipe_buffer_create
This is a follow-up to commit eafb7f234d.

Fixes Linux SCons build.
2011-02-15 17:29:43 -08:00
Marek Olšák
38104a767c r300g: disable linear filtering for float textures 2011-02-16 00:55:39 +01:00
Chad Versace
62c8c77333 glsl: Reinstate constant-folding for division by zero
Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160

Commit e7c1f058d1 disabled constant-folding
when division-by-zero occured. This was a mistake, because the spec does
allow division by zero. (From section 5.9 of the GLSL 1.20 spec: Dividing
by zero does not cause an exception but does result in an unspecified
value.)

For floating-point division, the original pre-e7c1f05 behavior is
reinstated.

For integer division, constant-fold 1/0 to 0.
2011-02-15 15:46:12 -08:00
Chad Versace
f2e9981e43 Revert "glsl: Fix constant-folding for reciprocal expressions"
This reverts commit b3cf92aa91.

The reverted commit prevented constant-folding of reciprocal expressions
when the reciprocated expression was 0. However, since the spec allows
division by zero, constant-folding *is* permissible in this case.

From Section 5.9 of the GLSL 1.20 spec:
    Dividing by zero does not cause an exception but does result in an
    unspecified value.
2011-02-15 15:46:12 -08:00
Chad Versace
a231ac23f4 tnl: Add support for datatype GL_FIXED in vertex arrays
Before populating the vertex buffer attribute pointer (VB->AttribPtr[]),
convert vertex data in GL_FIXED format to GL_FLOAT.

Fixes bug: http://bugs.freedesktop.org/show_bug.cgi?id=34047

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-15 15:39:22 -08:00
Dave Airlie
632918d3ec r600g: add srgb compressed formats to the list. 2011-02-16 08:54:14 +10:00
Marek Olšák
eafb7f234d gallium: add usage parameter to pipe_buffer_create
And set a reasonable buffer usage flag everywhere instead of
just PIPE_USAGE_DEFAULT.
2011-02-15 22:44:21 +01:00
Fabian Bieler
82a9794a35 r600g: Fix RGB10_A2 format handling 2011-02-15 12:31:30 -05:00
Dave Airlie
4b81c5f6e1 r600g: fix regression in r6/7xx since mipmap rework
I typod this when copy-pasting.
2011-02-15 18:43:56 +10:00
Vinson Lee
cd8af3b60b nvc0: Fix uninitialized variable warning.
Fixes this GCC warning.
nvc0_tgsi_to_nc.c: In function 'bld_tex':
nvc0_tgsi_to_nc.c:1392: warning: 'dim' may be used uninitialized in this function
2011-02-15 00:27:16 -08:00
Marek Olšák
b9e2cde600 r300g: offload the CS ioctl to another thread
This is a multi-threading optimization which hides the kernel overhead
behind a thread. It improves performance in CPU-limited apps by 2-15%.
Of course you must have at least 2 cores for it to make any difference.

It can be disabled with:

export RADEON_THREAD=0
2011-02-15 09:17:39 +01:00
Dave Airlie
8e0437914b r600g: add support for s3tc formats.
On r600, s3tc formats require a 1D tiled texture format,
so we have to do uploads using a blit, via the 64-bit and 128-bit formats

Based on the r600c code we use a 64 and 128-bit type to do the
blits.

Still requires R600_ENABLE_S3TC until the kernel fixes are in,
this has only been tested on evergreen where the kernel doesn't
yet get in the way.
2011-02-15 14:44:09 +10:00
Dave Airlie
a661dacf14 r600g: fix miptree calculations
the miptree setup and pitch storing didn't work so well for block
based things like compressed textures. The CB takes blocks, where
the texture sampler takes pixels, and transfers need bytes,

So now we store blocks/bytes and translate to pixels in the sampler.

This is necessary for s3tc to work properly.
2011-02-15 14:44:08 +10:00
Dave Airlie
ea7a548d07 r600g: drop tiled flag
we can work this out from the array_mode and it makes more sense
to do that.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-15 14:44:08 +10:00
Dave Airlie
fdb4373a20 st/mesa: fix compressed mipmap generation.
If the underlying transfer had a stride wider for hw alignment reasons,
the mipmap generation would generate badly strided images.

this fixes a few problems I found while testing r600g with s3tc

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-15 14:44:08 +10:00
Marek Olšák
dc578188fa st/mesa: fix GLES build
Broken since d5062fb3a3.

I wonder why this code is hidden behind #if by default.
2011-02-15 04:56:09 +01:00
Marek Olšák
333d3daf47 r300g: actually implement the is_buffer_busy hook the right way
Ooops.
2011-02-15 04:00:47 +01:00
Marek Olšák
45e1cd522b r300g: handle interaction between UNSYNCHRONIZED and DONTBLOCK flags in bo_map
The VBO module uses both, but they are somewhat opposite to each other.
In this case, we pick UNSYNCHRONIZED and ignore DONTBLOCK.
2011-02-15 04:00:47 +01:00
Marek Olšák
8decb0a96d r300g: fix a possible race condition when mapping a buffer
This is the last one I think.
2011-02-15 04:00:47 +01:00
Marek Olšák
18b4978ac8 r300g: implement fences using dummy relocations
So finally we have them.
2011-02-15 04:00:46 +01:00
Marek Olšák
4faf11ad6c r300g: fix SIGFPE on debug builds 2011-02-15 01:19:54 +01:00
Marek Olšák
56029ce52b r300g: inline some of the pipe_buffer_map/unmap calls 2011-02-15 01:19:54 +01:00