mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
intel/anv: Fix condition for planar yuv surface
Test the sampler->conversion for NULL pointer before dereferencing it. Fixes: Regressions in VulkanCTS. Fixes:226316116c"intel/anv: Fix condition to set MipModeFilter for YUV surface" Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit69e94e8939)
This commit is contained in:
parent
47cffe6da3
commit
811f4b21da
2 changed files with 3 additions and 3 deletions
|
|
@ -310,7 +310,7 @@
|
|||
"description": "intel/anv: Fix condition for planar yuv surface",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "226316116cd1e48a8f0734aa58669f98294d3d19"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -504,12 +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 =
|
||||
const bool isl_format_is_planar_yuv = sampler->conversion &&
|
||||
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_planar_yuv) ?
|
||||
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