1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-27 22:54:16 +01:00

[d3d11] Use clearBuffer to initialize UAV counters

This commit is contained in:
Philip Rebohle 2018-06-16 10:22:38 +02:00
parent 7fa26f1c87
commit a148233b13
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -2814,14 +2814,13 @@ namespace dxvk {
const DxvkBufferSlice counterSlice = uav->GetCounterSlice();
const D3D11UavCounter counterValue = { pUAVInitialCounts[i] };
if (counterSlice.defined()
&& counterValue.atomicCtr != 0xFFFFFFFFu) {
if (counterSlice.defined() && counterValue.atomicCtr != 0xFFFFFFFFu) {
EmitCs([counterSlice, counterValue] (DxvkContext* ctx) {
ctx->updateBuffer(
ctx->clearBuffer(
counterSlice.buffer(),
counterSlice.offset(),
counterSlice.length(),
&counterValue);
counterValue.atomicCtr);
});
}
}