r600: ignore PIPE_BIND_LINEAR in *_is_format_supported
authorChristian König <christian.koenig@amd.com>
Wed, 30 Mar 2016 13:38:29 +0000 (15:38 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 30 Mar 2016 18:00:27 +0000 (20:00 +0200)
Similar to radeonsi linear layout should work for all not compressed
or depth/stencil formats. Fixes issues with VDPAU on r600.

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 83313cb28cf977875d2c478cbe0b8ea8bc43cac1..6595267698751e9cb8b0df346f73b32d47a6a0e5 100644 (file)
@@ -299,6 +299,11 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
        if (usage & PIPE_BIND_TRANSFER_WRITE)
                retval |= PIPE_BIND_TRANSFER_WRITE;
 
+       if ((usage & PIPE_BIND_LINEAR) &&
+           !util_format_is_compressed(format) &&
+           !(usage & PIPE_BIND_DEPTH_STENCIL))
+               retval |= PIPE_BIND_LINEAR;
+
        return retval == usage;
 }
 
index f9026197b2617ccaa793875a09a6efd5819f12b0..3189a1360b15c593774f86a70aafdf8f9148db58 100644 (file)
@@ -239,6 +239,11 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
        if (usage & PIPE_BIND_TRANSFER_WRITE)
                retval |= PIPE_BIND_TRANSFER_WRITE;
 
+       if ((usage & PIPE_BIND_LINEAR) &&
+           !util_format_is_compressed(format) &&
+           !(usage & PIPE_BIND_DEPTH_STENCIL))
+               retval |= PIPE_BIND_LINEAR;
+
        return retval == usage;
 }