On 09/13/2017 11:16 AM, Gert Wollny wrote:
Am Dienstag, den 12.09.2017, 23:44 +0200 schrieb Glenn Kennard:

Vadim is correct, the fix is to extend the check in the if case above
to also exclude TGSI_FILE_SYSTEM_VALUE, and keep the assert in place.
ie:

   if (pshader->indirect_files & ~((1 << TGSI_FILE_CONSTANT) | (1 <<
TGSI_FILE_SAMPLER) | (1 << TGSI_FILE_SYSTEM_VALUE))) {

Good, I'll update the patch accordingly. I guess the else path below is
then only some fall-back for non-debug builds make all GPRs available
as one big array to keep the code somehow valid for execution, right?

Yes, it's just a safe fall-back in case if we don't have proper array info for some reason. It makes the backend assume that all GPRs can be accessed indirectly.


I think I'd like to add a comment for that when I submit the new patch,
because it is kind of irritating to see an assert and then a code path
that seems to properly handle the case that would make the assert fail.

if (pshader->num_arrays) {
    ...
} else {
    sh->add_gpr_array(0, pshader->bc.ngpr, 0x0F);
}

Best,
Gert



_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to