[SPIR-V] Size the vertex bindings input based on actual number of bindings
This commit is contained in:
parent
16cf9883ca
commit
be687f5f27
|
@ -236,7 +236,8 @@ void SpirvShaderTranslator::StartTranslation() {
|
||||||
b.addMemberDecoration(vtx_s, 0, spv::Decoration::DecorationOffset, 0);
|
b.addMemberDecoration(vtx_s, 0, spv::Decoration::DecorationOffset, 0);
|
||||||
|
|
||||||
// Create the vertex bindings variable.
|
// Create the vertex bindings variable.
|
||||||
Id vtx_a_t = b.makeArrayType(vtx_s, b.makeUintConstant(32), 0);
|
Id vtx_a_t = b.makeArrayType(
|
||||||
|
vtx_s, b.makeUintConstant(uint32_t(vertex_bindings().size())), 0);
|
||||||
vtx_ = b.createVariable(spv::StorageClass::StorageClassUniform, vtx_a_t,
|
vtx_ = b.createVariable(spv::StorageClass::StorageClassUniform, vtx_a_t,
|
||||||
"vertex_bindings");
|
"vertex_bindings");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue