diff options
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 11 | ||||
-rw-r--r-- | src/intel/blorp/blorp_genX_exec.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index f552302aa85..0850473eba3 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1195,9 +1195,10 @@ brw_blorp_build_nir_shader(struct blorp_context *blorp, void *mem_ctx, * representing the four samples that maxe up a pixel. So we need * to multiply our X and Y coordinates each by 2 and then add 1. */ - src_pos = nir_ishl(&b, src_pos, nir_imm_int(&b, 1)); - src_pos = nir_iadd(&b, src_pos, nir_imm_int(&b, 1)); - src_pos = nir_i2f32(&b, src_pos); + assert(key->src_coords_normalized); + src_pos = nir_fadd(&b, + nir_i2f32(&b, src_pos), + nir_imm_float(&b, 0.5f)); color = blorp_nir_tex(&b, &v, key, src_pos); } else { /* Gen7+ hardware doesn't automaticaly blend. */ @@ -1825,7 +1826,9 @@ try_blorp_blit(struct blorp_batch *batch, params->num_samples = params->dst.surf.samples; - if (wm_prog_key->bilinear_filter && batch->blorp->isl_dev->info->gen < 6) { + if ((wm_prog_key->bilinear_filter || + (wm_prog_key->blend && !wm_prog_key->blit_scaled)) && + batch->blorp->isl_dev->info->gen <= 6) { /* Gen4-5 don't support non-normalized texture coordinates */ wm_prog_key->src_coords_normalized = true; params->wm_inputs.src_inv_size[0] = diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index 1d77877db53..91c0756bf35 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -535,7 +535,7 @@ blorp_emit_sampler_state(struct blorp_batch *batch, sampler.VAddressMagFilterRoundingEnable = true; sampler.UAddressMinFilterRoundingEnable = true; sampler.UAddressMagFilterRoundingEnable = true; -#if GEN_GEN >= 6 +#if GEN_GEN > 6 sampler.NonnormalizedCoordinateEnable = true; #endif } |