diff options
author | Paul Berry <[email protected]> | 2012-05-08 13:39:10 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-05-25 08:45:11 -0700 |
commit | 455ac562722f60ac9fb0c3d3c697fa339fa011ad (patch) | |
tree | 726a4d7e3668f1e07f6bc6e671ccb707ebf3d726 /src/mesa/drivers/dri/i965/brw_blorp.h | |
parent | 0e11b2c5afca456e19b1c29889dde449a4072ede (diff) |
i965/msaa: Properly handle sliced layout for Gen7.
Starting in Gen7, there are two possible layouts for MSAA surfaces:
- Interleaved, in which additional samples are accommodated by scaling
up the width and height of the surface. This is the only layout
available in Gen6. On Gen7 it is used for depth and stencil
surfaces only.
- Sliced, in which the surface is stored as a 2D array, with array
slice n containing all pixel data for sample n. On Gen7 this layout
is used for color surfaces.
The "Sliced" layout has an additional requirement: it must be used in
ARYSPC_LOD0 mode, which means that the surface doesn't leave any extra
room between array slices for miplevels other than 0.
This patch modifies the surface allocation functions to use the
correct layout when allocating MSAA surfaces in Gen7, and to set the
array offsets properly when using ARYSPC_LOD0 mode. It also modifies
the code that populates SURFACE_STATE structures to ensure that
ARYSPC_LOD0 mode is selected in the appropriate circumstances.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_blorp.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h index 6af5f67683d..f4aafd77825 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.h +++ b/src/mesa/drivers/dri/i965/brw_blorp.h @@ -85,6 +85,11 @@ public: bool map_stencil_as_y_tiled; unsigned num_samples; + + /* Setting this flag indicates that the surface should be set up in + * ARYSPC_LOD0 mode. Ignored prior to Gen7. + */ + bool array_spacing_lod0; }; |