From beb7d660561b424c58d5527ff3edaee100d07a8b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 28 Jan 2021 20:25:55 -0500 Subject: [PATCH] panfrost: Add sample positions sysval For Midgard. On Bifrost, the hardware pushes this directly to FAU. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/util/pan_ir.h | 1 + src/panfrost/util/pan_sysval.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/panfrost/util/pan_ir.h b/src/panfrost/util/pan_ir.h index c5132754299..afcb2ed6bf8 100644 --- a/src/panfrost/util/pan_ir.h +++ b/src/panfrost/util/pan_ir.h @@ -53,6 +53,7 @@ enum { PAN_SYSVAL_LOCAL_GROUP_SIZE = 8, PAN_SYSVAL_WORK_DIM = 9, PAN_SYSVAL_IMAGE_SIZE = 10, + PAN_SYSVAL_SAMPLE_POSITIONS = 11, }; #define PAN_TXS_SYSVAL_ID(texidx, dim, is_array) \ diff --git a/src/panfrost/util/pan_sysval.c b/src/panfrost/util/pan_sysval.c index a80c5ab3f8a..996041dc2ad 100644 --- a/src/panfrost/util/pan_sysval.c +++ b/src/panfrost/util/pan_sysval.c @@ -75,6 +75,8 @@ panfrost_nir_sysval_for_intrinsic(nir_intrinsic_instr *instr) return PAN_SYSVAL_LOCAL_GROUP_SIZE; case nir_intrinsic_load_work_dim: return PAN_SYSVAL_WORK_DIM; + case nir_intrinsic_load_sample_positions_pan: + return PAN_SYSVAL_SAMPLE_POSITIONS; case nir_intrinsic_load_ssbo_address: case nir_intrinsic_get_ssbo_size: return panfrost_sysval_for_ssbo(instr);