https://bugs.freedesktop.org/show_bug.cgi?id=96410
--- Comment #3 from gregory.hain...@gmail.com ---
I confirm that Nvidia doesn't check anything. And we don't even check it for
mono program. I don't know if it was intended or a bug.
Potentially we could do something like the code below (I guess I need to add
back the unit 0 case). Code is faster because it only check sampler rather than
all uniforms.
An alternative will be to check only SamplersValidated for all stages. It will
be equivalent to mono program.
I guess the ideal solution would be to support GL_KHR_no_error to disable all
those crazy validations.
--------------------------8<--------------------------
for (unsigned idx = 0; idx < ARRAY_SIZE(pipeline->CurrentProgram); idx++) {
if (!shProg[idx])
continue;
shader = shProg[idx]->_LinkedShaders[idx];
if (!shader || !shader->Program)
continue;
mask = shader->Program->SamplersUsed;
while (mask) {
const int s = u_bit_scan(&mask);
GLuint unit = shader->SamplerUnits[s];
GLuint tgt = shader->SamplerTargets[s];
if (TexturesUsed[unit] & ~(1 << tgt)) {
pipeline->InfoLog =
ralloc_asprintf(pipeline,
"Program %d: "
"Texture unit %d is accessed with 2 different types",
shProg[idx]->Name, unit);
return false;
}
TexturesUsed[unit] |= (1 << tgt);
}
active_samplers += shader->num_samplers;
}
--------------------------->8-------------------------
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev