Fix issue with unused parameter "vectorAllocator" in some functions. (#277)

+ update to version 94.
This commit is contained in:
Andreas Süßenbach 2018-11-29 13:21:24 +01:00 committed by GitHub
parent 95fde2253b
commit a616542f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 622 additions and 268 deletions

@ -1 +1 @@
Subproject commit c2ef675dac74b77abdaf4c3de679381f2e3b276c Subproject commit c24b84795f6c083df107d8639286881a23894679

View File

@ -3334,7 +3334,7 @@ void VulkanHppGenerator::writeFunctionBodyEnhanced(std::ostream & os, std::strin
{ {
std::string const stringTemplate = std::string const stringTemplate =
R"(${i} static_assert( sizeof( ${type} ) <= sizeof( Unique${type} ), "${type} is greater than Unique${type}!" ); R"(${i} static_assert( sizeof( ${type} ) <= sizeof( Unique${type} ), "${type} is greater than Unique${type}!" );
${i} std::vector<Unique${type}, Allocator> ${typeVariable}s; ${i} std::vector<Unique${type}, Allocator> ${typeVariable}s${allocator};
${i} ${typeVariable}s.reserve( ${vectorSize} ); ${i} ${typeVariable}s.reserve( ${vectorSize} );
${i} ${type}* buffer = reinterpret_cast<${type}*>( reinterpret_cast<char*>( ${typeVariable}s.data() ) + ${vectorSize} * ( sizeof( Unique${type} ) - sizeof( ${type} ) ) ); ${i} ${type}* buffer = reinterpret_cast<${type}*>( reinterpret_cast<char*>( ${typeVariable}s.data() ) + ${vectorSize} * ( sizeof( Unique${type} ) - sizeof( ${type} ) ) );
${i} Result result = static_cast<Result>(d.vk${command}( m_device, ${arguments}, reinterpret_cast<Vk${type}*>( buffer ) ) ); ${i} Result result = static_cast<Result>(d.vk${command}( m_device, ${arguments}, reinterpret_cast<Vk${type}*>( buffer ) ) );
@ -3362,6 +3362,7 @@ ${i} return createResultValue( result, ${typeVariable}s, VULKAN_HPP_NAMESPACE_S
{ "i", indentation }, { "i", indentation },
{ "type", type }, { "type", type },
{ "typeVariable", typeVariable }, { "typeVariable", typeVariable },
{ "allocator", withAllocator ? "( vectorAllocator )" : "" },
{ "vectorSize", isCreateFunction ? "createInfos.size()" : "allocateInfo." + typeVariable + "Count" }, { "vectorSize", isCreateFunction ? "createInfos.size()" : "allocateInfo." + typeVariable + "Count" },
{ "command", startUpperCase(commandData.fullName) }, { "command", startUpperCase(commandData.fullName) },
{ "arguments", arguments.str() }, { "arguments", arguments.str() },

View File

@ -47,6 +47,9 @@ int main(int /*argc*/, char * /*argv[]*/)
std::vector<uint8_t> data; std::vector<uint8_t> data;
device->getAccelerationStructureHandleNV<uint8_t>({}, data, vk::DispatchLoaderDynamic()); device->getAccelerationStructureHandleNV<uint8_t>({}, data, vk::DispatchLoaderDynamic());
std::vector<vk::UniqueCommandBuffer>::allocator_type vectorAllocator;
std::vector<vk::UniqueCommandBuffer> commandBuffers = device->allocateCommandBuffersUnique({}, vectorAllocator, vk::DispatchLoaderStatic());
} }
catch (vk::SystemError err) catch (vk::SystemError err)
{ {

File diff suppressed because it is too large Load Diff