nvk: Wire up early z and post depth coverage
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:11:55 +0000 (20:11 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:58 +0000 (21:31 +0000)
Was crawling through header bits and found that we weren't plumbing
these through.

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

src/nouveau/vulkan/nvk_graphics_pipeline.c

index 2c36325..9f1e74b 100644 (file)
@@ -9,6 +9,7 @@
 #include "nouveau_context.h"
 
 #include "nvk_cl9097.h"
+#include "nvk_clb197.h"
 #include "nvk_clc397.h"
 
 static void
@@ -284,6 +285,15 @@ nvk_graphics_pipeline_create(struct nvk_device *device,
          });
          P_NV9097_SET_SUBTILING_PERF_KNOB_B(p, 0x20);
 
+         P_IMMD(p, NV9097, SET_API_MANDATED_EARLY_Z, shader->fs.early_z);
+
+         if (device->ctx->eng3d.cls >= MAXWELL_B) {
+            P_IMMD(p, NVB197, SET_POST_Z_PS_IMASK,
+                   shader->fs.post_depth_coverage);
+         } else {
+            assert(!shader->fs.post_depth_coverage);
+         }
+
          P_MTHD(p, NV9097, SET_ZCULL_BOUNDS);
          P_INLINE_DATA(p, shader->flags[0]);
          break;