gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube index
authorMarek Olšák <maraeo@gmail.com>
Thu, 20 Dec 2012 12:08:00 +0000 (13:08 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 4 Jan 2013 13:05:47 +0000 (14:05 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_blitter.c

index 0948eab816ab2765f258e317ae4b66688711ea80..0e4ce6842134a2f00cc9599a1665808ee1ffc0dc 100644 (file)
@@ -681,6 +681,11 @@ static void blitter_set_texcoords(struct blitter_context_priv *ctx,
       }
       break;
 
+   case PIPE_TEXTURE_CUBE_ARRAY:
+      for (i = 0; i < 4; i++)
+         ctx->vertices[i][1][3] = (float) (layer / 6); /*w*/
+      break;
+
    case PIPE_TEXTURE_2D:
       for (i = 0; i < 4; i++) {
          ctx->vertices[i][1][2] = (float) sample; /*r*/