summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2020-08-13 12:16:00 +0200
committerPaul Lemire <paul.lemire@kdab.com>2020-08-18 07:58:50 +0200
commit6a2c89c0433e1202d21a13c9ebfc1fe22465b8fc (patch)
treed7ece6332132df1d4932a4cc268a231cacdc73bb /src/gui/rhi/qrhi.cpp
parentaf5e8c2e97cef39d0b8d21fe072e24598d48871b (diff)
rhi: sanityCheckGraphicsPipeline handle no vertex attributes
It is a valid use case to have a vertex shader with no vertex attributes. Using gl_VertexID or gl_InstanceID is enough to generate vertex data out of thin air. Change-Id: If7689914624a84723923fd2d7aef355bda592e24 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi.cpp')
-rw-r--r--src/gui/rhi/qrhi.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index 76d6622eda..f2c2ad2284 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -4301,14 +4301,8 @@ bool QRhiImplementation::sanityCheckGraphicsPipeline(QRhiGraphicsPipeline *ps)
qWarning("Empty shader passed to graphics pipeline");
return false;
}
- if (it->type() == QRhiShaderStage::Vertex) {
+ if (it->type() == QRhiShaderStage::Vertex)
hasVertexStage = true;
- const QRhiVertexInputLayout inputLayout = ps->vertexInputLayout();
- if (inputLayout.cbeginAttributes() == inputLayout.cendAttributes()) {
- qWarning("Vertex stage present without any vertex inputs");
- return false;
- }
- }
}
if (!hasVertexStage) {
qWarning("Cannot build a graphics pipeline without a vertex stage");