Mesa (main): d3d12: Fix take_ownership semantic for constant buffers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 9 02:31:21 UTC 2022
Module: Mesa
Branch: main
Commit: 97d13b2debb2f5cdb2e80b16a5b89a5611c4a1f4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=97d13b2debb2f5cdb2e80b16a5b89a5611c4a1f4
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Tue Feb 8 16:29:03 2022 -0800
d3d12: Fix take_ownership semantic for constant buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14941>
---
src/gallium/drivers/d3d12/d3d12_context.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/d3d12/d3d12_context.cpp b/src/gallium/drivers/d3d12/d3d12_context.cpp
index fb8103190ac..9417e052301 100644
--- a/src/gallium/drivers/d3d12/d3d12_context.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_context.cpp
@@ -1378,10 +1378,10 @@ d3d12_set_constant_buffer(struct pipe_context *pctx,
d3d12_increment_constant_buffer_bind_count(ctx, shader, d3d12_resource(buffer));
if (take_ownership) {
- pipe_resource_reference(&ctx->cbufs[shader][index].buffer, buffer);
- } else {
pipe_resource_reference(&ctx->cbufs[shader][index].buffer, NULL);
ctx->cbufs[shader][index].buffer = buffer;
+ } else {
+ pipe_resource_reference(&ctx->cbufs[shader][index].buffer, buffer);
}
}
More information about the mesa-commit
mailing list