mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 21:48:09 +02:00
intel/anv: Fix condition to set MipModeFilter for YUV surface
Mip Mode Filter must be set to MIPFILTER_NONE for Planar YUV surfaces. Add the missing condition to check for planar format. Fixes:b24b93d584"anv: enable VK_KHR_sampler_ycbcr_conversion" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit226316116c)
This commit is contained in:
parent
07029efa5d
commit
291b34ef0c
2 changed files with 6 additions and 3 deletions
|
|
@ -436,7 +436,7 @@
|
|||
"description": "intel/anv: Fix condition to set MipModeFilter for YUV surface",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "b24b93d58431a4349eecddb07304f6eda648e997"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -504,9 +504,12 @@ VkResult genX(CreateSampler)(
|
|||
/* From Broadwell PRM, SAMPLER_STATE:
|
||||
* "Mip Mode Filter must be set to MIPFILTER_NONE for Planar YUV surfaces."
|
||||
*/
|
||||
const bool isl_format_is_planar_yuv =
|
||||
isl_format_is_yuv(sampler->conversion->format->planes[0].isl_format) &&
|
||||
isl_format_is_planar(sampler->conversion->format->planes[0].isl_format);
|
||||
|
||||
const uint32_t mip_filter_mode =
|
||||
(sampler->conversion &&
|
||||
isl_format_is_yuv(sampler->conversion->format->planes[0].isl_format)) ?
|
||||
(sampler->conversion && isl_format_is_planar_yuv) ?
|
||||
MIPFILTER_NONE : vk_to_gen_mipmap_mode[pCreateInfo->mipmapMode];
|
||||
|
||||
struct GENX(SAMPLER_STATE) sampler_state = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue