summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv/emit_context.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-06-16 22:00:31 -0300
committerGravatar ameerj2021-07-22 21:51:38 -0400
commitb5e78607ad138ad6d915b1f754fa1e5bef9c1c3c (patch)
treef8d2a34904289c6e2b55d9344b809df8f12bf782 /src/shader_recompiler/backend/spirv/emit_context.cpp
parentvk_graphics_pipeline: Use VK_KHR_push_descriptor when available (diff)
downloadyuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.gz
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.xz
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.zip
spirv: Handle small storage buffer loads on devices with no support
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.cpp')
-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 612d087ad..32c21f3b4 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -952,13 +952,13 @@ void EmitContext::DefineStorageBuffers(const Info& info, u32& binding) {
952 952
953 const IR::Type used_types{profile.support_descriptor_aliasing ? info.used_storage_buffer_types 953 const IR::Type used_types{profile.support_descriptor_aliasing ? info.used_storage_buffer_types
954 : IR::Type::U32}; 954 : IR::Type::U32};
955 if (True(used_types & IR::Type::U8)) { 955 if (profile.support_int8 && True(used_types & IR::Type::U8)) {
956 DefineSsbos(*this, storage_types.U8, &StorageDefinitions::U8, info, binding, U8, 956 DefineSsbos(*this, storage_types.U8, &StorageDefinitions::U8, info, binding, U8,
957 sizeof(u8)); 957 sizeof(u8));
958 DefineSsbos(*this, storage_types.S8, &StorageDefinitions::S8, info, binding, S8, 958 DefineSsbos(*this, storage_types.S8, &StorageDefinitions::S8, info, binding, S8,
959 sizeof(u8)); 959 sizeof(u8));
960 } 960 }
961 if (True(used_types & IR::Type::U16)) { 961 if (profile.support_int16 && True(used_types & IR::Type::U16)) {
962 DefineSsbos(*this, storage_types.U16, &StorageDefinitions::U16, info, binding, U16, 962 DefineSsbos(*this, storage_types.U16, &StorageDefinitions::U16, info, binding, U16,
963 sizeof(u16)); 963 sizeof(u16));
964 DefineSsbos(*this, storage_types.S16, &StorageDefinitions::S16, info, binding, S16, 964 DefineSsbos(*this, storage_types.S16, &StorageDefinitions::S16, info, binding, S16,