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

Ilia Mirkin imirkin at alum.mit.edu
Fri Jul 8 13:51:02 UTC 2016


On Fri, Jul 8, 2016 at 6:22 AM, Eric Engestrom
<eric.engestrom at imgtec.com> wrote:
> 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/

Of course, thank you. It's actually fixed in the next patch, but I
forgot to fold the fix in. (And I end up making it into a global
function there, I guess I should move that into this patch as well.)

>
>> +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