Reduce default footprint: optional debug text, drop unused shader copies. (#3938)

This commit is contained in:
Branimir Karadžić
2026-08-29 22:32:32 -07:00
committed by GitHub
parent 4b4c138fb0
commit c949b911fc
16 changed files with 153 additions and 101 deletions
+8 -1
View File
@@ -4264,6 +4264,12 @@ WGPU_IMPORT
bx::read(&reader, m_size, &err);
bx::read(&reader, m_blockSize, &err);
if (bx::strFind(bx::StringView( (const char*)m_code->data, m_code->size), "rgba8unorm").isEmpty() )
{
release(m_code);
m_code = NULL;
}
}
void ShaderWGPU::destroy()
@@ -4289,7 +4295,8 @@ WGPU_IMPORT
WGPUShaderModule ShaderWGPU::getModule(bool _bgra8Storage) const
{
if (!_bgra8Storage)
if (!_bgra8Storage
|| NULL == m_code)
{
return m_module;
}