diff options
author | Dave Airlie <[email protected]> | 2020-03-26 12:32:24 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2020-05-19 10:26:46 +1000 |
commit | 310823eccd81ad2bb89a9ec8b8c177bc8929cefa (patch) | |
tree | e7039598229afc151ebd8d243e5e7edae3637f9c /src/gallium | |
parent | 0dac24790e7386a51f1d513762ef08ca20ed994d (diff) |
gallivm/nir: add sample_mask_in support
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5050>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_nir.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 1 |
3 files changed, 5 insertions, 0 deletions
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; }; |