aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_resource.h
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-04-29 15:38:20 +0200
committerChristoph Bumiller <[email protected]>2012-04-29 18:03:18 +0200
commitb328949a37fee7b0f68ed3e068ffc4426c083042 (patch)
tree14bbe5c9615d06267671b272f79ee10275d1cd28 /src/gallium/drivers/nv50/nv50_resource.h
parentd46f969b84a405dff6bbc647a7addd0902adc1e4 (diff)
nv50,nvc0: fix depth/stencil resolve
Cannot sample depth/stencil with a single view, and needed to use different shader code for nve4.
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