summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 3f91c86e64c..9e1aaabd18c 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -963,6 +963,16 @@ svga_texture_create(struct pipe_screen *screen,
svga_format_name(typeless),
bindings);
}
+
+ if (svga_format_is_uncompressed_snorm(tex->key.format)) {
+ /* We can't normally render to snorm surfaces, but once we
+ * substitute a typeless format, we can if the rendertarget view
+ * is unorm. This can happen with GL_ARB_copy_image.
+ */
+ tex->key.flags |= SVGA3D_SURFACE_HINT_RENDERTARGET;
+ tex->key.flags |= SVGA3D_SURFACE_BIND_RENDER_TARGET;
+ }
+
tex->key.format = typeless;
}