text: /**
   * netzhaut - Web Browser Engine
   * Copyright (C) 2020 The netzhaut Authors
   * Published under MIT
   */
  
  #include "../Result.h"
  
  #undef  NH_GFX_CHECK
  #define NH_GFX_CHECK(checkable)                                             \
  {                                                                           \
      NH_GFX_RESULT checkResult = checkable;                                  \
      if (checkResult != NH_GFX_SUCCESS) {NH_GFX_DIAGNOSTIC_END(checkResult)} \
  }
  
  #undef  NH_GFX_SILENT_CHECK
  #define NH_GFX_SILENT_CHECK(checkable)                       \
  {                                                            \
      NH_GFX_RESULT checkResult = checkable;                   \
      if (checkResult != NH_GFX_SUCCESS) {NH_GFX_SILENT_END()} \
  }
  
  #undef  NH_GFX_CHECK_NULL
  #define NH_GFX_CHECK_NULL(checkable)                                              \
  {                                                                                 \
      void *checkResult_p = checkable;                                              \
      if (checkResult_p == NULL) {NH_GFX_DIAGNOSTIC_END(NH_GFX_ERROR_NULL_POINTER)} \
  }
  
  #undef  NH_GFX_CHECK_MEM
  #define NH_GFX_CHECK_MEM(checkable)                                                    \
  {                                                                                      \
      void *checkResult_p = checkable;                                                   \
      if (checkResult_p == NULL) {NH_GFX_DIAGNOSTIC_END(NH_GFX_ERROR_MEMORY_ALLOCATION)} \
  }
  
  #undef  NH_GFX_CHECK_VULKAN
  #define NH_GFX_CHECK_VULKAN(checkable)                                                   \
  {                                                                                        \
      VkResult checkResult = checkable;                                                    \
      if (checkResult != VK_SUCCESS) {NH_GFX_DIAGNOSTIC_END(nh_vk_getResult(checkResult))} \
  }
  
  