mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Turn off annoying "debug flicker" I used to see if we were swapping buffers properly early on
Also minor logging changes, refine the false-positive debug layer check
This commit is contained in:
parent
79fd828d16
commit
575cc890b7
3 changed files with 12 additions and 5 deletions
|
@ -110,14 +110,18 @@ VulkanContext::VulkanContext(const char *app_name, int app_ver, uint32_t flags)
|
|||
|
||||
VkResult res = vkCreateInstance(&inst_info, NULL, &instance_);
|
||||
if (res != VK_SUCCESS) {
|
||||
ELOG("Failed to create instance: %d", res);
|
||||
if (res == VK_ERROR_LAYER_NOT_PRESENT) {
|
||||
WLOG("Validation on but layers not available - dropping layers");
|
||||
// Drop the validation layers and try again.
|
||||
instance_layer_names.clear();
|
||||
device_layer_names.clear();
|
||||
inst_info.enabledLayerCount = 0;
|
||||
inst_info.ppEnabledLayerNames = NULL;
|
||||
res = vkCreateInstance(&inst_info, NULL, &instance_);
|
||||
if (res != VK_SUCCESS)
|
||||
ELOG("Failed to create instance even without validation: %d", res);
|
||||
} else {
|
||||
ELOG("Failed to create instance : %d", res);
|
||||
}
|
||||
}
|
||||
assert(res == VK_SUCCESS);
|
||||
|
|
|
@ -119,8 +119,9 @@ static VkBool32 VKAPI_CALL Vulkan_Dbg(VkDebugReportFlagsEXT msgFlags, VkDebugRep
|
|||
}
|
||||
message << "[" << pLayerPrefix << "] " << ObjTypeToString(objType) << " Code " << msgCode << " : " << pMsg << "\n";
|
||||
|
||||
// Getting some bizarre false positive for mapping image memory.
|
||||
if (msgCode == 6)
|
||||
// Getting some bizarre false positives for mapping image memory.
|
||||
// https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/121
|
||||
if (msgCode == 6 && !memcmp(pMsg, "Cannot map", 10))
|
||||
return false;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -680,8 +680,10 @@ void Thin3DVKContext::Begin(bool clear, uint32_t colorval, float depthVal, int s
|
|||
VkClearValue clearVal[2] = {};
|
||||
Uint8x4ToFloat4(colorval, clearVal[0].color.float32);
|
||||
|
||||
if (frameNum_ & 1)
|
||||
clearVal[0].color.float32[2] = 1.0f;
|
||||
// // Debug flicker - used to see if we swap at all. no longer necessary
|
||||
// if (frameNum_ & 1)
|
||||
// clearVal[0].color.float32[2] = 1.0f;
|
||||
|
||||
clearVal[1].depthStencil.depth = depthVal;
|
||||
clearVal[1].depthStencil.stencil = stencilVal;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue