[Mesa-dev] [PATCH 4/4] st/mesa: add LATC and 3DC support
Marek Olšák
maraeo at gmail.com
Mon Mar 7 11:40:17 PST 2011
A follow-up patch is attached.
Marek
On Mon, Mar 7, 2011 at 4:45 PM, Brian Paul <brianp at vmware.com> wrote:
> On 03/06/2011 08:28 PM, Marek Olšák wrote:
>
>> softpipe passes all tests.
>> ---
>> src/mesa/state_tracker/st_extensions.c | 21 ++++++++++++
>> src/mesa/state_tracker/st_format.c | 54
>> ++++++++++++++++++++++++++++++-
>> src/mesa/state_tracker/st_gen_mipmap.c | 4 ++-
>> 3 files changed, 76 insertions(+), 3 deletions(-)
>>
>> [...]
>
> diff --git a/src/mesa/state_tracker/st_gen_mipmap.c
>> b/src/mesa/state_tracker/st_gen_mipmap.c
>> index a12a32e..f8b23d1 100644
>> --- a/src/mesa/state_tracker/st_gen_mipmap.c
>> +++ b/src/mesa/state_tracker/st_gen_mipmap.c
>> @@ -205,7 +205,9 @@ fallback_generate_mipmap(struct gl_context *ctx,
>> GLenum target,
>>
>> if (compressed) {
>> if (texObj->Image[face][baseLevel]->TexFormat ==
>> MESA_FORMAT_SIGNED_RED_RGTC1 ||
>> - texObj->Image[face][baseLevel]->TexFormat ==
>> MESA_FORMAT_SIGNED_RG_RGTC2)
>> + texObj->Image[face][baseLevel]->TexFormat ==
>> MESA_FORMAT_SIGNED_RG_RGTC2 ||
>> + texObj->Image[face][baseLevel]->TexFormat ==
>> MESA_FORMAT_SIGNED_L_LATC1 ||
>> + texObj->Image[face][baseLevel]->TexFormat ==
>> MESA_FORMAT_SIGNED_LA_LATC2)
>> datatype = GL_FLOAT;
>> else
>> datatype = GL_UNSIGNED_BYTE;
>>
>
> When I see a bunch of comparisons like this I suspect that a helper
> function such as get_datatype_for_compressed_format(gl_format) would be
> cleaner.
>
> -Brian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110307/a0d17ff5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-st-mesa-cleanup-checking-for-signed-compressed-forma.patch
Type: application/pgp-keys
Size: 1443 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110307/a0d17ff5/attachment-0001.key>
More information about the mesa-dev
mailing list