aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-04-03 15:20:04 -0400
committerMarek Olšák <[email protected]>2018-04-13 12:31:04 -0400
commit82799c503508a93bb1bdceb119b7705ea32ddb1a (patch)
tree510b00fc4abb1295b0c8c6139973f763ddc7af6e /src/gallium/drivers/radeonsi/si_state.c
parent1372ccfe6f812db65a0e9c467edb4565c56e6677 (diff)
radeonsi/gfx9: don't use the workaround for gather4 + stencil
it doesn't seem to be needed. Acked-by: Samuel Pitoiset <[email protected]> Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 2924a72f48d..3faf36f2470 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1612,7 +1612,13 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen,
* gathers in stencil sampling. This affects at least
* GL45-CTS.texture_cube_map_array.sampling on VI.
*/
- return V_008F14_IMG_DATA_FORMAT_8_8_8_8;
+ if (sscreen->info.chip_class <= VI)
+ return V_008F14_IMG_DATA_FORMAT_8_8_8_8;
+
+ if (format == PIPE_FORMAT_X24S8_UINT)
+ return V_008F14_IMG_DATA_FORMAT_8_24;
+ else
+ return V_008F14_IMG_DATA_FORMAT_24_8;
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_008F14_IMG_DATA_FORMAT_8_24;
@@ -3567,7 +3573,10 @@ si_make_texture_descriptor(struct si_screen *screen,
* fix texture gathers. This affects at least
* GL45-CTS.texture_cube_map_array.sampling on VI.
*/
- util_format_compose_swizzles(swizzle_wwww, state_swizzle, swizzle);
+ if (screen->info.chip_class <= VI)
+ util_format_compose_swizzles(swizzle_wwww, state_swizzle, swizzle);
+ else
+ util_format_compose_swizzles(swizzle_yyyy, state_swizzle, swizzle);
break;
default:
util_format_compose_swizzles(swizzle_xxxx, state_swizzle, swizzle);