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

Method Sampler>

framework/spirv_reflection.cpp:302–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300
301template <>
302inline void read_shader_resource<ShaderResourceType::Sampler>(const spirv_cross::Compiler &compiler,
303 VkShaderStageFlagBits stage,
304 std::vector<ShaderResource> &resources,
305 const ShaderVariant & variant)
306{
307 auto sampler_resources = compiler.get_shader_resources().separate_samplers;
308
309 for (auto &resource : sampler_resources)
310 {
311 ShaderResource shader_resource{};
312 shader_resource.type = ShaderResourceType::Sampler;
313 shader_resource.stages = stage;
314 shader_resource.name = resource.name;
315
316 read_resource_array_size(compiler, resource, shader_resource, variant);
317 read_resource_decoration<spv::DecorationDescriptorSet>(compiler, resource, shader_resource, variant);
318 read_resource_decoration<spv::DecorationBinding>(compiler, resource, shader_resource, variant);
319
320 resources.push_back(shader_resource);
321 }
322}
323
324template <>
325inline void read_shader_resource<ShaderResourceType::BufferUniform>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 1

read_resource_array_sizeFunction · 0.85

Tested by

no test coverage detected