-
Notifications
You must be signed in to change notification settings - Fork 69
Added support for VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES #1003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
d4ade8c
75ebe75
c2cf167
5b783e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| +38 −1 | 28_FFTBloom/main.cpp | |
| +18 −0 | 29_Arithmetic2Bench/main.cpp | |
| +21 −2 | 30_ComputeShaderPathTracer/main.cpp | |
| +17 −1 | 40_PathTracer/src/renderer/CRenderer.cpp | |
| +29 −0 | 64_EmulatedFloatTest/main.cpp | |
| +42 −3 | 70_FLIPFluids/main.cpp | |
| +79 −64 | 71_RayTracingPipeline/main.cpp | |
| +18 −0 | 72_CooperativeBinarySearch/main.cpp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,8 @@ class CVulkanRayTracingPipeline final : public IGPURayTracingPipeline | |
|
|
||
| inline VkPipeline getInternalObject() const { return m_vkPipeline; } | ||
|
|
||
| void populateExecutableInfo(bool includeInternalRepresentations); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add it as a pure virtual protected function in IGPUPipeline |
||
|
|
||
| virtual const SShaderGroupHandle& getRaygen() const override; | ||
| virtual std::span<const SShaderGroupHandle> getMissHandles() const override; | ||
| virtual std::span<const SShaderGroupHandle> getHitHandles() const override; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1190,9 +1190,16 @@ void CVulkanLogicalDevice::createComputePipelines_impl( | |
| const VkPipeline vk_pipeline = vk_pipelines[i]; | ||
| // break the lifetime cause of the aliasing | ||
| std::uninitialized_default_construct_n(output+i,1); | ||
| output[i] = core::make_smart_refctd_ptr<CVulkanComputePipeline>( | ||
| auto pipeline = core::make_smart_refctd_ptr<CVulkanComputePipeline>( | ||
| info,vk_pipeline | ||
| ); | ||
| if (info.flags.hasFlags(IGPUComputePipeline::SCreationParams::FLAGS::CAPTURE_STATISTICS)) | ||
| { | ||
| pipeline->populateExecutableInfo(info.flags.hasFlags(IGPUComputePipeline::SCreationParams::FLAGS::CAPTURE_INTERNAL_REPRESENTATIONS)); | ||
| if (pipeline->getExecutableInfo().empty()) | ||
| m_logger.log("Driver returned 0 executables for pipeline created with CAPTURE_STATISTICS flag. This pipeline type may not be supported by the driver's VK_KHR_pipeline_executable_properties implementation.", system::ILogger::ELL_WARNING); | ||
| } | ||
|
Comment on lines
+1196
to
+1201
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's shared validation of pipeline creation parameters we do in ILogicalDevice, put that there |
||
| output[i] = std::move(pipeline); | ||
| debugNameBuilder.str(""); | ||
| const auto& specInfo = createInfos[i].shader; | ||
| debugNameBuilder << specInfo.shader->getFilepathHint() << "(" << specInfo.entryPoint << "," << hlsl::ShaderStage::ESS_COMPUTE << ")\n"; | ||
|
|
@@ -1446,7 +1453,14 @@ void CVulkanLogicalDevice::createGraphicsPipelines_impl( | |
| const VkPipeline vk_pipeline = vk_pipelines[i]; | ||
| // break the lifetime cause of the aliasing | ||
| std::uninitialized_default_construct_n(output+i,1); | ||
| output[i] = core::make_smart_refctd_ptr<CVulkanGraphicsPipeline>(createInfos[i],vk_pipeline); | ||
| auto pipeline = core::make_smart_refctd_ptr<CVulkanGraphicsPipeline>(createInfos[i],vk_pipeline); | ||
| if (createInfo.flags.hasFlags(IGPUGraphicsPipeline::SCreationParams::FLAGS::CAPTURE_STATISTICS)) | ||
| { | ||
| pipeline->populateExecutableInfo(createInfo.flags.hasFlags(IGPUGraphicsPipeline::SCreationParams::FLAGS::CAPTURE_INTERNAL_REPRESENTATIONS)); | ||
| if (pipeline->getExecutableInfo().empty()) | ||
| m_logger.log("Driver returned 0 executables for pipeline created with CAPTURE_STATISTICS flag. This pipeline type may not be supported by the driver's VK_KHR_pipeline_executable_properties implementation.", system::ILogger::ELL_WARNING); | ||
| } | ||
| output[i] = std::move(pipeline); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not call into |
||
| debugNameBuilder.str(""); | ||
| auto buildDebugName = [&](const IGPUPipelineBase::SShaderSpecInfo& spec, hlsl::ShaderStage stage) | ||
| { | ||
|
|
@@ -1651,11 +1665,19 @@ void CVulkanLogicalDevice::createRayTracingPipelines_impl( | |
| const auto success = m_devf.vk.vkGetRayTracingShaderGroupHandlesKHR(m_vkdev, vk_pipeline, 0, handleCount, dataSize, shaderGroupHandles->data()) == VK_SUCCESS; | ||
| assert(success); | ||
|
|
||
| output[i] = core::make_smart_refctd_ptr<CVulkanRayTracingPipeline>( | ||
| auto pipeline = core::make_smart_refctd_ptr<CVulkanRayTracingPipeline>( | ||
| createInfos[i], | ||
| vk_pipeline, | ||
| std::move(shaderGroupHandles) | ||
| ); | ||
|
|
||
| if (info.cached.flags.hasFlags(IGPURayTracingPipeline::SCreationParams::FLAGS::CAPTURE_STATISTICS)) | ||
| { | ||
| pipeline->populateExecutableInfo(info.cached.flags.hasFlags(IGPURayTracingPipeline::SCreationParams::FLAGS::CAPTURE_INTERNAL_REPRESENTATIONS)); | ||
| if (pipeline->getExecutableInfo().empty()) | ||
| m_logger.log("Driver returned 0 executables for pipeline created with CAPTURE_STATISTICS flag. This pipeline type may not be supported by the driver's VK_KHR_pipeline_executable_properties implementation.", system::ILogger::ELL_WARNING); | ||
| } | ||
| output[i] = std::move(pipeline); | ||
| } | ||
| } | ||
| else | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.