diff --git a/src/nouveau/vulkan/nvk_cmd_draw.c b/src/nouveau/vulkan/nvk_cmd_draw.c index 505713cbf0d..ca649e4b07d 100644 --- a/src/nouveau/vulkan/nvk_cmd_draw.c +++ b/src/nouveau/vulkan/nvk_cmd_draw.c @@ -1223,9 +1223,8 @@ nvk_CmdBeginRendering(VkCommandBuffer commandBuffer, P_NV9097_SET_ZT_B(p, addr); /* We want the combined Z/S format for the SET_ZT_FORMAT packet */ - const enum pipe_format zs_p_format = - nvk_format_to_pipe_format(iview->vk.format); - const uint8_t zs_format = nil_format_to_depth_stencil(zs_p_format); + const uint8_t zs_format = + nil_format_to_depth_stencil(nil_image.format.p_format); if (pdev->info.cls_eng3d >= BLACKWELL_A) { P_NVCD97_SET_ZT_FORMAT(p, { diff --git a/src/nouveau/vulkan/nvk_image_view.c b/src/nouveau/vulkan/nvk_image_view.c index b409a8a77d5..022e8865806 100644 --- a/src/nouveau/vulkan/nvk_image_view.c +++ b/src/nouveau/vulkan/nvk_image_view.c @@ -158,7 +158,9 @@ nvk_image_view_init(struct nvk_device *dev, if (image->separate_zs) p_format = nil_image.format.p_format; else if (view->vk.aspects == VK_IMAGE_ASPECT_STENCIL_BIT) - p_format = util_format_stencil_only(p_format); + p_format = util_format_stencil_only(nil_image.format.p_format); + else if (view->vk.aspects & VK_IMAGE_ASPECT_DEPTH_BIT) + p_format = nil_image.format.p_format; struct nil_view nil_view = { .view_type = vk_image_view_type_to_nil_view_type(view->vk.view_type),