[Mesa-dev] [PATCH 12/16] i965: drop brw->must_use_separate_stencil in favor of devinfo's

Emil Velikov emil.l.velikov at gmail.com
Wed Aug 30 10:38:36 UTC 2017


On 30 August 2017 at 11:07, Lionel Landwerlin
<lionel.g.landwerlin at intel.com> wrote:

> @@ -249,6 +249,7 @@ static mesa_format
>  intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat)
>  {
>     struct brw_context *brw = brw_context(ctx);
> +   const struct gen_device_info *devinfo = &brw->screen->devinfo;
Since this is used only in the assert below, annotate it as MAYBE_UNUSED/UNUSED?
Otherwise GCC will warn on release builds.

>
>     switch (internalFormat) {
>     default:
> @@ -270,7 +271,7 @@ intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat)
>        if (brw->has_separate_stencil) {
>          return MESA_FORMAT_S_UINT8;
>        } else {
> -        assert(!brw->must_use_separate_stencil);
> +        assert(!devinfo->must_use_separate_stencil);
>          return MESA_FORMAT_Z24_UNORM_S8_UINT;
>        }
>     }

-Emil


More information about the mesa-dev mailing list