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

Method InputAttachment>

framework/spirv_reflection.cpp:184–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183template <>
184inline void read_shader_resource<ShaderResourceType::InputAttachment>(const spirv_cross::Compiler &compiler,
185 VkShaderStageFlagBits /*stage*/,
186 std::vector<ShaderResource> &resources,
187 const ShaderVariant & variant)
188{
189 auto subpass_resources = compiler.get_shader_resources().subpass_inputs;
190
191 for (auto &resource : subpass_resources)
192 {
193 ShaderResource shader_resource{};
194 shader_resource.type = ShaderResourceType::InputAttachment;
195 shader_resource.stages = VK_SHADER_STAGE_FRAGMENT_BIT;
196 shader_resource.name = resource.name;
197
198 read_resource_array_size(compiler, resource, shader_resource, variant);
199 read_resource_decoration<spv::DecorationInputAttachmentIndex>(compiler, resource, shader_resource, variant);
200 read_resource_decoration<spv::DecorationDescriptorSet>(compiler, resource, shader_resource, variant);
201 read_resource_decoration<spv::DecorationBinding>(compiler, resource, shader_resource, variant);
202
203 resources.push_back(shader_resource);
204 }
205}
206
207template <>
208inline void read_shader_resource<ShaderResourceType::Output>(const spirv_cross::Compiler &compiler,

Callers

nothing calls this directly

Calls 1

read_resource_array_sizeFunction · 0.85

Tested by

no test coverage detected