mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 23:52:20 +01:00
[dxvk] Add context feature flag for debug utils support
This commit is contained in:
parent
8c3d7a1979
commit
b62a8c78b4
@ -63,6 +63,10 @@ namespace dxvk {
|
||||
// Maintenance5 introduced a bounded BindIndexBuffer function
|
||||
if (m_device->features().khrMaintenance5.maintenance5)
|
||||
m_features.set(DxvkContextFeature::IndexBufferRobustness);
|
||||
|
||||
// Add a fast path to query debug utils support
|
||||
if (m_device->isDebugEnabled())
|
||||
m_features.set(DxvkContextFeature::DebugUtils);
|
||||
}
|
||||
|
||||
|
||||
@ -101,6 +105,8 @@ namespace dxvk {
|
||||
m_cmd->trackDescriptorPool(m_descriptorPool, m_descriptorManager);
|
||||
m_descriptorPool = m_descriptorManager->getDescriptorPool();
|
||||
}
|
||||
|
||||
m_renderPassIndex = 0u;
|
||||
}
|
||||
|
||||
|
||||
@ -2481,29 +2487,27 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::beginDebugLabel(VkDebugUtilsLabelEXT* label) {
|
||||
if (m_device->isDebugEnabled())
|
||||
void DxvkContext::beginDebugLabel(VkDebugUtilsLabelEXT *label) {
|
||||
if (m_features.test(DxvkContextFeature::DebugUtils))
|
||||
m_cmd->cmdBeginDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer, *label);
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::endDebugLabel() {
|
||||
if (m_device->isDebugEnabled())
|
||||
if (m_features.test(DxvkContextFeature::DebugUtils))
|
||||
m_cmd->cmdEndDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer);
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::insertDebugLabel(VkDebugUtilsLabelEXT* label) {
|
||||
if (m_device->isDebugEnabled())
|
||||
void DxvkContext::insertDebugLabel(VkDebugUtilsLabelEXT *label) {
|
||||
if (m_features.test(DxvkContextFeature::DebugUtils))
|
||||
m_cmd->cmdInsertDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer, *label);
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::setDebugName(const Rc<DxvkPagedResource>& resource, const char* name) {
|
||||
if (!m_device->isDebugEnabled())
|
||||
return;
|
||||
|
||||
resource->setDebugName(name);
|
||||
if (m_features.test(DxvkContextFeature::DebugUtils))
|
||||
resource->setDebugName(name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1379,6 +1379,7 @@ namespace dxvk {
|
||||
DxvkObjects* m_common;
|
||||
|
||||
uint64_t m_trackingId = 0u;
|
||||
uint32_t m_renderPassIndex = 0u;
|
||||
|
||||
Rc<DxvkCommandList> m_cmd;
|
||||
Rc<DxvkBuffer> m_zeroBuffer;
|
||||
|
@ -66,6 +66,7 @@ namespace dxvk {
|
||||
TrackGraphicsPipeline,
|
||||
VariableMultisampleRate,
|
||||
IndexBufferRobustness,
|
||||
DebugUtils,
|
||||
FeatureCount
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user