mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 06:38:09 +02:00
panvk: Use vk_image::drm_format_mod instead of pan_image::layout.modifier
This will help prepare for multiplane, where panvk_image will have an array of pan_image structs to represent the planes. The format modifier is the same for all planes, so we can use vk_image::drm_format_mod. Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
This commit is contained in:
parent
1289c5a30b
commit
3295cb9700
5 changed files with 5 additions and 5 deletions
|
|
@ -437,7 +437,7 @@ panvk_BindImageMemory2(VkDevice device, uint32_t bindInfoCount,
|
|||
}
|
||||
|
||||
/* Reset the AFBC headers */
|
||||
if (drm_is_afbc(image->pimage.layout.modifier)) {
|
||||
if (drm_is_afbc(image->vk.drm_format_mod)) {
|
||||
/* Transient CPU mapping */
|
||||
void *base = pan_kmod_bo_mmap(image->bo, 0,
|
||||
pan_kmod_bo_size(image->bo),
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ panvk_meta_get_uint_format_for_blk_size(unsigned blk_sz)
|
|||
static inline struct vk_meta_copy_image_properties
|
||||
panvk_meta_copy_get_image_properties(struct panvk_image *img)
|
||||
{
|
||||
uint64_t mod = img->pimage.layout.modifier;
|
||||
uint64_t mod = img->vk.drm_format_mod;
|
||||
enum pipe_format pfmt = vk_format_to_pipe_format(img->vk.format);
|
||||
unsigned blk_sz = util_format_get_blocksize(pfmt);
|
||||
struct vk_meta_copy_image_properties props = {0};
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ render_state_set_s_attachment(struct panvk_cmd_buffer *cmdbuf,
|
|||
state->render.s_attachment.fmt = iview->vk.format;
|
||||
state->render.bound_attachments |= MESA_VK_RP_ATTACHMENT_STENCIL_BIT;
|
||||
|
||||
if (drm_is_afbc(img->pimage.layout.modifier)) {
|
||||
if (drm_is_afbc(img->vk.drm_format_mod)) {
|
||||
assert(fbinfo->zs.view.zs == &iview->pview || !fbinfo->zs.view.zs);
|
||||
fbinfo->zs.view.zs = &iview->pview;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ copy_to_image_use_gfx_pipeline(struct panvk_device *dev,
|
|||
return true;
|
||||
|
||||
/* Writes to AFBC images must go through the graphics pipeline. */
|
||||
if (drm_is_afbc(dst_img->pimage.layout.modifier))
|
||||
if (drm_is_afbc(dst_img->vk.drm_format_mod))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ panvk_per_arch(CreateImageView)(VkDevice _device,
|
|||
assert(fmt_blksize < BITFIELD_MASK(10));
|
||||
assert(hw_fmt < BITFIELD_MASK(22));
|
||||
|
||||
cfg.type = image->pimage.layout.modifier == DRM_FORMAT_MOD_LINEAR
|
||||
cfg.type = image->vk.drm_format_mod == DRM_FORMAT_MOD_LINEAR
|
||||
? MALI_ATTRIBUTE_TYPE_3D_LINEAR
|
||||
: MALI_ATTRIBUTE_TYPE_3D_INTERLEAVED;
|
||||
cfg.pointer = image->pimage.data.base + offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue