mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-13 19:17:12 +00:00
lazily fetch subsamples in MSAA textures
This commit is contained in:
committed by
Baldur Karlsson
parent
38fa7a1ac7
commit
3d07a0b568
@@ -2447,11 +2447,14 @@ void ReplayProxy::EnsureTexCached(ResourceId &texid, CompType &typeCast, const S
|
||||
}
|
||||
|
||||
const ProxyTextureProperties &proxy = proxyit->second;
|
||||
const bool allSamples = sub.sample == ~0U;
|
||||
|
||||
for(uint32_t sample = 0; sample < proxy.msSamp; sample++)
|
||||
uint32_t numSamplesToFetch = allSamples ? proxy.msSamp : 1;
|
||||
for(uint32_t sample = 0; sample < numSamplesToFetch; sample++)
|
||||
{
|
||||
Subresource s = sub;
|
||||
s.sample = sample;
|
||||
if(allSamples)
|
||||
s.sample = sample;
|
||||
|
||||
TextureCacheEntry sampleArrayEntry = {texid, s};
|
||||
|
||||
|
||||
@@ -430,7 +430,12 @@ public:
|
||||
{
|
||||
if(m_Proxy)
|
||||
{
|
||||
EnsureTexCached(display.resourceId, display.typeCast, display.subresource);
|
||||
Subresource customShaderSubresource = display.subresource;
|
||||
// fetch all subsamples in case the custom shader wants to fetch more than simply the active
|
||||
// subsample
|
||||
customShaderSubresource.sample = ~0U;
|
||||
|
||||
EnsureTexCached(display.resourceId, display.typeCast, customShaderSubresource);
|
||||
|
||||
if(display.resourceId == ResourceId())
|
||||
return ResourceId();
|
||||
|
||||
@@ -691,7 +691,7 @@ void ReplayOutput::Display()
|
||||
disp.linearDisplayAsGamma = true;
|
||||
disp.flipY = false;
|
||||
disp.subresource = m_Thumbnails[i].sub;
|
||||
disp.subresource.sample = ~0U;
|
||||
disp.subresource.sample = 0;
|
||||
disp.customShaderId = ResourceId();
|
||||
disp.resourceId = m_pDevice->GetLiveID(m_Thumbnails[i].texture);
|
||||
disp.typeCast = m_Thumbnails[i].typeCast;
|
||||
|
||||
Reference in New Issue
Block a user