From 9565db871cb961ab18eb208f679f00a49c2e3f6f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 30 Jun 2021 11:39:23 -0700 Subject: [PATCH] vkr: add vkr_context::validate_fatal It replaces VKR_CONTEXT_VALIDATE_FORCE_FATAL. Signed-off-by: Chia-I Wu Reviewed-by: Yiwei Zhang --- src/vkr_renderer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vkr_renderer.c b/src/vkr_renderer.c index a7f4726..0285c33 100644 --- a/src/vkr_renderer.c +++ b/src/vkr_renderer.c @@ -311,8 +311,6 @@ enum vkr_context_validate_level { VKR_CONTEXT_VALIDATE_NONE, /* force enabling the validation layer */ VKR_CONTEXT_VALIDATE_FORCE_ON, - /* same as above but also treat validation errors as fatal errors */ - VKR_CONTEXT_VALIDATE_FORCE_FATAL, }; struct vkr_context { @@ -320,6 +318,7 @@ struct vkr_context { char *debug_name; enum vkr_context_validate_level validate_level; + bool validate_fatal; mtx_t mutex; @@ -725,7 +724,7 @@ vkr_validation_callback(UNUSED VkDebugUtilsMessageSeverityFlagBitsEXT messageSev vrend_printf("%s\n", pCallbackData->pMessage); - if (ctx->validate_level != VKR_CONTEXT_VALIDATE_FORCE_FATAL) + if (!ctx->validate_fatal) return false; vkr_cs_decoder_set_fatal(&ctx->decoder);