summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format.h
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-03 10:12:47 +0100
committerMichal Krol <michal@vmware.com>2009-12-03 10:12:47 +0100
commitd28740c298968303500a8c43047ded2679e727ac (patch)
treebb20439f6040083d94fbc21f71a32fcc3f13eae4 /src/gallium/auxiliary/util/u_format.h
parent3400b668e35469d5dbba515e3a8b9d775fd2eff5 (diff)
Move pf_is_depth_stencil() to u_format auxiliary module.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format.h')
-rw-r--r--src/gallium/auxiliary/util/u_format.h13
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 2931d2a8bb..cd883d38ca 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -128,6 +128,19 @@ util_format_is_compressed(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_DXT ? TRUE : FALSE;
}
+static INLINE boolean
+util_format_is_depth_or_stencil(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(format);
+ if (!format) {
+ return FALSE;
+ }
+
+ return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS ? TRUE : FALSE;
+}
+
/*
* Format access functions.