diff --git a/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp b/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp index 3980831d16..ea7c9717bf 100644 --- a/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp +++ b/src/common/rendering/vulkan/renderer/vk_descriptorset.cpp @@ -103,7 +103,7 @@ void VkDescriptorSetManager::UpdateFixedSet() WriteDescriptors update; update.AddCombinedImageSampler(FixedSet.get(), 0, fb->GetTextureManager()->Shadowmap.View.get(), fb->GetSamplerManager()->ShadowmapSampler.get(), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); update.AddCombinedImageSampler(FixedSet.get(), 1, fb->GetTextureManager()->Lightmap.View.get(), fb->GetSamplerManager()->LightmapSampler.get(), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); - if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) update.AddAccelerationStructure(FixedSet.get(), 2, fb->GetRaytrace()->GetAccelStruct()); update.Execute(fb->device.get()); } @@ -263,7 +263,7 @@ void VkDescriptorSetManager::CreateFixedSetLayout() DescriptorSetLayoutBuilder builder; builder.AddBinding(0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT); builder.AddBinding(1, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT); - if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) builder.AddBinding(2, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1, VK_SHADER_STAGE_FRAGMENT_BIT); builder.DebugName("VkDescriptorSetManager.FixedSetLayout"); FixedSetLayout = builder.Create(fb->device.get()); @@ -283,7 +283,7 @@ void VkDescriptorSetManager::CreateFixedSetPool() { DescriptorPoolBuilder poolbuilder; poolbuilder.AddPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 2 * maxSets); - if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) poolbuilder.AddPoolSize(VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1 * maxSets); poolbuilder.MaxSets(maxSets); poolbuilder.DebugName("VkDescriptorSetManager.FixedDescriptorPool"); diff --git a/src/common/rendering/vulkan/renderer/vk_raytrace.cpp b/src/common/rendering/vulkan/renderer/vk_raytrace.cpp index 9e7a95889d..8efdb10d1a 100644 --- a/src/common/rendering/vulkan/renderer/vk_raytrace.cpp +++ b/src/common/rendering/vulkan/renderer/vk_raytrace.cpp @@ -55,7 +55,7 @@ void VkRaytrace::SetLevelMesh(hwrenderer::LevelMesh* mesh) { Reset(); Mesh = mesh; - if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) { CreateVulkanObjects(); } diff --git a/src/common/rendering/vulkan/shaders/vk_shader.cpp b/src/common/rendering/vulkan/shaders/vk_shader.cpp index aac85262f7..1005dd41b5 100644 --- a/src/common/rendering/vulkan/shaders/vk_shader.cpp +++ b/src/common/rendering/vulkan/shaders/vk_shader.cpp @@ -361,7 +361,7 @@ std::unique_ptr VkShaderManager::LoadVertShader(FString shadername std::unique_ptr VkShaderManager::LoadFragShader(FString shadername, const char *frag_lump, const char *material_lump, const char *light_lump, const char *defines, bool alphatest, bool gbufferpass) { FString code = GetTargetGlslVersion(); - if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME)) code << "\n#define SUPPORTS_RAYTRACING\n"; code << defines; code << "\n$placeholder$"; // here the code can later add more needed #defines. diff --git a/src/common/rendering/vulkan/system/vk_renderdevice.cpp b/src/common/rendering/vulkan/system/vk_renderdevice.cpp index 91686de6a9..6ec4cab783 100644 --- a/src/common/rendering/vulkan/system/vk_renderdevice.cpp +++ b/src/common/rendering/vulkan/system/vk_renderdevice.cpp @@ -568,8 +568,3 @@ void VulkanRenderDevice::SetSceneRenderTarget(bool useSSAO) { mRenderState->SetRenderTarget(&GetBuffers()->SceneColor, GetBuffers()->SceneDepthStencil.View.get(), GetBuffers()->GetWidth(), GetBuffers()->GetHeight(), VK_FORMAT_R16G16B16A16_SFLOAT, GetBuffers()->GetSceneSamples()); } - -bool VulkanRenderDevice::RaytracingEnabled() -{ - return vk_raytrace && device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME); -}