Module: Mesa Branch: master Commit: 34bae108df0c707a638b4305af9a1d08d15832b4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=34bae108df0c707a638b4305af9a1d08d15832b4
Author: Jesse Natalie <[email protected]> Date: Mon Dec 14 11:53:39 2020 -0800 d3d12: Use an appropriate pipe resource usage for map intermediates Reviewed-by: Louis-Francis Ratté-Boulianne <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8095> --- src/gallium/drivers/d3d12/d3d12_resource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/d3d12/d3d12_resource.cpp b/src/gallium/drivers/d3d12/d3d12_resource.cpp index 6f15d4f92ab..8fc90c75ad8 100644 --- a/src/gallium/drivers/d3d12/d3d12_resource.cpp +++ b/src/gallium/drivers/d3d12/d3d12_resource.cpp @@ -972,8 +972,11 @@ d3d12_transfer_map(struct pipe_context *pctx, range.Begin = aligned_x; } + pipe_resource_usage staging_usage = (usage & (PIPE_MAP_READ | PIPE_MAP_READ_WRITE)) ? + PIPE_USAGE_STAGING : PIPE_USAGE_STREAM; + trans->staging_res = pipe_buffer_create(pctx->screen, 0, - PIPE_USAGE_STAGING, + staging_usage, staging_res_size); if (!trans->staging_res) return NULL; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
