r300g: user index buffers are always aligned
authorMarek Olšák <maraeo@gmail.com>
Sat, 25 Dec 2010 13:39:35 +0000 (14:39 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 25 Dec 2010 15:07:13 +0000 (16:07 +0100)
src/gallium/drivers/r300/r300_render.c

index 2a363a3bc9e702f8c0d84c3ec3691b3e91f52a3b..142538b36575580595c08bf735557b8f6a0775ea 100644 (file)
@@ -577,7 +577,8 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
     r300_update_derived_state(r300);
 
     /* Fallback for misaligned ushort indices. */
-    if (indexSize == 2 && (start & 1)) {
+    if (indexSize == 2 && (start & 1) &&
+        !r300_buffer_is_user_buffer(indexBuffer)) {
         struct pipe_transfer *transfer;
         struct pipe_resource *userbuf;