summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-12 13:31:05 -0700
committerJason Ekstrand <[email protected]>2017-05-26 07:58:01 -0700
commitb9b7792d9abc722bc9e267050fc4d1be6caec243 (patch)
tree31f637d6d1d638ebf41f47c430a3ee8e108b559e /src
parentb50b821eb35bc783f463b80e4a284d55caaf0e37 (diff)
intel/isl: Don't request space for stencil/hiz packets unless needed
On Iron Lake, the packets exist but we never emit them so there's no need for us to ask the driver to make batch space for them. Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/isl/isl.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index f89f351c157..f70e1880583 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -84,17 +84,16 @@ isl_device_init(struct isl_device *dev,
dev->ss.aux_addr_offset =
(RENDER_SURFACE_STATE_AuxiliarySurfaceBaseAddress_start(info) & ~31) / 8;
- dev->ds.size =
- _3DSTATE_DEPTH_BUFFER_length(info) * 4 +
- _3DSTATE_STENCIL_BUFFER_length(info) * 4 +
- _3DSTATE_HIER_DEPTH_BUFFER_length(info) * 4 +
- _3DSTATE_CLEAR_PARAMS_length(info) * 4;
-
+ dev->ds.size = _3DSTATE_DEPTH_BUFFER_length(info) * 4;
assert(_3DSTATE_DEPTH_BUFFER_SurfaceBaseAddress_start(info) % 8 == 0);
dev->ds.depth_offset =
_3DSTATE_DEPTH_BUFFER_SurfaceBaseAddress_start(info) / 8;
- if (info->has_hiz_and_separate_stencil) {
+ if (dev->use_separate_stencil) {
+ dev->ds.size += _3DSTATE_STENCIL_BUFFER_length(info) * 4 +
+ _3DSTATE_HIER_DEPTH_BUFFER_length(info) * 4 +
+ _3DSTATE_CLEAR_PARAMS_length(info) * 4;
+
assert(_3DSTATE_STENCIL_BUFFER_SurfaceBaseAddress_start(info) % 8 == 0);
dev->ds.stencil_offset =
_3DSTATE_DEPTH_BUFFER_length(info) * 4 +