From 782dfb09f08b974865f13249d19a09e5111c6e1a Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 6 May 2026 11:33:27 -0400 Subject: [PATCH] nvk/image: Take an nvk_physical_device in can_compress() This is more idiomatic with the rest of the NVK queries. --- src/nouveau/vulkan/nvk_image.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nouveau/vulkan/nvk_image.c b/src/nouveau/vulkan/nvk_image.c index 8a65c65d942..809f50bd2f0 100644 --- a/src/nouveau/vulkan/nvk_image.c +++ b/src/nouveau/vulkan/nvk_image.c @@ -773,10 +773,10 @@ nvk_GetPhysicalDeviceSparseImageFormatProperties2( } static bool -nvk_image_can_compress(const struct nvkmd_pdev *nvkmd_pdev, +nvk_image_can_compress(const struct nvk_physical_device *pdev, const struct nvk_image *image) { - if (!nvkmd_pdev->kmd_info.has_compression) + if (!pdev->nvkmd->kmd_info.has_compression) return false; /* Our host copy code does not understand compression */ @@ -887,7 +887,7 @@ nvk_image_init(struct nvk_device *dev, * in GetImageMemoryRequirements() we are able to detect it and specify that * we prefer a dedicated allocation for it. */ - image->can_compress = nvk_image_can_compress(dev->nvkmd->pdev, image); + image->can_compress = nvk_image_can_compress(pdev, image); if (!image->can_compress) usage |= NIL_IMAGE_USAGE_UNCOMPRESSED_BIT;