1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00

[dxvk] Add DxvkOptions struct for quick lookup of features/limits

This commit is contained in:
Philip Rebohle 2018-06-22 00:29:44 +02:00
parent d35ff6ca13
commit aa3e718fcd
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 23 additions and 1 deletions

View File

@ -40,6 +40,14 @@ namespace dxvk {
} }
DxvkDeviceOptions DxvkDevice::options() const {
DxvkDeviceOptions options;
options.maxNumDynamicUniformBuffers = m_properties.limits.maxDescriptorSetUniformBuffersDynamic;
options.maxNumDynamicStorageBuffers = m_properties.limits.maxDescriptorSetStorageBuffersDynamic;
return options;
}
Rc<DxvkPhysicalBuffer> DxvkDevice::allocPhysicalBuffer( Rc<DxvkPhysicalBuffer> DxvkDevice::allocPhysicalBuffer(
const DxvkBufferCreateInfo& createInfo, const DxvkBufferCreateInfo& createInfo,
VkMemoryPropertyFlags memoryType) { VkMemoryPropertyFlags memoryType) {

View File

@ -27,6 +27,14 @@ namespace dxvk {
class DxvkInstance; class DxvkInstance;
/**
* \brief Device options
*/
struct DxvkDeviceOptions {
uint32_t maxNumDynamicUniformBuffers = 0;
uint32_t maxNumDynamicStorageBuffers = 0;
};
/** /**
* \brief Device queue * \brief Device queue
* *
@ -115,6 +123,12 @@ namespace dxvk {
return m_features; return m_features;
} }
/**
* \brief Retrieves device options
* \returns Device options
*/
DxvkDeviceOptions options() const;
/** /**
* \brief Allocates a physical buffer * \brief Allocates a physical buffer
* *