diff options
Diffstat (limited to 'tools/gfx/vulkan')
| -rw-r--r-- | tools/gfx/vulkan/vk-device.cpp | 5 | ||||
| -rw-r--r-- | tools/gfx/vulkan/vk-helper-functions.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx/vulkan/vk-helper-functions.h | 7 |
3 files changed, 4 insertions, 11 deletions
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp index b9ca76493..d056e3984 100644 --- a/tools/gfx/vulkan/vk-device.cpp +++ b/tools/gfx/vulkan/vk-device.cpp @@ -214,7 +214,8 @@ Result DeviceImpl::initVulkanInstanceAndDevice( #endif } - if (ENABLE_VALIDATION_LAYER || isGfxDebugLayerEnabled()) + gfxEnableDebugLayer(useValidationLayer); + if (isGfxDebugLayerEnabled()) instanceExtensions.add(VK_EXT_DEBUG_REPORT_EXTENSION_NAME); VkInstanceCreateInfo instanceCreateInfo = {VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO}; @@ -1027,7 +1028,7 @@ SlangResult DeviceImpl::initialize(const Desc& desc) descriptorSetAllocator.m_api = &m_api; initDeviceResult = initVulkanInstanceAndDevice( desc.existingDeviceHandles.handles, - ENABLE_VALIDATION_LAYER != 0 || isGfxDebugLayerEnabled()); + isGfxDebugLayerEnabled()); if (initDeviceResult == SLANG_OK) break; } diff --git a/tools/gfx/vulkan/vk-helper-functions.cpp b/tools/gfx/vulkan/vk-helper-functions.cpp index f1f517567..4a1fe85d0 100644 --- a/tools/gfx/vulkan/vk-helper-functions.cpp +++ b/tools/gfx/vulkan/vk-helper-functions.cpp @@ -214,8 +214,7 @@ VkAccessFlags translateAccelerationStructureAccessFlag(AccessFlag access) { VkAccessFlags result = 0; if ((uint32_t)access & (uint32_t)AccessFlag::Read) - result |= VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_SHADER_READ_BIT | - VK_ACCESS_TRANSFER_READ_BIT; + result |= VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_SHADER_READ_BIT; if ((uint32_t)access & (uint32_t)AccessFlag::Write) result |= VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR; return result; diff --git a/tools/gfx/vulkan/vk-helper-functions.h b/tools/gfx/vulkan/vk-helper-functions.h index 59dc61230..14fd18f5d 100644 --- a/tools/gfx/vulkan/vk-helper-functions.h +++ b/tools/gfx/vulkan/vk-helper-functions.h @@ -7,13 +7,6 @@ // Vulkan has a different coordinate system to ogl // http://anki3d.org/vulkan-coordinate-system/ -#ifndef ENABLE_VALIDATION_LAYER -#if _DEBUG -#define ENABLE_VALIDATION_LAYER 1 -#else -#define ENABLE_VALIDATION_LAYER 0 -#endif -#endif #ifdef _MSC_VER #include <stddef.h> |
