2
0

OpenXRVkInstance.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <OpenXRVk/OpenXRVkInstance.h>
  9. #include <OpenXRVk/OpenXRVkUtils.h>
  10. #include <Atom/RHI.Reflect/Vulkan/XRVkDescriptors.h>
  11. #include <AzCore/Casting/numeric_cast.h>
  12. #ifdef AZ_PLATFORM_ANDROID
  13. #include <AzCore/Android/AndroidEnv.h>
  14. #endif
  15. namespace OpenXRVk
  16. {
  17. XR::Ptr<Instance> Instance::Create()
  18. {
  19. return aznew Instance;
  20. }
  21. XR::StringList Instance::GetInstanceExtensionNames(const char* layerName /*= nullptr*/) const
  22. {
  23. XR::StringList extensionNames;
  24. AZ::u32 extPropertyCount = 0;
  25. XrResult result = xrEnumerateInstanceExtensionProperties(layerName, 0, &extPropertyCount, nullptr);
  26. if (IsError(result) || extPropertyCount == 0)
  27. {
  28. return extensionNames;
  29. }
  30. AZStd::vector<XrExtensionProperties> extProperties;
  31. extProperties.resize(extPropertyCount);
  32. for (XrExtensionProperties& extension : extProperties)
  33. {
  34. extension.type = XR_TYPE_EXTENSION_PROPERTIES;
  35. }
  36. result = xrEnumerateInstanceExtensionProperties(layerName, aznumeric_cast<AZ::u32>(extProperties.size()), &extPropertyCount, extProperties.data());
  37. if (IsError(result))
  38. {
  39. return extensionNames;
  40. }
  41. extensionNames.reserve(extensionNames.size() + extProperties.size());
  42. for (uint32_t extPropertyIndex = 0; extPropertyIndex < extPropertyCount; extPropertyIndex++)
  43. {
  44. extensionNames.emplace_back(extProperties[extPropertyIndex].extensionName);
  45. }
  46. return extensionNames;
  47. }
  48. XR::StringList Instance::GetInstanceLayerNames() const
  49. {
  50. XR::StringList layerNames;
  51. AZ::u32 layerPropertyCount = 0;
  52. XrResult result = xrEnumerateApiLayerProperties(0, &layerPropertyCount, nullptr);
  53. if (IsError(result) || layerPropertyCount == 0)
  54. {
  55. return layerNames;
  56. }
  57. AZStd::vector<XrApiLayerProperties> layerProperties(layerPropertyCount);
  58. for (XrApiLayerProperties& layer : layerProperties)
  59. {
  60. layer.type = XR_TYPE_API_LAYER_PROPERTIES;
  61. }
  62. result = xrEnumerateApiLayerProperties(aznumeric_cast<AZ::u32>(layerProperties.size()), &layerPropertyCount, layerProperties.data());
  63. if (IsError(result))
  64. {
  65. return layerNames;
  66. }
  67. layerNames.reserve(layerNames.size() + layerProperties.size());
  68. for (uint32_t layerPropertyIndex = 0; layerPropertyIndex < layerPropertyCount; ++layerPropertyIndex)
  69. {
  70. layerNames.emplace_back(layerProperties[layerPropertyIndex].layerName);
  71. }
  72. return layerNames;
  73. }
  74. AZ::RHI::ResultCode Instance::InitInstanceInternal(AZ::RHI::ValidationMode validationMode)
  75. {
  76. #ifdef AZ_PLATFORM_ANDROID
  77. // Initialize the loader for Android platform
  78. {
  79. AZ::Android::AndroidEnv* androidEnv = AZ::Android::AndroidEnv::Get();
  80. AZ_Assert(androidEnv != nullptr, "Invalid android enviroment");
  81. PFN_xrInitializeLoaderKHR initializeLoader = nullptr;
  82. XrResult resultLoader = xrGetInstanceProcAddr(
  83. XR_NULL_HANDLE, "xrInitializeLoaderKHR",
  84. reinterpret_cast<PFN_xrVoidFunction*>(&initializeLoader));
  85. ASSERT_IF_UNSUCCESSFUL(resultLoader);
  86. XrLoaderInitInfoAndroidKHR loaderInitInfoAndroid;
  87. memset(&loaderInitInfoAndroid, 0, sizeof(loaderInitInfoAndroid));
  88. loaderInitInfoAndroid.type = XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR;
  89. loaderInitInfoAndroid.next = nullptr;
  90. loaderInitInfoAndroid.applicationVM = androidEnv->GetActivityJavaVM();
  91. loaderInitInfoAndroid.applicationContext = androidEnv->GetActivityRef();
  92. initializeLoader(reinterpret_cast<const XrLoaderInitInfoBaseHeaderKHR*>(&loaderInitInfoAndroid));
  93. }
  94. #endif
  95. XR::RawStringList optionalLayers;
  96. XR::RawStringList optionalExtensions = { XR_KHR_VULKAN_ENABLE_EXTENSION_NAME };
  97. XR::StringList instanceLayerNames = GetInstanceLayerNames();
  98. XR::RawStringList supportedLayers = FilterList(optionalLayers, instanceLayerNames);
  99. m_requiredLayers.insert(m_requiredLayers.end(), supportedLayers.begin(), supportedLayers.end());
  100. XR::StringList instanceExtensions = GetInstanceExtensionNames();
  101. XR::RawStringList supportedExtensions = FilterList(optionalExtensions, instanceExtensions);
  102. m_requiredExtensions.insert(m_requiredExtensions.end(), supportedExtensions.begin(), supportedExtensions.end());
  103. if (validationMode == AZ::RHI::ValidationMode::Enabled)
  104. {
  105. AZ_Printf("OpenXRVk", "Available Extensions: (%i)\n", instanceExtensions.size());
  106. for (const AZStd::string& extension : instanceExtensions)
  107. {
  108. AZ_Printf("OpenXRVk", "Name=%s\n", extension.c_str());
  109. }
  110. AZ_Printf("OpenXRVk", "Available Layers: (%i)\n", instanceLayerNames.size());
  111. for (const AZStd::string& layerName : instanceLayerNames)
  112. {
  113. AZ_Printf("OpenXRVk", "Name=%s \n", layerName.c_str());
  114. }
  115. }
  116. AZ_Assert(m_xrInstance == XR_NULL_HANDLE, "XR Instance is already initialized");
  117. XrInstanceCreateInfo createInfo{ XR_TYPE_INSTANCE_CREATE_INFO };
  118. createInfo.next = nullptr;
  119. createInfo.enabledExtensionCount = aznumeric_cast<AZ::u32>(supportedExtensions.size());
  120. createInfo.enabledExtensionNames = supportedExtensions.data();
  121. createInfo.enabledApiLayerCount = aznumeric_cast<AZ::u32>(supportedLayers.size());
  122. createInfo.enabledApiLayerNames = supportedLayers.data();
  123. azstrncpy(createInfo.applicationInfo.applicationName, XR_MAX_APPLICATION_NAME_SIZE, "O3deApp", 4);
  124. createInfo.applicationInfo.apiVersion = XR_CURRENT_API_VERSION;
  125. //Create XR instance
  126. XrResult result = xrCreateInstance(&createInfo, &m_xrInstance);
  127. if(IsError(result))
  128. {
  129. AZ_Warning("OpenXRVk", false, "Failed to create XR instance");
  130. return AZ::RHI::ResultCode::Fail;
  131. }
  132. if (validationMode == AZ::RHI::ValidationMode::Enabled)
  133. {
  134. XrInstanceProperties instanceProperties{ XR_TYPE_INSTANCE_PROPERTIES };
  135. result = xrGetInstanceProperties(m_xrInstance, &instanceProperties);
  136. if (IsSuccess(result))
  137. {
  138. AZStd::string verStr = AZStd::string::format("%d.%d.%d",
  139. XR_VERSION_MAJOR(instanceProperties.runtimeVersion),
  140. XR_VERSION_MINOR(instanceProperties.runtimeVersion),
  141. XR_VERSION_PATCH(instanceProperties.runtimeVersion));
  142. AZ_Printf("OpenXRVk", "Instance RuntimeName=%s RuntimeVersion=%s\n", instanceProperties.runtimeName, verStr.c_str());
  143. }
  144. }
  145. AZ_Assert(m_xrInstance != XR_NULL_HANDLE, "XR Isntance is Null");
  146. AZ_Assert(m_xrSystemId == XR_NULL_SYSTEM_ID, "XR System id already initialized");
  147. //TODO::Add support for handheld display
  148. m_formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
  149. //TODO::Add support for other view configuration types
  150. m_viewConfigType = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;
  151. //TODO::Add support for other environment blend types
  152. m_environmentBlendMode = XR_ENVIRONMENT_BLEND_MODE_OPAQUE;
  153. XrSystemGetInfo systemInfo{ XR_TYPE_SYSTEM_GET_INFO };
  154. systemInfo.formFactor = m_formFactor;
  155. result = xrGetSystem(m_xrInstance, &systemInfo, &m_xrSystemId);
  156. if (IsError(result))
  157. {
  158. AZ_Warning("OpenXRVk", false, "Failed to get XR System id");
  159. return AZ::RHI::ResultCode::Fail;
  160. }
  161. // Query the runtime Vulkan API version requirements
  162. XrGraphicsRequirementsVulkan2KHR graphicsRequirements{ XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR };
  163. PFN_xrGetVulkanGraphicsRequirementsKHR pfnGetVulkanGraphicsRequirementsKHR = nullptr;
  164. result = xrGetInstanceProcAddr(m_xrInstance, "xrGetVulkanGraphicsRequirementsKHR",
  165. reinterpret_cast<PFN_xrVoidFunction*>(&pfnGetVulkanGraphicsRequirementsKHR));
  166. WARN_IF_UNSUCCESSFUL(result);
  167. XrGraphicsRequirementsVulkanKHR legacyRequirements{ XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR };
  168. result = pfnGetVulkanGraphicsRequirementsKHR(m_xrInstance, m_xrSystemId, &legacyRequirements);
  169. WARN_IF_UNSUCCESSFUL(result);
  170. graphicsRequirements.maxApiVersionSupported = legacyRequirements.maxApiVersionSupported;
  171. graphicsRequirements.minApiVersionSupported = legacyRequirements.minApiVersionSupported;
  172. if (validationMode == AZ::RHI::ValidationMode::Enabled)
  173. {
  174. AZ_Printf("OpenXRVk", "graphicsRequirements.maxApiVersionSupported %d.%d.%d\n",
  175. XR_VERSION_MAJOR(graphicsRequirements.maxApiVersionSupported),
  176. XR_VERSION_MINOR(graphicsRequirements.maxApiVersionSupported),
  177. XR_VERSION_PATCH(graphicsRequirements.maxApiVersionSupported));
  178. AZ_Printf("OpenXRVk", "graphicsRequirements.minApiVersionSupported %d.%d.%d\n",
  179. XR_VERSION_MAJOR(graphicsRequirements.minApiVersionSupported),
  180. XR_VERSION_MINOR(graphicsRequirements.minApiVersionSupported),
  181. XR_VERSION_PATCH(graphicsRequirements.minApiVersionSupported));
  182. AZ_Printf("OpenXRVk", "Using system %d for form factor %s\n", m_xrSystemId, to_string(m_formFactor));
  183. LogViewConfigurations();
  184. }
  185. return AZ::RHI::ResultCode::Success;
  186. }
  187. void Instance::LogViewConfigurations()
  188. {
  189. AZ::u32 viewConfigTypeCount = 0;
  190. XrResult result = xrEnumerateViewConfigurations(m_xrInstance, m_xrSystemId, 0, &viewConfigTypeCount, nullptr);
  191. RETURN_IF_UNSUCCESSFUL(result);
  192. AZStd::vector<XrViewConfigurationType> viewConfigTypes(viewConfigTypeCount);
  193. result = xrEnumerateViewConfigurations(m_xrInstance, m_xrSystemId, viewConfigTypeCount, &viewConfigTypeCount, viewConfigTypes.data());
  194. RETURN_IF_UNSUCCESSFUL(result);
  195. AZ_Warning("OpenXRVk", aznumeric_cast<AZ::u32>(viewConfigTypes.size()) == viewConfigTypeCount, "Size Mismatch");
  196. AZ_Printf("OpenXRVk", "Available View Configuration Types: (%d)\n", viewConfigTypeCount);
  197. for (XrViewConfigurationType viewConfigType : viewConfigTypes)
  198. {
  199. AZ_Printf("OpenXRVk", "View Configuration Type: %s %s\n", to_string(viewConfigType),
  200. viewConfigType == m_viewConfigType ? "(Selected)" : "");
  201. XrViewConfigurationProperties viewConfigProperties{ XR_TYPE_VIEW_CONFIGURATION_PROPERTIES };
  202. result = xrGetViewConfigurationProperties(m_xrInstance, m_xrSystemId, viewConfigType, &viewConfigProperties);
  203. RETURN_IF_UNSUCCESSFUL(result);
  204. AZ_Printf("OpenXRVk", "View configuration FovMutable=%s\n", viewConfigProperties.fovMutable == XR_TRUE ? "True" : "False");
  205. AZ::u32 viewCount = 0;
  206. result = xrEnumerateViewConfigurationViews(m_xrInstance, m_xrSystemId, viewConfigType, 0, &viewCount, nullptr);
  207. RETURN_IF_UNSUCCESSFUL(result);
  208. if (viewCount > 0)
  209. {
  210. AZStd::vector<XrViewConfigurationView> views(viewCount);
  211. for (XrViewConfigurationView& view : views)
  212. {
  213. view.type = XR_TYPE_VIEW_CONFIGURATION_VIEW;
  214. }
  215. result = xrEnumerateViewConfigurationViews(m_xrInstance, m_xrSystemId, viewConfigType, viewCount, &viewCount, views.data());
  216. RETURN_IF_UNSUCCESSFUL(result);
  217. for (uint32_t i = 0; i < views.size(); i++)
  218. {
  219. const XrViewConfigurationView& view = views[i];
  220. AZ_Printf(
  221. "OpenXRVk", "View [%d]: Recommended Width=%d Height=%d SampleCount=%d\n", i, view.recommendedImageRectWidth,
  222. view.recommendedImageRectHeight, view.recommendedSwapchainSampleCount);
  223. AZ_Printf(
  224. "OpenXRVk", "View [%d]: Maximum Width=%d Height=%d SampleCount=%d\n", i, view.maxImageRectWidth,
  225. view.maxImageRectHeight, view.maxSwapchainSampleCount);
  226. }
  227. }
  228. else
  229. {
  230. AZ_Printf("OpenXRVk", "Empty view configuration type\n");
  231. }
  232. LogEnvironmentBlendMode(viewConfigType);
  233. }
  234. }
  235. void Instance::LogEnvironmentBlendMode(XrViewConfigurationType type)
  236. {
  237. AZ::u32 count = 0;
  238. XrResult result = xrEnumerateEnvironmentBlendModes(m_xrInstance, m_xrSystemId, type, 0, &count, nullptr);
  239. AZ_Warning("OpenXRVk", count > 0, "BlendModes not supported");
  240. RETURN_IF_UNSUCCESSFUL(result);
  241. AZ_Printf("OpenXRVk", "Available Environment Blend Mode count : (%d)\n", count);
  242. AZStd::vector<XrEnvironmentBlendMode> blendModes(count);
  243. result = xrEnumerateEnvironmentBlendModes(m_xrInstance, m_xrSystemId, type, count, &count, blendModes.data());
  244. RETURN_IF_UNSUCCESSFUL(result);
  245. [[maybe_unused]] bool blendModeFound = false;
  246. for (XrEnvironmentBlendMode mode : blendModes)
  247. {
  248. const bool blendModeMatch = (mode == m_environmentBlendMode);
  249. AZ_Printf("OpenXRVk", "Environment Blend Mode (%s) : %s\n", to_string(mode), blendModeMatch ? "(Selected)" : "");
  250. blendModeFound |= blendModeMatch;
  251. }
  252. }
  253. AZ::RHI::ResultCode Instance::InitNativeInstance(AZ::RHI::XRInstanceDescriptor* instanceDescriptor)
  254. {
  255. m_functionLoader = AZ::Vulkan::FunctionLoader::Create();
  256. if (!m_functionLoader->Init() ||
  257. !m_functionLoader->LoadProcAddresses(&m_context, VK_NULL_HANDLE, VK_NULL_HANDLE, VK_NULL_HANDLE))
  258. {
  259. m_functionLoader.reset();
  260. AZ_Error("OpenXRVk", false, "Could not initialize function loader.");
  261. return AZ::RHI::ResultCode::Fail;
  262. }
  263. AZ::Vulkan::XRInstanceDescriptor* xrInstanceDescriptor = static_cast<AZ::Vulkan::XRInstanceDescriptor*>(instanceDescriptor);
  264. XrVulkanInstanceCreateInfoKHR createInfo{ XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR };
  265. createInfo.systemId = m_xrSystemId;
  266. createInfo.pfnGetInstanceProcAddr = m_context.GetInstanceProcAddr;
  267. createInfo.vulkanCreateInfo = xrInstanceDescriptor->m_inputData.m_createInfo;
  268. createInfo.vulkanAllocator = nullptr;
  269. PFN_xrGetVulkanInstanceExtensionsKHR pfnGetVulkanInstanceExtensionsKHR = nullptr;
  270. XrResult result = xrGetInstanceProcAddr(m_xrInstance, "xrGetVulkanInstanceExtensionsKHR", reinterpret_cast<PFN_xrVoidFunction*>(&pfnGetVulkanInstanceExtensionsKHR));
  271. ASSERT_IF_UNSUCCESSFUL(result);
  272. AZ::u32 extensionNamesSize = 0;
  273. result = pfnGetVulkanInstanceExtensionsKHR(m_xrInstance, m_xrSystemId, 0, &extensionNamesSize, nullptr);
  274. ASSERT_IF_UNSUCCESSFUL(result);
  275. AZStd::vector<char> extensionNames(extensionNamesSize);
  276. result = pfnGetVulkanInstanceExtensionsKHR(m_xrInstance, m_xrSystemId, extensionNamesSize, &extensionNamesSize, &extensionNames[0]);
  277. ASSERT_IF_UNSUCCESSFUL(result);
  278. AZStd::vector<const char*> extensions = ParseExtensionString(&extensionNames[0]);
  279. for (uint32_t i = 0; i < createInfo.vulkanCreateInfo->enabledExtensionCount; ++i)
  280. {
  281. extensions.push_back(createInfo.vulkanCreateInfo->ppEnabledExtensionNames[i]);
  282. }
  283. VkInstanceCreateInfo instInfo{ VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO };
  284. memcpy(&instInfo, createInfo.vulkanCreateInfo, sizeof(instInfo));
  285. instInfo.enabledExtensionCount = aznumeric_cast<AZ::u32>(extensions.size());
  286. instInfo.ppEnabledExtensionNames = extensions.empty() ? nullptr : extensions.data();
  287. auto pfnCreateInstance = (PFN_vkCreateInstance)createInfo.pfnGetInstanceProcAddr(nullptr, "vkCreateInstance");
  288. VkResult vkResult = pfnCreateInstance(&instInfo, nullptr, &m_xrVkInstance);
  289. if (vkResult != VK_SUCCESS)
  290. {
  291. ShutdownInternal();
  292. AZ_Error("OpenXRVk", false, "Failed to create the instance.");
  293. return AZ::RHI::ResultCode::Fail;
  294. }
  295. // Now that we have created the instance, load the function pointers for it.
  296. if (!m_functionLoader->LoadProcAddresses(&m_context, m_xrVkInstance, VK_NULL_HANDLE, VK_NULL_HANDLE))
  297. {
  298. ShutdownInternal();
  299. AZ_Warning("OpenXRVk", false, "Failed to initialize function loader for the instance.");
  300. return AZ::RHI::ResultCode::Fail;
  301. }
  302. //Populate the instance descriptor with the correct VkInstance
  303. xrInstanceDescriptor->m_outputData.m_xrVkInstance = m_xrVkInstance;
  304. //Get the list of Physical devices
  305. m_supportedXRDevices = PhysicalDevice::EnumerateDeviceList(m_xrSystemId, m_xrInstance, m_xrVkInstance);
  306. if (m_supportedXRDevices.empty())
  307. {
  308. ShutdownInternal();
  309. AZ_Error("OpenXRVk", false, "No physical devices found.");
  310. return AZ::RHI::ResultCode::Fail;
  311. }
  312. //Just use the first device at the moment.
  313. m_physicalDeviceActiveIndex = 0;
  314. return AZ::RHI::ResultCode::Success;
  315. }
  316. void Instance::ShutdownInternal()
  317. {
  318. if (m_xrVkInstance != VK_NULL_HANDLE)
  319. {
  320. m_supportedXRDevices.clear();
  321. m_context.DestroyInstance(m_xrVkInstance, nullptr);
  322. m_xrVkInstance = VK_NULL_HANDLE;
  323. }
  324. if (m_functionLoader)
  325. {
  326. m_functionLoader->Shutdown();
  327. }
  328. m_functionLoader = nullptr;
  329. }
  330. AZ::RHI::ResultCode Instance::GetXRPhysicalDevice(AZ::RHI::XRPhysicalDeviceDescriptor* physicalDeviceDescriptor, int32_t index)
  331. {
  332. AZ::Vulkan::XRPhysicalDeviceDescriptor* xrPhysicalDeviceDescriptor = static_cast<AZ::Vulkan::XRPhysicalDeviceDescriptor*>(physicalDeviceDescriptor);
  333. if (xrPhysicalDeviceDescriptor && (index < m_supportedXRDevices.size()))
  334. {
  335. xrPhysicalDeviceDescriptor->m_outputData.m_xrVkPhysicalDevice = m_supportedXRDevices[index];
  336. return AZ::RHI::ResultCode::Success;
  337. }
  338. return AZ::RHI::ResultCode::Fail;
  339. }
  340. AZ::u32 Instance::GetNumPhysicalDevices() const
  341. {
  342. return aznumeric_cast<AZ::u32>(m_supportedXRDevices.size());
  343. }
  344. VkPhysicalDevice Instance::GetActivePhysicalDevice() const
  345. {
  346. AZ_Assert(m_physicalDeviceActiveIndex < m_supportedXRDevices.size(), "Index out of range");
  347. return m_supportedXRDevices[m_physicalDeviceActiveIndex];
  348. }
  349. XrInstance Instance::GetXRInstance() const
  350. {
  351. return m_xrInstance;
  352. }
  353. XrSystemId Instance::GetXRSystemId() const
  354. {
  355. return m_xrSystemId;
  356. }
  357. VkInstance Instance::GetNativeInstance() const
  358. {
  359. return m_xrVkInstance;
  360. }
  361. GladVulkanContext& Instance::GetContext()
  362. {
  363. return m_context;
  364. }
  365. AZ::Vulkan::FunctionLoader& Instance::GetFunctionLoader()
  366. {
  367. return *m_functionLoader;
  368. }
  369. XrEnvironmentBlendMode Instance::GetEnvironmentBlendMode() const
  370. {
  371. return m_environmentBlendMode;
  372. }
  373. XrViewConfigurationType Instance::GetViewConfigType() const
  374. {
  375. return m_viewConfigType;
  376. }
  377. }