1
0
Fork 0
forked from suyu/suyu

vk_shader_decompiler: Fix build issues on old gcc versions

This commit is contained in:
ReinUsesLisp 2019-12-10 00:55:21 -03:00
parent d30cf51d7d
commit 233ed96a5c
No known key found for this signature in database
GPG key ID: 2DFC508897B39CFE

View file

@ -1018,7 +1018,7 @@ private:
return {OpLoad(t_float, AccessElement(t_in_float, frag_coord, element)), return {OpLoad(t_float, AccessElement(t_in_float, frag_coord, element)),
Type::Float}; Type::Float};
} }
const auto elements = {in_indices.position.value(), element}; const std::vector elements = {in_indices.position.value(), element};
return {OpLoad(t_float, ArrayPass(t_in_float, in_vertex, elements)), Type::Float}; return {OpLoad(t_float, ArrayPass(t_in_float, in_vertex, elements)), Type::Float};
} }
case Attribute::Index::PointCoord: { case Attribute::Index::PointCoord: {
@ -1064,7 +1064,8 @@ private:
const auto type_descriptor = GetAttributeType(location); const auto type_descriptor = GetAttributeType(location);
const Type type = type_descriptor.type; const Type type = type_descriptor.type;
const Id attribute_id = input_attributes.at(attribute); const Id attribute_id = input_attributes.at(attribute);
const Id pointer = ArrayPass(type_descriptor.scalar, attribute_id, {element}); const std::vector elements = {element};
const Id pointer = ArrayPass(type_descriptor.scalar, attribute_id, elements);
return {OpLoad(GetTypeDefinition(type), pointer), type}; return {OpLoad(GetTypeDefinition(type), pointer), type};
} }
break; break;