[Mesa-dev] [PATCH] r600/sb: remove superfluos assert
Vadim Girlin
vadimgirlin at gmail.com
Wed Sep 13 14:44:30 UTC 2017
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
>
>
More information about the mesa-dev
mailing list