summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp b/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
index b7aeab512c..b4da7fc354 100644
--- a/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
@@ -115,11 +115,12 @@ D3DVertexFormat::D3DVertexFormat(const PortableVertexDeclaration& vtx_decl)
for (int i = 0; i < 3; i++)
{
+ static constexpr std::array<const char*, 3> NAMES = {"NORMAL", "TANGENT", "BINORMAL"};
format = &vtx_decl.normals[i];
if (format->enable)
{
- m_elems[m_num_elems].SemanticName = "NORMAL";
- m_elems[m_num_elems].SemanticIndex = i;
+ m_elems[m_num_elems].SemanticName = NAMES[i];
+ m_elems[m_num_elems].SemanticIndex = 0;
m_elems[m_num_elems].AlignedByteOffset = format->offset;
m_elems[m_num_elems].Format = VarToD3D(format->type, format->components, format->integer);
m_elems[m_num_elems].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;