diff options
author | Marek Olšák <[email protected]> | 2019-06-26 22:57:10 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-09 17:24:16 -0400 |
commit | fbf781e401ca648a2fcad6dd3bbd2bca28466b85 (patch) | |
tree | a70617bd02a20b4556b3e4a7781c2977ae053a35 /src/gallium/drivers/radeonsi | |
parent | 2adc8e273667aca5499bb4c33e68eeb2c7d0654a (diff) |
radeonsi/gfx10: support pixel shaders without exports
It only works if there are not color and no Z exports.
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 380533b94dc..3b95ed5d7ab 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1587,8 +1587,15 @@ static void si_shader_ps(struct si_screen *sscreen, struct si_shader *shader) * stalls without this setting. * * Don't add this to CB_SHADER_MASK. + * + * GFX10 supports pixel shaders without exports by setting both + * the color and Z formats to SPI_SHADER_ZERO. The hw will skip export + * instructions if any are present. */ - if (!spi_shader_col_format && + if ((sscreen->info.chip_class <= GFX9 || + info->uses_kill || + shader->key.part.ps.epilog.alpha_func != PIPE_FUNC_ALWAYS) && + !spi_shader_col_format && !info->writes_z && !info->writes_stencil && !info->writes_samplemask) spi_shader_col_format = V_028714_SPI_SHADER_32_R; |