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

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25135>
This commit is contained in:
Faith Ekstrand
2023-09-08 17:29:47 -05:00
committed by Marge Bot
parent 8ce4d7a08d
commit 35e0989779
+3 -1
View File
@@ -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;