From 8cda44ec592d8f2394dc59725feb3237968d8d16 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Tue, 8 Sep 2015 16:57:22 -0600 Subject: demos: Do not bail on validation error --- demos/cube.c | 11 ++++++++--- demos/tri.c | 10 +++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index e0b0f3cd..614c406d 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -263,14 +263,12 @@ VkBool32 dbgFunc( const char* pMsg, void* pUserData) { - VkBool32 bail = false; char *message = (char *) malloc(strlen(pMsg)+100); assert (message); if (msgFlags & VK_DBG_REPORT_ERROR_BIT) { sprintf(message,"ERROR: [%s] Code %d : %s", pLayerPrefix, msgCode, pMsg); - bail = true; } else if (msgFlags & VK_DBG_REPORT_WARN_BIT) { // We know that we're submitting queues without fences, ignore this warning if (strstr(pMsg, "vkQueueSubmit parameter, VkFence fence, is null pointer")){ @@ -289,7 +287,14 @@ VkBool32 dbgFunc( #endif free(message); - return bail; + /* + * false indicates that layer should not bail-out of an + * API call that had validation failures. This may mean that the + * app dies inside the driver due to invalid parameter(s). + * That's what would happen without validation layers, so we'll + * keep that behavior here. + */ + return false; } typedef struct _SwapchainBuffers { diff --git a/demos/tri.c b/demos/tri.c index 3b2eada2..2e1691cf 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -136,7 +136,15 @@ VkBool32 dbgFunc( fflush(stdout); #endif free(message); - return true; + + /* + * false indicates that layer should not bail-out of an + * API call that had validation failures. This may mean that the + * app dies inside the driver due to invalid parameter(s). + * That's what would happen without validation layers, so we'll + * keep that behavior here. + */ + return false; } typedef struct _SwapchainBuffers { -- cgit v1.2.3