From: Arcady Goldmints-Orlov Date: Sat, 25 Jul 2020 20:20:02 +0000 (-0500) Subject: broadcom/compiler: support nir_intrinsic_load_sample_id X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd87cdad18138d36c6d9aca61270ffd2ddfd81e5;p=mesa.git broadcom/compiler: support nir_intrinsic_load_sample_id This adds support for the intrinsic as well as the vir_SAMPID instruction that corresponds to it in vir. Reviewed-by: Iago Toral Quiroga Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 31160314730..e48db957bfb 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -2392,6 +2392,10 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr) vir_uniform(c, QUNIFORM_FB_LAYERS, 0)); break; + case nir_intrinsic_load_sample_id: + ntq_store_dest(c, &instr->dest, 0, vir_SAMPID(c)); + break; + default: fprintf(stderr, "Unknown intrinsic: "); nir_print_instr(&instr->instr, stderr); diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index 0026dd2fef3..9061a095bd0 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -1084,6 +1084,7 @@ VIR_A_ALU0(YCD) VIR_A_ALU0(MSF) VIR_A_ALU0(REVF) VIR_A_ALU0(BARRIERID) +VIR_A_ALU0(SAMPID) VIR_A_NODST_1(VPMSETUP) VIR_A_NODST_0(VPMWT) VIR_A_ALU2(FCMP)