aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_resource.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-08-02 01:43:01 +0200
committerMarek Olšák <[email protected]>2012-08-04 14:05:51 +0200
commitcdc681c3ad746fe8adab4ea71358bcc54e024ff9 (patch)
tree2ab6f1fd27331627db98d321e566c668f80da105 /src/gallium/drivers/r600/r600_resource.h
parente6dfc8c77bc00c06a35270a4e50aa52c738c8629 (diff)
r600g: precompute depth buffer state in pipe_surface and reuse it
This is done on-demand, because we don't know in advance if a zbuffer will be bound as depth or color.
Diffstat (limited to 'src/gallium/drivers/r600/r600_resource.h')
-rw-r--r--src/gallium/drivers/r600/r600_resource.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
index dc07d3e880f..d56fe4ae731 100644
--- a/src/gallium/drivers/r600/r600_resource.h
+++ b/src/gallium/drivers/r600/r600_resource.h
@@ -69,6 +69,18 @@ struct r600_resource_texture {
struct r600_surface {
struct pipe_surface base;
+
+ bool depth_initialized;
+
+ /* DB registers. */
+ unsigned db_depth_info; /* DB_Z_INFO (EG) or DB_DEPTH_INFO (r600) */
+ unsigned db_depth_base; /* DB_Z_READ/WRITE_BASE (EG) or DB_DEPTH_BASE (r600) */
+ unsigned db_depth_view;
+ unsigned db_depth_size;
+ unsigned db_depth_slice; /* EG only */
+ unsigned db_stencil_base; /* EG only */
+ unsigned db_stencil_info; /* EG only */
+ unsigned db_prefetch_limit; /* R600 only */
};
void r600_resource_destroy(struct pipe_screen *screen, struct pipe_resource *res);