mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
vulkan: Uses debug output setting to enable debug layers.
This commit is contained in:
parent
4bfd019c0d
commit
26ff4fd6b7
1 changed files with 13 additions and 23 deletions
|
@ -11,12 +11,10 @@
|
|||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
#include "Emu/state.h"
|
||||
#include "VulkanAPI.h"
|
||||
#include "../GCM.h"
|
||||
|
||||
//Set to 9 to enable all debug layers. Will cause significant slowdowns. Eventually to be replaced with GUI checkbox
|
||||
#define VK_ENABLED_LAYER_COUNT 0
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
class texture;
|
||||
|
@ -166,22 +164,18 @@ namespace vk
|
|||
"VK_KHR_swapchain"
|
||||
};
|
||||
|
||||
const char *validation_layers[] =
|
||||
{
|
||||
"VK_LAYER_LUNARG_threading", "VK_LAYER_LUNARG_mem_tracker",
|
||||
"VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_draw_state",
|
||||
"VK_LAYER_LUNARG_param_checker", "VK_LAYER_LUNARG_swapchain",
|
||||
"VK_LAYER_LUNARG_device_limits", "VK_LAYER_LUNARG_image",
|
||||
"VK_LAYER_GOOGLE_unique_objects",
|
||||
};
|
||||
std::vector<const char *> layers;
|
||||
|
||||
if (rpcs3::config.rsx.d3d12.debug_output.value())
|
||||
layers.push_back("VK_LAYER_LUNARG_standard_validation");
|
||||
|
||||
VkDeviceCreateInfo device;
|
||||
device.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
||||
device.pNext = NULL;
|
||||
device.queueCreateInfoCount = 1;
|
||||
device.pQueueCreateInfos = &queue;
|
||||
device.enabledLayerCount = VK_ENABLED_LAYER_COUNT;
|
||||
device.ppEnabledLayerNames = validation_layers;
|
||||
device.enabledLayerCount = layers.size();
|
||||
device.ppEnabledLayerNames = layers.data();
|
||||
device.enabledExtensionCount = 1;
|
||||
device.ppEnabledExtensionNames = requested_extensions;
|
||||
device.pEnabledFeatures = nullptr;
|
||||
|
@ -1011,21 +1005,17 @@ namespace vk
|
|||
"VK_EXT_debug_report",
|
||||
};
|
||||
|
||||
const char *validation_layers[] =
|
||||
{
|
||||
"VK_LAYER_LUNARG_threading", "VK_LAYER_LUNARG_mem_tracker",
|
||||
"VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_draw_state",
|
||||
"VK_LAYER_LUNARG_param_checker", "VK_LAYER_LUNARG_swapchain",
|
||||
"VK_LAYER_LUNARG_device_limits", "VK_LAYER_LUNARG_image",
|
||||
"VK_LAYER_GOOGLE_unique_objects",
|
||||
};
|
||||
std::vector<const char *> layers;
|
||||
|
||||
if (rpcs3::config.rsx.d3d12.debug_output.value())
|
||||
layers.push_back("VK_LAYER_LUNARG_standard_validation");
|
||||
|
||||
VkInstanceCreateInfo instance_info;
|
||||
instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
instance_info.pNext = nullptr;
|
||||
instance_info.pApplicationInfo = &app;
|
||||
instance_info.enabledLayerCount = VK_ENABLED_LAYER_COUNT;
|
||||
instance_info.ppEnabledLayerNames = validation_layers;
|
||||
instance_info.enabledLayerCount = layers.size();
|
||||
instance_info.ppEnabledLayerNames = layers.data();
|
||||
instance_info.enabledExtensionCount = 3;
|
||||
instance_info.ppEnabledExtensionNames = requested_extensions;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue