Commit c1e60dcf by Sean Risser

Log instead of warn of unsupported extensions

Currently we produce a warning every time an unsupported extension is used. The original bug (b/139528538) called for logging these structs silently unless a debugger's attached. So I've replaced all of our warnings for unsupported structs with calls to LOG_TRAP. This is an update to TRACE_ASSERT. LOG_TRAP will never emit to the debug log, instead it will only print to a file if writing to files is enabled for logv. Bug: b/148415347 Change-Id: Ib4ad2b20b3dffce4fac597c891b2f5ee23e032c4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41348Tested-by: 's avatarSean Risser <srisser@google.com> Presubmit-Ready: Sean Risser <srisser@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent b1dd9aca
...@@ -98,11 +98,13 @@ bool IsUnderDebugger() ...@@ -98,11 +98,13 @@ bool IsUnderDebugger()
enum class Level enum class Level
{ {
Verbose,
Debug, Debug,
Info, Info,
Warn, Warn,
Error, Error,
Fatal, Fatal,
Disabled,
}; };
#ifdef __ANDROID__ #ifdef __ANDROID__
...@@ -125,6 +127,8 @@ void logv_android(Level level, const char *msg) ...@@ -125,6 +127,8 @@ void logv_android(Level level, const char *msg)
case Level::Fatal: case Level::Fatal:
__android_log_write(ANDROID_LOG_FATAL, "SwiftShader", msg); __android_log_write(ANDROID_LOG_FATAL, "SwiftShader", msg);
break; break;
default:
break;
} }
} }
#else #else
...@@ -141,17 +145,16 @@ void logv_std(Level level, const char *msg) ...@@ -141,17 +145,16 @@ void logv_std(Level level, const char *msg)
case Level::Fatal: case Level::Fatal:
fprintf(stderr, "%s", msg); fprintf(stderr, "%s", msg);
break; break;
default:
break;
} }
} }
#endif #endif
void logv(Level level, const char *format, va_list args) void logv(Level level, const char *format, va_list args)
{ {
if(static_cast<int>(level) < static_cast<int>(Level::SWIFTSHADER_LOGGING_LEVEL)) if(static_cast<int>(level) >= static_cast<int>(Level::SWIFTSHADER_LOGGING_LEVEL))
{ {
return;
}
#ifndef SWIFTSHADER_DISABLE_TRACE #ifndef SWIFTSHADER_DISABLE_TRACE
char buffer[2048]; char buffer[2048];
vsnprintf(buffer, sizeof(buffer), format, args); vsnprintf(buffer, sizeof(buffer), format, args);
...@@ -164,9 +167,10 @@ void logv(Level level, const char *format, va_list args) ...@@ -164,9 +167,10 @@ void logv(Level level, const char *format, va_list args)
# else # else
logv_std(level, buffer); logv_std(level, buffer);
# endif # endif
}
const bool traceToFile = false; const Level traceToFileLevel = Level::Disabled;
if(traceToFile) if(static_cast<int>(level) >= static_cast<int>(traceToFileLevel))
{ {
FILE *file = fopen(TRACE_OUTPUT_FILE, "a"); FILE *file = fopen(TRACE_OUTPUT_FILE, "a");
...@@ -210,8 +214,10 @@ void abort(const char *format, ...) ...@@ -210,8 +214,10 @@ void abort(const char *format, ...)
::abort(); ::abort();
} }
void trace_assert(const char *format, ...) void log_trap(const char *format, ...)
{ {
// If enabled, log_assert will log all messages, and otherwise ignore them
// unless a debugger is attached.
static std::atomic<bool> asserted = { false }; static std::atomic<bool> asserted = { false };
if(IsUnderDebugger() && !asserted.exchange(true)) if(IsUnderDebugger() && !asserted.exchange(true))
{ {
...@@ -227,7 +233,7 @@ void trace_assert(const char *format, ...) ...@@ -227,7 +233,7 @@ void trace_assert(const char *format, ...)
{ {
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
logv(Level::Fatal, format, vararg); logv(Level::Verbose, format, vararg);
va_end(vararg); va_end(vararg);
} }
} }
......
...@@ -47,8 +47,8 @@ inline void warn() {} ...@@ -47,8 +47,8 @@ inline void warn() {}
// Outputs the message to the debugging log and stderr, and calls abort(). // Outputs the message to the debugging log and stderr, and calls abort().
void abort(const char *format, ...) CHECK_PRINTF_ARGS; void abort(const char *format, ...) CHECK_PRINTF_ARGS;
// Outputs text to the debugging log, and asserts once if a debugger is attached. // Outputs text to the debugging log, and traps once if a debugger is attached.
void trace_assert(const char *format, ...) CHECK_PRINTF_ARGS; void log_trap(const char *format, ...) CHECK_PRINTF_ARGS;
} // namespace sw } // namespace sw
...@@ -59,7 +59,7 @@ void trace_assert(const char *format, ...) CHECK_PRINTF_ARGS; ...@@ -59,7 +59,7 @@ void trace_assert(const char *format, ...) CHECK_PRINTF_ARGS;
# define TRACE_ASSERT(message, ...) (void(0)) # define TRACE_ASSERT(message, ...) (void(0))
#else #else
# define TRACE(message, ...) sw::trace("%s:%d TRACE: " message "\n", __FILE__, __LINE__, ##__VA_ARGS__) # define TRACE(message, ...) sw::trace("%s:%d TRACE: " message "\n", __FILE__, __LINE__, ##__VA_ARGS__)
# define TRACE_ASSERT(message, ...) sw::trace_assert("%s:%d %s TRACE_ASSERT: " message "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__) # define LOG_TRAP(message, ...) sw::log_trap("%s:%d %s TRACE_ASSERT: " message "\n", __FILE__, __LINE__, __func__, ##__VA_ARGS__)
#endif #endif
// A macro to print a warning message to the debugging log and stderr to denote // A macro to print a warning message to the debugging log and stderr to denote
......
...@@ -243,7 +243,7 @@ void ValidateRenderPassPNextChain(VkDevice device, const T *pCreateInfo) ...@@ -243,7 +243,7 @@ void ValidateRenderPassPNextChain(VkDevice device, const T *pCreateInfo)
} }
break; break;
default: default:
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());
break; break;
} }
...@@ -392,7 +392,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCre ...@@ -392,7 +392,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCre
// Vulkan structures in this Specification." // Vulkan structures in this Specification."
break; break;
default: default:
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(createInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(createInfo->sType).c_str());
break; break;
} }
} }
...@@ -752,7 +752,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c ...@@ -752,7 +752,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c
break; break;
default: default:
// "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]" // "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]"
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());
break; break;
} }
...@@ -782,7 +782,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c ...@@ -782,7 +782,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(queueCreateInfo.pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(queueCreateInfo.pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pQueueCreateInfos[%d].pNext sType = %s", i, vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pQueueCreateInfos[%d].pNext sType = %s", i, vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -968,7 +968,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryA ...@@ -968,7 +968,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryA
break; break;
} }
default: default:
WARN("pAllocateInfo->pNext sType = %s", vk::Stringify(allocationInfo->sType).c_str()); LOG_TRAP("pAllocateInfo->pNext sType = %s", vk::Stringify(allocationInfo->sType).c_str());
break; break;
} }
...@@ -1209,7 +1209,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreat ...@@ -1209,7 +1209,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreat
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -1352,7 +1352,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(VkDevice device, const VkEventCreat ...@@ -1352,7 +1352,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(VkDevice device, const VkEventCreat
while(extInfo) while(extInfo)
{ {
// Vulkan 1.2: "pNext must be NULL" // Vulkan 1.2: "pNext must be NULL"
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -1406,7 +1406,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryP ...@@ -1406,7 +1406,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryP
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -1443,7 +1443,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCre ...@@ -1443,7 +1443,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCre
// Do nothing. Should be handled by vk::Buffer::Create(). // Do nothing. Should be handled by vk::Buffer::Create().
break; break;
default: default:
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
break; break;
} }
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
...@@ -1474,7 +1474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBuffe ...@@ -1474,7 +1474,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBuffe
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -1529,7 +1529,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreat ...@@ -1529,7 +1529,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreat
break; break;
default: default:
// "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]" // "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]"
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());
break; break;
} }
...@@ -1633,7 +1633,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageV ...@@ -1633,7 +1633,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageV
} }
break; break;
default: default:
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());
break; break;
} }
...@@ -1665,7 +1665,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkSha ...@@ -1665,7 +1665,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkSha
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -1694,7 +1694,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(VkDevice device, const VkPi ...@@ -1694,7 +1694,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(VkDevice device, const VkPi
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -1811,7 +1811,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkP ...@@ -1811,7 +1811,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkP
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -1850,7 +1850,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerC ...@@ -1850,7 +1850,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerC
} }
break; break;
default: default:
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());
break; break;
} }
...@@ -1883,7 +1883,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, cons ...@@ -1883,7 +1883,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, cons
ASSERT(!vk::Cast(device)->hasExtension(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME)); ASSERT(!vk::Cast(device)->hasExtension(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME));
break; break;
default: default:
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extensionCreateInfo->sType).c_str());
break; break;
} }
...@@ -1909,7 +1909,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkD ...@@ -1909,7 +1909,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkD
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -1946,7 +1946,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const V ...@@ -1946,7 +1946,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const V
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pAllocateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pAllocateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pAllocateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pAllocateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -1984,7 +1984,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(VkDevice device, const VkFram ...@@ -1984,7 +1984,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(VkDevice device, const VkFram
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -2055,7 +2055,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkComm ...@@ -2055,7 +2055,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkComm
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pCreateInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -2086,7 +2086,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const V ...@@ -2086,7 +2086,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const V
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pAllocateInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pAllocateInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pAllocateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pAllocateInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -2109,7 +2109,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffe ...@@ -2109,7 +2109,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffe
auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pBeginInfo->pNext); auto *nextInfo = reinterpret_cast<const VkBaseInStructure *>(pBeginInfo->pNext);
while(nextInfo) while(nextInfo)
{ {
WARN("pBeginInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str()); LOG_TRAP("pBeginInfo->pNext sType = %s", vk::Stringify(nextInfo->sType).c_str());
nextInfo = nextInfo->pNext; nextInfo = nextInfo->pNext;
} }
...@@ -2467,7 +2467,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, c ...@@ -2467,7 +2467,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, c
// SwiftShader only has a single physical device, so this extension does nothing in this case. // SwiftShader only has a single physical device, so this extension does nothing in this case.
break; break;
default: default:
WARN("pRenderPassBegin->pNext sType = %s", vk::Stringify(renderPassBeginInfo->sType).c_str()); LOG_TRAP("pRenderPassBegin->pNext sType = %s", vk::Stringify(renderPassBeginInfo->sType).c_str());
break; break;
} }
...@@ -2540,7 +2540,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(VkDevice device, uint32_t bin ...@@ -2540,7 +2540,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(VkDevice device, uint32_t bin
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pBindInfos[i].pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pBindInfos[i].pNext);
while(extInfo) while(extInfo)
{ {
WARN("pBindInfos[%d].pNext sType = %s", i, vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pBindInfos[%d].pNext sType = %s", i, vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -2598,7 +2598,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(VkDevice device, uint32_t bind ...@@ -2598,7 +2598,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(VkDevice device, uint32_t bind
#endif #endif
default: default:
WARN("pBindInfos[%d].pNext sType = %s", i, vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pBindInfos[%d].pNext sType = %s", i, vk::Stringify(extInfo->sType).c_str());
break; break;
} }
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
...@@ -2650,7 +2650,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(VkDevice device, const ...@@ -2650,7 +2650,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(VkDevice device, const
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -2666,7 +2666,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(VkDevice device, const ...@@ -2666,7 +2666,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(VkDevice device, const
} }
break; break;
default: default:
WARN("pMemoryRequirements->pNext sType = %s", vk::Stringify(extensionRequirements->sType).c_str()); LOG_TRAP("pMemoryRequirements->pNext sType = %s", vk::Stringify(extensionRequirements->sType).c_str());
break; break;
} }
...@@ -2684,7 +2684,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const ...@@ -2684,7 +2684,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -2700,7 +2700,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const ...@@ -2700,7 +2700,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const
} }
break; break;
default: default:
WARN("pMemoryRequirements->pNext sType = %s", vk::Stringify(extensionRequirements->sType).c_str()); LOG_TRAP("pMemoryRequirements->pNext sType = %s", vk::Stringify(extensionRequirements->sType).c_str());
break; break;
} }
...@@ -2718,14 +2718,14 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(VkDevice device, ...@@ -2718,14 +2718,14 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(VkDevice device,
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
auto extensionRequirements = reinterpret_cast<VkBaseInStructure const *>(pSparseMemoryRequirements->pNext); auto extensionRequirements = reinterpret_cast<VkBaseInStructure const *>(pSparseMemoryRequirements->pNext);
while(extensionRequirements) while(extensionRequirements)
{ {
WARN("pSparseMemoryRequirements->pNext sType = %s", vk::Stringify(extensionRequirements->sType).c_str()); LOG_TRAP("pSparseMemoryRequirements->pNext sType = %s", vk::Stringify(extensionRequirements->sType).c_str());
extensionRequirements = extensionRequirements->pNext; extensionRequirements = extensionRequirements->pNext;
} }
...@@ -2820,7 +2820,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica ...@@ -2820,7 +2820,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica
sizeof(deviceExtensionProperties) / sizeof(deviceExtensionProperties[0]))); sizeof(deviceExtensionProperties) / sizeof(deviceExtensionProperties[0])));
break; break;
default: default:
WARN("pFeatures->pNext sType = %s", vk::Stringify(extensionFeatures->sType).c_str()); LOG_TRAP("pFeatures->pNext sType = %s", vk::Stringify(extensionFeatures->sType).c_str());
break; break;
} }
...@@ -2918,7 +2918,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(VkPhysicalDevice physi ...@@ -2918,7 +2918,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(VkPhysicalDevice physi
break; break;
default: default:
// "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]" // "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]"
WARN("pProperties->pNext sType = %s", vk::Stringify(extensionProperties->sType).c_str()); LOG_TRAP("pProperties->pNext sType = %s", vk::Stringify(extensionProperties->sType).c_str());
break; break;
} }
...@@ -2936,7 +2936,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(VkPhysicalDevice ...@@ -2936,7 +2936,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(VkPhysicalDevice
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pFormatProperties->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pFormatProperties->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pFormatProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pFormatProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -2983,7 +2983,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(VkPhysi ...@@ -2983,7 +2983,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(VkPhysi
} }
break; break;
default: default:
WARN("pImageFormatInfo->pNext sType = %s", vk::Stringify(extensionFormatInfo->sType).c_str()); LOG_TRAP("pImageFormatInfo->pNext sType = %s", vk::Stringify(extensionFormatInfo->sType).c_str());
break; break;
} }
...@@ -3016,7 +3016,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(VkPhysi ...@@ -3016,7 +3016,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(VkPhysi
} }
break; break;
default: default:
WARN("pImageFormatProperties->pNext sType = %s", vk::Stringify(extensionProperties->sType).c_str()); LOG_TRAP("pImageFormatProperties->pNext sType = %s", vk::Stringify(extensionProperties->sType).c_str());
break; break;
} }
...@@ -3042,7 +3042,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalD ...@@ -3042,7 +3042,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalD
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pQueueFamilyProperties->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pQueueFamilyProperties->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pQueueFamilyProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pQueueFamilyProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
} }
...@@ -3064,7 +3064,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice ...@@ -3064,7 +3064,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pMemoryProperties->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pMemoryProperties->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pMemoryProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pMemoryProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -3081,7 +3081,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(VkPhy ...@@ -3081,7 +3081,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(VkPhy
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pProperties->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pProperties->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pProperties->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
} }
...@@ -3112,7 +3112,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(VkDevice device, const VkDeviceQueu ...@@ -3112,7 +3112,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(VkDevice device, const VkDeviceQueu
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pQueueInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pQueueInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pQueueInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pQueueInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -3137,7 +3137,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(VkDevice device, c ...@@ -3137,7 +3137,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(VkDevice device, c
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
...@@ -3171,7 +3171,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(VkDevice device, ...@@ -3171,7 +3171,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(VkDevice device,
auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext); auto extInfo = reinterpret_cast<VkBaseInStructure const *>(pCreateInfo->pNext);
while(extInfo) while(extInfo)
{ {
WARN("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str()); LOG_TRAP("pCreateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
extInfo = extInfo->pNext; extInfo = extInfo->pNext;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment