summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-04-02 05:23:32 +0200
committerLuca Barbieri <[email protected]>2010-04-02 06:16:30 +0200
commit5126683e3b971ccfb51e50e560750ce44e86bae8 (patch)
treeccdb7104752d266653a1201a97e551bed94ecd23 /src/gallium/drivers
parent52e9b990a192a9329006d5f7dd2ac222effea5a5 (diff)
gallium/util: add util_format_is_supported to check for pack/unpack
This improves the code by making it more readable, and removes special knowledge of S3TC and other formats from softpipe.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 26a4bba5746..df527f5cb15 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -156,25 +156,9 @@ softpipe_is_format_supported( struct pipe_screen *screen,
target == PIPE_TEXTURE_3D ||
target == PIPE_TEXTURE_CUBE);
- switch(format) {
- case PIPE_FORMAT_YUYV:
- case PIPE_FORMAT_UYVY:
+ if(!util_format_is_supported(format))
return FALSE;
- case PIPE_FORMAT_DXT1_RGB:
- case PIPE_FORMAT_DXT1_RGBA:
- case PIPE_FORMAT_DXT3_RGBA:
- case PIPE_FORMAT_DXT5_RGBA:
- return util_format_s3tc_enabled;
-
- case PIPE_FORMAT_Z32_FLOAT:
- case PIPE_FORMAT_NONE:
- return FALSE;
-
- default:
- break;
- }
-
if(tex_usage & (PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
PIPE_TEXTURE_USAGE_SCANOUT |
PIPE_TEXTURE_USAGE_SHARED)) {
@@ -182,8 +166,6 @@ softpipe_is_format_supported( struct pipe_screen *screen,
return FALSE;
}
- /* XXX: this is often a lie. Pull in logic from llvmpipe to fix.
- */
return TRUE;
}