diff options
author | José Fonseca <[email protected]> | 2011-04-14 13:28:10 +0100 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-23 07:58:46 -0600 |
commit | ffeed5da6e568836867f09f1acb7ce660d091d4a (patch) | |
tree | 2b77b81f53317f4e91bcf15dc5125cdd98daed7d /src/gallium/drivers/svga/svga_surface.c | |
parent | 8bf3fb4eca5594f8348de2f8fb67bc94127f8d5a (diff) |
svga: Don't use the new depth formats for surfaces that will never be sampled from.
Mitigates issues with hosts where support for these new depth formats is
flaky.
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 1bcbd3e002b..00973263112 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -225,7 +225,7 @@ svga_create_surface(struct pipe_context *pipe, if (!render) { flags = SVGA3D_SURFACE_HINT_TEXTURE; - format = svga_translate_format(ss, surf_tmpl->format); + 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,7 +233,7 @@ 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); + format = svga_translate_format_render(ss, surf_tmpl->format, surf_tmpl->usage); } assert(format != SVGA3D_FORMAT_INVALID); @@ -243,7 +243,7 @@ svga_create_surface(struct pipe_context *pipe, /* Currently only used for compressed textures */ if (render && - format != svga_translate_format(ss, surf_tmpl->format)) { + format != svga_translate_format(ss, surf_tmpl->format, surf_tmpl->usage)) { view = TRUE; } |