summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv04/nv04_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv04/nv04_screen.c')
-rw-r--r--src/gallium/drivers/nv04/nv04_screen.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv04/nv04_screen.c b/src/gallium/drivers/nv04/nv04_screen.c
index 9f34117b8c8..da09a3a5fe8 100644
--- a/src/gallium/drivers/nv04/nv04_screen.c
+++ b/src/gallium/drivers/nv04/nv04_screen.c
@@ -79,10 +79,11 @@ nv04_screen_get_paramf(struct pipe_screen *screen, int param)
static boolean
nv04_screen_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format, uint type)
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned tex_usage, unsigned geom_flags)
{
- switch (type) {
- case PIPE_SURFACE:
+ if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
switch (format) {
case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_R5G6B5_UNORM:
@@ -91,8 +92,7 @@ nv04_screen_is_format_supported(struct pipe_screen *screen,
default:
break;
}
- break;
- case PIPE_TEXTURE:
+ } else {
switch (format) {
case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_X8R8G8B8_UNORM:
@@ -104,10 +104,7 @@ nv04_screen_is_format_supported(struct pipe_screen *screen,
default:
break;
}
- break;
- default:
- assert(0);
- };
+ }
return FALSE;
}