diff options
| author | 2021-07-25 22:26:23 -0300 | |
|---|---|---|
| committer | 2021-11-16 22:11:28 +0100 | |
| commit | 656adee630cb1de738ed4dc6cf1cbc35af40f64f (patch) | |
| tree | 5c5ec069a136655476180ce03fc24ccd911b3871 /src/shader_recompiler/shader_info.h | |
| parent | shader/rescaling_pass: Patch more instructions (diff) | |
| download | yuzu-656adee630cb1de738ed4dc6cf1cbc35af40f64f.tar.gz yuzu-656adee630cb1de738ed4dc6cf1cbc35af40f64f.tar.xz yuzu-656adee630cb1de738ed4dc6cf1cbc35af40f64f.zip | |
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 7bac9e2cd..9f375c30e 100644 --- a/src/shader_recompiler/shader_info.h +++ b/src/shader_recompiler/shader_info.h | |||
| @@ -191,4 +191,13 @@ struct Info { | |||
| 191 | ImageDescriptors image_descriptors; | 191 | ImageDescriptors image_descriptors; |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | template <typename Descriptors> | ||
| 195 | u32 NumDescriptors(const Descriptors& descriptors) { | ||
| 196 | u32 num{}; | ||
| 197 | for (const auto& desc : descriptors) { | ||
| 198 | num += desc.count; | ||
| 199 | } | ||
| 200 | return num; | ||
| 201 | } | ||
| 202 | |||
| 194 | } // namespace Shader | 203 | } // namespace Shader |