Browse Source

svga: improve check for 3D compressed textures

This is basically a a respin of f1dfcf4bce
per Jose's suggestion.

Just set the SVGA3dSurfaceFormatCaps flags for 3D and cube textures
when checking the texture format capabilities.  This will filter out
unsupported combinations like 3D+DXT.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
tags/mesa-10.1-rc1
Brian Paul 12 years ago
parent
commit
92c3d5acf7
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      src/gallium/drivers/svga/svga_screen.c

+ 7
- 5
src/gallium/drivers/svga/svga_screen.c View File

@@ -447,11 +447,6 @@ svga_is_format_supported( struct pipe_screen *screen,
}
}
if (target == PIPE_TEXTURE_3D && util_format_is_compressed(format)) {
/* we don't support compressed 3D textures at this time */
return FALSE;
}

/*
* Query the host capabilities.
*/
@@ -469,6 +464,13 @@ svga_is_format_supported( struct pipe_screen *screen,
mask.texture = 1;
}

if (target == PIPE_TEXTURE_CUBE) {
mask.cubeTexture = 1;
}
if (target == PIPE_TEXTURE_3D) {
mask.volumeTexture = 1;
}

return (caps.value & mask.value) == mask.value;
}


Loading…
Cancel
Save