From 656adee630cb1de738ed4dc6cf1cbc35af40f64f Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 25 Jul 2021 22:26:23 -0300 Subject: spirv: Implement rescaling patching --- src/shader_recompiler/shader_info.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/shader_recompiler/shader_info.h') diff --git a/src/shader_recompiler/shader_info.h b/src/shader_recompiler/shader_info.h index 7bac9e2cd..9f375c30e 100644 --- a/src/shader_recompiler/shader_info.h +++ b/src/shader_recompiler/shader_info.h @@ -191,4 +191,13 @@ struct Info { ImageDescriptors image_descriptors; }; +template +u32 NumDescriptors(const Descriptors& descriptors) { + u32 num{}; + for (const auto& desc : descriptors) { + num += desc.count; + } + return num; +} + } // namespace Shader -- cgit v1.2.3