summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_format.h
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-02-27 17:35:08 +0100
committerRoland Scheidegger <[email protected]>2014-02-27 17:56:10 +0100
commit612a1d5be1e8e21bceb28ebd77c3b25b72576394 (patch)
treebbf88385c4a2528223fcce4d3dbe7583b7f90ea3 /src/gallium/auxiliary/util/u_format.h
parent80c1b9349c861cc023c4f25c329a3c0ed4695b9e (diff)
util/u_format: don't crash in util_format_translate if we can't do translation
Some formats can't be handled - in particular cannot handle ints/uints formats, which lack the pack_rgba_float/unpack_rgba_float functions. Instead of trying to call these (and crash) return an error (I'm not sure yet if we should try to translate such formats too here might not make much sense). v2: suggested by Jose, use separate checks for pack/unpack of rgba_8unorm and rgba_float functions (right now if one exists the other should as well). Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_format.h')
-rw-r--r--src/gallium/auxiliary/util/u_format.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 5f86e2d2c0d..e36a9e2370e 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -1190,7 +1190,7 @@ util_format_write_4i(enum pipe_format format,
boolean
util_format_fits_8unorm(const struct util_format_description *format_desc);
-void
+boolean
util_format_translate(enum pipe_format dst_format,
void *dst, unsigned dst_stride,
unsigned dst_x, unsigned dst_y,