diff options
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 3 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 5e25e838f8f..879d32f50d6 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3080,6 +3080,9 @@ static LLVMValueRef barycentric_at_sample(struct ac_nir_context *ctx, unsigned mode, LLVMValueRef sample_id) { + if (ctx->abi->interp_at_sample_force_center) + return barycentric_center(ctx, mode); + LLVMValueRef halfval = LLVMConstReal(ctx->ac.f32, 0.5f); /* fetch sample ID */ diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index d6db398ee7b..3033ae0cac2 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -203,6 +203,7 @@ struct ac_shader_abi { /* Whether to clamp the shadow reference value to [0,1]on GFX8. Radeonsi currently * uses it due to promoting D16 to D32, but radv needs it off. */ bool clamp_shadow_reference; + bool interp_at_sample_force_center; /* Whether to workaround GFX9 ignoring the stride for the buffer size if IDXEN=0 * and LLVM optimizes an indexed load with constant index to IDXEN=0. */ |