mesa.git
13 years agor600g: Add support to dump vertex- and texture-fetch clauses
Fabian Bieler [Tue, 15 Feb 2011 12:00:49 +0000 (13:00 +0100)]
r600g: Add support to dump vertex- and texture-fetch clauses

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add BC4/5 to RGTC conversion
Dave Airlie [Thu, 17 Feb 2011 23:34:53 +0000 (09:34 +1000)]
r600g: add BC4/5 to RGTC conversion

this doesn't do anything much since the rest of mesa doesn't
support RGTC yet.

13 years agoutil: Fix typo in last commit.
José Fonseca [Thu, 17 Feb 2011 17:13:51 +0000 (17:13 +0000)]
util: Fix typo in last commit.

13 years agost/mesa: fix incorrect glCopyPixels position on fallback path
Brian Paul [Thu, 17 Feb 2011 17:09:37 +0000 (10:09 -0700)]
st/mesa: fix incorrect glCopyPixels position on fallback path

If we hit the pipe_get/put_tile() path for setting up the glCopyPixels
texture we were passing the wrong x/y position to pipe_get_tile().
The x/y position was already accounted for in the pipe_get_transfer()
call so we were effectively reading from 2*readX, 2*readY.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

13 years agodraw: update comments, rename vars in pstipple code
Brian Paul [Thu, 17 Feb 2011 16:21:24 +0000 (09:21 -0700)]
draw: update comments, rename vars in pstipple code

13 years agosvga: Don't use more than one constant per IFC instruction.
José Fonseca [Thu, 17 Feb 2011 10:09:06 +0000 (10:09 +0000)]
svga: Don't use more than one constant per IFC instruction.

13 years agomesa: Do copy propagation across if-else-endif.
José Fonseca [Thu, 17 Feb 2011 09:48:17 +0000 (09:48 +0000)]
mesa: Do copy propagation across if-else-endif.

Addresses excessive TEMP allocation in vertex shaders where all CONSTs are
stored into TEMPS at the start, but copy propagation was failing due to
the presence of IFs.

We could do something about loops, but ifs are easy enough.

13 years agoutil: Cleanup symbol name resolution on Windows.
José Fonseca [Thu, 17 Feb 2011 15:26:15 +0000 (15:26 +0000)]
util: Cleanup symbol name resolution on Windows.

- Support symbol name resolution on MinGW.
- Use dbghelp.dll (which should allow 64bit support), but untested yet.
- Cleanup.

13 years agodocs: updated environment variable list
Brian Paul [Thu, 17 Feb 2011 14:29:20 +0000 (07:29 -0700)]
docs: updated environment variable list

13 years agost/mesa: remove unused screen variables
Brian Paul [Thu, 17 Feb 2011 14:28:51 +0000 (07:28 -0700)]
st/mesa: remove unused screen variables

13 years agomesa: remove the MESA_NO_DITHER env var
Brian Paul [Thu, 17 Feb 2011 14:27:17 +0000 (07:27 -0700)]
mesa: remove the MESA_NO_DITHER env var

This was sometimes useful back when 16-bit framebuffers were prominent.

13 years agosoftpipe: rename env vars to be consistent
Brian Paul [Thu, 17 Feb 2011 14:23:40 +0000 (07:23 -0700)]
softpipe: rename env vars to be consistent

13 years agoegl_dri2: add swrast
Haitao Feng [Thu, 17 Feb 2011 04:05:15 +0000 (23:05 -0500)]
egl_dri2: add swrast

This enables the egl_dri2 driver to load swrast driver
for software rendering. It could be used when hardware
dri2 drivers are not available, such as in VM.

Signed-off-by: Haitao Feng <haitao.feng@intel.com>
13 years agor600g: get s3tc working on cards with crappy 64/128 bit types.
Dave Airlie [Thu, 17 Feb 2011 00:25:57 +0000 (10:25 +1000)]
r600g: get s3tc working on cards with crappy 64/128 bit types.

Some cards don't appear to work correctly with the UNORM type,
so switch to the integer type, however since gallium has no
integer types yet from what I can see we need to do a hack to
workaround it for the blitter.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add missing type to color buffer swap.
Dave Airlie [Thu, 17 Feb 2011 00:24:15 +0000 (10:24 +1000)]
r600g: add missing type to color buffer swap.

13 years agogallium/util: init key with memset()
Brian Paul [Thu, 17 Feb 2011 00:10:35 +0000 (17:10 -0700)]
gallium/util: init key with memset()

To silence missing initializers warning.

13 years agosvga: flush when transitioning between HW and SW rendering paths
Brian Paul [Wed, 16 Feb 2011 21:20:14 +0000 (14:20 -0700)]
svga: flush when transitioning between HW and SW rendering paths

To avoid mixing HW and SW rendering with the same vertex buffer.

13 years agortasm: add dummy return statement to silence MSVC warning
Brian Paul [Wed, 16 Feb 2011 21:17:41 +0000 (14:17 -0700)]
rtasm: add dummy return statement to silence MSVC warning

And use assert(0) instead of abort() to be consistent with rest
of Gallium.

13 years agosvga: use TRUE/FALSE instead of 0/1
Brian Paul [Tue, 15 Feb 2011 21:06:21 +0000 (14:06 -0700)]
svga: use TRUE/FALSE instead of 0/1

Some fields are booleans, others are bitmasks.  Use TRUE/FALSE to
clarify what's what.

13 years agosvga: fix incorrect comment
Brian Paul [Tue, 15 Feb 2011 20:24:41 +0000 (13:24 -0700)]
svga: fix incorrect comment

13 years agosvga: dimension the dirty[] array with SVGA_STATE_MAX
Brian Paul [Tue, 15 Feb 2011 20:24:21 +0000 (13:24 -0700)]
svga: dimension the dirty[] array with SVGA_STATE_MAX

13 years agomesa: make _mesa_write_renderbuffer_image() non-static
Brian Paul [Tue, 15 Feb 2011 17:26:56 +0000 (10:26 -0700)]
mesa: make _mesa_write_renderbuffer_image() non-static

13 years agosvga: disable a debug_printf() call
Brian Paul [Fri, 11 Feb 2011 21:30:31 +0000 (14:30 -0700)]
svga: disable a debug_printf() call

13 years agodocs: add glsl info
Sam Hocevar [Thu, 17 Feb 2011 00:04:20 +0000 (17:04 -0700)]
docs: add glsl info

13 years agodocs: fix glsl_compiler name
Sam Hocevar [Thu, 17 Feb 2011 00:04:03 +0000 (17:04 -0700)]
docs: fix glsl_compiler name

13 years agomesa: 80-column wrap
Brian Paul [Wed, 16 Feb 2011 17:35:21 +0000 (10:35 -0700)]
mesa: 80-column wrap

13 years agosvga: Proper redefine_user_buffer implementation.
José Fonseca [Wed, 16 Feb 2011 21:52:49 +0000 (21:52 +0000)]
svga: Proper redefine_user_buffer implementation.

Unfortunately still not enough to make GoogleEarth happy.

13 years agor300g: fix a race between CS and SET_TILING ioctls
Marek Olšák [Wed, 16 Feb 2011 21:23:23 +0000 (22:23 +0100)]
r300g: fix a race between CS and SET_TILING ioctls

13 years agor300g: fix blitting NPOT compressed textures
Marek Olšák [Wed, 16 Feb 2011 19:09:06 +0000 (20:09 +0100)]
r300g: fix blitting NPOT compressed textures

13 years agomesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2 and 4_4
Marek Olšák [Wed, 16 Feb 2011 19:37:28 +0000 (20:37 +0100)]
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.

13 years agomesa: fix mipmap generation for MESA_FORMAT_AL44
Marek Olšák [Wed, 16 Feb 2011 09:07:05 +0000 (10:07 +0100)]
mesa: fix mipmap generation for MESA_FORMAT_AL44

This was missed when implementing AL44.

13 years agoscons: Recognize 'AMD64' processor as well.
José Fonseca [Tue, 15 Feb 2011 17:31:31 +0000 (17:31 +0000)]
scons: Recognize 'AMD64' processor as well.

13 years agoscons: Don't get fooled by 32bit python on a 64bit windows.
José Fonseca [Tue, 15 Feb 2011 17:01:20 +0000 (17:01 +0000)]
scons: Don't get fooled by 32bit python on a 64bit windows.

13 years agoscons: Avoid depending on scons 2.0 in general.
José Fonseca [Tue, 15 Feb 2011 15:31:19 +0000 (15:31 +0000)]
scons: Avoid depending on scons 2.0 in general.

13 years agomesa: Remove the DXT compression via blit path.
José Fonseca [Tue, 21 Sep 2010 10:47:19 +0000 (11:47 +0100)]
mesa: Remove the DXT compression via blit path.

No longer used.

13 years agosvga: Don't fake DXT compression ability.
José Fonseca [Tue, 21 Sep 2010 10:46:20 +0000 (11:46 +0100)]
svga: Don't fake DXT compression ability.

13 years agonvc0: fix blend factor mapping
Christoph Bumiller [Wed, 16 Feb 2011 14:41:32 +0000 (15:41 +0100)]
nvc0: fix blend factor mapping

13 years agonvc0: fix emit_dfdx,dfdy
Christoph Bumiller [Wed, 16 Feb 2011 10:57:00 +0000 (11:57 +0100)]
nvc0: fix emit_dfdx,dfdy

13 years agonvc0: don't swap sources if either value is not in a GPR
Christoph Bumiller [Wed, 16 Feb 2011 10:42:28 +0000 (11:42 +0100)]
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.

13 years agonvc0: add missing break statements in constant_operand
Christoph Bumiller [Tue, 15 Feb 2011 20:36:57 +0000 (21:36 +0100)]
nvc0: add missing break statements in constant_operand

13 years agonvc0: fix clipping and use VIEWPORT instead of SCISSOR
Christoph Bumiller [Tue, 15 Feb 2011 13:41:20 +0000 (14:41 +0100)]
nvc0: fix clipping and use VIEWPORT instead of SCISSOR

13 years agonvc0: demagic the clear flags and fix region clears
Christoph Bumiller [Mon, 14 Feb 2011 13:10:41 +0000 (14:10 +0100)]
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.

13 years agonvc0: front stencil mask and func mask methods are swapped
Christoph Bumiller [Mon, 14 Feb 2011 01:04:58 +0000 (02:04 +0100)]
nvc0: front stencil mask and func mask methods are swapped

13 years agonvc0: clone memory values with multiple refs before modifying them
Christoph Bumiller [Sat, 12 Feb 2011 23:17:43 +0000 (00:17 +0100)]
nvc0: clone memory values with multiple refs before modifying them

13 years agonvc0: disable early fragment tests if KIL is used
Christoph Bumiller [Sat, 12 Feb 2011 21:02:26 +0000 (22:02 +0100)]
nvc0: disable early fragment tests if KIL is used

Early-Z pass raises the occlusion counter.

13 years agonvc0: force vertex data through FIFO if we need to convert it
Christoph Bumiller [Sat, 12 Feb 2011 18:18:19 +0000 (19:18 +0100)]
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.

13 years agonvc0: use format from the template on surface creation
Christoph Bumiller [Sat, 12 Feb 2011 17:50:03 +0000 (18:50 +0100)]
nvc0: use format from the template on surface creation

Fixes piglit/fbo-srgb.

13 years agonvc0: update the set of formats supported by the 2D engine
Christoph Bumiller [Sat, 12 Feb 2011 17:27:47 +0000 (18:27 +0100)]
nvc0: update the set of formats supported by the 2D engine

13 years agonvc0: fix user vertex buffer updates
Christoph Bumiller [Tue, 15 Feb 2011 18:12:41 +0000 (19:12 +0100)]
nvc0: fix user vertex buffer updates

13 years agomesa: use gl_format type instead of GLuint
Brian Paul [Wed, 16 Feb 2011 14:08:47 +0000 (07:08 -0700)]
mesa: use gl_format type instead of GLuint

13 years agor600g: fix typo in previous s3tc commit
Dave Airlie [Wed, 16 Feb 2011 06:51:41 +0000 (16:51 +1000)]
r600g: fix typo in previous s3tc commit

pointed out by Marek on irc.

13 years agor300g: fix texture border color for float formats
Marek Olšák [Wed, 16 Feb 2011 04:28:40 +0000 (05:28 +0100)]
r300g: fix texture border color for float formats

13 years agoRevert "util: fix DXT1 RGBA texture compression if the source color is (0, 0, 0, 0)"
Dave Airlie [Wed, 16 Feb 2011 06:13:58 +0000 (16:13 +1000)]
Revert "util: fix DXT1 RGBA texture compression if the source color is (0, 0, 0, 0)"

This reverts commit 6e7d782da506da233b2ac695b022ac393e1c719e.

Oops, I just had this locally for testing and forgot to remove it before pushing.

13 years agor600g: add L8A8 SRGB formats.
Dave Airlie [Wed, 16 Feb 2011 06:09:43 +0000 (16:09 +1000)]
r600g: add L8A8 SRGB formats.

this fixes the piglit mipmap generation sRGB on my rv730.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoutil: fix DXT1 RGBA texture compression if the source color is (0, 0, 0, 0)
Marek Olšák [Wed, 16 Feb 2011 03:18:42 +0000 (04:18 +0100)]
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>
13 years agor600g: add L4A4 support.
Dave Airlie [Wed, 16 Feb 2011 06:01:36 +0000 (16:01 +1000)]
r600g: add L4A4 support.

this fixes piglit fbo-generatemipmap-formats on my rv730.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix s3tc-texsubimage
Dave Airlie [Wed, 16 Feb 2011 05:56:11 +0000 (15:56 +1000)]
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>
13 years agolinker: Fix off-by-one error implicit array sizing
Ian Romanick [Wed, 16 Feb 2011 02:17:53 +0000 (18:17 -0800)]
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.

13 years agost/python: add usage parameter to pipe_buffer_create
Vinson Lee [Wed, 16 Feb 2011 01:29:43 +0000 (17:29 -0800)]
st/python: add usage parameter to pipe_buffer_create

This is a follow-up to commit eafb7f234d11a290b00dcaf5492b9bdad1cf5148.

Fixes Linux SCons build.

13 years agor300g: disable linear filtering for float textures
Marek Olšák [Tue, 15 Feb 2011 23:51:01 +0000 (00:51 +0100)]
r300g: disable linear filtering for float textures

13 years agoglsl: Reinstate constant-folding for division by zero
Chad Versace [Mon, 14 Feb 2011 21:22:39 +0000 (13:22 -0800)]
glsl: Reinstate constant-folding for division by zero

Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160

Commit e7c1f058d18f62aa4871aec623f994d7b68cb8c1 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.

13 years agoRevert "glsl: Fix constant-folding for reciprocal expressions"
Chad Versace [Mon, 14 Feb 2011 19:16:42 +0000 (11:16 -0800)]
Revert "glsl: Fix constant-folding for reciprocal expressions"

This reverts commit b3cf92aa916ee0537ee37723c23a9897ac9cd3e0.

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.

13 years agotnl: Add support for datatype GL_FIXED in vertex arrays
Chad Versace [Tue, 15 Feb 2011 23:30:05 +0000 (15:30 -0800)]
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.

13 years agor600g: add srgb compressed formats to the list.
Dave Airlie [Tue, 15 Feb 2011 22:50:30 +0000 (08:50 +1000)]
r600g: add srgb compressed formats to the list.

13 years agogallium: add usage parameter to pipe_buffer_create
Marek Olšák [Sun, 13 Feb 2011 08:13:14 +0000 (09:13 +0100)]
gallium: add usage parameter to pipe_buffer_create

And set a reasonable buffer usage flag everywhere instead of
just PIPE_USAGE_DEFAULT.

13 years agor600g: Fix RGB10_A2 format handling
Fabian Bieler [Thu, 10 Feb 2011 15:57:34 +0000 (16:57 +0100)]
r600g: Fix RGB10_A2 format handling

13 years agor600g: fix regression in r6/7xx since mipmap rework
Dave Airlie [Tue, 15 Feb 2011 08:42:48 +0000 (18:42 +1000)]
r600g: fix regression in r6/7xx since mipmap rework

I typod this when copy-pasting.

13 years agonvc0: Fix uninitialized variable warning.
Vinson Lee [Tue, 15 Feb 2011 08:25:08 +0000 (00:25 -0800)]
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

13 years agor300g: offload the CS ioctl to another thread
Marek Olšák [Tue, 15 Feb 2011 04:43:44 +0000 (05:43 +0100)]
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

13 years agor600g: add support for s3tc formats.
Dave Airlie [Fri, 11 Feb 2011 03:42:52 +0000 (13:42 +1000)]
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.

13 years agor600g: fix miptree calculations
Dave Airlie [Tue, 15 Feb 2011 03:21:50 +0000 (13:21 +1000)]
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.

13 years agor600g: drop tiled flag
Dave Airlie [Mon, 14 Feb 2011 03:34:11 +0000 (13:34 +1000)]
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>
13 years agost/mesa: fix compressed mipmap generation.
Dave Airlie [Tue, 15 Feb 2011 02:50:37 +0000 (12:50 +1000)]
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>
13 years agost/mesa: fix GLES build
Marek Olšák [Tue, 15 Feb 2011 03:41:57 +0000 (04:41 +0100)]
st/mesa: fix GLES build

Broken since d5062fb3a315c46d77d5c954a3e3c14be1907d33.

I wonder why this code is hidden behind #if by default.

13 years agor300g: actually implement the is_buffer_busy hook the right way
Marek Olšák [Tue, 15 Feb 2011 02:54:24 +0000 (03:54 +0100)]
r300g: actually implement the is_buffer_busy hook the right way

Ooops.

13 years agor300g: handle interaction between UNSYNCHRONIZED and DONTBLOCK flags in bo_map
Marek Olšák [Tue, 15 Feb 2011 02:43:57 +0000 (03:43 +0100)]
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.

13 years agor300g: fix a possible race condition when mapping a buffer
Marek Olšák [Tue, 15 Feb 2011 01:34:05 +0000 (02:34 +0100)]
r300g: fix a possible race condition when mapping a buffer

This is the last one I think.

13 years agor300g: implement fences using dummy relocations
Marek Olšák [Tue, 15 Feb 2011 00:41:16 +0000 (01:41 +0100)]
r300g: implement fences using dummy relocations

So finally we have them.

13 years agor300g: fix SIGFPE on debug builds
Marek Olšák [Tue, 15 Feb 2011 00:19:01 +0000 (01:19 +0100)]
r300g: fix SIGFPE on debug builds

13 years agor300g: inline some of the pipe_buffer_map/unmap calls
Marek Olšák [Tue, 15 Feb 2011 00:17:29 +0000 (01:17 +0100)]
r300g: inline some of the pipe_buffer_map/unmap calls

13 years agor300g: do not track whether occlusion queries have been flushed
Marek Olšák [Mon, 14 Feb 2011 22:33:06 +0000 (23:33 +0100)]
r300g: do not track whether occlusion queries have been flushed

The winsys takes care of flushing automatically.

13 years agor300g: flush CS in bo_map even if we get USAGE_DONTBLOCK
Marek Olšák [Mon, 14 Feb 2011 22:15:55 +0000 (23:15 +0100)]
r300g: flush CS in bo_map even if we get USAGE_DONTBLOCK

Because an app may do something like this:

while (!(ptr = bo_map(..., DONT_BLOCK))) {
    /* Do some other work. */
}

And it would be looping endlessly if we didn't flush.

13 years agost/python: remove pipe_vertex_buffer::max_index
Vinson Lee [Mon, 14 Feb 2011 22:10:05 +0000 (14:10 -0800)]
st/python: remove pipe_vertex_buffer::max_index

This is a follow-up to commit cdca3c58aa2d9549f5188910e2a77b438516714f.

13 years agograw: remove pipe_vertex_buffer::max_index
Vinson Lee [Mon, 14 Feb 2011 21:53:09 +0000 (13:53 -0800)]
graw: remove pipe_vertex_buffer::max_index

This is a follow-up to commit cdca3c58aa2d9549f5188910e2a77b438516714f.

13 years agost/mesa: Use blend equation and function of first render target for all render target...
Fabian Bieler [Thu, 10 Feb 2011 15:45:41 +0000 (16:45 +0100)]
st/mesa: Use blend equation and function of first render target for all render targets if ARB_draw_buffers_blend is not supported

If EXT_draw_buffers2 is supported but ARB_draw_buffers_blend isn't
_mesa_BlendFuncSeparateEXT only sets up the blend equation and function for the
first render target. This patch makes sure that update_blend doesn't try to use
the data from other rendertargets in such cases.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agor300g: implement pb_manager::is_buffer_busy
Marek Olšák [Sun, 13 Feb 2011 08:39:52 +0000 (09:39 +0100)]
r300g: implement pb_manager::is_buffer_busy

13 years agopb_bufmgr_cache: add is_buffer_busy hook and use it instead of non-blocking map
Marek Olšák [Sun, 13 Feb 2011 08:26:07 +0000 (09:26 +0100)]
pb_bufmgr_cache: add is_buffer_busy hook and use it instead of non-blocking map

This is cleaner and implementing the hook is optional.

13 years agogallium: notify drivers about possible changes in user buffer contents
Marek Olšák [Wed, 9 Feb 2011 00:10:11 +0000 (01:10 +0100)]
gallium: notify drivers about possible changes in user buffer contents

Also implement the redefine_user_buffer hook in the drivers.

13 years agost/mesa: set vertex arrays state only when necessary
Marek Olšák [Sun, 26 Dec 2010 03:30:51 +0000 (04:30 +0100)]
st/mesa: set vertex arrays state only when necessary

The vertex arrays state should be set only when (_NEW_ARRAY | _NEW_PROGRAM)
is dirty. This assumes user buffer content is mutable, which will be
sorted out in the next commit. The following usage case should be much faster
now:

for (i = 0; i < 1000; i++) {
   glDrawElements(...);
}

Or even:

for (i = 0; i < 1000; i++) {
   glSomeStateChangeOtherThanArraysOrProgram(...);
   glDrawElements(...);
}

The performance increase from this may be significant in some apps and
negligible in others. It is especially noticable in the Torcs game (r300g):
    Before: 15.4 fps
    After: 20 fps

Also less looping over attribs in st_draw_vbo yields slight speed-up
in apps with lots of glDraw* calls.

13 years agogallium: remove pipe_vertex_buffer::max_index
Marek Olšák [Mon, 10 Jan 2011 04:41:47 +0000 (05:41 +0100)]
gallium: remove pipe_vertex_buffer::max_index

This is redundant to pipe_draw_info::max_index and doesn't really fit
in the optimizations I plan.

13 years agogallium: always save and restore vertex buffers using cso_cache
Marek Olšák [Sun, 9 Jan 2011 08:25:56 +0000 (09:25 +0100)]
gallium: always save and restore vertex buffers using cso_cache

13 years agovbo: bind arrays only when necessary
Marek Olšák [Sat, 12 Feb 2011 02:57:19 +0000 (03:57 +0100)]
vbo: bind arrays only when necessary

We don't need to call bind_arrays in the vbo module if the states
which the function depends on are not dirty.

13 years agovbo: notify a driver that we change buffer offsets, strides, etc.
Marek Olšák [Mon, 27 Dec 2010 16:01:25 +0000 (17:01 +0100)]
vbo: notify a driver that we change buffer offsets, strides, etc.

13 years agor300g: Remove redundant initialization.
Vinson Lee [Mon, 14 Feb 2011 18:47:58 +0000 (10:47 -0800)]
r300g: Remove redundant initialization.

Remove redundant initialization from commit
3b01b52bd78e3d2fc857feacebd815a5fae00c94 noticed by tstellar.

13 years agor600g: add alignment cases for linear aligned
Alex Deucher [Mon, 14 Feb 2011 18:07:29 +0000 (13:07 -0500)]
r600g: add alignment cases for linear aligned

Matches the drm and ddx.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agodraw: Don't define the last two mipmap levels in aa lines.
José Fonseca [Mon, 14 Feb 2011 10:36:07 +0000 (10:36 +0000)]
draw: Don't define the last two mipmap levels in aa lines.

Some hardware needs to make a seperate copy of all levels to obey
max_lod, so simply do not define the last two levels instead of
clamping.

13 years agosvga: Set the appropriate flags when creating sampler/surface views.
José Fonseca [Fri, 11 Feb 2011 21:55:29 +0000 (21:55 +0000)]
svga: Set the appropriate flags when creating sampler/surface views.

13 years agor300g: put indices in CS if there's just a few of them and are in user memory
Marek Olšák [Mon, 14 Feb 2011 09:58:24 +0000 (10:58 +0100)]
r300g: put indices in CS if there's just a few of them and are in user memory

13 years agor300g: cleanup the draw functions
Marek Olšák [Mon, 14 Feb 2011 09:11:50 +0000 (10:11 +0100)]
r300g: cleanup the draw functions

13 years agor300g: do not create a user buffer struct for misaligned ushort indices fallback
Marek Olšák [Mon, 14 Feb 2011 09:08:59 +0000 (10:08 +0100)]
r300g: do not create a user buffer struct for misaligned ushort indices fallback