From 7fcc5aa9c0ab528bc9c6f68a4c457c408b9bbc08 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Thu, 2 Mar 2023 20:04:52 +0800 Subject: [PATCH] nir: add nir_load_barycentric_optimize_amd intrinsic MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Signed-off-by: Qiang Yu Part-of: --- src/compiler/nir/nir_divergence_analysis.c | 1 + src/compiler/nir/nir_intrinsics.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index 639432e..f40b672 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -208,6 +208,7 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr) case nir_intrinsic_load_alpha_reference_amd: case nir_intrinsic_load_ssbo_uniform_block_intel: case nir_intrinsic_load_shared_uniform_block_intel: + case nir_intrinsic_load_barycentric_optimize_amd: is_divergent = false; break; diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index 3c194ad..830b2f4 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -1607,6 +1607,9 @@ intrinsic("export_amd", [0], indices=[BASE, WRITE_MASK, FLAGS]) # Alpha test reference value system_value("alpha_reference_amd", 1) +# Whether to enable barycentric optimization +system_value("barycentric_optimize_amd", dest_comp=1, bit_sizes=[1]) + # V3D-specific instrinc for tile buffer color reads. # # The hardware requires that we read the samples and components of a pixel -- 2.7.4