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

Method BufferUniform>

framework/spirv_reflection.cpp:325–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324template <>
325inline void read_shader_resource<ShaderResourceType::BufferUniform>(const spirv_cross::Compiler &compiler,
326 VkShaderStageFlagBits stage,
327 std::vector<ShaderResource> &resources,
328 const ShaderVariant & variant)
329{
330 auto uniform_resources = compiler.get_shader_resources().uniform_buffers;
331
332 for (auto &resource : uniform_resources)
333 {
334 ShaderResource shader_resource{};
335 shader_resource.type = ShaderResourceType::BufferUniform;
336 shader_resource.stages = stage;
337 shader_resource.name = resource.name;
338
339 read_resource_size(compiler, resource, shader_resource, variant);
340 read_resource_array_size(compiler, resource, shader_resource, variant);
341 read_resource_decoration<spv::DecorationDescriptorSet>(compiler, resource, shader_resource, variant);
342 read_resource_decoration<spv::DecorationBinding>(compiler, resource, shader_resource, variant);
343
344 resources.push_back(shader_resource);
345 }
346}
347
348template <>
349inline void read_shader_resource<ShaderResourceType::BufferStorage>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 2

read_resource_sizeFunction · 0.85
read_resource_array_sizeFunction · 0.85

Tested by

no test coverage detected