Module: Mesa
Branch: main
Commit: a14354cf21e4f4361ff396471891082b0cd7b3d9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a14354cf21e4f4361ff396471891082b0cd7b3d9

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Sep  8 16:24:25 2022 +0200

radv: fix reporting RT shaders in RGP

RGP expects a compute bind point. This allows it to show ISA of RT
shaders and also enables instruction timing.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7213
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18496>

---

 src/amd/vulkan/layers/radv_sqtt_layer.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/layers/radv_sqtt_layer.c 
b/src/amd/vulkan/layers/radv_sqtt_layer.c
index 1d169b1159a..3775b9cd9ef 100644
--- a/src/amd/vulkan/layers/radv_sqtt_layer.c
+++ b/src/amd/vulkan/layers/radv_sqtt_layer.c
@@ -691,7 +691,14 @@ sqtt_CmdBindPipeline(VkCommandBuffer commandBuffer, 
VkPipelineBindPoint pipeline
 
    API_MARKER(BindPipeline, commandBuffer, pipelineBindPoint, _pipeline);
 
-   radv_describe_pipeline_bind(cmd_buffer, pipelineBindPoint, pipeline);
+   if (pipelineBindPoint == VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR) {
+      /* RGP seems to expect a compute bind point to detect and report RT 
pipelines, which makes
+       * sense somehow given that RT shaders are compiled to an unified 
compute shader.
+       */
+      radv_describe_pipeline_bind(cmd_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, 
pipeline);
+   } else {
+      radv_describe_pipeline_bind(cmd_buffer, pipelineBindPoint, pipeline);
+   }
 }
 
 VKAPI_ATTR void VKAPI_CALL

Reply via email to