aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/noop/noop_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/noop/noop_pipe.c')
-rw-r--r--src/gallium/drivers/noop/noop_pipe.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c
index 301301966ce..db2375e2e5d 100644
--- a/src/gallium/drivers/noop/noop_pipe.c
+++ b/src/gallium/drivers/noop/noop_pipe.c
@@ -29,6 +29,7 @@
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
+#include "util/u_upload_mgr.h"
#include "noop_public.h"
DEBUG_GET_ONCE_BOOL_OPTION(noop, "GALLIUM_NOOP", FALSE)
@@ -289,6 +290,9 @@ static void noop_flush(struct pipe_context *ctx,
static void noop_destroy_context(struct pipe_context *ctx)
{
+ if (ctx->stream_uploader)
+ u_upload_destroy(ctx->stream_uploader);
+
FREE(ctx);
}
@@ -310,8 +314,17 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen,
if (!ctx)
return NULL;
+
ctx->screen = screen;
ctx->priv = priv;
+
+ ctx->stream_uploader = u_upload_create_default(ctx);
+ if (!ctx->stream_uploader) {
+ FREE(ctx);
+ return NULL;
+ }
+ ctx->const_uploader = ctx->stream_uploader;
+
ctx->destroy = noop_destroy_context;
ctx->flush = noop_flush;
ctx->clear = noop_clear;