summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
diff options
context:
space:
mode:
authorGravatar ameerj2021-05-27 00:26:16 -0400
committerGravatar ameerj2021-07-22 21:51:36 -0400
commited14d31f663e126a8f9fe0ea8abff8e27c46248b (patch)
tree6bfe4bec1eda9960aef7c80dfa5926ab97984bd3 /src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
parentglsl: textures wip (diff)
downloadyuzu-ed14d31f663e126a8f9fe0ea8abff8e27c46248b.tar.gz
yuzu-ed14d31f663e126a8f9fe0ea8abff8e27c46248b.tar.xz
yuzu-ed14d31f663e126a8f9fe0ea8abff8e27c46248b.zip
glsl: Fix non-immediate buffer access
and many other misc implementations
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp48
1 files changed, 18 insertions, 30 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
index 048b12f38..aa966a304 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
@@ -17,19 +17,14 @@ void EmitCompositeConstructU32x2(EmitContext& ctx, IR::Inst& inst, std::string_v
17 ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); 17 ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2);
18} 18}
19 19
20void EmitCompositeConstructU32x3([[maybe_unused]] EmitContext& ctx, 20void EmitCompositeConstructU32x3(EmitContext& ctx, IR::Inst& inst, std::string_view e1,
21 [[maybe_unused]] std::string_view e1, 21 std::string_view e2, std::string_view e3) {
22 [[maybe_unused]] std::string_view e2, 22 ctx.AddU32x3("{}=uvec3({},{},{});", inst, e1, e2, e3);
23 [[maybe_unused]] std::string_view e3) {
24 throw NotImplementedException("GLSL Instruction");
25} 23}
26 24
27void EmitCompositeConstructU32x4([[maybe_unused]] EmitContext& ctx, 25void EmitCompositeConstructU32x4(EmitContext& ctx, IR::Inst& inst, std::string_view e1,
28 [[maybe_unused]] std::string_view e1, 26 std::string_view e2, std::string_view e3, std::string_view e4) {
29 [[maybe_unused]] std::string_view e2, 27 ctx.AddU32x4("{}=uvec4({},{},{},{});", inst, e1, e2, e3, e4);
30 [[maybe_unused]] std::string_view e3,
31 [[maybe_unused]] std::string_view e4) {
32 throw NotImplementedException("GLSL Instruction");
33} 28}
34 29
35void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, 30void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite,
@@ -37,16 +32,14 @@ void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_vie
37 ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); 32 ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]);
38} 33}
39 34
40void EmitCompositeExtractU32x3([[maybe_unused]] EmitContext& ctx, 35void EmitCompositeExtractU32x3(EmitContext& ctx, IR::Inst& inst, std::string_view composite,
41 [[maybe_unused]] std::string_view composite, 36 u32 index) {
42 [[maybe_unused]] u32 index) { 37 ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]);
43 throw NotImplementedException("GLSL Instruction");
44} 38}
45 39
46void EmitCompositeExtractU32x4([[maybe_unused]] EmitContext& ctx, 40void EmitCompositeExtractU32x4(EmitContext& ctx, IR::Inst& inst, std::string_view composite,
47 [[maybe_unused]] std::string_view composite, 41 u32 index) {
48 [[maybe_unused]] u32 index) { 42 ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]);
49 throw NotImplementedException("GLSL Instruction");
50} 43}
51 44
52void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx, 45void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx,
@@ -135,19 +128,14 @@ void EmitCompositeConstructF32x2(EmitContext& ctx, IR::Inst& inst, std::string_v
135 ctx.AddF32x2("{}=vec2({},{});", inst, e1, e2); 128 ctx.AddF32x2("{}=vec2({},{});", inst, e1, e2);
136} 129}
137 130
138void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, 131void EmitCompositeConstructF32x3(EmitContext& ctx, IR::Inst& inst, std::string_view e1,
139 [[maybe_unused]] std::string_view e1, 132 std::string_view e2, std::string_view e3) {
140 [[maybe_unused]] std::string_view e2, 133 ctx.AddF32x3("{}=vec3({},{},{});", inst, e1, e2, e3);
141 [[maybe_unused]] std::string_view e3) {
142 throw NotImplementedException("GLSL Instruction");
143} 134}
144 135
145void EmitCompositeConstructF32x4([[maybe_unused]] EmitContext& ctx, 136void EmitCompositeConstructF32x4(EmitContext& ctx, IR::Inst& inst, std::string_view e1,
146 [[maybe_unused]] std::string_view e1, 137 std::string_view e2, std::string_view e3, std::string_view e4) {
147 [[maybe_unused]] std::string_view e2, 138 ctx.AddF32x4("{}=vec4({},{},{},{});", inst, e1, e2, e3, e4);
148 [[maybe_unused]] std::string_view e3,
149 [[maybe_unused]] std::string_view e4) {
150 throw NotImplementedException("GLSL Instruction");
151} 139}
152 140
153void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, 141void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite,