summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-07-16 09:34:39 +0200
committerSamuel Pitoiset <[email protected]>2019-07-16 10:10:21 +0200
commit27d91062a8e89c62f5e8429b003e05a1585790c4 (patch)
tree073231efa5d31647014bc3e6c1f997e8a47172c6 /src
parent1b2bfeaaaacbc8a0fbab1e7221d1f2e0ae2a7017 (diff)
radv/gfx10: support pixel shaders without exports
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_pipeline.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index fdb0ed29ea4..31495ec078d 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -4283,9 +4283,15 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
* 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.
*/
struct radv_shader_variant *ps = pipeline->shaders[MESA_SHADER_FRAGMENT];
- if (!blend.spi_shader_col_format) {
+ if ((pipeline->device->physical_device->rad_info.chip_class <= GFX9 ||
+ ps->info.fs.can_discard) &&
+ !blend.spi_shader_col_format) {
if (!ps->info.info.ps.writes_z &&
!ps->info.info.ps.writes_stencil &&
!ps->info.info.ps.writes_sample_mask)