From 9cb52d470a0db8b733bb344168308a6e7766626d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 4 Apr 2018 21:14:13 +0200 Subject: [PATCH] radeonsi/nir: fix crash in test involving the sample mask Reviewed-by: Timothy Arceri --- 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 b4970f14e34..4eff4f57b97 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -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) -- 2.30.2