On Tue, Jul 19, 2016 at 5:56 AM, Iago Toral <[email protected]> wrote:
> On Mon, 2016-07-18 at 22:16 -0700, Jason Ekstrand wrote: > > The intel_get_image_dims helper function handles some image dimension > > sanitization for us for things such as 1-D array textures. We should > > probably be using it here. > > > > Signed-off-by: Jason Ekstrand <[email protected]> > > Cc: "12.0 11.2 11.1" <[email protected]> > > --- > > src/mesa/drivers/dri/i965/intel_tex.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/src/mesa/drivers/dri/i965/intel_tex.c > > b/src/mesa/drivers/dri/i965/intel_tex.c > > index 8c32fe3..d3e24f4 100644 > > --- a/src/mesa/drivers/dri/i965/intel_tex.c > > +++ b/src/mesa/drivers/dri/i965/intel_tex.c > > @@ -141,6 +141,8 @@ intel_alloc_texture_storage(struct gl_context > > *ctx, > > !intel_miptree_match_image(intel_texobj->mt, first_image) || > > intel_texobj->mt->last_level != levels - 1) { > > intel_miptree_release(&intel_texobj->mt); > > + > > + intel_get_image_dims(first_image, &width, &height, &depth); > > I don't think we want this. This code calls intel_miptree_create below, > which then calls miptree_create and that > calls intel_miptree_create_layout, which has this code: > > if (target == GL_TEXTURE_1D_ARRAY) { > /* ... */ > assert(height0 == 1 || depth0 == 1); > if (height0 > 1) { > depth0 = height0; > height0 = 1; > } > } > Are you serious????? "1-D Arrays are hard. Let's just make sure it works in either case". Wow... I'll see if I can't delete that code. --Jason > > Maybe we should just call the function in intel_miptree_create_layout > instead? > > Iago > > > intel_texobj->mt = intel_miptree_create(brw, texobj->Target, > > first_image- > > >TexFormat, > > 0, levels - 1, >
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
