Add dynamic textures streaming based on visibility

This commit is contained in:
Wojtek Figat
2021-06-18 14:41:44 +02:00
parent 41f0554484
commit f582ca5051
13 changed files with 70 additions and 39 deletions

View File

@@ -948,26 +948,26 @@ void GPUContextVulkan::BindCB(int32 slot, GPUConstantBuffer* cb)
void GPUContextVulkan::BindSR(int32 slot, GPUResourceView* view)
{
ASSERT(slot >= 0 && slot < GPU_MAX_SR_BINDED);
const auto handle = view ? (DescriptorOwnerResourceVulkan*)view->GetNativePtr() : nullptr;
if (_srHandles[slot] != handle)
{
_srDirtyFlag = true;
_srHandles[slot] = handle;
if (view)
*view->LastRenderTime = _lastRenderTime;
}
}
void GPUContextVulkan::BindUA(int32 slot, GPUResourceView* view)
{
ASSERT(slot >= 0 && slot < GPU_MAX_UA_BINDED);
const auto handle = view ? (DescriptorOwnerResourceVulkan*)view->GetNativePtr() : nullptr;
if (_uaHandles[slot] != handle)
{
_uaDirtyFlag = true;
_uaHandles[slot] = handle;
if (view)
*view->LastRenderTime = _lastRenderTime;
}
}