| 152 | } |
| 153 | |
| 154 | static WriteDescriptorSet getWrite( ImageAttachment const & attach |
| 155 | , SamplerDesc const & samplerDesc |
| 156 | , uint32_t binding |
| 157 | , uint32_t count |
| 158 | , uint32_t index |
| 159 | , RunnableGraph & graph ) |
| 160 | { |
| 161 | WriteDescriptorSet result{ binding |
| 162 | , 0u |
| 163 | , count |
| 164 | , getDescriptorType( attach ) }; |
| 165 | VkSampler sampler = attach.isSampledView() |
| 166 | ? graph.createSampler( samplerDesc ) |
| 167 | : VkSampler{}; |
| 168 | VkImageLayout layout = attach.isSampledView() |
| 169 | ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL |
| 170 | : VK_IMAGE_LAYOUT_GENERAL; |
| 171 | VkDescriptorImageInfo info{ sampler |
| 172 | , graph.createImageView( attach.view( index ) ) |
| 173 | , layout }; |
| 174 | result.imageInfo.push_back( info ); |
| 175 | return result; |
| 176 | } |
| 177 | |
| 178 | static WriteDescriptorSet getWrite( BufferAttachment const & attach |
| 179 | , uint32_t binding |
no test coverage detected