From a1652525e26e6ae2b0991a9b5c41f1d9b7065768 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:55 -0600 Subject: [PATCH] nvk: Wire up early z and post depth coverage Was crawling through header bits and found that we weren't plumbing these through. Part-of: --- src/nouveau/vulkan/nvk_graphics_pipeline.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nouveau/vulkan/nvk_graphics_pipeline.c b/src/nouveau/vulkan/nvk_graphics_pipeline.c index 2c363251179..9f1e74bba6d 100644 --- a/src/nouveau/vulkan/nvk_graphics_pipeline.c +++ b/src/nouveau/vulkan/nvk_graphics_pipeline.c @@ -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;