diff options
author | Thomas Hellstrom <[email protected]> | 2012-01-10 14:37:33 +0100 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2012-01-12 11:20:16 +0100 |
commit | 4dac89d92c711c01b7909d89b78ba568f9d5e1ef (patch) | |
tree | e5257c8ac72f87436692e0a6e0b53a1e08291126 | |
parent | 90d654b09d98fc597ca273c65c2b1b00a9c35f09 (diff) |
gallium/svga: Pass the SVGA3D_SURFACE_HINT_RENDERTARGET flag to the device
Some hardware versions rely on it to render correctly.
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Reviewed-by: Jakob Bornecrantz <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_texture.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index d3748420c0a..92286f90fb7 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -454,16 +454,19 @@ svga_texture_create(struct pipe_screen *screen, } /* - * XXX: Never pass the SVGA3D_SURFACE_HINT_RENDERTARGET hint. Mesa cannot + * Note: Previously we never passed the + * SVGA3D_SURFACE_HINT_RENDERTARGET hint. Mesa cannot * know beforehand whether a texture will be used as a rendertarget or not * and it always requests PIPE_BIND_RENDER_TARGET, therefore * passing the SVGA3D_SURFACE_HINT_RENDERTARGET here defeats its purpose. + * + * However, this was changed since other state trackers + * (XA for example) uses it accurately and certain device versions + * relies on it in certain situations to render correctly. */ -#if 0 if((template->bind & PIPE_BIND_RENDER_TARGET) && !util_format_is_s3tc(template->format)) tex->key.flags |= SVGA3D_SURFACE_HINT_RENDERTARGET; -#endif if(template->bind & PIPE_BIND_DEPTH_STENCIL) tex->key.flags |= SVGA3D_SURFACE_HINT_DEPTHSTENCIL; |