From a5b37dce1d07afcce523c7bf6438730164a9b5b1 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 13 Jan 2016 01:50:20 -0600 Subject: [PATCH] Shaders: Emit an unimplemented warning for indexed vertex fetch instructions --- src/xenia/gpu/glsl_shader_translator.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xenia/gpu/glsl_shader_translator.cc b/src/xenia/gpu/glsl_shader_translator.cc index 397dd3a63..3a891316d 100644 --- a/src/xenia/gpu/glsl_shader_translator.cc +++ b/src/xenia/gpu/glsl_shader_translator.cc @@ -535,6 +535,14 @@ void GlslShaderTranslator::ProcessVertexFetchInstruction( EmitSource("// "); instr.Disassemble(&source_); + if (instr.operands[0].storage_index != 0) { + // Unimplemented for now. + EmitUnimplementedTranslationError(); + EmitSourceDepth("pv.xyzw = vec4(0.0, 0.0, 0.0, 0.0);\n"); + EmitStoreVectorResult(instr.result); + return; + } + if (instr.is_predicated) { EmitSourceDepth("if (%cp0) {\n", instr.predicate_condition ? ' ' : '!'); Indent();