diff options
author | José Fonseca <[email protected]> | 2012-11-21 16:17:22 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-12-04 19:35:19 +0000 |
commit | a416a4a91dd167f9f018932b0a1c7045bfc08bd8 (patch) | |
tree | b79491f349d8e2b7f1807118118883a600d4d8b2 /src | |
parent | 4da0cb83ab6d82ba3cf011bb3b9b012bd27f7bfc (diff) |
translate: Fix the fetch function assertions.
fetch_rgba_float is NULL for integer formats, and vice-versa.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/translate/translate_generic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index 72099af6a9d..894c1684813 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -806,7 +806,6 @@ struct translate *translate_generic_create( const struct translate_key *key ) util_format_description(key->element[i].input_format); assert(format_desc); - assert(format_desc->fetch_rgba_float); tg->attrib[i].type = key->element[i].type; @@ -820,11 +819,14 @@ struct translate *translate_generic_create( const struct translate_key *key ) } if (format_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) { + assert(format_desc->fetch_rgba_sint); tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_sint; } else { + assert(format_desc->fetch_rgba_uint); tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_uint; } } else { + assert(format_desc->fetch_rgba_float); tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_float; } |