Browse Source

[vk, spir-v] Adding decoration for NonWritable buffers if vertexPipelineStoresAndAtomics isn't available

pull/3169/head
CamilleLaVey 4 weeks ago
committed by Caio Oliveira
parent
commit
41614c7c88
No known key found for this signature in database GPG Key ID: 362DA3DC1901E080
  1. 3
      src/shader_recompiler/backend/spirv/spirv_emit_context.cpp

3
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp

@ -315,6 +315,9 @@ void DefineSsbos(EmitContext& ctx, StorageTypeDefinition& type_def,
ctx.Decorate(id, spv::Decoration::Binding, binding);
ctx.Decorate(id, spv::Decoration::DescriptorSet, 0U);
ctx.Name(id, fmt::format("ssbo{}", index));
if (!desc.is_written) {
ctx.Decorate(id, spv::Decoration::NonWritable);
}
if (ctx.profile.supported_spirv >= 0x00010400) {
ctx.interfaces.push_back(id);
}

Loading…
Cancel
Save