Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error with VK_ENABLE_BETA_EXTENSIONS #1589

Closed
mikes-lunarg opened this issue Jun 12, 2023 · 2 comments · Fixed by #1591 or #1594
Closed

Compile error with VK_ENABLE_BETA_EXTENSIONS #1589

mikes-lunarg opened this issue Jun 12, 2023 · 2 comments · Fixed by #1591 or #1594
Labels

Comments

@mikes-lunarg
Copy link

I'm seeing new compile errors with the 153 headers when including vulkan.hpp with VK_ENABLE_BETA_EXTENSIONS defined:

#define VK_ENABLE_BETA_EXTENSIONS
#include <vulkan/vulkan.hpp>

g++ output:

In file included from Vulkan-Headers/include/vulkan/vulkan.hpp:6794,
                 from hpptest.cpp:2:
Vulkan-Headers/include/vulkan/vulkan_handles.hpp:12039:114: error: ‘StructureChainAllocator’ does not name a type; did you mean ‘StructureChainValidation’?
12039 |            typename B2                                                                                      = StructureChainAllocator,
      |                                                                                                               ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                               StructureChainValidation
Vulkan-Headers/include/vulkan/vulkan_handles.hpp:12040:91: error: type/value mismatch at argument 2 in template parameter list for ‘template<class, class> struct std::is_same’
12040 |               typename std::enable_if<std::is_same<typename B2::value_type, StructureChain>::value, int>::type = 0>
      |                                                                                           ^
Vulkan-Headers/include/vulkan/vulkan_handles.hpp:12040:91: note:   expected a type, got ‘StructureChain’
Vulkan-Headers/include/vulkan/vulkan_handles.hpp:12040:104: error: template argument 1 is invalid
12040 |               typename std::enable_if<std::is_same<typename B2::value_type, StructureChain>::value, int>::type = 0>
      |                                                                                                        ^
Vulkan-Headers/include/vulkan/vulkan_handles.hpp:12040:105: error: ‘<declaration error>’ is not a template [-fpermissive]
12040 |               typename std::enable_if<std::is_same<typename B2::value_type, StructureChain>::value, int>::type = 0>
      |                                                                                                         ^~
Vulkan-Headers/include/vulkan/vulkan_handles.hpp:12043:44: error: ‘StructureChainAllocator’ has not been declared
12043 |                                            StructureChainAllocator &                                            structureChainAllocator,
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~
In file included from Vulkan-Headers/include/vulkan/vulkan.hpp:6796:
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp: In member function ‘typename vk::ResultValueType<std::pair<vk::StructureChain<X, Y, Z ...>, std::vector<unsigned char, Uint8_tAllocator> > >::type vk::Device::getEncodedVideoSessionParametersKHR(const vk::VideoEncodeSessionParametersGetInfoKHR&, const Dispatch&) const’:
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18662:9: error: ‘structureChains’ was not declared in this scope; did you mean ‘StructureChain’?
18662 |         structureChains.resize( dataSize );
      |         ^~~~~~~~~~~~~~~
      |         StructureChain
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18666:59: error: expected primary-expression before ‘void’
18666 |           data[i].pNext = structureChains[i].template get<void>().pNext;
      |                                                           ^~~~
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp: At global scope:
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18686:89: error: type/value mismatch at argument 2 in template parameter list for ‘template<class, class> struct std::is_same’
18686 |             typename std::enable_if<std::is_same<typename B2::value_type, StructureChain>::value, int>::type>
      |                                                                                         ^
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18686:89: note:   expected a type, got ‘StructureChain’
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18686:102: error: template argument 1 is invalid
18686 |             typename std::enable_if<std::is_same<typename B2::value_type, StructureChain>::value, int>::type>
      |                                                                                                      ^
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18686:103: error: ‘<declaration error>’ is not a template [-fpermissive]
18686 |             typename std::enable_if<std::is_same<typename B2::value_type, StructureChain>::value, int>::type>
      |                                                                                                       ^~
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18690:50: error: ‘StructureChainAllocator’ has not been declared
18690 |                                                  StructureChainAllocator &                                            structureChainAllocator,
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp: In member function ‘typename vk::ResultValueType<std::pair<vk::StructureChain<X, Y, Z ...>, std::vector<unsigned char, Uint8_tAllocator> > >::type vk::Device::getEncodedVideoSessionParametersKHR(const vk::VideoEncodeSessionParametersGetInfoKHR&, int&, const Dispatch&) const’:
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18696:81: error: ‘uint8_tAllocator’ was not declared in this scope; did you mean ‘Uint8_tAllocator’?
18696 |       std::piecewise_construct, std::forward_as_tuple(), std::forward_as_tuple( uint8_tAllocator ) );
      |                                                                                 ^~~~~~~~~~~~~~~~
      |                                                                                 Uint8_tAllocator
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18711:9: error: ‘structureChains’ was not declared in this scope; did you mean ‘StructureChain’?
18711 |         structureChains.resize( dataSize );
      |         ^~~~~~~~~~~~~~~
      |         StructureChain
Vulkan-Headers/include/vulkan/vulkan_funcs.hpp:18715:59: error: expected primary-expression before ‘void’
18715 |           data[i].pNext = structureChains[i].template get<void>().pNext;
      |                                                           ^~~~

@mikes-lunarg
Copy link
Author

I am still getting errors with the latest fix, fewer though:

In file included from Vulkan-Hpp/vulkan/vulkan.hpp:6848,
                 from hpptest.cpp:2:
Vulkan-Hpp/vulkan/vulkan_funcs.hpp: In member function ‘typename vk::ResultValueType<std::pair<vk::StructureChain<X, Y, Z ...>, std::vector<unsigned char, Uint8_tAllocator> > >::type vk::Device::getEncodedVideoSessionParametersKHR(const vk::VideoEncodeSessionParametersGetInfoKHR&, const Dispatch&) const’:
Vulkan-Hpp/vulkan/vulkan_funcs.hpp:18663:9: error: ‘structureChains’ was not declared in this scope; did you mean ‘StructureChain’?
18663 |         structureChains.resize( dataSize );
      |         ^~~~~~~~~~~~~~~
      |         StructureChain
Vulkan-Hpp/vulkan/vulkan_funcs.hpp:18667:59: error: expected primary-expression before ‘void’
18667 |           data[i].pNext = structureChains[i].template get<void>().pNext;
      |                                                           ^~~~
Vulkan-Hpp/vulkan/vulkan_funcs.hpp: In member function ‘typename vk::ResultValueType<std::pair<vk::StructureChain<X, Y, Z ...>, std::vector<unsigned char, Uint8_tAllocator> > >::type vk::Device::getEncodedVideoSessionParametersKHR(const vk::VideoEncodeSessionParametersGetInfoKHR&, Uint8_tAllocator&, const Dispatch&) const’:
Vulkan-Hpp/vulkan/vulkan_funcs.hpp:18712:9: error: ‘structureChains’ was not declared in this scope; did you mean ‘StructureChain’?
18712 |         structureChains.resize( dataSize );
      |         ^~~~~~~~~~~~~~~
      |         StructureChain
Vulkan-Hpp/vulkan/vulkan_funcs.hpp:18716:59: error: expected primary-expression before ‘void’
18716 |           data[i].pNext = structureChains[i].template get<void>().pNext;
      |                                                           ^~~~

@asuessenbach
Copy link
Contributor

Thanks for reporting this (ongoing) issue. Will fix it right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment