From 310823eccd81ad2bb89a9ec8b8c177bc8929cefa Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 26 Mar 2020 12:32:24 +1000 Subject: [PATCH] gallivm/nir: add sample_mask_in support Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 1 + src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 3 +++ src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 1 + 3 files changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index d31d0408374..93234ac37b2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -1386,6 +1386,7 @@ static void visit_intrinsic(struct lp_build_nir_context *bld_base, case nir_intrinsic_load_patch_vertices_in: case nir_intrinsic_load_sample_id: case nir_intrinsic_load_sample_pos: + case nir_intrinsic_load_sample_mask_in: bld_base->sysval_intrin(bld_base, instr, result); break; case nir_intrinsic_load_helper_invocation: diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index d3f34be8603..09ba5293546 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -1386,6 +1386,9 @@ static void emit_sysval_intrin(struct lp_build_nir_context *bld_base, result[i] = lp_build_broadcast_scalar(&bld_base->base, val); } break; + case nir_intrinsic_load_sample_mask_in: + result[0] = bld->system_values.sample_mask_in; + break; } } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index b1b619e34d2..de5cd4187dd 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -185,6 +185,7 @@ struct lp_bld_tgsi_system_values { LLVMValueRef vertices_in; LLVMValueRef sample_id; LLVMValueRef sample_pos; + LLVMValueRef sample_mask_in; }; -- 2.30.2