[Mesa-dev] [PATCH v2 07/12] i965/miptree: Add space to store the clear value in the aux surface.
Rafael Antognolli
rafael.antognolli at intel.com
Fri Jan 19 19:54:42 UTC 2018
Similarly to vulkan where we store the clear value in the aux surface,
we can do the same in GL.
v2: Remove unneeded extra function.
Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b56a51e6f67..d0485ec65c6 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1670,6 +1670,17 @@ intel_alloc_aux_buffer(struct brw_context *brw,
return false;
buf->size = aux_surf->size;
+
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
+ if (devinfo->gen >= 10) {
+ /* On CNL, instead of setting the clear color in the SURFACE_STATE, we
+ * will set a pointer to a dword somewhere that contains the color. So,
+ * allocate the space for the clear color value here on the aux buffer.
+ */
+ assert(brw->isl_dev.ss.clear_value_size % 4 == 0);
+ buf->size += brw->isl_dev.ss.clear_value_size;
+ }
+
buf->pitch = aux_surf->row_pitch;
buf->qpitch = isl_surf_get_array_pitch_sa_rows(aux_surf);
--
2.14.3
More information about the mesa-dev
mailing list