summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2016-10-26 15:46:49 -0700
committerBrian Paul <[email protected]>2016-11-03 14:29:23 -0600
commit06bba2452f00d6fa8a4b233567995af0480a3f4d (patch)
treeffbb5027709ecd3b6e835098ffa64c93747ebaac /src/gallium/drivers
parentf2eec4e8292eb438ff45c14346a03f50155081a5 (diff)
Revert "svga: use untyped surface formats in most cases"
Using untyped surface formats causes huge performance degradation on Fusion. This reverts commit eb0ced74f6decd1bf1e111b162e1389bede89af6 until the backend has a better solution to address typeless surface formats.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index e16f73583c7..89909336e91 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -1072,17 +1072,14 @@ svga_texture_create(struct pipe_screen *screen,
goto fail;
}
- /* The actual allocation is done with a typeless format. Typeless
+ /* Use typeless formats for sRGB and depth resources. Typeless
* formats can be reinterpreted as other formats. For example,
* SVGA3D_R8G8B8A8_UNORM_TYPELESS can be interpreted as
* SVGA3D_R8G8B8A8_UNORM_SRGB or SVGA3D_R8G8B8A8_UNORM.
- * Do not use typeless formats for SHARED, DISPLAY_TARGET or SCANOUT
- * buffers.
*/
- if (svgascreen->sws->have_vgpu10
- && ((bindings & (PIPE_BIND_SHARED |
- PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SCANOUT)) == 0)) {
+ if (svgascreen->sws->have_vgpu10 &&
+ (util_format_is_srgb(template->format) ||
+ format_has_depth(template->format))) {
SVGA3dSurfaceFormat typeless = svga_typeless_format(tex->key.format);
if (0) {
debug_printf("Convert resource type %s -> %s (bind 0x%x)\n",