diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-09-08 16:57:22 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-09-10 10:40:37 -0600 |
| commit | 8cda44ec592d8f2394dc59725feb3237968d8d16 (patch) | |
| tree | 887fbc8aa4917bb671aa2c1755422aedb0206241 | |
| parent | 9f8fe5be96c81857bab4ec1d910b2914dfa564ce (diff) | |
| download | usermoji-8cda44ec592d8f2394dc59725feb3237968d8d16.tar.xz | |
demos: Do not bail on validation error
| -rw-r--r-- | demos/cube.c | 11 | ||||
| -rw-r--r-- | 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 { |
