radeonsi/nir: handle key.mono.u.ps.interpolate_at_sample_force_center
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
@@ -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 */
|
||||
|
@@ -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. */
|
||||
|
@@ -1243,6 +1243,9 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
|
||||
ac_to_integer(&ctx->ac,
|
||||
ac_build_gather_values(&ctx->ac, values, 4));
|
||||
}
|
||||
|
||||
ctx->abi.interp_at_sample_force_center =
|
||||
ctx->shader->key.mono.u.ps.interpolate_at_sample_force_center;
|
||||
}
|
||||
|
||||
ctx->abi.inputs = &ctx->inputs[0];
|
||||
|
Reference in New Issue
Block a user