[Bug 96971] invariant qualifier is not valid for shader inputs
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Jul 18 08:46:59 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=96971
Bug ID: 96971
Summary: invariant qualifier is not valid for shader inputs
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/i965
Assignee: idr at freedesktop.org
Reporter: qiankun.miao at intel.com
QA Contact: intel-3d-bugs at lists.freedesktop.org
Currently, only glsl es in mesa follows this rule. But glsl compiler should
also follow this rule. The behavior is specified in GLSLangSpec.4.40, in
Section 4.8.1 The Invariant Qualifier: "Only variables output from a shader can
be candidates for invariance." and "As only outputs need be declared with
invariant, an output from one shader stage will still match an input of a
subsequent stage without the input being declared as invariant."
So, input without invariant declaration should be valid.
But following code snippet in mesa/src/compiler/glsl/link_varyings.cpp makes it
an error:
if (!prog->IsES && input->data.invariant != output->data.invariant) {
linker_error(prog,
"%s shader output `%s' %s invariant qualifier, "
"but %s shader input %s invariant qualifier\n",
_mesa_shader_stage_to_string(producer_stage),
output->name,
(output->data.invariant) ? "has" : "lacks",
_mesa_shader_stage_to_string(consumer_stage),
(input->data.invariant) ? "has" : "lacks");
return;
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160718/88ff805b/attachment.html>
More information about the intel-3d-bugs
mailing list