diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c index 17e81dc6f77..0ba0ea3efd5 100644 --- a/src/intel/vulkan/genX_state.c +++ b/src/intel/vulkan/genX_state.c @@ -634,9 +634,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 = {