diff options
Diffstat (limited to 'src/shader_recompiler')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_context.cpp | 4 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp | 8 |
2 files changed, 6 insertions, 6 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, |
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp index 37a66095f..ccebf170d 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp | |||
| @@ -124,7 +124,7 @@ void EmitWriteGlobal128(EmitContext& ctx, Id address, Id value) { | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | Id EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | 126 | Id EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { |
| 127 | if (ctx.profile.support_descriptor_aliasing) { | 127 | if (ctx.profile.support_int8 && ctx.profile.support_descriptor_aliasing) { |
| 128 | return ctx.OpUConvert(ctx.U32[1], | 128 | return ctx.OpUConvert(ctx.U32[1], |
| 129 | LoadStorage(ctx, binding, offset, ctx.U8, ctx.storage_types.U8, | 129 | LoadStorage(ctx, binding, offset, ctx.U8, ctx.storage_types.U8, |
| 130 | sizeof(u8), &StorageDefinitions::U8)); | 130 | sizeof(u8), &StorageDefinitions::U8)); |
| @@ -135,7 +135,7 @@ Id EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value | |||
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | Id EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | 137 | Id EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { |
| 138 | if (ctx.profile.support_descriptor_aliasing) { | 138 | if (ctx.profile.support_int8 && ctx.profile.support_descriptor_aliasing) { |
| 139 | return ctx.OpSConvert(ctx.U32[1], | 139 | return ctx.OpSConvert(ctx.U32[1], |
| 140 | LoadStorage(ctx, binding, offset, ctx.S8, ctx.storage_types.S8, | 140 | LoadStorage(ctx, binding, offset, ctx.S8, ctx.storage_types.S8, |
| 141 | sizeof(s8), &StorageDefinitions::S8)); | 141 | sizeof(s8), &StorageDefinitions::S8)); |
| @@ -146,7 +146,7 @@ Id EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | Id EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | 148 | Id EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { |
| 149 | if (ctx.profile.support_descriptor_aliasing) { | 149 | if (ctx.profile.support_int16 && ctx.profile.support_descriptor_aliasing) { |
| 150 | return ctx.OpUConvert(ctx.U32[1], | 150 | return ctx.OpUConvert(ctx.U32[1], |
| 151 | LoadStorage(ctx, binding, offset, ctx.U16, ctx.storage_types.U16, | 151 | LoadStorage(ctx, binding, offset, ctx.U16, ctx.storage_types.U16, |
| 152 | sizeof(u16), &StorageDefinitions::U16)); | 152 | sizeof(u16), &StorageDefinitions::U16)); |
| @@ -157,7 +157,7 @@ Id EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Valu | |||
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | Id EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | 159 | Id EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { |
| 160 | if (ctx.profile.support_descriptor_aliasing) { | 160 | if (ctx.profile.support_int16 && ctx.profile.support_descriptor_aliasing) { |
| 161 | return ctx.OpSConvert(ctx.U32[1], | 161 | return ctx.OpSConvert(ctx.U32[1], |
| 162 | LoadStorage(ctx, binding, offset, ctx.S16, ctx.storage_types.S16, | 162 | LoadStorage(ctx, binding, offset, ctx.S16, ctx.storage_types.S16, |
| 163 | sizeof(s16), &StorageDefinitions::S16)); | 163 | sizeof(s16), &StorageDefinitions::S16)); |