| 1 |
/* |
| 2 |
* Copyright © 2021 Collabora Ltd. |
| 3 |
* SPDX-License-Identifier: MIT |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef PANVK_SAMPLER_H |
| 7 |
#define PANVK_SAMPLER_H |
| 8 |
|
| 9 |
#ifndef PAN_ARCH |
| 10 |
#error "PAN_ARCH must be defined" |
| 11 |
#endif |
| 12 |
|
| 13 |
#include <stdint.h> |
| 14 |
|
| 15 |
#include "vk_sampler.h" |
| 16 |
|
| 17 |
/* We use 2 sampler planes for YCbCr conversion with different filters for |
| 18 |
* the Y and CbCr components. |
| 19 |
*/ |
| 20 |
#define PANVK_MAX_DESCS_PER_SAMPLER 2 |
| 21 |
|
| 22 |
struct panvk_sampler { |
| 23 |
struct vk_sampler vk; |
| 24 |
struct mali_sampler_packed descs[PANVK_MAX_DESCS_PER_SAMPLER]; |
| 25 |
uint8_t desc_count; |
| 26 |
}; |
| 27 |
|
| 28 |
VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_sampler, vk.base, VkSampler, |
| 29 |
VK_OBJECT_TYPE_SAMPLER) |
| 30 |
|
| 31 |
#endif |