From d512d4127fa12a710e5d1d6d8067fe050b3445e7 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Mon, 1 Jan 2018 15:00:37 -0600 Subject: [PATCH] [SPIR-V] Fix the build. --- src/xenia/gpu/spirv_shader_translator.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/xenia/gpu/spirv_shader_translator.cc b/src/xenia/gpu/spirv_shader_translator.cc index efdcf924e..f646f8920 100644 --- a/src/xenia/gpu/spirv_shader_translator.cc +++ b/src/xenia/gpu/spirv_shader_translator.cc @@ -1263,7 +1263,10 @@ void SpirvShaderTranslator::ProcessVertexFetchInstruction( assert_unhandled_case(vertex_components); } - spv::Id vertex = 0; + auto vertex_ptr = vertex_binding_map_[instr.operands[1].storage_index] + [instr.attributes.offset]; + assert_not_zero(vertex_ptr); + spv::Id vertex = b.createLoad(vertex_ptr); switch (instr.attributes.data_format) { case VertexFormat::k_8_8_8_8: case VertexFormat::k_2_10_10_10: @@ -1277,13 +1280,9 @@ void SpirvShaderTranslator::ProcessVertexFetchInstruction( case VertexFormat::k_32_FLOAT: case VertexFormat::k_32_32_FLOAT: case VertexFormat::k_32_32_32_FLOAT: - case VertexFormat::k_32_32_32_32_FLOAT: + case VertexFormat::k_32_32_32_32_FLOAT: { // These are handled, for now. - auto vertex_ptr = vertex_binding_map_[instr.operands[1].storage_index] - [instr.attributes.offset]; - assert_not_zero(vertex_ptr); - vertex = b.createLoad(vertex_ptr); - break; + } break; case VertexFormat::k_10_11_11: { // This needs to be converted.