From 80808d743bf73b63caa034f2f99068709be92373 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 26 Jun 2019 23:07:42 +0100 Subject: [PATCH] [spirv] Add generic memberDecorate --- src/spirv/spirv_module.cpp | 11 +++++++++++ src/spirv/spirv_module.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/spirv/spirv_module.cpp b/src/spirv/spirv_module.cpp index 913c06d39..22324d76e 100644 --- a/src/spirv/spirv_module.cpp +++ b/src/spirv/spirv_module.cpp @@ -524,6 +524,17 @@ namespace dxvk { m_annotations.putWord (spv::DecorationBuiltIn); m_annotations.putWord (builtIn); } + + + void SpirvModule::memberDecorate( + uint32_t structId, + uint32_t memberId, + spv::Decoration decoration) { + m_annotations.putIns (spv::OpMemberDecorate, 4); + m_annotations.putWord (structId); + m_annotations.putWord (memberId); + m_annotations.putWord (decoration); + } void SpirvModule::memberDecorateOffset( diff --git a/src/spirv/spirv_module.h b/src/spirv/spirv_module.h index bee57c8ec..2a7afcff0 100644 --- a/src/spirv/spirv_module.h +++ b/src/spirv/spirv_module.h @@ -224,6 +224,11 @@ namespace dxvk { uint32_t structId, uint32_t memberId, spv::BuiltIn builtIn); + + void memberDecorate( + uint32_t structId, + uint32_t memberId, + spv::Decoration decoration); void memberDecorateOffset( uint32_t structId,