mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 22:08:59 +01:00
[d3d11] Track resources when dispatching Cubin shaders as well
This commit is contained in:
parent
bb16734a43
commit
afe1840c74
@ -4529,4 +4529,25 @@ namespace dxvk {
|
||||
pMsState->enableAlphaToCoverage = VK_FALSE;
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::TrackResourceSequenceNumber(
|
||||
ID3D11Resource* pResource) {
|
||||
if (!pResource)
|
||||
return;
|
||||
|
||||
D3D11CommonTexture* texture = GetCommonTexture(pResource);
|
||||
|
||||
if (texture) {
|
||||
if (texture->HasSequenceNumber()) {
|
||||
for (uint32_t i = 0; i < texture->CountSubresources(); i++)
|
||||
TrackTextureSequenceNumber(texture, i);
|
||||
}
|
||||
} else {
|
||||
D3D11Buffer* buffer = static_cast<D3D11Buffer*>(pResource);
|
||||
|
||||
if (buffer->HasSequenceNumber())
|
||||
TrackBufferSequenceNumber(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1068,6 +1068,9 @@ namespace dxvk {
|
||||
}
|
||||
}
|
||||
|
||||
void TrackResourceSequenceNumber(
|
||||
ID3D11Resource* pResource);
|
||||
|
||||
virtual void EmitCsChunk(DxvkCsChunkRef&& chunk) = 0;
|
||||
|
||||
virtual void TrackTextureSequenceNumber(
|
||||
|
@ -193,6 +193,13 @@ namespace dxvk {
|
||||
ctx->launchCuKernelNVX(cLaunchInfo.nvxLaunchInfo, cLaunchInfo.buffers, cLaunchInfo.images);
|
||||
});
|
||||
|
||||
// Track resource usage as necessary
|
||||
for (uint32_t i = 0; i < NumReadResources; i++)
|
||||
m_ctx->TrackResourceSequenceNumber(static_cast<ID3D11Resource*>(pReadResources[i]));
|
||||
|
||||
for (uint32_t i = 0; i < NumWriteResources; i++)
|
||||
m_ctx->TrackResourceSequenceNumber(static_cast<ID3D11Resource*>(pWriteResources[i]));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user