diff options
| author | Mai <mathew1800@gmail.com> | 2022-11-23 22:40:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-23 22:40:03 +0000 |
| commit | d6437b7e461af0ef457c05be996d6fb30d7922ac (patch) | |
| tree | 4a73b4b6ecb4fe3f172c7bbbdc729ddf0cde56d6 /Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp | |
| parent | ddf63bacb9fec7bdc9cc2df3601cddce2bc8f7af (diff) | |
| parent | f5d11c1e388768043516fdb54e71b72c26c3c22d (diff) | |
Merge pull request #11123 from Pokechu22/fmt-9.1.0
Externals: Update fmt to 9.1.0
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp b/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp index 6aa5ea14f1..65b63b32b9 100644 --- a/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKVertexFormat.cpp @@ -66,14 +66,14 @@ void VertexFormat::MapAttributes() if (m_decl.position.enable) AddAttribute( - SHADER_POSITION_ATTRIB, 0, + ShaderAttrib::Position, 0, VarToVkFormat(m_decl.position.type, m_decl.position.components, m_decl.position.integer), m_decl.position.offset); for (uint32_t i = 0; i < 3; i++) { if (m_decl.normals[i].enable) - AddAttribute(SHADER_NORMAL_ATTRIB + i, 0, + AddAttribute(ShaderAttrib::Normal + i, 0, VarToVkFormat(m_decl.normals[i].type, m_decl.normals[i].components, m_decl.normals[i].integer), m_decl.normals[i].offset); @@ -82,7 +82,7 @@ void VertexFormat::MapAttributes() for (uint32_t i = 0; i < 2; i++) { if (m_decl.colors[i].enable) - AddAttribute(SHADER_COLOR0_ATTRIB + i, 0, + AddAttribute(ShaderAttrib::Color0 + i, 0, VarToVkFormat(m_decl.colors[i].type, m_decl.colors[i].components, m_decl.colors[i].integer), m_decl.colors[i].offset); @@ -91,14 +91,14 @@ void VertexFormat::MapAttributes() for (uint32_t i = 0; i < 8; i++) { if (m_decl.texcoords[i].enable) - AddAttribute(SHADER_TEXTURE0_ATTRIB + i, 0, + AddAttribute(ShaderAttrib::TexCoord0 + i, 0, VarToVkFormat(m_decl.texcoords[i].type, m_decl.texcoords[i].components, m_decl.texcoords[i].integer), m_decl.texcoords[i].offset); } if (m_decl.posmtx.enable) - AddAttribute(SHADER_POSMTX_ATTRIB, 0, + AddAttribute(ShaderAttrib::PositionMatrix, 0, VarToVkFormat(m_decl.posmtx.type, m_decl.posmtx.components, m_decl.posmtx.integer), m_decl.posmtx.offset); } @@ -118,12 +118,12 @@ void VertexFormat::SetupInputState() m_input_state_info.pVertexAttributeDescriptions = m_attribute_descriptions.data(); } -void VertexFormat::AddAttribute(uint32_t location, uint32_t binding, VkFormat format, +void VertexFormat::AddAttribute(ShaderAttrib location, uint32_t binding, VkFormat format, uint32_t offset) { ASSERT(m_num_attributes < MAX_VERTEX_ATTRIBUTES); - m_attribute_descriptions[m_num_attributes].location = location; + m_attribute_descriptions[m_num_attributes].location = static_cast<uint32_t>(location); m_attribute_descriptions[m_num_attributes].binding = binding; m_attribute_descriptions[m_num_attributes].format = format; m_attribute_descriptions[m_num_attributes].offset = offset; |
