mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +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_features (features),
|
||||
m_properties (adapter->deviceProperties()),
|
||||
m_perfHints (getPerfHints()),
|
||||
m_memory (new DxvkMemoryAllocator (this)),
|
||||
m_renderPassPool (new DxvkRenderPassPool (vkd)),
|
||||
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) {
|
||||
m_recycledCommandLists.returnObject(cmdList);
|
||||
}
|
||||
|
@ -34,6 +34,13 @@ namespace dxvk {
|
||||
uint32_t maxNumDynamicUniformBuffers = 0;
|
||||
uint32_t maxNumDynamicStorageBuffers = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Device performance hints
|
||||
*/
|
||||
struct DxvkDevicePerfHints {
|
||||
VkBool32 preferFbDepthStencilCopy : 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Device queue
|
||||
@ -168,6 +175,14 @@ namespace dxvk {
|
||||
* \returns Device options
|
||||
*/
|
||||
DxvkDeviceOptions options() const;
|
||||
|
||||
/**
|
||||
* \brief Retrieves performance hints
|
||||
* \returns Device-specific perf hints
|
||||
*/
|
||||
DxvkDevicePerfHints perfHints() const {
|
||||
return m_perfHints;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Creates a command list
|
||||
@ -417,6 +432,8 @@ namespace dxvk {
|
||||
DxvkDeviceFeatures m_features;
|
||||
VkPhysicalDeviceProperties m_properties;
|
||||
|
||||
DxvkDevicePerfHints m_perfHints;
|
||||
|
||||
Rc<DxvkMemoryAllocator> m_memory;
|
||||
Rc<DxvkRenderPassPool> m_renderPassPool;
|
||||
Rc<DxvkPipelineManager> m_pipelineManager;
|
||||
@ -441,6 +458,8 @@ namespace dxvk {
|
||||
DxvkRecycler<DxvkDescriptorPool, 16> m_recycledDescriptorPools;
|
||||
|
||||
DxvkSubmissionQueue m_submissionQueue;
|
||||
|
||||
DxvkDevicePerfHints getPerfHints();
|
||||
|
||||
void recycleCommandList(
|
||||
const Rc<DxvkCommandList>& cmdList);
|
||||
|
Loading…
x
Reference in New Issue
Block a user