summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/format_unpack.c
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2014-03-21 11:05:55 -0700
committerAnuj Phogat <[email protected]>2014-05-01 10:58:40 -0700
commit7a8045d2f7b7f749a555dbe5f51c327ab0cd6cc8 (patch)
tree8af8df71bf9bab9a7c6a015edcfaee8c8d76b31f /src/mesa/main/format_unpack.c
parentef924f0de93accff2ea12dbd90cc3c1df794c8f5 (diff)
mesa: Add new helper function _mesa_unpack_depth_stencil_row()
This patch makes non-functional changes in the code. New helper function added here will make it easier to support more data types in the following patches. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/format_unpack.c')
-rw-r--r--src/mesa/main/format_unpack.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index cf96609ea07..c9d793f66cf 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -4263,3 +4263,27 @@ _mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
return;
}
}
+
+/**
+ * Unpack depth/stencil
+ * \param format the source data format
+ * \param type the destination data type
+ */
+void
+_mesa_unpack_depth_stencil_row(mesa_format format, GLuint n,
+ const void *src, GLenum type,
+ GLuint *dst)
+{
+ assert(type == GL_UNSIGNED_INT_24_8);
+
+ switch (type) {
+ case GL_UNSIGNED_INT_24_8:
+ _mesa_unpack_uint_24_8_depth_stencil_row(format, n, src, dst);
+ break;
+ default:
+ _mesa_problem(NULL,
+ "bad type 0x%x in _mesa_unpack_depth_stencil_row",
+ type);
+ return;
+ }
+}