summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-08 18:03:56 +0200
committerMarek Olšák <[email protected]>2016-07-13 19:46:16 +0200
commited3912d0daae717d70af9c595f1c36d817d9ceec (patch)
treef1c8b03e9b310794f27fe62d49e971a7ed8b1432 /src/gallium/drivers
parentfc8139b146d8be00b415edf60e91425b805d5b59 (diff)
radeonsi: just save buffer sizes instead of buffers while recording IBs
whole buffer objects are not needed Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c5
-rw-r--r--src/gallium/drivers/radeon/radeon_winsys.h2
-rw-r--r--src/gallium/drivers/radeonsi/si_debug.c4
3 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index f75fa6c7d8c..cd4908fd3b9 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -367,12 +367,7 @@ oom:
void radeon_clear_saved_cs(struct radeon_saved_cs *saved)
{
- unsigned i;
-
FREE(saved->ib);
-
- for (i = 0; i < saved->bo_count; i++)
- pb_reference(&saved->bo_list[i].buf, NULL);
FREE(saved->bo_list);
memset(saved, 0, sizeof(*saved));
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h
index de25e19aa5b..090cafc7ff6 100644
--- a/src/gallium/drivers/radeon/radeon_winsys.h
+++ b/src/gallium/drivers/radeon/radeon_winsys.h
@@ -414,7 +414,7 @@ struct radeon_surf {
};
struct radeon_bo_list_item {
- struct pb_buffer *buf;
+ uint64_t bo_size;
uint64_t vm_address;
uint64_t priority_usage; /* mask of (1 << RADEON_PRIO_*) */
};
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index 220ce13dab3..57a930f4fe1 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -609,13 +609,13 @@ static void si_dump_bo_list(struct si_context *sctx,
/* Note: Buffer sizes are expected to be aligned to 4k by the winsys. */
const unsigned page_size = sctx->b.screen->info.gart_page_size;
uint64_t va = saved->bo_list[i].vm_address;
- uint64_t size = saved->bo_list[i].buf->size;
+ uint64_t size = saved->bo_list[i].bo_size;
bool hit = false;
/* If there's unused virtual memory between 2 buffers, print it. */
if (i) {
uint64_t previous_va_end = saved->bo_list[i-1].vm_address +
- saved->bo_list[i-1].buf->size;
+ saved->bo_list[i-1].bo_size;
if (va > previous_va_end) {
fprintf(f, " %10"PRIu64" -- hole --\n",