summaryrefslogtreecommitdiff
path: root/src/imagination/vulkan/pvr_job_transfer.c
diff options
context:
space:
mode:
authorOskar Rundgren <oskar.rundgren@imgtec.com>2023-05-07 21:00:27 +0100
committerMarge Bot <emma+marge@anholt.net>2023-05-17 08:18:25 +0000
commit0e3c828fc4efed524ecbd4accc918bf29e72739b (patch)
tree03a9971af678ae1d2498224e89a3c36a536cc2de /src/imagination/vulkan/pvr_job_transfer.c
parentf1e339dfd6db7d18ee2262387268aa3f2f8c0f8c (diff)
downloadmesa-0e3c828fc4efed524ecbd4accc918bf29e72739b.tar.gz
pvr: PBE fix mesa pipe swizzle conversion
The swizzle of pipe formats is described in "struct util_format_description". The struct has array "unsigned char swizzle[4];". The index of the array is the colour channel (in the order R, G, B and A). The value is what position the colour channel is sourced from. In PBE register settings (REG_SWIZ_CHAN[0-3]) the register index is output channel position (and not colour). The colours are in the PBE source channels - SWIZ_SOURCE_CHAN0 typically red. The function pvr_get_pbe_hw_swizzle doesn't translate the swizzle correctly. Remove function and replace with switch for each colour. This could be done in a for loop, but there is just as much code in the loop, it involves pointers and it's less readable for humans. That's why I opted for this implementation. Fixed test: dEQP-VK.api.copy_and_blit.core.image_to_image .all_formats.color.2d.r4g4b4a4_unorm_pack16.b4g4r4a4_unorm_pack16 and other with this pixel format. Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>
Diffstat (limited to 'src/imagination/vulkan/pvr_job_transfer.c')
0 files changed, 0 insertions, 0 deletions