Use explicit validation layer names on Android (no meta layer available)
This commit is contained in:
parent
418f4e2875
commit
2accf02c1e
2 changed files with 19 additions and 8 deletions
|
|
@ -15,14 +15,25 @@ namespace vks
|
|||
{
|
||||
namespace debug
|
||||
{
|
||||
int validationLayerCount = 1;
|
||||
const char *validationLayerNames[] =
|
||||
{
|
||||
// This is a meta layer that enables all of the standard
|
||||
// validation layers in the correct order :
|
||||
// threading, parameter_validation, device_limits, object_tracker, image, core_validation, swapchain, and unique_objects
|
||||
#if !defined(__ANDROID__)
|
||||
// On desktop the LunarG loaders exposes a meta layer that contains all layers
|
||||
int32_t validationLayerCount = 1;
|
||||
const char *validationLayerNames[] = {
|
||||
"VK_LAYER_LUNARG_standard_validation"
|
||||
};
|
||||
#else
|
||||
// On Android we need to explicitly select all layers
|
||||
int32_t validationLayerCount = 7;
|
||||
const char *validationLayerNames[] = {
|
||||
"VK_LAYER_GOOGLE_threading",
|
||||
"VK_LAYER_LUNARG_parameter_validation",
|
||||
"VK_LAYER_LUNARG_object_tracker",
|
||||
"VK_LAYER_LUNARG_core_validation",
|
||||
"VK_LAYER_LUNARG_image",
|
||||
"VK_LAYER_LUNARG_swapchain",
|
||||
"VK_LAYER_GOOGLE_unique_objects"
|
||||
};
|
||||
#endif
|
||||
|
||||
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallback = VK_NULL_HANDLE;
|
||||
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallback = VK_NULL_HANDLE;
|
||||
|
|
@ -75,7 +86,7 @@ namespace vks
|
|||
std::stringstream debugMessage;
|
||||
debugMessage << prefix << " [" << pLayerPrefix << "] Code " << msgCode << " : " << pMsg;
|
||||
|
||||
#if defined(ANDROID)
|
||||
#if defined(__ANDROID__)
|
||||
if (flags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
|
||||
LOGE("%s", debugMessage.str().c_str());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue