mesa: Define helper function to get the number of texture layers.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 7 Dec 2013 22:35:04 +0000 (23:35 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 15 Jan 2014 15:42:07 +0000 (16:42 +0100)
commitd9b0b4e960b07140e5ece4b4ff6a142277408bfb
tree8100fdfea803f569c06f804d4f748cb8368b9c2b
parentbfcf78c1101a1cbcdd9a479722203047c8d6c26a
mesa: Define helper function to get the number of texture layers.

And to check if it can have layers at all.  This will be used by the
implementation of ARB_shader_image_load_store.

v2: Fix constness of texobj argument, use assert and return reasonable
    default rather than calling unreachable() in default switch case.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c
src/mesa/main/teximage.h