[Nouveau] [PATCH] nouveau/vieux: only advertise supported texture formats
currojerez at riseup.net
Mon Apr 30 12:42:49 PDT 2012
Lucas Stach <dev at lynxeye.de> writes:
> Am Montag, den 30.04.2012, 20:08 +0200 schrieb Francisco Jerez:
>> Lucas Stach <dev at lynxeye.de> writes:
>> > + /* only advertise supported texture formats */
>> > + memset(&ctx->TextureFormatSupported, 0,
>> > + sizeof(ctx->TextureFormatSupported));
>> > + ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = true;
>> > + ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888] = true;
>> > + ctx->TextureFormatSupported[MESA_FORMAT_RGB565] = true;
>> > + ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
>> > + ctx->TextureFormatSupported[MESA_FORMAT_Z24_S8] = true;
>> > +
>> Hi Lucas,
>> It's not obvious to me how this works. AFAIK nouveau doesn't make use
>> of this array. And even if it did, the texture formats you're listing
>> aren't the supported ones.
> Hello Francisco,
> The core mesa code decides what texture formats to advertise based on
> this array.
Are you sure? TextureFormatSupported doesn't seem to have any effect
except in drivers that use mesa's default for the ChooseTextureFormat
> And obviously someone thought it would be a good idea to
> init this array to "everything supported" if the driver doesn't
> overrides this.
> I opted to only advertise renderable texture formats, for reasons
> explained in my mail a minute ago.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 229 bytes
Desc: not available
More information about the Nouveau