Shader: Rework Swizzle and add support for swizzle store in SPIRV

This commit is contained in:
Jérôme Leclercq
2021-12-21 14:30:47 +01:00
parent e43a638112
commit 837b72f68e
11 changed files with 151 additions and 102 deletions

View File

@@ -359,7 +359,7 @@ namespace Nz
for (std::size_t i = 0; i < node.componentCount; ++i)
{
Int32 indexCount = UnderlyingCast(node.components[i]) - UnderlyingCast(ShaderAst::SwizzleComponent::First);
Int32 indexCount = SafeCast<Int32>(node.components[i]);
m_constantCache.Register(*m_constantCache.BuildConstant(indexCount));
}