mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 22:03:12 +01:00
WebGPU: Add texture format to shaderc (bin version 10) + streamline storage Images in shaders (#2482)
* WebGPU: Add texture format (shaderc bin version 10) * WebGPU: Simplify storage images + Fix format decorations * Shaderc: Cleanup Texture name assumption in textures
This commit is contained in:
@@ -53,9 +53,11 @@ namespace bgfx
|
||||
static TextureComponentTypeToId s_textureComponentTypeToId[] =
|
||||
{
|
||||
// see comment in s_descriptorTypeToId
|
||||
{ TextureComponentType::Float, 0x00 },
|
||||
{ TextureComponentType::Int, 0x01 },
|
||||
{ TextureComponentType::Uint, 0x02 },
|
||||
{ TextureComponentType::Float, 0x00 },
|
||||
{ TextureComponentType::Int, 0x01 },
|
||||
{ TextureComponentType::Uint, 0x02 },
|
||||
{ TextureComponentType::Depth, 0x03 },
|
||||
{ TextureComponentType::UnfilterableFloat, 0x04 },
|
||||
};
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_textureComponentTypeToId) == TextureComponentType::Count);
|
||||
|
||||
@@ -229,6 +231,12 @@ namespace bgfx
|
||||
uint16_t texInfo;
|
||||
bx::read(_reader, texInfo, _err);
|
||||
}
|
||||
|
||||
if (!isShaderVerLess(magic, 10) )
|
||||
{
|
||||
uint16_t texFormat = 0;
|
||||
bx::read(_reader, texFormat, _err);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t shaderSize;
|
||||
|
||||
Reference in New Issue
Block a user