summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-06-04 20:39:07 -0400
committerMarek Olšák <[email protected]>2018-06-05 22:52:08 -0400
commit17a42062ccdb3bf5624435db9598e4353756771f (patch)
tree9d1a76426fba2b6198a07f93b66e9523b371eee6 /src/gallium/drivers
parent01ad2067bba17451c663983877ec85145de20f02 (diff)
r300g/swtcl: make pipe_context uploaders use malloc'd memory as before
Discovered by Roland Scheidegger. The resource_create code uses GPU memory for PIPE_BIND_CUSTOM, but malloc'd memory otherwise. Vertex and index buffers should use malloc'd memory. Cc: 18.0 18.1 <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_context.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 627ba0c5702..79bfdc53d25 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -88,6 +88,8 @@ static void r300_destroy_context(struct pipe_context* context)
if (r300->uploader)
u_upload_destroy(r300->uploader);
+ if (r300->context.stream_uploader)
+ u_upload_destroy(r300->context.stream_uploader);
/* XXX: This function assumes r300->query_list was initialized */
r300_release_referenced_objects(r300);
@@ -424,10 +426,11 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.create_video_codec = vl_create_decoder;
r300->context.create_video_buffer = vl_video_buffer_create;
- r300->uploader = u_upload_create(&r300->context, 1024 * 1024,
+ r300->uploader = u_upload_create(&r300->context, 128 * 1024,
PIPE_BIND_CUSTOM, PIPE_USAGE_STREAM, 0);
- r300->context.stream_uploader = r300->uploader;
- r300->context.const_uploader = r300->uploader;
+ r300->context.stream_uploader = u_upload_create(&r300->context, 1024 * 1024,
+ 0, PIPE_USAGE_STREAM, 0);
+ r300->context.const_uploader = r300->context.stream_uploader;
r300->blitter = util_blitter_create(&r300->context);
if (r300->blitter == NULL)