summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-07-27 16:12:25 -0600
committerBrian Paul <[email protected]>2011-09-23 07:58:48 -0600
commit681f92140c2f4170ec222a8213e0895c7fa8483a (patch)
tree0f0eb4fd5c48f827e9d0bc0241b392303293ec02 /src
parent2b2a69e088416a18e3bb119ea1edb594b06e06fe (diff)
svga: add format translation for DXT/sRGB formats
Without this, apps/tests that tried to use a DXT/sRGB format would die on a failed assertion (st_texture.c:80).
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_format.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c
index 40a0e6a58b5..416612d120d 100644
--- a/src/gallium/drivers/svga/svga_format.c
+++ b/src/gallium/drivers/svga/svga_format.c
@@ -48,10 +48,16 @@ svga_translate_format(struct svga_screen *ss,
case PIPE_FORMAT_B8G8R8X8_UNORM:
return SVGA3D_X8R8G8B8;
- /* Required for GL2.1:
- */
+ /* sRGB required for GL2.1 */
case PIPE_FORMAT_B8G8R8A8_SRGB:
return SVGA3D_A8R8G8B8;
+ case PIPE_FORMAT_DXT1_SRGB:
+ case PIPE_FORMAT_DXT1_SRGBA:
+ return SVGA3D_DXT1;
+ case PIPE_FORMAT_DXT3_SRGBA:
+ return SVGA3D_DXT3;
+ case PIPE_FORMAT_DXT5_SRGBA:
+ return SVGA3D_DXT5;
case PIPE_FORMAT_B5G6R5_UNORM:
return SVGA3D_R5G6B5;