mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Refactor parent member of the vk::raii classes.
This commit is contained in:
parent
14bfefb209
commit
e725ff31bd
@ -48,8 +48,8 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
<< "physicalDevices:\n";
|
<< "physicalDevices:\n";
|
||||||
for ( size_t j = 0; j < groupProperties[i].physicalDeviceCount; j++ )
|
for ( size_t j = 0; j < groupProperties[i].physicalDeviceCount; j++ )
|
||||||
{
|
{
|
||||||
vk::raii::PhysicalDevice physicalDevice( static_cast<VkPhysicalDevice>( groupProperties[i].physicalDevices[j] ),
|
vk::raii::PhysicalDevice physicalDevice(
|
||||||
instance.getDispatcher() );
|
instance, static_cast<VkPhysicalDevice>( groupProperties[i].physicalDevices[j] ) );
|
||||||
std::cout << "\t\t" << j << " : " << physicalDevice.getProperties().deviceName << "\n";
|
std::cout << "\t\t" << j << " : " << physicalDevice.getProperties().deviceName << "\n";
|
||||||
}
|
}
|
||||||
std::cout << "\t"
|
std::cout << "\t"
|
||||||
@ -58,8 +58,8 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
|
|
||||||
if ( 1 < groupProperties[i].physicalDeviceCount )
|
if ( 1 < groupProperties[i].physicalDeviceCount )
|
||||||
{
|
{
|
||||||
vk::raii::PhysicalDevice physicalDevice( static_cast<VkPhysicalDevice>( groupProperties[i].physicalDevices[0] ),
|
vk::raii::PhysicalDevice physicalDevice(
|
||||||
instance.getDispatcher() );
|
instance, static_cast<VkPhysicalDevice>( groupProperties[i].physicalDevices[0] ) );
|
||||||
|
|
||||||
// get the QueueFamilyProperties of the first PhysicalDevice
|
// get the QueueFamilyProperties of the first PhysicalDevice
|
||||||
std::vector<vk::QueueFamilyProperties> queueFamilyProperties = physicalDevice.getQueueFamilyProperties();
|
std::vector<vk::QueueFamilyProperties> queueFamilyProperties = physicalDevice.getQueueFamilyProperties();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -409,7 +409,7 @@ private:
|
|||||||
std::string generateBitmasks( std::vector<RequireData> const & requireData,
|
std::string generateBitmasks( std::vector<RequireData> const & requireData,
|
||||||
std::set<std::string> & listedBitmasks,
|
std::set<std::string> & listedBitmasks,
|
||||||
std::string const & title ) const;
|
std::string const & title ) const;
|
||||||
std::string generateCallArgumentsEnhanced( std::vector<ParamData> const & params,
|
std::string generateCallArgumentsEnhanced( CommandData const & commandData,
|
||||||
size_t initialSkipCount,
|
size_t initialSkipCount,
|
||||||
bool nonConstPointerAsNullptr,
|
bool nonConstPointerAsNullptr,
|
||||||
std::set<size_t> const & singularParams,
|
std::set<size_t> const & singularParams,
|
||||||
@ -1090,18 +1090,21 @@ private:
|
|||||||
std::map<size_t, size_t> const & vectorParamIndices ) const;
|
std::map<size_t, size_t> const & vectorParamIndices ) const;
|
||||||
std::pair<std::string, std::string>
|
std::pair<std::string, std::string>
|
||||||
generateRAIIHandleConstructors( std::pair<std::string, HandleData> const & handle ) const;
|
generateRAIIHandleConstructors( std::pair<std::string, HandleData> const & handle ) const;
|
||||||
std::string generateRAIIHandleConstructorArgument( ParamData const & param, bool definition, bool singular ) const;
|
std::string generateRAIIHandleConstructorArgument( ParamData const & param,
|
||||||
std::string generateRAIIHandleConstructorArguments( std::pair<std::string, HandleData> const & handle,
|
bool definition,
|
||||||
std::vector<ParamData> const & params,
|
|
||||||
bool singular,
|
bool singular,
|
||||||
bool skipLeadingGrandParent,
|
bool takesOwnership ) const;
|
||||||
bool encounteredArgument ) const;
|
std::string generateRAIIHandleConstructorArguments(
|
||||||
std::string generateRAIIHandleConstructorCallArguments( std::string const & handleType,
|
std::pair<std::string, HandleData> const & handle,
|
||||||
std::vector<ParamData> const & params,
|
std::map<std::string, VulkanHppGenerator::CommandData>::const_iterator constructorIt,
|
||||||
|
bool singular,
|
||||||
|
bool takesOwnership ) const;
|
||||||
|
std::string generateRAIIHandleConstructorCallArguments(
|
||||||
|
std::pair<std::string, HandleData> const & handle,
|
||||||
|
std::map<std::string, VulkanHppGenerator::CommandData>::const_iterator constructorIt,
|
||||||
bool nonConstPointerAsNullptr,
|
bool nonConstPointerAsNullptr,
|
||||||
std::set<size_t> const & singularParams,
|
std::set<size_t> const & singularParams,
|
||||||
bool allocatorIsMemberVariable,
|
bool allocatorIsMemberVariable ) const;
|
||||||
bool skipLeadingGrandParent ) const;
|
|
||||||
std::string generateRAIIHandleConstructorEnumerate( std::pair<std::string, HandleData> const & handle,
|
std::string generateRAIIHandleConstructorEnumerate( std::pair<std::string, HandleData> const & handle,
|
||||||
std::map<std::string, CommandData>::const_iterator constructorIt,
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
||||||
std::vector<ParamData>::const_iterator handleParamIt,
|
std::vector<ParamData>::const_iterator handleParamIt,
|
||||||
@ -1109,10 +1112,10 @@ private:
|
|||||||
std::string const & enter,
|
std::string const & enter,
|
||||||
std::string const & leave ) const;
|
std::string const & leave ) const;
|
||||||
std::string
|
std::string
|
||||||
generateRAIIHandleConstructorInitializationList( std::string const & handleType,
|
generateRAIIHandleConstructorInitializationList( std::pair<std::string, HandleData> const & handle,
|
||||||
std::map<std::string, CommandData>::const_iterator constructorIt,
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
||||||
std::map<std::string, CommandData>::const_iterator destructorIt,
|
std::map<std::string, CommandData>::const_iterator destructorIt,
|
||||||
bool hasSecondLevelCommands ) const;
|
bool takesOwnership ) const;
|
||||||
std::string generateRAIIHandleConstructorResult( std::pair<std::string, HandleData> const & handle,
|
std::string generateRAIIHandleConstructorResult( std::pair<std::string, HandleData> const & handle,
|
||||||
std::map<std::string, CommandData>::const_iterator constructorIt,
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
||||||
std::string const & enter,
|
std::string const & enter,
|
||||||
@ -1136,10 +1139,12 @@ private:
|
|||||||
std::string generateRAIIHandleContext( std::pair<std::string, HandleData> const & handle,
|
std::string generateRAIIHandleContext( std::pair<std::string, HandleData> const & handle,
|
||||||
std::set<std::string> const & specialFunctions ) const;
|
std::set<std::string> const & specialFunctions ) const;
|
||||||
std::pair<std::string, std::string>
|
std::pair<std::string, std::string>
|
||||||
generateRAIIHandleDestructor( std::string const & handleType,
|
generateRAIIHandleDestructor( std::string const & parentType,
|
||||||
|
std::string const & handleType,
|
||||||
std::map<std::string, CommandData>::const_iterator destructorIt,
|
std::map<std::string, CommandData>::const_iterator destructorIt,
|
||||||
std::string const & enter ) const;
|
std::string const & enter ) const;
|
||||||
std::string generateRAIIHandleDestructorCallArguments( std::string const & handleType,
|
std::string generateRAIIHandleDestructorCallArguments( std::string const & parentType,
|
||||||
|
std::string const & handleType,
|
||||||
std::vector<ParamData> const & params ) const;
|
std::vector<ParamData> const & params ) const;
|
||||||
std::tuple<std::string, std::string, std::string, std::string>
|
std::tuple<std::string, std::string, std::string, std::string>
|
||||||
generateRAIIHandleDetails( std::pair<std::string, HandleData> const & handle,
|
generateRAIIHandleDetails( std::pair<std::string, HandleData> const & handle,
|
||||||
@ -1149,7 +1154,6 @@ private:
|
|||||||
std::string generateRAIIHandleSingularConstructorArguments(
|
std::string generateRAIIHandleSingularConstructorArguments(
|
||||||
std::pair<std::string, HandleData> const & handle,
|
std::pair<std::string, HandleData> const & handle,
|
||||||
std::map<std::string, CommandData>::const_iterator constructorIt ) const;
|
std::map<std::string, CommandData>::const_iterator constructorIt ) const;
|
||||||
std::string generateRAIIHandleUpgradeConstructor( std::pair<std::string, HandleData> const & handle ) const;
|
|
||||||
std::string generateRAIIHandleVectorSizeCheck( std::string const & name,
|
std::string generateRAIIHandleVectorSizeCheck( std::string const & name,
|
||||||
CommandData const & commandData,
|
CommandData const & commandData,
|
||||||
size_t initialSkipCount,
|
size_t initialSkipCount,
|
||||||
@ -1188,6 +1192,7 @@ private:
|
|||||||
size_t initialSkipCount,
|
size_t initialSkipCount,
|
||||||
std::map<size_t, std::vector<size_t>> const & countToVectorMap,
|
std::map<size_t, std::vector<size_t>> const & countToVectorMap,
|
||||||
std::set<size_t> const & skippedParams ) const;
|
std::set<size_t> const & skippedParams ) const;
|
||||||
|
std::pair<std::string, std::string> getParentTypeAndName( std::pair<std::string, HandleData> const & handle ) const;
|
||||||
std::string getPlatform( std::string const & title ) const;
|
std::string getPlatform( std::string const & title ) const;
|
||||||
std::pair<std::string, std::string> getPoolTypeAndName( std::string const & type ) const;
|
std::pair<std::string, std::string> getPoolTypeAndName( std::string const & type ) const;
|
||||||
std::string getVectorSize( std::vector<ParamData> const & params,
|
std::string getVectorSize( std::vector<ParamData> const & params,
|
||||||
@ -1292,6 +1297,7 @@ private:
|
|||||||
std::set<std::string> const & handleCommands,
|
std::set<std::string> const & handleCommands,
|
||||||
std::set<std::string> & listedCommands ) const;
|
std::set<std::string> & listedCommands ) const;
|
||||||
void setVulkanLicenseHeader( int line, std::string const & comment );
|
void setVulkanLicenseHeader( int line, std::string const & comment );
|
||||||
|
bool skipLeadingGrandParent( std::pair<std::string, HandleData> const & handle ) const;
|
||||||
std::string toString( TypeCategory category );
|
std::string toString( TypeCategory category );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user