From 75fa5c99a86c1ae0f8a4fecc016a5f82da9ae80a Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 11 Apr 2011 06:23:00 +0200 Subject: gallium: add and use generic function for querying patented format support (v2) v2: Unsigned floats are allowed regardless of the configure switch. --- src/gallium/drivers/nvc0/nvc0_screen.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/gallium/drivers/nvc0/nvc0_screen.c') diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c index 31133f0cc6c..c4cdface502 100644 --- a/src/gallium/drivers/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nvc0/nvc0_screen.c @@ -39,17 +39,8 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen, if (sample_count > 1) return FALSE; - if (!util_format_s3tc_enabled) { - switch (format) { - case PIPE_FORMAT_DXT1_RGB: - case PIPE_FORMAT_DXT1_RGBA: - case PIPE_FORMAT_DXT3_RGBA: - case PIPE_FORMAT_DXT5_RGBA: - return FALSE; - default: - break; - } - } + if (!util_format_is_supported(format, bindings)) + return FALSE; /* transfers & shared are always supported */ bindings &= ~(PIPE_BIND_TRANSFER_READ | -- cgit v1.2.3