Module: Mesa
Branch: main
Commit: 35e098977965fc38c46721428e66cb2e16c95777
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=35e098977965fc38c46721428e66cb2e16c95777

Author: Faith Ekstrand <[email protected]>
Date:   Fri Sep  8 17:29:47 2023 -0500

nvk: Don't add a dummy attachment when gl_SampleMask is written

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25135>

---

 src/nouveau/vulkan/nvk_shader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nouveau/vulkan/nvk_shader.c b/src/nouveau/vulkan/nvk_shader.c
index 82b81a3d7f1..0a66cf25253 100644
--- a/src/nouveau/vulkan/nvk_shader.c
+++ b/src/nouveau/vulkan/nvk_shader.c
@@ -1007,7 +1007,9 @@ nvk_fs_gen_header(struct nvk_shader *fs, struct 
nv50_ir_prog_info_out *info)
     * executed. It seems like it wants to think that it has some color
     * outputs in order to actually run.
     */
-   if (info->prop.fp.numColourResults == 0 && !info->prop.fp.writesDepth)
+   if (info->prop.fp.numColourResults == 0 &&
+       !info->prop.fp.writesDepth &&
+       info->io.sampleMask >= 80 /* PIPE_MAX_SHADER_OUTPUTS */)
       fs->hdr[18] |= 0xf;
 
    fs->fs.early_z = info->prop.fp.earlyFragTests;

Reply via email to