[Mesa-dev] [PATCH 7/9] intel/blorp: Apply Gen4 coord. normalization after cubemap sizes are adjusted
Jason Ekstrand
jason at jlekstrand.net
Fri Jun 16 22:58:20 UTC 2017
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Fri, Jun 16, 2017 at 2:01 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Otherwise the values used for coordinate normalization use the wrong
> sizes.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Suggested-by: Jason Ekstrand <jason.ekstrand at intel.com>
> ---
> src/intel/blorp/blorp_blit.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
> index e48e5da..317a2f3 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(¶ms->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 &&
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170616/d9f7d2af/attachment.html>
More information about the mesa-dev
mailing list