mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Implement device- and driver-specific performance hints
These are meant to be read by the DxvkContext in order to choose a fast path for certasin operations.
This commit is contained in:
parent
e611dff45e
commit
a08f9d0897
@ -16,6 +16,7 @@ namespace dxvk {
|
|||||||
m_extensions (extensions),
|
m_extensions (extensions),
|
||||||
m_features (features),
|
m_features (features),
|
||||||
m_properties (adapter->deviceProperties()),
|
m_properties (adapter->deviceProperties()),
|
||||||
|
m_perfHints (getPerfHints()),
|
||||||
m_memory (new DxvkMemoryAllocator (this)),
|
m_memory (new DxvkMemoryAllocator (this)),
|
||||||
m_renderPassPool (new DxvkRenderPassPool (vkd)),
|
m_renderPassPool (new DxvkRenderPassPool (vkd)),
|
||||||
m_pipelineManager (new DxvkPipelineManager (this, m_renderPassPool.ptr())),
|
m_pipelineManager (new DxvkPipelineManager (this, m_renderPassPool.ptr())),
|
||||||
@ -258,6 +259,14 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DxvkDevicePerfHints DxvkDevice::getPerfHints() {
|
||||||
|
DxvkDevicePerfHints hints;
|
||||||
|
hints.preferFbDepthStencilCopy = m_extensions.extShaderStencilExport
|
||||||
|
&& m_adapter->matchesDriver(DxvkGpuVendor::Amd, VK_DRIVER_ID_MESA_RADV_KHR, 0, 0);
|
||||||
|
return hints;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DxvkDevice::recycleCommandList(const Rc<DxvkCommandList>& cmdList) {
|
void DxvkDevice::recycleCommandList(const Rc<DxvkCommandList>& cmdList) {
|
||||||
m_recycledCommandLists.returnObject(cmdList);
|
m_recycledCommandLists.returnObject(cmdList);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,13 @@ namespace dxvk {
|
|||||||
uint32_t maxNumDynamicUniformBuffers = 0;
|
uint32_t maxNumDynamicUniformBuffers = 0;
|
||||||
uint32_t maxNumDynamicStorageBuffers = 0;
|
uint32_t maxNumDynamicStorageBuffers = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Device performance hints
|
||||||
|
*/
|
||||||
|
struct DxvkDevicePerfHints {
|
||||||
|
VkBool32 preferFbDepthStencilCopy : 1;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Device queue
|
* \brief Device queue
|
||||||
@ -168,6 +175,14 @@ namespace dxvk {
|
|||||||
* \returns Device options
|
* \returns Device options
|
||||||
*/
|
*/
|
||||||
DxvkDeviceOptions options() const;
|
DxvkDeviceOptions options() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Retrieves performance hints
|
||||||
|
* \returns Device-specific perf hints
|
||||||
|
*/
|
||||||
|
DxvkDevicePerfHints perfHints() const {
|
||||||
|
return m_perfHints;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a command list
|
* \brief Creates a command list
|
||||||
@ -417,6 +432,8 @@ namespace dxvk {
|
|||||||
DxvkDeviceFeatures m_features;
|
DxvkDeviceFeatures m_features;
|
||||||
VkPhysicalDeviceProperties m_properties;
|
VkPhysicalDeviceProperties m_properties;
|
||||||
|
|
||||||
|
DxvkDevicePerfHints m_perfHints;
|
||||||
|
|
||||||
Rc<DxvkMemoryAllocator> m_memory;
|
Rc<DxvkMemoryAllocator> m_memory;
|
||||||
Rc<DxvkRenderPassPool> m_renderPassPool;
|
Rc<DxvkRenderPassPool> m_renderPassPool;
|
||||||
Rc<DxvkPipelineManager> m_pipelineManager;
|
Rc<DxvkPipelineManager> m_pipelineManager;
|
||||||
@ -441,6 +458,8 @@ namespace dxvk {
|
|||||||
DxvkRecycler<DxvkDescriptorPool, 16> m_recycledDescriptorPools;
|
DxvkRecycler<DxvkDescriptorPool, 16> m_recycledDescriptorPools;
|
||||||
|
|
||||||
DxvkSubmissionQueue m_submissionQueue;
|
DxvkSubmissionQueue m_submissionQueue;
|
||||||
|
|
||||||
|
DxvkDevicePerfHints getPerfHints();
|
||||||
|
|
||||||
void recycleCommandList(
|
void recycleCommandList(
|
||||||
const Rc<DxvkCommandList>& cmdList);
|
const Rc<DxvkCommandList>& cmdList);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user