radv: Add the BOs of all shaders in a RT pipeline

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23681>
This commit is contained in:
Friedrich Vock
2023-06-15 18:48:18 +02:00
committed by Marge Bot
parent 99e44cc527
commit b49afd6ce2
+9
View File
@@ -6472,6 +6472,15 @@ radv_emit_compute_pipeline(struct radv_cmd_buffer *cmd_buffer,
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, cmd_buffer->state.rt_prolog->bo);
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs,
cmd_buffer->state.shaders[MESA_SHADER_INTERSECTION]->bo);
struct radv_ray_tracing_pipeline *rt_pipeline = radv_pipeline_to_ray_tracing(&pipeline->base);
for (unsigned i = 0; i < rt_pipeline->stage_count; ++i) {
if (!radv_ray_tracing_stage_is_compiled(&rt_pipeline->stages[i]))
continue;
struct radv_shader *shader = container_of(rt_pipeline->stages[i].shader,
struct radv_shader, base);
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, shader->bo);
}
}
if (unlikely(cmd_buffer->device->trace_bo))