aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-20 01:49:26 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:32 -0400
commit1426ed05b034096d9d27fddd7bbf2d783e89e5e7 (patch)
treeb7a50656b63f5207c61f52bd6e655634dd9d7c1d /src
parent9c318fe58b69e8cee49f9163ffb81266e5fd07f6 (diff)
glasm: Implement EmitVertex and EndPrimitive
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_instructions.h2
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
index 7ccba4c6f8..0ce00db672 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
@@ -32,7 +32,7 @@ void EmitWorkgroupMemoryBarrier(EmitContext& ctx);
void EmitDeviceMemoryBarrier(EmitContext& ctx);
void EmitPrologue(EmitContext& ctx);
void EmitEpilogue(EmitContext& ctx);
-void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream);
+void EmitEmitVertex(EmitContext& ctx, ScalarS32 stream);
void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream);
void EmitGetRegister(EmitContext& ctx);
void EmitSetRegister(EmitContext& ctx);
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
index f7fec05452..9b962427cd 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
@@ -72,12 +72,16 @@ void EmitEpilogue(EmitContext& ctx) {
// TODO
}
-void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
- NotImplemented();
+void EmitEmitVertex(EmitContext& ctx, ScalarS32 stream) {
+ ctx.Add("EMITS {};", stream);
}
void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) {
- NotImplemented();
+ if (!stream.IsImmediate()) {
+ // LOG_WARNING not immediate
+ }
+ ctx.reg_alloc.Consume(stream);
+ ctx.Add("ENDPRIM;");
}
void EmitGetRegister(EmitContext& ctx) {