iris: Upload constant resources for efficient GPU access

Re-using the stream_uploader for constant data hurts performance on
DG1.  Constant data like uniform buffers should reside in local
memory for faster GPU access.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>
This commit is contained in:
Mark Janes
2020-08-17 14:37:03 -07:00
committed by Kenneth Graunke
parent ecd75318e3
commit 8838861ea3
+10 -1
View File
@@ -217,6 +217,8 @@ iris_destroy_context(struct pipe_context *ctx)
if (ctx->stream_uploader)
u_upload_destroy(ctx->stream_uploader);
if (ctx->const_uploader)
u_upload_destroy(ctx->const_uploader);
clear_dirty_dmabuf_set(ice);
@@ -286,7 +288,14 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
free(ctx);
return NULL;
}
ctx->const_uploader = ctx->stream_uploader;
ctx->const_uploader = u_upload_create(ctx, 1024 * 1024,
PIPE_BIND_CONSTANT_BUFFER,
PIPE_USAGE_IMMUTABLE, 0);
if (!ctx->const_uploader) {
u_upload_destroy(ctx->stream_uploader);
free(ctx);
return NULL;
}
if (!create_dirty_dmabuf_set(ice)) {
ralloc_free(ice);