From 8cb60c7dd3cb608615d3e5f89ad4198c0babdb3d Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sun, 1 Jan 2017 16:47:12 +0100 Subject: ac/debug: Dump indirect buffers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is for handling chained command buffers and secondary command buffers. It doesn't handle the trace id for secondary command buffers yet, but I don't think that is possible in general with just writes, as we could call a secondary command buffer multiple times. I think this is good enough for now, as the most useful case is the chaining when we grow an IB. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/amd/vulkan') diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index 99b16192bcd..f7707f6c793 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -777,8 +777,9 @@ static int radv_amdgpu_winsys_cs_submit(struct radeon_winsys_ctx *_ctx, } -static void *radv_amdgpu_winsys_get_cpu_addr(struct radv_amdgpu_cs *cs, uint64_t addr) +static void *radv_amdgpu_winsys_get_cpu_addr(void *_cs, uint64_t addr) { + struct radv_amdgpu_cs *cs = (struct radv_amdgpu_cs *)_cs; void *ret = NULL; for (unsigned i = 0; i <= cs->num_old_ib_buffers; ++i) { struct radv_amdgpu_winsys_bo *bo; @@ -801,7 +802,8 @@ static void radv_amdgpu_winsys_cs_dump(struct radeon_winsys_cs *_cs, ac_parse_ib(file, radv_amdgpu_winsys_get_cpu_addr(cs, cs->ib.ib_mc_address), - cs->ib.size, trace_id, "main IB", cs->ws->info.chip_class); + cs->ib.size, trace_id, "main IB", cs->ws->info.chip_class, + radv_amdgpu_winsys_get_cpu_addr, cs); } static struct radeon_winsys_ctx *radv_amdgpu_ctx_create(struct radeon_winsys *_ws) -- cgit v1.2.3