1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d11] Check if uav's counter slice is defined in CopyStructureCount

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
This commit is contained in:
Danylo Piliaiev 2019-03-07 19:03:48 +02:00 committed by Philip Rebohle
parent 261d31cac6
commit 4dd68987d6

View File

@ -670,9 +670,13 @@ namespace dxvk {
if (!buf || !uav) if (!buf || !uav)
return; return;
auto counterSlice = uav->GetCounterSlice();
if (!counterSlice.defined())
return;
EmitCs([ EmitCs([
cDstSlice = buf->GetBufferSlice(DstAlignedByteOffset), cDstSlice = buf->GetBufferSlice(DstAlignedByteOffset),
cSrcSlice = uav->GetCounterSlice() cSrcSlice = std::move(counterSlice)
] (DxvkContext* ctx) { ] (DxvkContext* ctx) {
ctx->copyBuffer( ctx->copyBuffer(
cDstSlice.buffer(), cDstSlice.buffer(),