[Mesa-dev] [PATCH 01/17] intel/isl: Add missing stencil pitch validation
Jason Ekstrand
jason at jlekstrand.net
Fri Jul 21 17:47:34 UTC 2017
On Fri, Jul 21, 2017 at 8:00 AM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/intel/isl/isl.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index 7d1356f0ac..4393088409 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -1316,8 +1316,10 @@ isl_calc_row_pitch(const struct isl_device *dev,
> !pitch_in_range(row_pitch, _3DSTATE_HIER_DEPTH_BUFFER_
> SurfacePitch_bits(dev->info)))
> return false;
>
> - if (surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT)
> - isl_finishme("validate row pitch of stencil surfaces");
> + if ((surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT) &&
> + !pitch_in_range(row_pitch,
> + _3DSTATE_STENCIL_BUFFER_
> SurfacePitch_bits(dev->info)))
> + return false;
>
I think we want this to be
if (surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT) {
if (surf_info->format == ISL_FORMAT_R8_UINT) {
if (!pitch_in_range(row_pitch, _3DSTATE_STENCIL_BUFFER_
SurfacePitch_bits(dev->info)))
return false;
} else {
if (!pitch_in_range(row_pitch, _3DSTATE_DEPTH_BUFFER_
SurfacePitch_bits(dev->info)))
return false;
}
}
I'm not sure how gen4 is even working without doing that.
>
> done:
> *out_row_pitch = row_pitch;
> --
> 2.11.0
>
> _______________________________________________
> 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/20170721/b43eb5a9/attachment-0001.html>
More information about the mesa-dev
mailing list