summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-12-07 15:00:49 -0700
committerBrian Paul <[email protected]>2017-12-12 09:44:59 -0700
commit63b03dc924adf91ecb5da757edafa975878d7047 (patch)
tree72dba06e5c6b01d809a9f6fd50cbdd86b572d9cc /src/gallium/auxiliary/util
parentdde8309cdea5c739983693650105b2f993c5a71c (diff)
gallium/util: don't pass a pipe_resource to util_resource_is_array_texture()
No need to pass a pipe_resource when we can just pass the target. This makes the function potentially more usable. Rename it too. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_resource.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_resource.h b/src/gallium/auxiliary/util/u_resource.h
index 6736476f4da..3c6194b8f07 100644
--- a/src/gallium/auxiliary/util/u_resource.h
+++ b/src/gallium/auxiliary/util/u_resource.h
@@ -32,14 +32,14 @@ unsigned
util_resource_size(const struct pipe_resource *res);
/**
- * Return true if the resource is an array texture.
+ * Return true if the texture target is an array type.
*
* Note that this function returns true for single-layered array textures.
*/
static inline boolean
-util_resource_is_array_texture(const struct pipe_resource *res)
+util_texture_is_array(enum pipe_texture_target target)
{
- switch (res->target) {
+ switch (target) {
case PIPE_TEXTURE_1D_ARRAY:
case PIPE_TEXTURE_2D_ARRAY:
case PIPE_TEXTURE_CUBE_ARRAY: