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

Method Input>

framework/spirv_reflection.cpp:161–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160template <>
161inline void read_shader_resource<ShaderResourceType::Input>(const spirv_cross::Compiler &compiler,
162 VkShaderStageFlagBits stage,
163 std::vector<ShaderResource> &resources,
164 const ShaderVariant & variant)
165{
166 auto input_resources = compiler.get_shader_resources().stage_inputs;
167
168 for (auto &resource : input_resources)
169 {
170 ShaderResource shader_resource{};
171 shader_resource.type = ShaderResourceType::Input;
172 shader_resource.stages = stage;
173 shader_resource.name = resource.name;
174
175 read_resource_vec_size(compiler, resource, shader_resource, variant);
176 read_resource_array_size(compiler, resource, shader_resource, variant);
177 read_resource_decoration<spv::DecorationLocation>(compiler, resource, shader_resource, variant);
178
179 resources.push_back(shader_resource);
180 }
181}
182
183template <>
184inline void read_shader_resource<ShaderResourceType::InputAttachment>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 2

read_resource_vec_sizeFunction · 0.85
read_resource_array_sizeFunction · 0.85

Tested by

no test coverage detected