[Mesa-dev] [PATCH] i965/blorp: Fix clear rectangle alignment in fast color clear

Anuj Phogat anuj.phogat at gmail.com
Wed Jul 10 10:36:05 PDT 2013


On Tue, Jul 9, 2013 at 6:44 PM, Chris Forbes <chrisf at ijw.co.nz> wrote:
> I think it would be clearer to do this, rather than 4 parallel checks:
Yes. It's clearer. I will make this change.
>
>   if (intel->gen >= 7) {
>     /* rationale ... */
>     x0 = ROUND_DOWN_TO(x0, 2 * x_align);
>     y0 = ROUND_DOWN_TO(y0, 2 * y_align);
>     x1 = ALIGN(x1, 2 * x_align);
>     y1 = ALIGN(y1, 2 * y_align);
>   } else {
>     x0 = ROUND_DOWN_TO(x0, x_align);
>     y0 = ROUND_DOWN_TO(y0, y_align);
>     x1 = ALIGN(x1, x_align);
>     y1 = ALIGN(y1, y_align);
>   }
>
> Could you adjust the comment to include the rationale for this being
> done on all Gen7+?
> As it is, someone is going to stumble across this as a HSW GT3
> workaround, see > Gen6, and going to have to hunting in the git
> history to convince themselves it's not bogus.
>
> This patch will also need to be fixed up for Ken's intel_context ->
> brw_context change, which has landed now.
I'll update my patch.
>
> -- Chris


More information about the mesa-dev mailing list