summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_context.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-23 09:14:35 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:29 +0200
commitd2e811db2edd3829b344e96ad56ae979bccd28d2 (patch)
tree14160c4fb0bd1dac9fb604f3a6b4767e3292a0e7 /src/shader_recompiler/backend/spirv/emit_context.h
parentspirv: Add int8 and int16 capabilities only when supported (diff)
downloadyuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.tar
yuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.tar.gz
yuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.tar.bz2
yuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.tar.lz
yuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.tar.xz
yuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.tar.zst
yuzu-d2e811db2edd3829b344e96ad56ae979bccd28d2.zip
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.h')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.h b/src/shader_recompiler/backend/spirv/emit_context.h
index baf12c217..823ed8525 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.h
+++ b/src/shader_recompiler/backend/spirv/emit_context.h
@@ -122,10 +122,6 @@ public:
return Constant(U32[1], value);
}
- Id Const(f32 value) {
- return Constant(F32[1], value);
- }
-
Id Const(u32 element_1, u32 element_2) {
return ConstantComposite(U32[2], Const(element_1), Const(element_2));
}
@@ -139,6 +135,27 @@ public:
Const(element_4));
}
+ Id SConst(s32 value) {
+ return Constant(S32[1], value);
+ }
+
+ Id SConst(s32 element_1, s32 element_2) {
+ return ConstantComposite(S32[2], SConst(element_1), SConst(element_2));
+ }
+
+ Id SConst(s32 element_1, s32 element_2, s32 element_3) {
+ return ConstantComposite(S32[3], SConst(element_1), SConst(element_2), SConst(element_3));
+ }
+
+ Id SConst(s32 element_1, s32 element_2, s32 element_3, s32 element_4) {
+ return ConstantComposite(S32[4], SConst(element_1), SConst(element_2), SConst(element_3),
+ SConst(element_4));
+ }
+
+ Id Const(f32 value) {
+ return Constant(F32[1], value);
+ }
+
const Profile& profile;
Stage stage{};