diff options
author | José Fonseca <[email protected]> | 2010-04-03 00:51:19 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-04-03 00:51:19 +0100 |
commit | 47e61426586bb9f9f40950e9c4372e4f12bb9ed6 (patch) | |
tree | 2387c7c4af139a3a151d52c7d177ab7c739a7cca /src/gallium/drivers | |
parent | dd194b6932c9b7bbb87b34b501254ec83d82ba49 (diff) |
util: Revert unsolicited, untested, unreviewed, and broken changes to format support.
Not all is bad, but I'm afraid I'll have to throw the baby with the water
given they are all tied to together.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_context.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 23 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c index 92b194a8f82..aa14e17872d 100644 --- a/src/gallium/drivers/nv50/nv50_context.c +++ b/src/gallium/drivers/nv50/nv50_context.c @@ -22,7 +22,6 @@ #include "draw/draw_context.h" #include "pipe/p_defines.h" -#include "util/u_format.h" #include "nv50_context.h" #include "nv50_screen.h" diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index ddc53b336fb..be64048abfc 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -27,7 +27,6 @@ #include "util/u_memory.h" -#include "util/u_format.h" #include "util/u_format_s3tc.h" #include "pipe/p_defines.h" #include "pipe/p_screen.h" @@ -156,9 +155,25 @@ softpipe_is_format_supported( struct pipe_screen *screen, target == PIPE_TEXTURE_3D || target == PIPE_TEXTURE_CUBE); - if(!util_format_is_supported(format)) + switch(format) { + case PIPE_FORMAT_YUYV: + case PIPE_FORMAT_UYVY: 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)) { @@ -166,6 +181,8 @@ 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; } @@ -224,6 +241,8 @@ softpipe_create_screen(struct sw_winsys *winsys) screen->base.context_create = softpipe_create_context; screen->base.flush_frontbuffer = softpipe_flush_frontbuffer; + util_format_s3tc_init(); + softpipe_init_screen_texture_funcs(&screen->base); softpipe_init_screen_buffer_funcs(&screen->base); softpipe_init_screen_fence_funcs(&screen->base); |