[Mesa-dev] [PATCH 1/2] radv/gfx10: support pixel shaders without exports
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Jul 16 07:34:39 UTC 2019
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_pipeline.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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)
--
2.22.0
More information about the mesa-dev
mailing list