Skip to content

Commit fe4c78d

Browse files
Ramesh Viswanathanmeta-codesync[bot]
authored andcommitted
Use designated initializers in vulkan/Device.cpp
Reviewed By: xiendong, corporateshark Differential Revision: D94685849 fbshipit-source-id: 6def921a548ea693f875c8360a44002ec898c296
1 parent f36cfd2 commit fe4c78d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/igl/vulkan/Device.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,14 +891,16 @@ ICapabilities::TextureFormatCapabilities Device::getTextureFormatCapabilitiesInt
891891
}
892892

893893
ShaderVersion Device::getShaderVersionInternal() const {
894-
return {ShaderFamily::SpirV, 1, 5, 0};
894+
return {.family = ShaderFamily::SpirV, .majorVersion = 1, .minorVersion = 5, .extra = 0};
895895
}
896896

897897
BackendVersion Device::getBackendVersionInternal() const {
898898
const uint32_t apiVersion = ctx_->vkPhysicalDeviceProperties2_.properties.apiVersion;
899-
return {BackendFlavor::Vulkan,
900-
static_cast<uint8_t>(VK_API_VERSION_MAJOR(apiVersion)),
901-
static_cast<uint8_t>(VK_API_VERSION_MINOR(apiVersion))};
899+
return {
900+
.flavor = BackendFlavor::Vulkan,
901+
.majorVersion = static_cast<uint8_t>(VK_API_VERSION_MAJOR(apiVersion)),
902+
.minorVersion = static_cast<uint8_t>(VK_API_VERSION_MINOR(apiVersion)),
903+
};
902904
}
903905

904906
Holder<BindGroupTextureHandle> Device::createBindGroupInternal(

0 commit comments

Comments
 (0)