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

Method Output>

framework/spirv_reflection.cpp:208–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206
207template <>
208inline void read_shader_resource<ShaderResourceType::Output>(const spirv_cross::Compiler &compiler,
209 VkShaderStageFlagBits stage,
210 std::vector<ShaderResource> &resources,
211 const ShaderVariant & variant)
212{
213 auto output_resources = compiler.get_shader_resources().stage_outputs;
214
215 for (auto &resource : output_resources)
216 {
217 ShaderResource shader_resource{};
218 shader_resource.type = ShaderResourceType::Output;
219 shader_resource.stages = stage;
220 shader_resource.name = resource.name;
221
222 read_resource_array_size(compiler, resource, shader_resource, variant);
223 read_resource_vec_size(compiler, resource, shader_resource, variant);
224 read_resource_decoration<spv::DecorationLocation>(compiler, resource, shader_resource, variant);
225
226 resources.push_back(shader_resource);
227 }
228}
229
230template <>
231inline void read_shader_resource<ShaderResourceType::Image>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 2

read_resource_array_sizeFunction · 0.85
read_resource_vec_sizeFunction · 0.85

Tested by

no test coverage detected