| 115 | } |
| 116 | |
| 117 | inline void read_resource_size(const spirv_cross::Compiler &compiler, |
| 118 | const spirv_cross::Resource &resource, |
| 119 | ShaderResource & shader_resource, |
| 120 | const ShaderVariant & variant) |
| 121 | { |
| 122 | const auto &spirv_type = compiler.get_type_from_variable(resource.id); |
| 123 | |
| 124 | size_t array_size = 0; |
| 125 | if (variant.get_runtime_array_sizes().count(resource.name) != 0) |
| 126 | { |
| 127 | array_size = variant.get_runtime_array_sizes().at(resource.name); |
| 128 | } |
| 129 | |
| 130 | shader_resource.size = to_u32(compiler.get_declared_struct_size_runtime_array(spirv_type, array_size)); |
| 131 | } |
| 132 | |
| 133 | inline void read_resource_size(const spirv_cross::Compiler & compiler, |
| 134 | const spirv_cross::SPIRConstant &constant, |
no test coverage detected