vcoda / magma

Abstraction layer over Khronos Vulkan API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot build

thargy opened this issue ¡ comments

Sorry, I'm returning to C++ after >20 years 👴🏻, so this is probably my own dumb fault 🤷🏻‍♂️ .

I've included your repo as a submodule to my own project, which is being built with gcc-11 (c++20) on Ubuntu. I'm trying to get my CMake build system, build magma, as necessary. However, navigating to the root of your repo and running make gives:

g++ -std=c++14 -m64 -msse4 -pthread -ftemplate-depth=2048 -fconstexpr-depth=2048 -Wno-enum-compare -Werror -DVK_USE_PLATFORM_XCB_KHR -I/include -Icore -O0 -g -D_DEBUG -c allocator/deviceMemoryAllocator.cpp -o allocator/deviceMemoryAllocator.o
In file included from allocator/../objects/object.h:66,
                 from allocator/../objects/nondispatchable.h:19,
                 from allocator/../objects/deviceMemory.h:19,
                 from allocator/deviceMemoryAllocator.cpp:21:
allocator/../objects/object.inl: In member function ‘void magma::Object<Type>::setObjectName(const char*)’:
allocator/../objects/object.inl:50:41: error: no match for call to ‘(magma::DeviceExtension<VkResult (*)(VkDevice_T*, const VkDebugUtilsObjectNameInfoEXT*)>) (std::__shared_ptr_access<magma::Device, __gnu_cxx::_S_atomic, false, false>::element_type&, VkDebugUtilsObjectNameInfoEXT*)’
   50 |             vkSetDebugUtilsObjectNameEXT(MAGMA_HANDLE(device), &info);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/object.inl:50:41: note: candidate: ‘VkResult (*)(VkDevice_T*, const VkDebugUtilsObjectNameInfoEXT*)’ (conversion)
allocator/../objects/object.inl:50:41: note:   candidate expects 3 arguments, 3 provided
allocator/../objects/object.inl: In member function ‘void magma::Object<Type>::setObjectTag(uint64_t, std::size_t, const void*)’:
allocator/../objects/object.inl:93:40: error: no match for call to ‘(magma::DeviceExtension<VkResult (*)(VkDevice_T*, const VkDebugUtilsObjectTagInfoEXT*)>) (std::__shared_ptr_access<magma::Device, __gnu_cxx::_S_atomic, false, false>::element_type&, VkDebugUtilsObjectTagInfoEXT*)’
   93 |             vkSetDebugUtilsObjectTagEXT(MAGMA_HANDLE(device), &info);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/object.inl:93:40: note: candidate: ‘VkResult (*)(VkDevice_T*, const VkDebugUtilsObjectTagInfoEXT*)’ (conversion)
allocator/../objects/object.inl:93:40: note:   candidate expects 3 arguments, 3 provided
In file included from core/pch.h:48,
                 from allocator/deviceMemoryAllocator.cpp:18:
allocator/../objects/commandBuffer.h: At global scope:
core/core.h:100:25: error: expected identifier before ‘*’ token
  100 | #define MAGMA_HANDLE(p) *(this->p)
      |                         ^
allocator/../objects/../misc/deviceExtension.h:43:45: note: in expansion of macro ‘MAGMA_HANDLE’
   43 |     magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
      |                                             ^~~~~~~~~~~~
allocator/../objects/commandBuffer.h:524:9: note: in expansion of macro ‘MAGMA_OPTIONAL_DEVICE_EXTENSION’
  524 |         MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core/core.h:100:26: error: expected ‘,’ or ‘...’ before ‘(’ token
  100 | #define MAGMA_HANDLE(p) *(this->p)
      |                          ^
allocator/../objects/../misc/deviceExtension.h:43:45: note: in expansion of macro ‘MAGMA_HANDLE’
   43 |     magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
      |                                             ^~~~~~~~~~~~
allocator/../objects/commandBuffer.h:524:9: note: in expansion of macro ‘MAGMA_OPTIONAL_DEVICE_EXTENSION’
  524 |         MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from allocator/../objects/commandBuffer.h:565,
                 from allocator/deviceMemoryAllocator.cpp:25:
allocator/../objects/commandBuffer.inl: In member function ‘void magma::CommandBuffer::drawMultiIndexed(const std::vector<VkMultiDrawIndexedInfoEXT>&, uint32_t, const std::vector<int>&) const’:
allocator/../objects/commandBuffer.inl:184:29: error: no matching function for call to ‘magma::CommandBuffer::vkCmdDrawMultiIndexedEXT(VkCommandBuffer_T* const&, uint32_t, const VkMultiDrawIndexedInfoEXT*, int, int, uint32_t&, const int*) const’
  184 |     vkCmdDrawMultiIndexedEXT(handle, MAGMA_COUNT(indexInfo), indexInfo.data(), 1, 0, stride, vertexOffsets.data());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from allocator/../objects/object.h:22,
                 from allocator/../objects/nondispatchable.h:19,
                 from allocator/../objects/deviceMemory.h:19,
                 from allocator/deviceMemoryAllocator.cpp:21:
allocator/../objects/commandBuffer.h:524:41: note: candidate: ‘magma::DeviceExtension<void (*)(VkCommandBuffer_T*, unsigned int, const VkMultiDrawIndexedInfoEXT*, unsigned int, unsigned int, unsigned int, const int*)> magma::CommandBuffer::vkCmdDrawMultiIndexedEXT(int*)’
  524 |         MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro ‘MAGMA_OPTIONAL_DEVICE_EXTENSION’
   43 |     magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
      |                                        ^~~~
allocator/../objects/commandBuffer.h:524:41: note:   candidate expects 1 argument, 7 provided
  524 |         MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro ‘MAGMA_OPTIONAL_DEVICE_EXTENSION’
   43 |     magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
      |                                        ^~~~
In file included from allocator/../objects/commandBuffer.h:565,
                 from allocator/deviceMemoryAllocator.cpp:25:
allocator/../objects/commandBuffer.inl: In member function ‘void magma::CommandBuffer::drawMultiIndexedInstanced(const std::vector<VkMultiDrawIndexedInfoEXT>&, uint32_t, uint32_t, uint32_t, const std::vector<int>&) const’:
allocator/../objects/commandBuffer.inl:190:29: error: no matching function for call to ‘magma::CommandBuffer::vkCmdDrawMultiIndexedEXT(VkCommandBuffer_T* const&, uint32_t, const VkMultiDrawIndexedInfoEXT*, uint32_t&, uint32_t&, uint32_t&, const int*) const’
  190 |     vkCmdDrawMultiIndexedEXT(handle, MAGMA_COUNT(indexInfo), indexInfo.data(), instanceCount, firstInstance, stride, vertexOffsets.data());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from allocator/../objects/object.h:22,
                 from allocator/../objects/nondispatchable.h:19,
                 from allocator/../objects/deviceMemory.h:19,
                 from allocator/deviceMemoryAllocator.cpp:21:
allocator/../objects/commandBuffer.h:524:41: note: candidate: ‘magma::DeviceExtension<void (*)(VkCommandBuffer_T*, unsigned int, const VkMultiDrawIndexedInfoEXT*, unsigned int, unsigned int, unsigned int, const int*)> magma::CommandBuffer::vkCmdDrawMultiIndexedEXT(int*)’
  524 |         MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro ‘MAGMA_OPTIONAL_DEVICE_EXTENSION’
   43 |     magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
      |                                        ^~~~
allocator/../objects/commandBuffer.h:524:41: note:   candidate expects 1 argument, 7 provided
  524 |         MAGMA_OPTIONAL_DEVICE_EXTENSION(vkCmdDrawMultiIndexedEXT);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
allocator/../objects/../misc/deviceExtension.h:43:40: note: in definition of macro ‘MAGMA_OPTIONAL_DEVICE_EXTENSION’
   43 |     magma::DeviceExtension<PFN_##func> func(MAGMA_HANDLE(device), MAGMA_STRINGIZE(func))
      |                                        ^~~~
make: *** [Makefile:144: allocator/deviceMemoryAllocator.o] Error 1

Have moved on, closing for lack of response.