panvk: Make panvk_sampler a per-gen
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
This commit is contained in:
committed by
Marge Bot
parent
9ff7971b16
commit
18e03803a7
@@ -6,15 +6,17 @@
|
||||
#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"
|
||||
|
||||
#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,
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user