mesa/src/panfrost/vulkan/panvk_sampler.h
Rebecca Mckeever cdf24f067e panvk: Use multiple sampler planes and one texture descriptor per plane
Multiple sampler planes (one for luma, one for chroma) are needed to
support CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT.

Multiple texture descriptors (one per plane) are needed for the
downsampling in nir_vk_lower_ycbcr_tex() to work in panvk.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00

31 lines
648 B
C

/*
* Copyright © 2021 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#ifndef PANVK_SAMPLER_H
#define PANVK_SAMPLER_H
#ifndef PAN_ARCH
#error "PAN_ARCH must be defined"
#endif
#include <stdint.h>
#include "vk_sampler.h"
/* We use 2 sampler planes for YCbCr conversion with different filters for
* the Y and CbCr components.
*/
#define PANVK_MAX_DESCS_PER_SAMPLER 2
struct panvk_sampler {
struct vk_sampler vk;
struct mali_sampler_packed descs[PANVK_MAX_DESCS_PER_SAMPLER];
uint8_t desc_count;
};
VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_sampler, vk.base, VkSampler,
VK_OBJECT_TYPE_SAMPLER)
#endif