[Mesa-dev] [PATCH 10/10] radeonsi: add an assertion that only two-dimensional constant references are used
Timothy Arceri
tarceri at itsqueeze.com
Thu Aug 24 11:36:35 UTC 2017
On 24/08/17 21:23, Nicolai Hähnle wrote:
> On 24.08.2017 03:59, Timothy Arceri wrote:
>> On 24/08/17 02:41, Nicolai Hähnle wrote:
>>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>
>>> ---
>>> src/gallium/drivers/radeonsi/si_shader.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/src/gallium/drivers/radeonsi/si_shader.c
>>> b/src/gallium/drivers/radeonsi/si_shader.c
>>> index f02fc9e9ba2..c445c49d2aa 100644
>>> --- a/src/gallium/drivers/radeonsi/si_shader.c
>>> +++ b/src/gallium/drivers/radeonsi/si_shader.c
>>> @@ -1851,6 +1851,7 @@ static LLVMValueRef fetch_constant(
>>> return lp_build_gather_values(&ctx->gallivm, values, 4);
>>> }
>>> + assert(reg->Register.Dimension);
>>> buf = reg->Register.Dimension ? reg->Dimension.Index : 0;
>>
>> Shouldn't you change this to:
>>
>> buf = reg->Dimension.Index;
>>
>> And below this:
>>
>> if (reg->Register.Dimension && reg->Dimension.Indirect) {
>>
>> to
>>
>> if (reg->Dimension.Indirect) {
>
> Yeah, make sense. Any other comments? :)
It seems fine I've skimmed most of it. r-b for patch 3. I was going to
wait for any testing results before going over it too finely.
>
> Cheers,
> Nicolai
>
>
>>
>>> idx = reg->Register.Index * 4 + swizzle;
>>>
>
>
More information about the mesa-dev
mailing list