summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_context.h
diff options
context:
space:
mode:
authorGravatar ameerj2021-06-02 00:33:03 -0400
committerGravatar ameerj2021-07-22 21:51:37 -0400
commitf4799e8fa15b92d8d5607dc5dfca4974901ee06c (patch)
treefe05a0bb667c92f018d08aaf7e410fd55746e0c1 /src/shader_recompiler/backend/glsl/emit_context.h
parentglsl: Yet another gl_ViewportIndex fix attempt (diff)
downloadyuzu-f4799e8fa15b92d8d5607dc5dfca4974901ee06c.tar.gz
yuzu-f4799e8fa15b92d8d5607dc5dfca4974901ee06c.tar.xz
yuzu-f4799e8fa15b92d8d5607dc5dfca4974901ee06c.zip
glsl: Implement transform feedback
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.h')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_context.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.h b/src/shader_recompiler/backend/glsl/emit_context.h
index 48786a2c7..5d48675e6 100644
--- a/src/shader_recompiler/backend/glsl/emit_context.h
+++ b/src/shader_recompiler/backend/glsl/emit_context.h
@@ -30,6 +30,12 @@ struct Program;
30 30
31namespace Shader::Backend::GLSL { 31namespace Shader::Backend::GLSL {
32 32
33struct GenericElementInfo {
34 std::string name{};
35 u32 first_element{};
36 u32 num_components{};
37};
38
33class EmitContext { 39class EmitContext {
34public: 40public:
35 explicit EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, 41 explicit EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_,
@@ -149,6 +155,7 @@ public:
149 std::vector<u32> image_buffer_bindings; 155 std::vector<u32> image_buffer_bindings;
150 std::vector<u32> texture_bindings; 156 std::vector<u32> texture_bindings;
151 std::vector<u32> image_bindings; 157 std::vector<u32> image_bindings;
158 std::array<std::array<GenericElementInfo, 4>, 32> output_generics{};
152 159
153 bool uses_y_direction{}; 160 bool uses_y_direction{};
154 bool uses_cc_carry{}; 161 bool uses_cc_carry{};
@@ -157,6 +164,7 @@ private:
157 void SetupExtensions(std::string& header); 164 void SetupExtensions(std::string& header);
158 void DefineConstantBuffers(Bindings& bindings); 165 void DefineConstantBuffers(Bindings& bindings);
159 void DefineStorageBuffers(Bindings& bindings); 166 void DefineStorageBuffers(Bindings& bindings);
167 void DefineGenericOutput(size_t index, u32 invocations);
160 void DefineHelperFunctions(); 168 void DefineHelperFunctions();
161 void SetupImages(Bindings& bindings); 169 void SetupImages(Bindings& bindings);
162}; 170};