From c3058653add8f8a9d147de652a94c178a6973ac6 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Wed, 25 Nov 2020 19:14:57 +0300 Subject: Added RootSignatureBuilder, some fixed for vulkan ray tracing --- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 1 + Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 3cab0ae2..e34f52f2 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -2789,6 +2789,7 @@ void DeviceContextVkImpl::BuildBLAS(const BuildBLASAttribs& Attribs) // vertex format in SrcTris may be undefined, so use vertex format from description vkTris.vertexFormat = TypeToVkFormat(TriDesc.VertexValueType, TriDesc.VertexComponentCount, TriDesc.VertexValueType < VT_FLOAT16); vkTris.vertexStride = SrcTris.VertexStride; + vkTris.maxVertex = SrcTris.VertexCount; vkTris.vertexData.deviceAddress = pVB->GetVkDeviceAddress() + SrcTris.VertexOffset; TransitionOrVerifyBufferState(*pVB, Attribs.GeometryTransitionMode, RESOURCE_STATE_BUILD_AS_READ, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, OpName); diff --git a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp index 93fb9f34..514ca01d 100644 --- a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp +++ b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp @@ -427,6 +427,17 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& _E EnabledExtFeats.BufferDeviceAddress = DeviceExtFeatures.BufferDeviceAddress; EnabledExtFeats.DescriptorIndexing = DeviceExtFeatures.DescriptorIndexing; + // disable unused features + EnabledExtFeats.AccelStruct.accelerationStructureCaptureReplay = false; + EnabledExtFeats.AccelStruct.accelerationStructureIndirectBuild = false; + EnabledExtFeats.AccelStruct.accelerationStructureHostCommands = false; + EnabledExtFeats.AccelStruct.descriptorBindingAccelerationStructureUpdateAfterBind = false; + + EnabledExtFeats.RayTracingPipeline.rayTracingPipelineShaderGroupHandleCaptureReplay = false; + EnabledExtFeats.RayTracingPipeline.rayTracingPipelineShaderGroupHandleCaptureReplayMixed = false; + EnabledExtFeats.RayTracingPipeline.rayTracingPipelineTraceRaysIndirect = false; + EnabledExtFeats.RayTracingPipeline.rayTraversalPrimitiveCulling = false; // for GLSL_EXT_ray_flags_primitive_culling + *NextExt = &EnabledExtFeats.AccelStruct; NextExt = &EnabledExtFeats.AccelStruct.pNext; *NextExt = &EnabledExtFeats.RayTracingPipeline; -- cgit v1.2.3