mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
nvk: Use the image format for depth views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36957>
This commit is contained in:
parent
7527ad001a
commit
89110b8d1d
2 changed files with 5 additions and 4 deletions
|
|
@ -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, {
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue