diff options
author | José Fonseca <[email protected]> | 2011-04-27 12:02:08 +0100 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-23 07:58:47 -0600 |
commit | 974b6413f4540d73c21c092cc0a62abb6d546e21 (patch) | |
tree | 6495d855498199c6fbdd61591bc6ec8b02d550e3 /src/gallium/drivers/svga/svga_surface.c | |
parent | ffeed5da6e568836867f09f1acb7ce660d091d4a (diff) |
svga: Cleanup format capability checking.
Accurately describe what operations are supported when a format caps
entry is not advertised by the host, and which formats are never
supported, instead of making ad-hoc and often incorrect assumptions.
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 00973263112..c9f1370b39e 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -33,6 +33,7 @@ #include "util/u_math.h" #include "util/u_memory.h" +#include "svga_format.h" #include "svga_screen.h" #include "svga_context.h" #include "svga_resource_texture.h" @@ -225,7 +226,6 @@ svga_create_surface(struct pipe_context *pipe, if (!render) { flags = SVGA3D_SURFACE_HINT_TEXTURE; - format = svga_translate_format(ss, surf_tmpl->format, surf_tmpl->usage); } else { if (surf_tmpl->usage & PIPE_BIND_RENDER_TARGET) { flags = SVGA3D_SURFACE_HINT_RENDERTARGET; @@ -233,9 +233,9 @@ svga_create_surface(struct pipe_context *pipe, if (surf_tmpl->usage & PIPE_BIND_DEPTH_STENCIL) { flags = SVGA3D_SURFACE_HINT_DEPTHSTENCIL; } - format = svga_translate_format_render(ss, surf_tmpl->format, surf_tmpl->usage); } + format = svga_translate_format(ss, surf_tmpl->format, surf_tmpl->usage); assert(format != SVGA3D_FORMAT_INVALID); if (svga_screen(screen)->debug.force_surface_view) |