1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxvk] Make device properties accessible from the device

This commit is contained in:
Philip Rebohle 2019-08-13 14:29:19 +02:00
parent 2f15cb7602
commit acf0001fd1
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 15 additions and 7 deletions

View File

@ -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<DxvkFramebuffer> 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);

View File

@ -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;