From accad56ee7cc9f77886d164701a35f1e89a3519b Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Wed, 19 May 2021 16:32:03 -0300
Subject: glasm: Implement stores to gl_ViewportIndex

---
 src/shader_recompiler/backend/glasm/emit_context.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/shader_recompiler/backend/glasm/emit_context.h')

diff --git a/src/shader_recompiler/backend/glasm/emit_context.h b/src/shader_recompiler/backend/glasm/emit_context.h
index d6b0bf73c9..dd1f9ac9f0 100644
--- a/src/shader_recompiler/backend/glasm/emit_context.h
+++ b/src/shader_recompiler/backend/glasm/emit_context.h
@@ -11,10 +11,12 @@
 #include <fmt/format.h>
 
 #include "shader_recompiler/backend/glasm/reg_alloc.h"
+#include "shader_recompiler/stage.h"
 
 namespace Shader {
 struct Info;
-}
+struct Profile;
+} // namespace Shader
 
 namespace Shader::Backend {
 struct Bindings;
@@ -29,7 +31,7 @@ namespace Shader::Backend::GLASM {
 
 class EmitContext {
 public:
-    explicit EmitContext(IR::Program& program, Bindings& bindings);
+    explicit EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_);
 
     template <typename... Args>
     void Add(const char* format_str, IR::Inst& inst, Args&&... args) {
@@ -55,10 +57,12 @@ public:
     std::string code;
     RegAlloc reg_alloc{*this};
     const Info& info;
+    const Profile& profile;
 
     std::vector<u32> texture_buffer_bindings;
     std::vector<u32> texture_bindings;
 
+    Stage stage{};
     std::string_view stage_name = "invalid";
 };
 
-- 
cgit v1.2.3-70-g09d2