File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ namespace Anvil
218218 true /* in_is_helper_struct */ );
219219 }
220220
221- std::unique_ptr<StructChain<StructType> > create_chain () const
221+ std::unique_ptr<StructChain<StructType> > create_chain (const void *pNextLast = nullptr ) const
222222 {
223223 size_t helper_data_start_offset = 0 ;
224224 size_t n_bytes_used = 0 ;
@@ -260,12 +260,11 @@ namespace Anvil
260260 current_struct_data_size);
261261
262262 /* Adjust pNext pointer to point at the next struct, if defined. */
263+ VkStructHeader *header_ptr = reinterpret_cast <VkStructHeader *>(&result_ptr->raw_data .at (n_bytes_used));
263264 if (n_struct != (n_structs - 1 ) )
264- {
265- VkStructHeader* header_ptr = reinterpret_cast <VkStructHeader*>(&result_ptr->raw_data .at (n_bytes_used) );
266-
267265 header_ptr->next_ptr = &result_ptr->raw_data .at (0 ) + n_bytes_used + current_struct_data_size;
268- }
266+ else
267+ header_ptr->next_ptr = pNextLast;
269268
270269 n_bytes_used += current_struct_data_size;
271270 }
Original file line number Diff line number Diff line change @@ -305,9 +305,7 @@ void Anvil::BaseDevice::create_device(const std::vector<const char*>& in_extensi
305305
306306 /* Issue the request */
307307 {
308- auto struct_chain_ptr = struct_chainer.create_chain ();
309-
310- struct_chain_ptr->get_root_struct ()->pNext = m_create_info_ptr->pNext ;
308+ auto struct_chain_ptr = struct_chainer.create_chain (m_create_info_ptr->pNext );
311309
312310 result = Anvil::Vulkan::vkCreateDevice (physical_device_ptrs.at (0 )->get_physical_device (),
313311 struct_chain_ptr->get_root_struct (),
You can’t perform that action at this time.
0 commit comments