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

Function read_resource_array_size

framework/spirv_reflection.cpp:107–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107inline void read_resource_array_size(const spirv_cross::Compiler &compiler,
108 const spirv_cross::Resource &resource,
109 ShaderResource & shader_resource,
110 const ShaderVariant & variant)
111{
112 const auto &spirv_type = compiler.get_type_from_variable(resource.id);
113
114 shader_resource.array_size = spirv_type.array.size() ? spirv_type.array[0] : 1;
115}
116
117inline void read_resource_size(const spirv_cross::Compiler &compiler,
118 const spirv_cross::Resource &resource,

Callers 9

Input>Method · 0.85
InputAttachment>Method · 0.85
Output>Method · 0.85
Image>Method · 0.85
ImageSampler>Method · 0.85
ImageStorage>Method · 0.85
Sampler>Method · 0.85
BufferUniform>Method · 0.85
BufferStorage>Method · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected