From: Brian Date: Fri, 10 Aug 2007 19:11:31 +0000 (-0600) Subject: added st_sizeof_format() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce02b16dac0891a570a3a42f26463ea5c68f1618;p=mesa.git added st_sizeof_format() --- diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 4aa5066b8cb..a89dfb10fb4 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -98,6 +98,15 @@ st_get_format_info(GLuint format) } +GLuint +st_sizeof_format(GLuint pipeFormat) +{ + const struct pipe_format_info *info = st_get_format_info(pipeFormat); + assert(info); + return info->size; +} + + GLuint st_mesa_format_to_pipe_format(GLuint mesaFormat) { diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h index dde4731e94d..6b3cba0f631 100644 --- a/src/mesa/state_tracker/st_format.h +++ b/src/mesa/state_tracker/st_format.h @@ -50,6 +50,10 @@ extern const struct pipe_format_info * st_get_format_info(GLuint format); +extern GLuint +st_sizeof_format(GLuint pipeFormat); + + extern GLuint st_mesa_format_to_pipe_format(GLuint mesaFormat);