[Mesa-dev] [PATCH 10/33] intel/blorp: Use isl_get_interleaved_msaa_px_size_sa

Pohjolainen, Topi topi.pohjolainen at gmail.com
Thu Sep 1 07:07:54 UTC 2016


On Wed, Aug 31, 2016 at 02:22:29PM -0700, Jason Ekstrand wrote:
> ---
>  src/intel/blorp/blorp_blit.c | 34 ++++++----------------------------
>  1 file changed, 6 insertions(+), 28 deletions(-)

Patches 1-10:

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

> 
> diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
> index b5d8d2a..05fad8f 100644
> --- a/src/intel/blorp/blorp_blit.c
> +++ b/src/intel/blorp/blorp_blit.c
> @@ -1489,34 +1489,12 @@ blorp_blit(struct blorp_batch *batch,
>         * If it's UMS, then we have no choice but to set up the rendering
>         * pipeline as multisampled.
>         */
> -      switch (params.dst.surf.samples) {
> -      case 2:
> -         params.x0 = ROUND_DOWN_TO(params.x0 * 2, 4);
> -         params.y0 = ROUND_DOWN_TO(params.y0, 4);
> -         params.x1 = ALIGN(params.x1 * 2, 4);
> -         params.y1 = ALIGN(params.y1, 4);
> -         break;
> -      case 4:
> -         params.x0 = ROUND_DOWN_TO(params.x0 * 2, 4);
> -         params.y0 = ROUND_DOWN_TO(params.y0 * 2, 4);
> -         params.x1 = ALIGN(params.x1 * 2, 4);
> -         params.y1 = ALIGN(params.y1 * 2, 4);
> -         break;
> -      case 8:
> -         params.x0 = ROUND_DOWN_TO(params.x0 * 4, 8);
> -         params.y0 = ROUND_DOWN_TO(params.y0 * 2, 4);
> -         params.x1 = ALIGN(params.x1 * 4, 8);
> -         params.y1 = ALIGN(params.y1 * 2, 4);
> -         break;
> -      case 16:
> -         params.x0 = ROUND_DOWN_TO(params.x0 * 4, 8);
> -         params.y0 = ROUND_DOWN_TO(params.y0 * 4, 8);
> -         params.x1 = ALIGN(params.x1 * 4, 8);
> -         params.y1 = ALIGN(params.y1 * 4, 8);
> -         break;
> -      default:
> -         unreachable("Unrecognized sample count in brw_blorp_blit_params ctor");
> -      }
> +      struct isl_extent2d px_size_sa =
> +         isl_get_interleaved_msaa_px_size_sa(params.dst.surf.samples);
> +      params.x0 = ROUND_DOWN_TO(params.x0, 2) * px_size_sa.width;
> +      params.y0 = ROUND_DOWN_TO(params.y0, 2) * px_size_sa.height;
> +      params.x1 = ALIGN(params.x1, 2) * px_size_sa.width;
> +      params.y1 = ALIGN(params.y1, 2) * px_size_sa.height;
>  
>        surf_fake_interleaved_msaa(batch->blorp->isl_dev, &params.dst);
>  
> -- 
> 2.5.0.400.gff86faf
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list