[Mesa-dev] [PATCH 1/2] common: Correct texture init for meta pbo uploads and downloads.
Kenneth Graunke
kenneth at whitecape.org
Tue Mar 3 22:28:36 PST 2015
On Wednesday, March 04, 2015 02:01:30 AM Emil Velikov wrote:
> On 24 February 2015 at 23:20, Laura Ekstrand <laura at jlekstrand.net> wrote:
> > This moves the line setting immutability for the texture to after
> > _mesa_initialize_texture_object so that the initializer function will not
> > cancel it out. Moreover, because of the ARB_texture_view extension, immutable
> > textures must have NumLayers > 0, or depth will equal (0-1)=0xFFFFFFFF during
> > SURFACE_STATE setup, which triggers assertions.
> >
> > v2: Review from Kenneth Graunke:
> > - Include more explanation in the commit message.
> > - Make texture setup bug fixes into a separate patch.
> > ---
> > src/mesa/drivers/common/meta_tex_subimage.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
> > index 68c8273..2d2b9d8 100644
> > --- a/src/mesa/drivers/common/meta_tex_subimage.c
> > +++ b/src/mesa/drivers/common/meta_tex_subimage.c
> > @@ -100,8 +100,11 @@ create_texture_for_pbo(struct gl_context *ctx, bool create_pbo,
> > _mesa_GenTextures(1, tmp_tex);
> > tex_obj = _mesa_lookup_texture(ctx, *tmp_tex);
> > tex_obj->Target = depth > 1 ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D;
> > - tex_obj->Immutable = GL_TRUE;
> > _mesa_initialize_texture_object(ctx, tex_obj, *tmp_tex, GL_TEXTURE_2D);
> > + /* This must be set after _mesa_initialize_texture_object, not before. */
> > + tex_obj->Immutable = GL_TRUE;
> > + /* This is required for interactions with ARB_texture_view. */
> > + tex_obj->NumLayers = 1;
> >
> > internal_format = _mesa_get_format_base_format(pbo_format);
> >
> > --
> Hi Laura,
>
> This patch does not seem fitted for 10.4. I'm assuming they are not
> applicable considering the significant amount of rework that you've
> done recently. I might be mistaking, in which case can you kindly send
> over a backport.
>
> Thanks
> Emil
I don't think this code exists in 10.4 - only 10.5.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150303/13d489c2/attachment-0001.sig>
More information about the mesa-dev
mailing list