mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 01:41:10 +00:00
GL doesn't support block-compressed 3D textures
This commit is contained in:
12 files changed
+27
-17
No files matched your search
@@ -305,7 +305,7 @@ public:
|
||||
{
|
||||
RDCERR("Calling proxy-render functions on an image viewer");
|
||||
}
|
||||
bool IsTextureSupported(const ResourceFormat &format) { return true; }
|
||||
bool IsTextureSupported(const TextureDescription &tex) { return true; }
|
||||
bool NeedRemapForFetch(const ResourceFormat &format) { return false; }
|
||||
ResourceId CreateProxyBuffer(const BufferDescription &templateBuf)
|
||||
{
|
||||
|
||||
@@ -2143,7 +2143,7 @@ void ReplayProxy::RemapProxyTextureIfNeeded(TextureDescription &tex, GetTextureD
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_Proxy->IsTextureSupported(tex.format))
|
||||
if(m_Proxy->IsTextureSupported(tex))
|
||||
return;
|
||||
|
||||
if(tex.format.Special())
|
||||
|
||||
@@ -559,7 +559,7 @@ public:
|
||||
RDCERR("Calling proxy-render functions on a proxy serialiser");
|
||||
}
|
||||
|
||||
bool IsTextureSupported(const ResourceFormat &format) { return true; }
|
||||
bool IsTextureSupported(const TextureDescription &tex) { return true; }
|
||||
ResourceId CreateProxyBuffer(const BufferDescription &templateBuf)
|
||||
{
|
||||
RDCERR("Calling proxy-render functions on a proxy serialiser");
|
||||
|
||||
@@ -3576,9 +3576,9 @@ void D3D11Replay::SetProxyTextureData(ResourceId texid, const Subresource &sub,
|
||||
}
|
||||
}
|
||||
|
||||
bool D3D11Replay::IsTextureSupported(const ResourceFormat &format)
|
||||
bool D3D11Replay::IsTextureSupported(const TextureDescription &tex)
|
||||
{
|
||||
return MakeDXGIFormat(format) != DXGI_FORMAT_UNKNOWN;
|
||||
return MakeDXGIFormat(tex.format) != DXGI_FORMAT_UNKNOWN;
|
||||
}
|
||||
|
||||
bool D3D11Replay::NeedRemapForFetch(const ResourceFormat &format)
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
|
||||
ResourceId CreateProxyTexture(const TextureDescription &templateTex);
|
||||
void SetProxyTextureData(ResourceId texid, const Subresource &sub, byte *data, size_t dataSize);
|
||||
bool IsTextureSupported(const ResourceFormat &format);
|
||||
bool IsTextureSupported(const TextureDescription &tex);
|
||||
bool NeedRemapForFetch(const ResourceFormat &format);
|
||||
|
||||
ResourceId CreateProxyBuffer(const BufferDescription &templateBuf);
|
||||
|
||||
@@ -2670,9 +2670,9 @@ std::vector<uint32_t> D3D12Replay::GetPassEvents(uint32_t eventId)
|
||||
return passEvents;
|
||||
}
|
||||
|
||||
bool D3D12Replay::IsTextureSupported(const ResourceFormat &format)
|
||||
bool D3D12Replay::IsTextureSupported(const TextureDescription &tex)
|
||||
{
|
||||
return MakeDXGIFormat(format) != DXGI_FORMAT_UNKNOWN;
|
||||
return MakeDXGIFormat(tex.format) != DXGI_FORMAT_UNKNOWN;
|
||||
}
|
||||
|
||||
bool D3D12Replay::NeedRemapForFetch(const ResourceFormat &format)
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
|
||||
ResourceId CreateProxyTexture(const TextureDescription &templateTex);
|
||||
void SetProxyTextureData(ResourceId texid, const Subresource &sub, byte *data, size_t dataSize);
|
||||
bool IsTextureSupported(const ResourceFormat &format);
|
||||
bool IsTextureSupported(const TextureDescription &tex);
|
||||
bool NeedRemapForFetch(const ResourceFormat &format);
|
||||
|
||||
ResourceId CreateProxyBuffer(const BufferDescription &templateBuf);
|
||||
|
||||
@@ -3290,22 +3290,32 @@ void GLReplay::SetProxyTextureData(ResourceId texid, const Subresource &sub, byt
|
||||
}
|
||||
}
|
||||
|
||||
bool GLReplay::IsTextureSupported(const ResourceFormat &format)
|
||||
bool GLReplay::IsTextureSupported(const TextureDescription &tex)
|
||||
{
|
||||
// We couldn't create proxy textures for ASTC textures (see MakeGLFormat). So we give back false
|
||||
// and let RemapProxyTextureIfNeeded to set remap type for them.
|
||||
if(format.type == ResourceFormatType::ASTC)
|
||||
if(tex.format.type == ResourceFormatType::ASTC)
|
||||
return false;
|
||||
|
||||
// we don't try to replay alpha8 textures, as we stick strictly to core profile GL
|
||||
if(format.type == ResourceFormatType::A8)
|
||||
if(tex.format.type == ResourceFormatType::A8)
|
||||
return false;
|
||||
|
||||
// BGRA is not accepted as an internal format in case of GL
|
||||
// EXT_texture_format_BGRA8888 is required for creating BGRA proxy textures in case of GLES
|
||||
if(format.BGRAOrder())
|
||||
if(tex.format.BGRAOrder())
|
||||
return IsGLES && HasExt[EXT_texture_format_BGRA8888];
|
||||
|
||||
// don't support 3D block compressed textures
|
||||
if(tex.dimension == 3 &&
|
||||
(tex.format.type == ResourceFormatType::BC1 || tex.format.type == ResourceFormatType::BC2 ||
|
||||
tex.format.type == ResourceFormatType::BC1 || tex.format.type == ResourceFormatType::BC2 ||
|
||||
tex.format.type == ResourceFormatType::BC3 || tex.format.type == ResourceFormatType::BC4 ||
|
||||
tex.format.type == ResourceFormatType::BC5 || tex.format.type == ResourceFormatType::BC6 ||
|
||||
tex.format.type == ResourceFormatType::BC7 || tex.format.type == ResourceFormatType::ASTC ||
|
||||
tex.format.type == ResourceFormatType::ETC2 || tex.format.type == ResourceFormatType::EAC))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
ResourceId CreateProxyTexture(const TextureDescription &templateTex);
|
||||
void SetProxyTextureData(ResourceId texid, const Subresource &sub, byte *data, size_t dataSize);
|
||||
bool IsTextureSupported(const ResourceFormat &format);
|
||||
bool IsTextureSupported(const TextureDescription &tex);
|
||||
bool NeedRemapForFetch(const ResourceFormat &format);
|
||||
|
||||
ResourceId CreateProxyBuffer(const BufferDescription &templateBuf);
|
||||
|
||||
@@ -4098,7 +4098,7 @@ void VulkanReplay::SetProxyTextureData(ResourceId texid, const Subresource &sub,
|
||||
VULKANNOTIMP("SetProxyTextureData");
|
||||
}
|
||||
|
||||
bool VulkanReplay::IsTextureSupported(const ResourceFormat &format)
|
||||
bool VulkanReplay::IsTextureSupported(const TextureDescription &tex)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
|
||||
ResourceId CreateProxyTexture(const TextureDescription &templateTex);
|
||||
void SetProxyTextureData(ResourceId texid, const Subresource &sub, byte *data, size_t dataSize);
|
||||
bool IsTextureSupported(const ResourceFormat &format);
|
||||
bool IsTextureSupported(const TextureDescription &tex);
|
||||
bool NeedRemapForFetch(const ResourceFormat &format);
|
||||
|
||||
ResourceId CreateProxyBuffer(const BufferDescription &templateBuf);
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
virtual ResourceId CreateProxyTexture(const TextureDescription &templateTex) = 0;
|
||||
virtual void SetProxyTextureData(ResourceId texid, const Subresource &sub, byte *data,
|
||||
size_t dataSize) = 0;
|
||||
virtual bool IsTextureSupported(const ResourceFormat &format) = 0;
|
||||
virtual bool IsTextureSupported(const TextureDescription &tex) = 0;
|
||||
|
||||
virtual ResourceId CreateProxyBuffer(const BufferDescription &templateBuf) = 0;
|
||||
virtual void SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSize) = 0;
|
||||
|
||||
Reference in new issue
Block a user