Changes after github review.
Remap with binding instead of name.
This commit is contained in:
parent
7216d13620
commit
7cf44099c9
@ -674,7 +674,7 @@ void CompilerHLSL::emit_interface_block_in_struct(const SPIRVariable &var, unord
|
||||
{
|
||||
for (auto &attribute : vertex_attributes)
|
||||
{
|
||||
if (attribute.name == name)
|
||||
if (attribute.binding == binding_number)
|
||||
{
|
||||
semantic = attribute.semantic;
|
||||
semantic_index = attribute.semantic_index;
|
||||
@ -3165,9 +3165,7 @@ string CompilerHLSL::compile(std::vector<HLSLVertexAttr> *p_vertex_attributes)
|
||||
{
|
||||
if (p_vertex_attributes)
|
||||
{
|
||||
vertex_attributes.clear();
|
||||
for (auto &va : *p_vertex_attributes)
|
||||
vertex_attributes.emplace_back(va);
|
||||
vertex_attributes = *p_vertex_attributes;
|
||||
}
|
||||
|
||||
return compile();
|
||||
|
@ -25,7 +25,7 @@ namespace spirv_cross
|
||||
{
|
||||
struct HLSLVertexAttr
|
||||
{
|
||||
std::string name;
|
||||
uint32_t binding;
|
||||
std::string semantic;
|
||||
uint32_t semantic_index;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user