Просмотр исходного кода

VK: Disabled allocator callbacks.

Бранимир Караџић 1 год назад
Родитель
Сommit
9547e79867
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      src/renderer_vk.cpp

+ 9 - 2
src/renderer_vk.cpp

@@ -1325,8 +1325,15 @@ VK_IMPORT
 
 				if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
 				{
-					s_allocationCb.pUserData = g_allocator;
-					m_allocatorCb = &s_allocationCb;
+					// Validation layer is calling freeFunction with pointers that are not allocated
+					// via callback mechanism. This is bug in validation layer, and work-around
+					// would be to keep track of allocated pointers and ignore those that are not
+					// allocated by it.
+					//
+					// Anyhow we just let VK take care of memory, until they fix the issue...
+					//
+					// s_allocationCb.pUserData = g_allocator;
+					// m_allocatorCb = &s_allocationCb;
 					BX_UNUSED(s_allocationCb);
 				}