From acf0001fd11d3875e460e8430fadb2815727538c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 13 Aug 2019 14:29:19 +0200 Subject: [PATCH] [dxvk] Make device properties accessible from the device --- src/dxvk/dxvk_device.cpp | 12 ++++++------ src/dxvk/dxvk_device.h | 10 +++++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index 8c6428788..faa6f2a12 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -15,7 +15,7 @@ namespace dxvk { m_vkd (vkd), m_extensions (extensions), m_features (features), - m_properties (adapter->deviceProperties()), + m_properties (adapter->devicePropertiesExt()), m_perfHints (getPerfHints()), m_objects (this), m_submissionQueue (this) { @@ -51,8 +51,8 @@ namespace dxvk { DxvkDeviceOptions DxvkDevice::options() const { DxvkDeviceOptions options; - options.maxNumDynamicUniformBuffers = m_properties.limits.maxDescriptorSetUniformBuffersDynamic; - options.maxNumDynamicStorageBuffers = m_properties.limits.maxDescriptorSetStorageBuffersDynamic; + options.maxNumDynamicUniformBuffers = m_properties.core.properties.limits.maxDescriptorSetUniformBuffersDynamic; + options.maxNumDynamicStorageBuffers = m_properties.core.properties.limits.maxDescriptorSetStorageBuffersDynamic; return options; } @@ -98,9 +98,9 @@ namespace dxvk { Rc DxvkDevice::createFramebuffer( const DxvkRenderTargets& renderTargets) { const DxvkFramebufferSize defaultSize = { - m_properties.limits.maxFramebufferWidth, - m_properties.limits.maxFramebufferHeight, - m_properties.limits.maxFramebufferLayers }; + m_properties.core.properties.limits.maxFramebufferWidth, + m_properties.core.properties.limits.maxFramebufferHeight, + m_properties.core.properties.limits.maxFramebufferLayers }; auto renderPassFormat = DxvkFramebuffer::getRenderPassFormat(renderTargets); auto renderPassObject = m_objects.renderPassPool().getRenderPass(renderPassFormat); diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index 2d45a1b17..58ef3cc98 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -165,6 +165,14 @@ namespace dxvk { return m_features; } + /** + * \brief Device properties + * \returns Device properties + */ + const DxvkDeviceInfo& properties() const { + return m_properties; + } + /** * \brief Queries supported shader stages * \returns Supported shader pipeline stages @@ -431,7 +439,7 @@ namespace dxvk { DxvkDeviceExtensions m_extensions; DxvkDeviceFeatures m_features; - VkPhysicalDeviceProperties m_properties; + DxvkDeviceInfo m_properties; DxvkDevicePerfHints m_perfHints; DxvkObjects m_objects;