radeonsi/nir: fix crash in test involving the sample mask
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 4 Apr 2018 19:14:13 +0000 (21:14 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 20 Apr 2018 07:21:50 +0000 (09:21 +0200)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeonsi/si_shader.c

index b4970f14e347abde776cd528b56aacfa3373ed2f..4eff4f57b97d274ded42aaf3078119e646fcab81 100644 (file)
@@ -2016,7 +2016,8 @@ static LLVMValueRef load_sample_position(struct ac_shader_abi *abi, LLVMValueRef
 
 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)