aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_context.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-19 16:32:03 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:32 -0400
commitaccad56ee7cc9f77886d164701a35f1e89a3519b (patch)
tree34b272f1f70d0c4d926877c4e960ccec0084ce17 /src/shader_recompiler/backend/glasm/emit_context.h
parent2494dbe183660297d9b66d4300a28ca95f740f08 (diff)
glasm: Implement stores to gl_ViewportIndex
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_context.h')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_context.h8
1 files changed, 6 insertions, 2 deletions
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";
};