summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/swr_context.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_context.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp
index 89330857ae0..2e37bacfac6 100644
--- a/src/gallium/drivers/swr/swr_context.cpp
+++ b/src/gallium/drivers/swr/swr_context.cpp
@@ -33,6 +33,7 @@
#include "util/u_inlines.h"
#include "util/u_format.h"
#include "util/u_atomic.h"
+#include "util/u_upload_mgr.h"
extern "C" {
#include "util/u_transfer.h"
@@ -369,6 +370,9 @@ swr_destroy(struct pipe_context *pipe)
pipe_sampler_view_reference(&ctx->sampler_views[PIPE_SHADER_VERTEX][i], NULL);
}
+ if (ctx->pipe.stream_uploader)
+ u_upload_destroy(ctx->pipe.stream_uploader);
+
/* Idle core after destroying buffer resources, but before deleting
* context. Destroying resources has potentially called StoreTiles.*/
SwrWaitForIdle(ctx->swrContext);
@@ -493,6 +497,11 @@ swr_create_context(struct pipe_screen *p_screen, void *priv, unsigned flags)
swr_draw_init(&ctx->pipe);
swr_query_init(&ctx->pipe);
+ ctx->pipe.stream_uploader = u_upload_create_default(&ctx->pipe);
+ if (!ctx->pipe.stream_uploader)
+ goto fail;
+ ctx->pipe.const_uploader = ctx->pipe.stream_uploader;
+
ctx->pipe.blit = swr_blit;
ctx->blitter = util_blitter_create(&ctx->pipe);
if (!ctx->blitter)