summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-06-17 03:00:31 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:38 +0200
commitb5e78607ad138ad6d915b1f754fa1e5bef9c1c3c (patch)
treef8d2a34904289c6e2b55d9344b809df8f12bf782 /src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
parentvk_graphics_pipeline: Use VK_KHR_push_descriptor when available (diff)
downloadyuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.gz
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.bz2
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.lz
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.xz
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.tar.zst
yuzu-b5e78607ad138ad6d915b1f754fa1e5bef9c1c3c.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp8
1 files changed, 4 insertions, 4 deletions
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) {
}
Id EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
- if (ctx.profile.support_descriptor_aliasing) {
+ if (ctx.profile.support_int8 && ctx.profile.support_descriptor_aliasing) {
return ctx.OpUConvert(ctx.U32[1],
LoadStorage(ctx, binding, offset, ctx.U8, ctx.storage_types.U8,
sizeof(u8), &StorageDefinitions::U8));
@@ -135,7 +135,7 @@ Id EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value
}
Id EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
- if (ctx.profile.support_descriptor_aliasing) {
+ if (ctx.profile.support_int8 && ctx.profile.support_descriptor_aliasing) {
return ctx.OpSConvert(ctx.U32[1],
LoadStorage(ctx, binding, offset, ctx.S8, ctx.storage_types.S8,
sizeof(s8), &StorageDefinitions::S8));
@@ -146,7 +146,7 @@ Id EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value
}
Id EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
- if (ctx.profile.support_descriptor_aliasing) {
+ if (ctx.profile.support_int16 && ctx.profile.support_descriptor_aliasing) {
return ctx.OpUConvert(ctx.U32[1],
LoadStorage(ctx, binding, offset, ctx.U16, ctx.storage_types.U16,
sizeof(u16), &StorageDefinitions::U16));
@@ -157,7 +157,7 @@ Id EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Valu
}
Id EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
- if (ctx.profile.support_descriptor_aliasing) {
+ if (ctx.profile.support_int16 && ctx.profile.support_descriptor_aliasing) {
return ctx.OpSConvert(ctx.U32[1],
LoadStorage(ctx, binding, offset, ctx.S16, ctx.storage_types.S16,
sizeof(s16), &StorageDefinitions::S16));