summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_resource.h')
-rw-r--r--src/gallium/drivers/nv50/nv50_resource.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_resource.h b/src/gallium/drivers/nv50/nv50_resource.h
index 5d5596ea6e3..920fa0a4a2b 100644
--- a/src/gallium/drivers/nv50/nv50_resource.h
+++ b/src/gallium/drivers/nv50/nv50_resource.h
@@ -96,6 +96,18 @@ nv50_surface(struct pipe_surface *ps)
return (struct nv50_surface *)ps;
}
+static INLINE enum pipe_format
+nv50_zs_to_s_format(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT: return PIPE_FORMAT_X24S8_UINT;
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM: return PIPE_FORMAT_S8X24_UINT;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: return PIPE_FORMAT_X32_S8X24_UINT;
+ default:
+ return format;
+ }
+}
+
#ifndef __NVC0_RESOURCE_H__
unsigned