aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2017-06-01 15:41:52 -0700
committerIan Romanick <[email protected]>2017-06-20 11:07:02 -0700
commit990f2be139cefe2b978848558372fe025c91ce99 (patch)
tree3d28ce3192dbe722bdd4169768fac36afbf59fdd /src/intel
parentb2dd61196e7fb4ee9b4d1be7b83c2bdfa7f12021 (diff)
intel/blorp: Apply Gen4 coord. normalization after cubemap sizes are adjusted
Otherwise the values used for coordinate normalization use the wrong sizes. Signed-off-by: Ian Romanick <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/blorp/blorp_blit.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index e48e5da1fa8..317a2f35a12 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -1822,6 +1822,17 @@ 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) {
+ /* Gen4-5 don't support non-normalized texture coordinates */
+ wm_prog_key->src_coords_normalized = true;
+ params->wm_inputs.src_inv_size[0] =
+ 1.0f / minify(params->src.surf.logical_level0_px.width,
+ params->src.view.base_level);
+ params->wm_inputs.src_inv_size[1] =
+ 1.0f / minify(params->src.surf.logical_level0_px.height,
+ params->src.view.base_level);
+ }
+
if (params->src.tile_x_sa || params->src.tile_y_sa) {
assert(wm_prog_key->need_src_offset);
surf_get_intratile_offset_px(&params->src,
@@ -2085,15 +2096,6 @@ blorp_blit(struct blorp_batch *batch,
if (filter == GL_LINEAR &&
params.src.surf.samples <= 1 && params.dst.surf.samples <= 1) {
wm_prog_key.bilinear_filter = true;
-
- if (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] =
- 1.0f / minify(params.src.surf.logical_level0_px.width, src_level);
- params.wm_inputs.src_inv_size[1] =
- 1.0f / minify(params.src.surf.logical_level0_px.height, src_level);
- }
}
if ((params.src.surf.usage & ISL_SURF_USAGE_DEPTH_BIT) == 0 &&