summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_resource.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-08-12 20:06:33 +0200
committerMarek Olšák <[email protected]>2012-08-27 04:31:00 +0200
commita3d9d7ec79d6f7205fab2324e47d8ea185431de0 (patch)
tree3aa8b27b500d9e7535053e01c5345f025ab4f86a /src/gallium/drivers/r600/r600_resource.h
parent48edfe0505ee79d35f770f53b9c9b7ca3c69fd2b (diff)
r600g: implement compression for MSAA colorbuffers for evergreen
This adds the FMASK and CMASK buffers. They share the same resource with color data. COMPRESSION and FAST_CLEAR are always enabled if both FMASK and CMASK are allocated. We initialize the CMASK to a "compressed" state (not "fast cleared"), so that we can keep FAST_CLEAR enabled all the time. Both FMASK and CMASK must be present at the moment. If either one is missing, the other one is not used. v2: add cayman regs in the list Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_resource.h')
-rw-r--r--src/gallium/drivers/r600/r600_resource.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
index 7beab0fa110..dbb958e6925 100644
--- a/src/gallium/drivers/r600/r600_resource.h
+++ b/src/gallium/drivers/r600/r600_resource.h
@@ -55,6 +55,11 @@ struct r600_texture {
struct r600_texture *flushed_depth_texture;
boolean is_flushing_texture;
struct radeon_surface surface;
+
+ /* FMASK and CMASK can only be used with MSAA textures for now.
+ * MSAA textures cannot have mipmaps. */
+ unsigned fmask_offset, fmask_size, fmask_bank_height;
+ unsigned cmask_offset, cmask_size, cmask_slice_tile_max;
};
#define R600_TEX_IS_TILED(tex, level) ((tex)->array_mode[level] != V_038000_ARRAY_LINEAR_GENERAL && (tex)->array_mode[level] != V_038000_ARRAY_LINEAR_ALIGNED)
@@ -74,12 +79,14 @@ struct r600_surface {
unsigned cb_color_base;
unsigned cb_color_view;
unsigned cb_color_size; /* R600 only */
- unsigned cb_color_frag; /* R600 only */
- unsigned cb_color_tile; /* R600 only */
unsigned cb_color_dim; /* EG only */
unsigned cb_color_pitch; /* EG only */
unsigned cb_color_slice; /* EG only */
unsigned cb_color_attrib; /* EG only */
+ unsigned cb_color_fmask; /* CB_COLORn_FMASK (EG) or CB_COLORn_FRAG (r600) */
+ unsigned cb_color_fmask_slice; /* EG only */
+ unsigned cb_color_cmask; /* CB_COLORn_CMASK (EG) or CB_COLORn_TILE (r600) */
+ unsigned cb_color_cmask_slice; /* EG only */
/* DB registers. */
unsigned db_depth_info; /* DB_Z_INFO (EG) or DB_DEPTH_INFO (r600) */