diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-01-25 11:06:59 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-02-14 17:48:09 +0100 |
commit | 5476973325288e399f99af004e53184e41892282 (patch) | |
tree | ae85c0e05498cb7c902e92a7494b185fdb21ce0e /src | |
parent | bea15cdfa4de5fb9fa1614ef93b54df7139423fa (diff) |
rhi: gl: Skip the vertex-fragment interface check with more stages
Once tessellation and geometry shader support is added, the check
makes no sense when there are additional stages between the vertex
and fragment stages.
Pick-to: 6.5 6.4
Change-Id: I3d3c0a5b338f5fe191c072a13a8699924f7a6a1b
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 77448a8b21..99089d057c 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -5683,9 +5683,12 @@ bool QGles2GraphicsPipeline::create() }; QShaderDescription desc[LastIdx]; QShader::SeparateToCombinedImageSamplerMappingList samplerMappingList[LastIdx]; + bool vertexFragmentOnly = true; for (const QRhiShaderStage &shaderStage : std::as_const(m_shaderStages)) { if (isGraphicsStage(shaderStage)) { const int idx = descIdxForStage(shaderStage); + if (idx != VtxIdx && idx != FragIdx) + vertexFragmentOnly = false; QShader shader = shaderStage.shader(); QShaderVersion shaderVersion; desc[idx] = shader.description(); @@ -5717,7 +5720,8 @@ bool QGles2GraphicsPipeline::create() for (const QShaderDescription::InOutVariable &inVar : desc[VtxIdx].inputVariables()) rhiD->f->glBindAttribLocation(program, GLuint(inVar.location), inVar.name); - rhiD->sanityCheckVertexFragmentInterface(desc[VtxIdx], desc[FragIdx]); + if (vertexFragmentOnly) + rhiD->sanityCheckVertexFragmentInterface(desc[VtxIdx], desc[FragIdx]); if (!rhiD->linkProgram(program)) return false; |