[Mesa-dev] [PATCH 5/5] radeonsi/nir: fix crash in test involving the sample mask

Nicolai Hähnle nhaehnle at gmail.com
Fri Apr 20 07:20:29 UTC 2018


On 12.04.2018 02:13, Timothy Arceri wrote:
> On 11/04/18 20:56, Nicolai Hähnle wrote:
>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> Please add to the commit message which test was fixed by this. Otherwise 
> the change seems reasonable:

I agree, unfortunately I couldn't find my notes on this anymore...

Cheers,
Nicolai

> 
> Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
> 
>>
>> ---
>>   src/gallium/drivers/radeonsi/si_shader.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
>> b/src/gallium/drivers/radeonsi/si_shader.c
>> index 8c62d53e2ad..3e224b083e6 100644
>> --- a/src/gallium/drivers/radeonsi/si_shader.c
>> +++ b/src/gallium/drivers/radeonsi/si_shader.c
>> @@ -2009,21 +2009,22 @@ static LLVMValueRef 
>> load_sample_position(struct ac_shader_abi *abi, LLVMValueRef
>>           buffer_load_const(ctx, resource, offset1),
>>           LLVMConstReal(ctx->f32, 0),
>>           LLVMConstReal(ctx->f32, 0)
>>       };
>>       return lp_build_gather_values(&ctx->gallivm, pos, 4);
>>   }
>>   static LLVMValueRef load_sample_mask_in(struct ac_shader_abi *abi)
>>   {
>> -    return abi->sample_coverage;
>> +    struct si_shader_context *ctx = si_shader_context_from_abi(abi);
>> +    return ac_to_integer(&ctx->ac, abi->sample_coverage);
>>   }
>>   static LLVMValueRef si_load_tess_coord(struct ac_shader_abi *abi)
>>   {
>>       struct si_shader_context *ctx = si_shader_context_from_abi(abi);
>>       struct lp_build_context *bld = &ctx->bld_base.base;
>>       LLVMValueRef coord[4] = {
>>           LLVMGetParam(ctx->main_fn, ctx->param_tes_u),
>>           LLVMGetParam(ctx->main_fn, ctx->param_tes_v),
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list