Commit 191c8f41 authored by Laszlo Agocs's avatar Laszlo Agocs

Add DebugMarkers to feature enum

parent e6bb11ff
......@@ -146,6 +146,7 @@ void Window::customInit()
// Check some features/limits.
qDebug("isFeatureSupported(MultisampleTexture): %d", m_r->isFeatureSupported(QRhi::MultisampleTexture));
qDebug("isFeatureSupported(MultisampleRenderBuffer): %d", m_r->isFeatureSupported(QRhi::MultisampleRenderBuffer));
qDebug("isFeatureSupported(DebugMarkers): %d", m_r->isFeatureSupported(QRhi::DebugMarkers));
qDebug("Min 2D texture width/height: %d", m_r->resourceSizeLimit(QRhi::TextureSizeMin));
qDebug("Max 2D texture width/height: %d", m_r->resourceSizeLimit(QRhi::TextureSizeMax));
}
......
......@@ -365,8 +365,9 @@ public:
virtual void release() = 0;
void releaseAndDestroy();
// May be ignored unless EnableDebugMarkers is set.
// May also be ignored for some objects, depending on the backend.
// Ignored when DebugMarkers are not supported or EnableDebugMarkers is not
// set. May also be ignored for objects other than buffers, renderbuffers, and
// textures, depending on the backend.
QByteArray name() const;
void setName(const QByteArray &name);
......@@ -992,8 +993,7 @@ public:
qint32 vertexOffset = 0,
quint32 firstInstance = 0);
// Ignored when EnableDebugMarkers is not set.
// May be silently ignored with some backends.
// Ignored when DebugMarkers are not supported or EnableDebugMarkers is not set.
void debugMarkBegin(const QByteArray &name);
void debugMarkEnd();
// With some backends debugMarkMsg is only supported inside a pass and is
......@@ -1113,7 +1113,8 @@ public:
enum Feature {
MultisampleTexture = 1,
MultisampleRenderBuffer
MultisampleRenderBuffer,
DebugMarkers
};
enum ResourceSizeLimit {
......
......@@ -261,6 +261,8 @@ bool QRhiD3D11::isFeatureSupported(QRhi::Feature feature) const
Q_FALLTHROUGH();
case QRhi::MultisampleRenderBuffer:
return true;
case QRhi::DebugMarkers:
return annotations != nullptr;
default:
Q_UNREACHABLE();
return false;
......
......@@ -263,6 +263,8 @@ bool QRhiGles2::isFeatureSupported(QRhi::Feature feature) const
return false;
case QRhi::MultisampleRenderBuffer:
return caps.msaaRenderBuffer;
case QRhi::DebugMarkers:
return false;
default:
Q_UNREACHABLE();
return false;
......
......@@ -358,6 +358,8 @@ bool QRhiMetal::isFeatureSupported(QRhi::Feature feature) const
case QRhi::MultisampleTexture:
Q_FALLTHROUGH();
case QRhi::MultisampleRenderBuffer:
Q_FALLTHROUGH();
case QRhi::DebugMarkers:
return true;
default:
Q_UNREACHABLE();
......
......@@ -2661,6 +2661,8 @@ bool QRhiVulkan::isFeatureSupported(QRhi::Feature feature) const
Q_FALLTHROUGH();
case QRhi::MultisampleRenderBuffer:
return true;
case QRhi::DebugMarkers:
return debugMarkersAvailable;
default:
Q_UNREACHABLE();
return false;
......
d3d, vk: timestamp query
prof report api (fed by a cbor stream)
gl: debug: object names
gl: debug: markers (begin, end, msg)
prof: report readback temp buf
multiwindow_threaded should demo pulling out the device and importing to another rhi
mtl: reduce set*
......@@ -46,6 +45,7 @@ multi mip/layer copy? (fewer barriers...)
multi-buffer (region) readback?
depth readback?
copy image depth?
gl: markers and object names via gl_khr_debug
shadertools:
dxc for d3d as an alternative to fxc?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment