mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[d3d11] Fix subtle bug in constant buffer rebinding
Previously, if the app called SetConstantBuffers1 with a non-zero offset and a full UBO range, and then SetConstantBuffers with the same buffer, we would not rebind that buffer at offset zero.
This commit is contained in:
parent
aef2eb14df
commit
bcd2be0698
@ -3922,7 +3922,7 @@ namespace dxvk {
|
|||||||
constantCount = std::min(newBuffer->Desc()->ByteWidth / 16, UINT(D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT));
|
constantCount = std::min(newBuffer->Desc()->ByteWidth / 16, UINT(D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT));
|
||||||
|
|
||||||
if (Bindings[StartSlot + i].buffer != newBuffer
|
if (Bindings[StartSlot + i].buffer != newBuffer
|
||||||
|| Bindings[StartSlot + i].constantCount != constantCount) {
|
|| Bindings[StartSlot + i].constantBound != constantCount) {
|
||||||
Bindings[StartSlot + i].buffer = newBuffer;
|
Bindings[StartSlot + i].buffer = newBuffer;
|
||||||
Bindings[StartSlot + i].constantOffset = 0;
|
Bindings[StartSlot + i].constantOffset = 0;
|
||||||
Bindings[StartSlot + i].constantCount = constantCount;
|
Bindings[StartSlot + i].constantCount = constantCount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user