diff --git a/src/panfrost/vulkan/panvk_sampler.h b/src/panfrost/vulkan/panvk_sampler.h index 992afafaf8f..4b653516bb9 100644 --- a/src/panfrost/vulkan/panvk_sampler.h +++ b/src/panfrost/vulkan/panvk_sampler.h @@ -6,15 +6,17 @@ #ifndef PANVK_SAMPLER_H #define PANVK_SAMPLER_H +#ifndef PAN_ARCH +#error "PAN_ARCH must be defined" +#endif + #include #include "vk_sampler.h" -#define SAMPLER_DESC_WORDS 8 - struct panvk_sampler { struct vk_sampler vk; - uint32_t desc[SAMPLER_DESC_WORDS]; + struct mali_sampler_packed desc; }; VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_sampler, vk.base, VkSampler, diff --git a/src/panfrost/vulkan/panvk_vX_sampler.c b/src/panfrost/vulkan/panvk_vX_sampler.c index b65ee8ff069..d48cd050cce 100644 --- a/src/panfrost/vulkan/panvk_vX_sampler.c +++ b/src/panfrost/vulkan/panvk_vX_sampler.c @@ -75,7 +75,7 @@ panvk_per_arch(CreateSampler)(VkDevice _device, VkClearColorValue border_color = vk_sampler_border_color_value(pCreateInfo, NULL); - pan_pack(sampler->desc, SAMPLER, cfg) { + pan_pack(sampler->desc.opaque, SAMPLER, cfg) { cfg.magnify_nearest = pCreateInfo->magFilter == VK_FILTER_NEAREST; cfg.minify_nearest = pCreateInfo->minFilter == VK_FILTER_NEAREST; cfg.mipmap_mode =