summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-23 09:13:34 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:29 +0200
commit4ead714910136dded0f404e184603f17b6810291 (patch)
tree47e5ad807ec21f5881fc8e9301d7d2b710e0221a /src/shader_recompiler/backend/spirv
parentspirv: Add integer clamping workarounds (diff)
downloadyuzu-4ead714910136dded0f404e184603f17b6810291.tar
yuzu-4ead714910136dded0f404e184603f17b6810291.tar.gz
yuzu-4ead714910136dded0f404e184603f17b6810291.tar.bz2
yuzu-4ead714910136dded0f404e184603f17b6810291.tar.lz
yuzu-4ead714910136dded0f404e184603f17b6810291.tar.xz
yuzu-4ead714910136dded0f404e184603f17b6810291.tar.zst
yuzu-4ead714910136dded0f404e184603f17b6810291.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 0eb400223..e9ffe4955 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -526,12 +526,12 @@ void EmitContext::DefineCommonTypes(const Info& info) {
output_f32 = Name(TypePointer(spv::StorageClass::Output, F32[1]), "output_f32");
output_u32 = Name(TypePointer(spv::StorageClass::Output, U32[1]), "output_u32");
- if (info.uses_int8) {
+ if (info.uses_int8 && profile.support_int8) {
AddCapability(spv::Capability::Int8);
U8 = Name(TypeInt(8, false), "u8");
S8 = Name(TypeInt(8, true), "s8");
}
- if (info.uses_int16) {
+ if (info.uses_int16 && profile.support_int16) {
AddCapability(spv::Capability::Int16);
U16 = Name(TypeInt(16, false), "u16");
S16 = Name(TypeInt(16, true), "s16");