summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/etnaviv
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2017-01-27 00:12:37 +0100
committerMarek Olšák <marek.olsak@amd.com>2017-02-14 21:46:16 +0100
commit55ad59d2b72d6d6e38bd0a54586b713a7a93bb10 (patch)
treeeb46201b7ce87773e0199399a75a469c389f3dc7 /src/gallium/drivers/etnaviv
parent998396c32e4e95fef5a1efef6cb1a9efb0868aa6 (diff)
gallium: set pipe_context uploaders in drivers (v3)
Notes: - make sure the default size is large enough to handle all state trackers - pipe wrappers don't receive transfer calls from stream_uploader, because pipe_context::stream_uploader points directly to the underlying driver's stream_uploader (to keep it simple for now) v2: add error handling to nv50, nvc0, noop v3: set const_uploader Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> (v1) Tested-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src/gallium/drivers/etnaviv')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
index ce2d8719e4..62297a0504 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_context.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_context.c
@@ -49,6 +49,7 @@
#include "util/u_blitter.h"
#include "util/u_memory.h"
#include "util/u_prim.h"
+#include "util/u_upload_mgr.h"
#include "hw/common.xml.h"
@@ -63,6 +64,9 @@ etna_context_destroy(struct pipe_context *pctx)
if (ctx->blitter)
util_blitter_destroy(ctx->blitter);
+ if (pctx->stream_uploader)
+ u_upload_destroy(pctx->stream_uploader);
+
if (ctx->stream)
etna_cmd_stream_del(ctx->stream);
@@ -276,6 +280,10 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
pctx = &ctx->base;
pctx->priv = ctx;
pctx->screen = pscreen;
+ pctx->stream_uploader = u_upload_create_default(pctx);
+ if (!pctx->stream_uploader)
+ goto fail;
+ pctx->const_uploader = pctx->stream_uploader;
/* context ctxate setup */
ctx->specs = screen->specs;