[Mesa-dev] [PATCH 3/4] st/mesa: refactor duplicated etc fallback checks

Eric Engestrom eric.engestrom at imgtec.com
Fri Jul 8 10:22:14 UTC 2016


On Fri, Jul 08, 2016 at 02:48:04AM -0400, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/mesa/state_tracker/st_cb_texture.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index 1474d97..7852d45 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -189,6 +189,12 @@ st_FreeTextureImageBuffer(struct gl_context *ctx,
>     stImage->num_transfers = 0;
>  }
>  
> +static void

s/void/bool/

> +etc_fallback(struct st_context *st, struct gl_texture_image *texImage)
> +{
> +   return (_mesa_is_format_etc2(texImage->TexFormat) && !st->has_etc2) ||
> +          (texImage->TexFormat == MESA_FORMAT_ETC1_RGB8 && !st->has_etc1);
> +}
>  
>  /** called via ctx->Driver.MapTextureImage() */
>  static void


More information about the mesa-dev mailing list