[Mesa-dev] [PATCH 01/13] intel/blorp: Assert on subresource in surface_info_init

Nanley Chery nanleychery at gmail.com
Tue Jun 20 21:15:25 UTC 2017


On Mon, Jun 19, 2017 at 04:05:04PM -0700, Jason Ekstrand wrote:
> General comment:  "Subresource" is not a term that we've historically used
> outside of Vulkan.  Maybe better to just say "intel/blorp: Assert that
> levels and layers are in range"
> 

Looks like I'll have to send out a V2, so I'll update the 3 uses of that
term.

> On Tue, Jun 13, 2017 at 11:41 AM, Nanley Chery <nanleychery at gmail.com>
> wrote:
> 
> > Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> > ---
> >  src/intel/blorp/blorp.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
> > index 9c88658e8a..993b42fa85 100644
> > --- a/src/intel/blorp/blorp.c
> > +++ b/src/intel/blorp/blorp.c
> > @@ -66,6 +66,8 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
> >                              unsigned int level, unsigned int layer,
> >                              enum isl_format format, bool is_render_target)
> >  {
> > +   assert(level < surf->surf->levels);
> > +
> >     info->enabled = true;
> >
> >     if (format == ISL_FORMAT_UNSUPPORTED)
> > @@ -106,6 +108,8 @@ brw_blorp_surface_info_init(struct blorp_context
> > *blorp,
> >     info->view.array_len = MAX2(info->surf.logical_level0_px.depth,
> >                                 info->surf.logical_level0_px.array_len);
> >
> > +   assert(layer < info->view.array_len);
> > +
> >     if (!is_render_target &&
> >         (info->surf.dim == ISL_SURF_DIM_3D ||
> >          info->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)) {
> > --
> > 2.13.1
> >
> > _______________________________________________
> > 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