nvk/image: Take an nvk_physical_device in can_compress()

This is more idiomatic with the rest of the NVK queries.
This commit is contained in:
Faith Ekstrand 2026-05-06 11:33:27 -04:00
parent 62be7e0e4b
commit 782dfb09f0

View file

@ -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;