summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_resource.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-08-19 01:07:46 +0200
committerMarek Olšák <[email protected]>2011-08-19 23:12:11 +0200
commit68c54abb2cfd12a031829e78d721b2480d0c8cc4 (patch)
tree6c5492f01df574cc6a5ed48f64f9f9345e44471f /src/gallium/drivers/r600/r600_resource.h
parent3e9dc51f82276e57ecfb4e2725d88d83dbedcd85 (diff)
r600g: fix depth-stencil on evergreen
Such that it actually works in apps which use both. A separate buffer is allocated for stencil. The only exception is the window-system-provided depth-stencil buffer, where depth and stencil share the same buffer. This fixes: - fbo-depthstencil-GL_DEPTH24_STENCIL8-clear - fbo-depthstencil-GL_DEPTH24_STENCIL8-drawpixels-FLOAT-and-USHORT - fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-24_8 - fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-FLOAT-and-USHORT
Diffstat (limited to 'src/gallium/drivers/r600/r600_resource.h')
-rw-r--r--src/gallium/drivers/r600/r600_resource.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
index 836e7491f1f..d9d29db7968 100644
--- a/src/gallium/drivers/r600/r600_resource.h
+++ b/src/gallium/drivers/r600/r600_resource.h
@@ -52,6 +52,12 @@ struct r600_resource {
struct r600_resource_texture {
struct r600_resource resource;
+
+ /* If this resource is a depth-stencil buffer on evergreen, this contains
+ * the depth part of the format. There is a separate stencil resource
+ * for the stencil buffer below. */
+ enum pipe_format real_format;
+
unsigned offset[PIPE_MAX_TEXTURE_LEVELS];
unsigned pitch_in_bytes[PIPE_MAX_TEXTURE_LEVELS]; /* transfer */
unsigned pitch_in_blocks[PIPE_MAX_TEXTURE_LEVELS]; /* texture resource */
@@ -62,6 +68,7 @@ struct r600_resource_texture {
unsigned tile_type;
unsigned depth;
unsigned dirty_db;
+ struct r600_resource_texture *stencil; /* Stencil is in a separate buffer on Evergreen. */
struct r600_resource_texture *flushed_depth_texture;
boolean is_flushing_texture;