summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2016-03-10 21:23:49 +0100
committerBas Nieuwenhuizen <[email protected]>2016-04-19 18:10:30 +0200
commitaabc7d61d6826164f5ecf8243a6265af6c6ee62c (patch)
tree205f86224a4b29363496e5a0131313fa63e1edf5 /src/gallium/drivers/radeonsi/si_pipe.c
parent0d7ddd6819b1007ee1490755068660fbc436e974 (diff)
radeonsi: Add CE uploader.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index ddfa59fd128..ca07331187f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -29,6 +29,7 @@
#include "radeon/radeon_llvm_emit.h"
#include "radeon/radeon_uvd.h"
#include "util/u_memory.h"
+#include "util/u_suballoc.h"
#include "vl/vl_decoder.h"
/*
@@ -41,6 +42,9 @@ static void si_destroy_context(struct pipe_context *context)
si_release_all_descriptors(sctx);
+ if (sctx->ce_suballocator)
+ u_suballocator_destroy(sctx->ce_suballocator);
+
pipe_resource_reference(&sctx->esgs_ring, NULL);
pipe_resource_reference(&sctx->gsvs_ring, NULL);
pipe_resource_reference(&sctx->tf_ring, NULL);
@@ -155,6 +159,13 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
if (!sctx->ce_preamble_ib)
goto fail;
}
+
+ sctx->ce_suballocator =
+ u_suballocator_create(&sctx->b.b, 1024 * 1024,
+ 64, PIPE_BIND_CUSTOM,
+ PIPE_USAGE_DEFAULT, FALSE);
+ if (!sctx->ce_suballocator)
+ goto fail;
}
sctx->b.gfx.flush = si_context_gfx_flush;