ac/nir: remove misleading condition
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 28 Aug 2017 22:36:57 +0000 (01:36 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 28 Aug 2017 22:36:57 +0000 (01:36 +0300)
location is never set to INTERP_SAMPLE, and Nicolai comments:
"... that part is misleading. location refers to the base location, not
the final location of the sample, and it can never be INTERP_SAMPLE."

Suggested-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
src/amd/common/ac_nir_to_llvm.c

index 823ea428927bf886cc715edae59bfd12b7295be4..9c808ef68594c60ed66558e5cc597b4a05a3d72e 100644 (file)
@@ -3856,7 +3856,7 @@ static LLVMValueRef visit_interp(struct nir_to_llvm_context *ctx,
        interp_param = lookup_interp_param(ctx, instr->variables[0]->var->data.interpolation, location);
        attr_number = LLVMConstInt(ctx->i32, input_index, false);
 
-       if (location == INTERP_SAMPLE || location == INTERP_CENTER) {
+       if (location == INTERP_CENTER) {
                LLVMValueRef ij_out[2];
                LLVMValueRef ddxy_out = emit_ddxy_interp(ctx->nir, interp_param);