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. Change-Id: I3d3c0a5b338f5fe191c072a13a8699924f7a6a1b Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 5476973325288e399f99af004e53184e41892282) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e3ceb846a2
commit
7cf7fe93ef
@ -5500,9 +5500,12 @@ bool QGles2GraphicsPipeline::create()
|
|||||||
};
|
};
|
||||||
QShaderDescription desc[LastIdx];
|
QShaderDescription desc[LastIdx];
|
||||||
QShader::SeparateToCombinedImageSamplerMappingList samplerMappingList[LastIdx];
|
QShader::SeparateToCombinedImageSamplerMappingList samplerMappingList[LastIdx];
|
||||||
|
bool vertexFragmentOnly = true;
|
||||||
for (const QRhiShaderStage &shaderStage : std::as_const(m_shaderStages)) {
|
for (const QRhiShaderStage &shaderStage : std::as_const(m_shaderStages)) {
|
||||||
if (isGraphicsStage(shaderStage)) {
|
if (isGraphicsStage(shaderStage)) {
|
||||||
const int idx = descIdxForStage(shaderStage);
|
const int idx = descIdxForStage(shaderStage);
|
||||||
|
if (idx != VtxIdx && idx != FragIdx)
|
||||||
|
vertexFragmentOnly = false;
|
||||||
QShader shader = shaderStage.shader();
|
QShader shader = shaderStage.shader();
|
||||||
QShaderVersion shaderVersion;
|
QShaderVersion shaderVersion;
|
||||||
desc[idx] = shader.description();
|
desc[idx] = shader.description();
|
||||||
@ -5534,6 +5537,7 @@ bool QGles2GraphicsPipeline::create()
|
|||||||
for (const QShaderDescription::InOutVariable &inVar : desc[VtxIdx].inputVariables())
|
for (const QShaderDescription::InOutVariable &inVar : desc[VtxIdx].inputVariables())
|
||||||
rhiD->f->glBindAttribLocation(program, GLuint(inVar.location), inVar.name);
|
rhiD->f->glBindAttribLocation(program, GLuint(inVar.location), inVar.name);
|
||||||
|
|
||||||
|
if (vertexFragmentOnly)
|
||||||
rhiD->sanityCheckVertexFragmentInterface(desc[VtxIdx], desc[FragIdx]);
|
rhiD->sanityCheckVertexFragmentInterface(desc[VtxIdx], desc[FragIdx]);
|
||||||
|
|
||||||
if (!rhiD->linkProgram(program))
|
if (!rhiD->linkProgram(program))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user