Vulkan only allows power-of-two sample counts. We already kinda checked
for this, but forgot to validate the result in the end. Let's check the
result and error properly.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
if (sample_count >= 1) {
VkSampleCountFlagBits sample_mask = vk_sample_count_flags(sample_count);
+ if (!sample_mask)
+ return false;
const struct util_format_description *desc = util_format_description(format);
if (util_format_is_depth_or_stencil(format)) {
if (util_format_has_depth(desc)) {