diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-04-08 19:03:05 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-04-08 19:03:41 +0100 |
commit | 89ceb2f3c761d7287f5e2dca84d43dc16f400da0 (patch) | |
tree | 7d7a4c0366e7dff908a1479102f31e2c2d30b3ba /src/gallium/auxiliary/util/u_format.h | |
parent | 956b2f74d8048ee9e0cfde4704bb9a5e438c3b03 (diff) |
util: (Almost) universal format translation function.
Untested.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_format.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index 93818a3161..a7c24f0c00 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -530,6 +530,19 @@ util_format_write_4ub(enum pipe_format format, void *dst, unsigned dst_stride, unsigned x, unsigned y, unsigned w, unsigned h); +/* + * Generic format conversion; + */ + +void +util_format_translate(enum pipe_format dst_format, + void *dst, unsigned dst_stride, + unsigned dst_x, unsigned dst_y, + enum pipe_format src_format, + const void *src, unsigned src_stride, + unsigned src_x, unsigned src_y, + unsigned width, unsigned height); + #ifdef __cplusplus } // extern "C" { #endif |