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

[dxvk] Use new lifetime tracking for samplers

This commit is contained in:
Philip Rebohle 2024-10-17 16:09:50 +02:00 committed by Philip Rebohle
parent 7fef97dae0
commit b011e22406
4 changed files with 7 additions and 11 deletions

View File

@ -278,10 +278,6 @@ namespace dxvk {
m_resources.trackResource(DxvkLifetime<DxvkResource>(rc, Access));
}
void trackSampler(const Rc<DxvkSampler>& sampler) {
m_resources.trackSampler(sampler);
}
/**
* \brief Tracks an object
*

View File

@ -1373,7 +1373,7 @@ namespace dxvk {
}
m_cmd->trackResource<DxvkAccess::Write>(imageView->image());
m_cmd->trackSampler(sampler);
m_cmd->track(sampler);
}
@ -2651,7 +2651,7 @@ namespace dxvk {
m_cmd->trackResource<DxvkAccess::Write>(dstView->image());
m_cmd->trackResource<DxvkAccess::Read>(srcView->image());
m_cmd->trackSampler(sampler);
m_cmd->track(sampler);
}
@ -5117,7 +5117,7 @@ namespace dxvk {
descriptorInfo.image.imageLayout = VK_IMAGE_LAYOUT_UNDEFINED;
if (m_rcTracked.set(binding.resourceBinding))
m_cmd->trackSampler(res.sampler);
m_cmd->track(res.sampler);
} else {
descriptorInfo.image.sampler = m_common->dummyResources().samplerHandle();
descriptorInfo.image.imageView = VK_NULL_HANDLE;
@ -5169,7 +5169,7 @@ namespace dxvk {
descriptorInfo.image.imageLayout = res.imageView->image()->info().layout;
if (m_rcTracked.set(binding.resourceBinding)) {
m_cmd->trackSampler(res.sampler);
m_cmd->track(res.sampler);
m_cmd->trackResource<DxvkAccess::Read>(res.imageView->image());
}
} else {

View File

@ -346,8 +346,8 @@ namespace dxvk {
if (m_gammaImage)
ctx.cmd->trackResource<DxvkAccess::Read>(m_gammaImage);
ctx.cmd->trackSampler(m_samplerGamma);
ctx.cmd->trackSampler(m_samplerPresent);
ctx.cmd->track(m_samplerGamma);
ctx.cmd->track(m_samplerPresent);
}

View File

@ -194,7 +194,7 @@ namespace dxvk::hud {
ctx.cmd->trackResource<DxvkAccess::Read>(m_textBuffer);
ctx.cmd->trackResource<DxvkAccess::Read>(m_fontBuffer);
ctx.cmd->trackResource<DxvkAccess::Read>(m_fontTexture);
ctx.cmd->trackSampler(m_fontSampler);
ctx.cmd->track(m_fontSampler);
// Reset internal text buffers
m_textDraws.clear();