[Mesa-dev] [PATCH] main: Add STENCIL_INDEX formats to base_tex_format
Matt Turner
mattst88 at gmail.com
Fri Jan 30 15:17:08 PST 2015
On Fri, Jan 30, 2015 at 3:05 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> On Fri, Jan 30, 2015 at 3:03 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> On Fri, Jan 30, 2015 at 2:27 PM, Jason Ekstrand <jason at jlekstrand.net>
>> wrote:
>> > This fixes a bug on BDW when our meta-based stencil blit path
>> > assert-fails
>> > due to an invalid internal format even though we do support the
>> > ARB_stencil_texturing extension.
>> > ---
>> > src/mesa/main/teximage.c | 10 ++++++++++
>> > 1 file changed, 10 insertions(+)
>> >
>> > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
>> > index 03264dd..0e37613 100644
>> > --- a/src/mesa/main/teximage.c
>> > +++ b/src/mesa/main/teximage.c
>> > @@ -221,6 +221,16 @@ _mesa_base_tex_format( struct gl_context *ctx,
>> > GLint internalFormat )
>> > }
>> > }
>> >
>> > + if (ctx->Extensions.ARB_stencil_texturing) {
>> > + switch (internalFormat) {
>> > + case GL_STENCIL_INDEX:
>>
>> Don't indent case.
>>
>> > + case GL_STENCIL_INDEX8:
>> > + return GL_STENCIL_INDEX;
>> > + default:
>> > + ; /* fallthrough */
>>
>> Just make this a break statement.
>
>
> Both of the above are consistent with the rest of the function. How much do
> we care about style vs. consistency?
Oh, yuck. I don't know.
We've decided to replace tabs with spaces when we modify lines even if
it makes it inconsistent with the surroundings.
I see other properly indented case labels in this file, so I'd
probably fix that. The default /* fallthrough */, I don't really mind.
That does seem pretty consistent.
More information about the mesa-dev
mailing list