summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-16 23:06:13 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commitf7a2340205b4fa2db32403f20d7b7afe32b15f33 (patch)
tree22059632c5f3bf068e686997d833368f6c22f6ec /src/shader_recompiler/backend/glasm
parentglasm: Implement rest of shared mem (diff)
downloadyuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.gz
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.bz2
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.lz
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.xz
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.zst
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp16
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_image.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index e5c96eb7f..0a76423f4 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -212,14 +212,14 @@ void EmitCode(EmitContext& ctx, const IR::Program& program) {
for (const IR::AbstractSyntaxNode& node : program.syntax_list) {
switch (node.type) {
case IR::AbstractSyntaxNode::Type::Block:
- for (IR::Inst& inst : node.block->Instructions()) {
+ for (IR::Inst& inst : node.data.block->Instructions()) {
EmitInst(ctx, &inst);
}
break;
case IR::AbstractSyntaxNode::Type::If:
ctx.Add("MOV.S.CC RC,{};"
"IF NE.x;",
- eval(node.if_node.cond));
+ eval(node.data.if_node.cond));
break;
case IR::AbstractSyntaxNode::Type::EndIf:
ctx.Add("ENDIF;");
@@ -228,8 +228,8 @@ void EmitCode(EmitContext& ctx, const IR::Program& program) {
ctx.Add("REP;");
break;
case IR::AbstractSyntaxNode::Type::Repeat:
- if (node.repeat.cond.IsImmediate()) {
- if (node.repeat.cond.U1()) {
+ if (node.data.repeat.cond.IsImmediate()) {
+ if (node.data.repeat.cond.U1()) {
ctx.Add("ENDREP;");
} else {
ctx.Add("BRK;"
@@ -239,18 +239,18 @@ void EmitCode(EmitContext& ctx, const IR::Program& program) {
ctx.Add("MOV.S.CC RC,{};"
"BRK (EQ.x);"
"ENDREP;",
- eval(node.repeat.cond));
+ eval(node.data.repeat.cond));
}
break;
case IR::AbstractSyntaxNode::Type::Break:
- if (node.break_node.cond.IsImmediate()) {
- if (node.break_node.cond.U1()) {
+ if (node.data.break_node.cond.IsImmediate()) {
+ if (node.data.break_node.cond.U1()) {
ctx.Add("BRK;");
}
} else {
ctx.Add("MOV.S.CC RC,{};"
"BRK (NE.x);",
- eval(node.break_node.cond));
+ eval(node.data.break_node.cond));
}
break;
case IR::AbstractSyntaxNode::Type::Return:
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
index a32d01925..4d146d34e 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
@@ -105,7 +105,7 @@ void EmitBoundImageWrite(EmitContext&) {
throw LogicError("Unreachable instruction");
}
-std::string Texture([[maybe_unused]] EmitContext& ctx, IR::TextureInstInfo info,
+static std::string Texture([[maybe_unused]] EmitContext& ctx, IR::TextureInstInfo info,
[[maybe_unused]] const IR::Value& index) {
// FIXME
return fmt::format("texture[{}]", info.descriptor_index);