MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / Image>

Method Image>

framework/spirv_reflection.cpp:231–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229
230template <>
231inline void read_shader_resource<ShaderResourceType::Image>(const spirv_cross::Compiler &compiler,
232 VkShaderStageFlagBits stage,
233 std::vector<ShaderResource> &resources,
234 const ShaderVariant & variant)
235{
236 auto image_resources = compiler.get_shader_resources().separate_images;
237
238 for (auto &resource : image_resources)
239 {
240 ShaderResource shader_resource{};
241 shader_resource.type = ShaderResourceType::Image;
242 shader_resource.stages = stage;
243 shader_resource.name = resource.name;
244
245 read_resource_array_size(compiler, resource, shader_resource, variant);
246 read_resource_decoration<spv::DecorationDescriptorSet>(compiler, resource, shader_resource, variant);
247 read_resource_decoration<spv::DecorationBinding>(compiler, resource, shader_resource, variant);
248
249 resources.push_back(shader_resource);
250 }
251}
252
253template <>
254inline void read_shader_resource<ShaderResourceType::ImageSampler>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 1

read_resource_array_sizeFunction · 0.85

Tested by

no test coverage detected