[Mesa-dev] [PATCH 2/4] mesa: finish implementing ARB_texture_stencil8
Kenneth Graunke
kenneth at whitecape.org
Sun Apr 5 20:33:52 PDT 2015
On Sunday, April 05, 2015 08:31:55 PM Kenneth Graunke wrote:
> On Sunday, April 05, 2015 04:48:48 PM Dave Airlie wrote:
> > Parts of this were implemented previously, so finish it off.
> >
> > Signed-off-by: Dave Airlie <airlied at redhat.com>
> > ---
> > src/mesa/main/extensions.c | 1 +
> > src/mesa/main/teximage.c | 3 ++-
> > 2 files changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> > index f212015..eea1ade 100644
> > --- a/src/mesa/main/extensions.c
> > +++ b/src/mesa/main/extensions.c
> > @@ -185,6 +185,7 @@ static const struct extension extension_table[] = {
> > { "GL_ARB_texture_rectangle", o(NV_texture_rectangle), GL, 2004 },
> > { "GL_ARB_texture_rgb10_a2ui", o(ARB_texture_rgb10_a2ui), GL, 2009 },
> > { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 },
> > + { "GL_ARB_texture_stencil8", o(ARB_texture_stencil8), GL, 2013 },
> > { "GL_ARB_texture_storage", o(dummy_true), GL, 2011 },
> > { "GL_ARB_texture_storage_multisample", o(ARB_texture_multisample), GL, 2012 },
> > { "GL_ARB_texture_view", o(ARB_texture_view), GL, 2012 },
> > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> > index 36e0b56..faca801 100644
> > --- a/src/mesa/main/teximage.c
> > +++ b/src/mesa/main/teximage.c
> > @@ -1997,7 +1997,8 @@ _mesa_legal_texture_base_format_for_target(struct gl_context *ctx,
> > const char *caller)
>
> You should update the comment above this function.
>
> > {
> > if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT
> > - || _mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_STENCIL) {
> > + || _mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_STENCIL
> > + || _mesa_base_tex_format(ctx, internalFormat) == GL_STENCIL_INDEX) {
> > /* Section 3.8.3 (Texture Image Specification) of the OpenGL 3.3 Core
> > * Profile spec says:
> > *
> >
>
> This seems insufficient to me. It think at minimum need to add code to
> the following places:
>
> - test_attachment_completeness
> - _mesa_choose_tex_format
> - _mesa_base_tex_format
>
> At least, that's what I did in my earlier attempt:
>
> http://cgit.freedesktop.org/~kwg/mesa/commit/?h=stencil-texture&id=131e0f1bc70fa286df67f1ede8c4671bd6c88053
> http://cgit.freedesktop.org/~kwg/mesa/commit/?h=stencil-texture&id=7fc34cd005e9059a9876c2d37ed90cef056adf92
>
> The reason I abandoned the effort was because the extension introduces a
> zillion new places you can use stencil textures - or places that use
> textures and now hit stencil textures - and doing a proper job meant
> writing Piglit tests for a lot of those.
>
> For example...GetTexImage? FBO stencil attachments? GenerateMipmaps?
> Multisampled stencil textures? (Yes, that's a thing now! Hooray :/)
>
> I'm sure nobody's driver gets any of that wrong...
>
> --Ken
I just noticed that you did send Piglit tests for a bunch of these.
Thanks! :)
-------------- 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/20150405/8bbb511c/attachment.sig>
More information about the mesa-dev
mailing list