OSDN Git Service

svga: Use the correct element size.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 1 Jul 2011 16:06:58 +0000 (17:06 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 1 Jul 2011 17:32:42 +0000 (18:32 +0100)
Instead of always using the first element's size.

This fixes flashing floor on CINEBENCH R10.

src/gallium/drivers/svga/svga_pipe_draw.c

index 0b4d41b..d53edcb 100644 (file)
@@ -87,7 +87,7 @@ svga_user_buffer_range(struct svga_context *svga,
          struct svga_buffer *buffer = svga_buffer(vb->buffer);
          unsigned first, size;
          unsigned instance_div = ve[i].instance_divisor;
-         unsigned elemSize = util_format_get_blocksize(ve->src_format);
+         unsigned elemSize = util_format_get_blocksize(ve[i].src_format);
 
          svga->dirty |= SVGA_NEW_VBUFFER;