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

Method ImageSampler>

framework/spirv_reflection.cpp:254–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252
253template <>
254inline void read_shader_resource<ShaderResourceType::ImageSampler>(const spirv_cross::Compiler &compiler,
255 VkShaderStageFlagBits stage,
256 std::vector<ShaderResource> &resources,
257 const ShaderVariant & variant)
258{
259 auto image_resources = compiler.get_shader_resources().sampled_images;
260
261 for (auto &resource : image_resources)
262 {
263 ShaderResource shader_resource{};
264 shader_resource.type = ShaderResourceType::ImageSampler;
265 shader_resource.stages = stage;
266 shader_resource.name = resource.name;
267
268 read_resource_array_size(compiler, resource, shader_resource, variant);
269 read_resource_decoration<spv::DecorationDescriptorSet>(compiler, resource, shader_resource, variant);
270 read_resource_decoration<spv::DecorationBinding>(compiler, resource, shader_resource, variant);
271
272 resources.push_back(shader_resource);
273 }
274}
275
276template <>
277inline void read_shader_resource<ShaderResourceType::ImageStorage>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 1

read_resource_array_sizeFunction · 0.85

Tested by

no test coverage detected