KhronosGroup / SPIRV-LLVM-Translator

A tool and a library for bi-directional translation between SPIR-V and LLVM IR
Other
468 stars 209 forks source link

[DebugInfo] Round up #elts of TypeVector when calculating memory size #2504

Closed LU-JOHN closed 3 months ago

LU-JOHN commented 4 months ago

Round up number of elements in a Vector to a power of 2 when calculating memory size. Memory size will be calculated as BaseType * bit_ceil(ComponentCount). The previous calculation already rounded 3 elements to 4 elements.

LU-JOHN commented 3 months ago

Adding a "MemorySize" field toTypeVector was considered but rejected. See https://github.com/KhronosGroup/SPIRV-Registry/pull/250