i965: Support images with aux buffers
authorBen Widawsky <ben@bwidawsk.net>
Tue, 30 May 2017 11:53:50 +0000 (17:23 +0530)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 14 Aug 2017 17:43:30 +0000 (10:43 -0700)
Previously images did not support any auxiliary compression surfaces
(CCS, MCS, or HiZ).  That's about to change.  This patch just adds the
fields to __DRIimageRec to make auxiliary surfaces possible.

v2 (Jason Ekstrand):
 - Add an aux_pitch parameter as well as aux_offset

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/intel_image.h

index 5e83bbd0608d4b3561b280318e6ed5d0542bfd2e..78d689a11a3a22ccbb20f6cc89b2bfab94930bb1 100644 (file)
@@ -92,6 +92,12 @@ struct __DRIimageRec {
    /** The image was created with EGL_EXT_image_dma_buf_import. */
    bool dma_buf_imported;
 
+   /** Offset of the auxiliary compression surface in the bo. */
+   uint32_t aux_offset;
+
+   /** Pitch of the auxiliary compression surface. */
+   uint32_t aux_pitch;
+
    /**
     * Provided by EGL_EXT_image_dma_buf_import.
     * \{