diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-25 22:26:23 -0300 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:28 +0100 |
commit | 656adee630cb1de738ed4dc6cf1cbc35af40f64f (patch) | |
tree | 5c5ec069a136655476180ce03fc24ccd911b3871 /src/shader_recompiler/shader_info.h | |
parent | 01379c5e3cd1181c7c7d37a672364fbcad627fb0 (diff) |
spirv: Implement rescaling patching
Diffstat (limited to 'src/shader_recompiler/shader_info.h')
-rw-r--r-- | src/shader_recompiler/shader_info.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shader_recompiler/shader_info.h b/src/shader_recompiler/shader_info.h index 7bac9e2cdc..9f375c30e5 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 <typename Descriptors> +u32 NumDescriptors(const Descriptors& descriptors) { + u32 num{}; + for (const auto& desc : descriptors) { + num += desc.count; + } + return num; +} + } // namespace Shader |