| 347 | |
| 348 | template <> |
| 349 | inline void read_shader_resource<ShaderResourceType::BufferStorage>(const spirv_cross::Compiler &compiler, |
| 350 | VkShaderStageFlagBits stage, |
| 351 | std::vector<ShaderResource> &resources, |
| 352 | const ShaderVariant & variant) |
| 353 | { |
| 354 | auto storage_resources = compiler.get_shader_resources().storage_buffers; |
| 355 | |
| 356 | for (auto &resource : storage_resources) |
| 357 | { |
| 358 | ShaderResource shader_resource; |
| 359 | shader_resource.type = ShaderResourceType::BufferStorage; |
| 360 | shader_resource.stages = stage; |
| 361 | shader_resource.name = resource.name; |
| 362 | |
| 363 | read_resource_size(compiler, resource, shader_resource, variant); |
| 364 | read_resource_array_size(compiler, resource, shader_resource, variant); |
| 365 | read_resource_decoration<spv::DecorationNonReadable>(compiler, resource, shader_resource, variant); |
| 366 | read_resource_decoration<spv::DecorationNonWritable>(compiler, resource, shader_resource, variant); |
| 367 | read_resource_decoration<spv::DecorationDescriptorSet>(compiler, resource, shader_resource, variant); |
| 368 | read_resource_decoration<spv::DecorationBinding>(compiler, resource, shader_resource, variant); |
| 369 | |
| 370 | resources.push_back(shader_resource); |
| 371 | } |
| 372 | } |
| 373 | } // namespace |
| 374 | |
| 375 | bool SPIRVReflection::reflect_shader_resources(VkShaderStageFlagBits stage, const std::vector<uint32_t> &spirv, std::vector<ShaderResource> &resources, const ShaderVariant &variant) |
nothing calls this directly
no test coverage detected