Use clear color address in surface state.

Submitted by Topi Pohjolainen on Jan. 19, 2018, 7:54 p.m.

Details

Reviewer None
Submitted Jan. 19, 2018, 7:54 p.m.
Last Updated April 6, 2018, 3:08 p.m.
Revision 7

Cover Letter(s)

Revision 1
      Second version of this series, with (hopefully) full support for this in
Vulkan.

Rafael Antognolli (12):
  anv/image: Do not override lower bits of dword.
  genxml: Preserve fields that share dword space with addresses.
  intel/genxml: Use a single field for clear color address on gen10.
  intel/isl: Add support to emit clear value address.
  anv: Make the clear address 64 bytes aligned.
  intel/blorp: Add suport for fast clear address.
  i965/miptree: Add space to store the clear value in the aux surface.
  i965/blorp: Update the fast clear color entry buffer.
  i965/surface_state: Emit the clear color address instead of value.
  i965/surface_state: Silence warning.
  anv: Emit the fast clear color address, instead of value.
  anv: Use clear address for HiZ fast clears too.

 src/intel/blorp/blorp_genX_exec.h                | 12 +++-
 src/intel/genxml/gen10.xml                       |  7 +--
 src/intel/genxml/gen_pack_header.py              |  9 ++-
 src/intel/isl/isl.h                              |  9 +++
 src/intel/isl/isl_surface_state.c                | 18 ++++--
 src/intel/vulkan/anv_device.c                    | 19 ++++++
 src/intel/vulkan/anv_image.c                     | 52 +++++++++++++----
 src/intel/vulkan/anv_private.h                   | 18 +++++-
 src/intel/vulkan/genX_cmd_buffer.c               | 74 +++++++++++++++++++-----
 src/mesa/drivers/dri/i965/brw_blorp.c            | 26 +++++++++
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 18 +++++-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 11 ++++
 12 files changed, 231 insertions(+), 42 deletions(-)
    
Revision 2
      Rebase of this series after lots of aux surface changes on anv.

Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Topi Pohjolainen <topi.pohjolainen@intel.com>

Rafael Antognolli (13):
  anv/image: Do not override lower bits of dword.
  genxml: Preserve fields that share dword space with addresses.
  intel/genxml: Use a single field for clear color address on gen10.
  intel/isl: Update size of clear color value.
  intel/genxml: Add Clear Color struct.
  intel/isl: Add support to emit clear value address.
  intel/blorp: Add suport for fast clear address.
  i965/miptree: Add space to store the clear value in the aux surface.
  i965/blorp: Update the fast clear color entry buffer.
  i965/surface_state: Emit the clear color address instead of value.
  i965/surface_state: Silence warning.
  anv: Emit the fast clear color address, instead of value.
  anv: Use clear address for HiZ fast clears too.

 src/intel/blorp/blorp_genX_exec.h                | 12 ++++--
 src/intel/genxml/gen10.xml                       | 15 +++++--
 src/intel/genxml/gen11.xml                       |  7 ++--
 src/intel/genxml/gen_pack_header.py              |  9 +++-
 src/intel/isl/isl.c                              | 29 +++++++++----
 src/intel/isl/isl.h                              | 14 +++++++
 src/intel/isl/isl_surface_state.c                | 18 ++++++--
 src/intel/vulkan/anv_device.c                    | 19 +++++++++
 src/intel/vulkan/anv_image.c                     | 53 ++++++++++++++++++------
 src/intel/vulkan/anv_private.h                   |  8 +++-
 src/intel/vulkan/genX_cmd_buffer.c               | 52 +++++++++++++++++++++--
 src/mesa/drivers/dri/i965/brw_blorp.c            | 26 ++++++++++++
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 18 +++++++-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 10 +++++
 14 files changed, 245 insertions(+), 45 deletions(-)
    
Revision 3
      New revision of this series.

Major differences are:
 - I tried to incorporate most of the review feedback.
 - While adding some code in i965 to update the clear color state
   buffer, I seemd to avoid some bugs by actually doing it in blorp.
   However, anv already updates the same buffer, so in order to avoid
   having both places doing that, I tried to centralize that code in
   blorp.
 - Now blorp updates the clear color whenever we are doing a fast clear
   and have the clear_color_addr field set with a valid buffer.

Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Jordan Justen <jordan.l.justen@intel.com>

Rafael Antognolli (18):
  anv/image: Do not override lower bits of dword.
  genxml: Preserve fields that share dword space with addresses.
  intel/genxml: Use a single field for clear color address on gen10.
  intel/genxml: Add Clear Color struct.
  intel/isl: Add support to emit clear value address.
  intel/blorp: Add support for fast clear address.
  intel/blorp: Only copy clear color when doing a resolve.
  intel/blorp: Update clear color state buffer during fast clears.
  i965/miptree: Add space to store the clear value in the aux surface.
  i965/miptree: Add new BO for clear color.
  i965/blorp: Add aux_buf variable to simplify code.
  i965/blorp: Update the fast clear color address.
  i965/surface_state: Emit the clear color address instead of value.
  anv: Add a helper to extract clear color from the attachment.
  anv: Emit the fast clear color address, instead of value.
  anv: Use clear address for HiZ fast clears too.
  anv: Make blorp update the clear color.
  intel: Remove use_clear_address flag from isl_surf_fill_state_info.

 src/intel/blorp/blorp_genX_exec.h                | 75 ++++++++++++++++++++---
 src/intel/genxml/gen10.xml                       | 15 +++--
 src/intel/genxml/gen11.xml                       | 17 ++++--
 src/intel/genxml/gen_pack_header.py              |  9 ++-
 src/intel/isl/isl.c                              | 23 ++++---
 src/intel/isl/isl.h                              | 14 +++++
 src/intel/isl/isl_surface_state.c                |  5 +-
 src/intel/vulkan/anv_blorp.c                     | 69 +++++++++++++++------
 src/intel/vulkan/anv_device.c                    | 19 ++++++
 src/intel/vulkan/anv_image.c                     | 47 +++++++++++----
 src/intel/vulkan/anv_private.h                   | 38 +++++++++++-
 src/intel/vulkan/genX_cmd_buffer.c               | 76 +++++++++++++-----------
 src/mesa/drivers/dri/i965/brw_blorp.c            | 26 ++++----
 src/mesa/drivers/dri/i965/brw_clear.c            | 22 +++++++
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 26 +++++++-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 34 +++++++++++
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h    | 16 +++++
 17 files changed, 423 insertions(+), 108 deletions(-)
    
Revision 5
      Another revision, hopefully with all the last suggestions included.

This revision of this series can be found here:

https://cgit.freedesktop.org/~rantogno/mesa/log/?h=cnl/fast_clear_address_v5

Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: "Pohjolainen, Topi" <topi.pohjolainen@gmail.com>

Rafael Antognolli (19):
  anv/image: Do not override lower bits of dword.
  genxml: Preserve fields that share dword space with addresses.
  intel/genxml: Use a single field for clear color address on gen10.
  intel/genxml: Add Clear Color struct to gen10+.
  intel: Use Clear Color struct size.
  intel/isl: Add support to emit clear value address.
  intel/blorp: Add support for fast clear address.
  intel/blorp: Only copy clear color when doing a resolve.
  intel/blorp: Update clear color state buffer during fast clears.
  i965/miptree: Add space to store the clear value in the aux surface.
  i965/miptree: Add new clear color BO for winsys aux buffers
  i965: Add aux_buf variable to simplify code.
  i965/blorp: Update the fast clear value buffer.
  i965/surface_state: Emit the clear color address instead of value.
  anv: Add a helper to extract clear color from the attachment.
  anv: Emit the fast clear color address, instead of value.
  anv: Use clear address for HiZ fast clears too.
  anv: Make blorp update the clear color.
  intel: Remove use_clear_address flag from isl_surf_fill_state_info.

 src/intel/blorp/blorp_genX_exec.h                | 80 ++++++++++++++++++++----
 src/intel/genxml/gen10.xml                       | 15 +++--
 src/intel/genxml/gen11.xml                       | 17 +++--
 src/intel/genxml/gen_pack_header.py              |  8 ++-
 src/intel/isl/isl.c                              |  4 ++
 src/intel/isl/isl.h                              | 14 +++++
 src/intel/isl/isl_surface_state.c                |  5 +-
 src/intel/vulkan/anv_blorp.c                     | 69 ++++++++++++++------
 src/intel/vulkan/anv_device.c                    | 19 ++++++
 src/intel/vulkan/anv_image.c                     | 47 ++++++++++----
 src/intel/vulkan/anv_private.h                   | 42 +++++++++++--
 src/intel/vulkan/genX_cmd_buffer.c               | 73 ++++++++++-----------
 src/mesa/drivers/dri/i965/brw_blorp.c            | 26 +++++---
 src/mesa/drivers/dri/i965/brw_clear.c            | 22 +++++++
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 34 +++++++---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 34 ++++++++++
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h    | 16 +++++
 17 files changed, 414 insertions(+), 111 deletions(-)
    

Revisions

Patches download mbox

# Name Submitter State A F R T
[v4,01/18] anv/image: Do not override lower bits of dword. Rafael Antognolli New 2
[v4,02/18] genxml: Preserve fields that share dword space with addresses. Rafael Antognolli New 1
[v4,03/18] intel/genxml: Use a single field for clear color address on gen10. Rafael Antognolli New 2
[v4,04/18] intel/genxml: Add Clear Color struct. Rafael Antognolli New
[v4,05/18] intel/isl: Add support to emit clear value address. Rafael Antognolli New
[v4,06/18] intel/blorp: Add support for fast clear address. Rafael Antognolli New 1
[v4,07/18] intel/blorp: Only copy clear color when doing a resolve. Rafael Antognolli New
[v4,08/18] intel/blorp: Update clear color state buffer during fast clears. Rafael Antognolli Accepted 1
[v4,09/18] i965/miptree: Add space to store the clear value in the aux surface. Rafael Antognolli New
[v4,10/18] i965/miptree: Add new BO for clear color. Rafael Antognolli New
[v4,11/18] i965/blorp: Add aux_buf variable to simplify code. Rafael Antognolli New
[v4,12/18] i965/blorp: Update the fast clear color address. Rafael Antognolli New
[v4,13/18] i965/surface_state: Emit the clear color address instead of value. Rafael Antognolli New
[v4,14/18] anv: Add a helper to extract clear color from the attachment. Rafael Antognolli Accepted
[v4,15/18] anv: Emit the fast clear color address, instead of value. Rafael Antognolli New
[v4,16/18] anv: Use clear address for HiZ fast clears too. Rafael Antognolli Accepted
[v4,17/18] anv: Make blorp update the clear color. Rafael Antognolli New 1
[v4,18/18] intel: Remove use_clear_address flag from isl_surf_fill_state_info. Rafael Antognolli New

Patches download mbox

# Name Submitter State A F R T
[v4,01/18] anv/image: Do not override lower bits of dword. Rafael Antognolli New 2
[v4,02/18] genxml: Preserve fields that share dword space with addresses. Rafael Antognolli New 1
[v4,03/18] intel/genxml: Use a single field for clear color address on gen10. Rafael Antognolli New 2
[v4,04/18] intel/genxml: Add Clear Color struct. Rafael Antognolli New
[v4,05/18] intel/isl: Add support to emit clear value address. Rafael Antognolli New
[v4,06/18] intel/blorp: Add support for fast clear address. Rafael Antognolli New 1
[v4,07/18] intel/blorp: Only copy clear color when doing a resolve. Rafael Antognolli New
[v4,08/18] intel/blorp: Update clear color state buffer during fast clears. Rafael Antognolli Accepted 1
[v4,09/18] i965/miptree: Add space to store the clear value in the aux surface. Rafael Antognolli New
[v4,10/18] i965/miptree: Add new BO for clear color. Rafael Antognolli New
[v4,11/18] i965/blorp: Add aux_buf variable to simplify code. Rafael Antognolli New
[v4,12/18] i965/blorp: Update the fast clear color address. Jason Ekstrand New
[v4,13/18] i965/surface_state: Emit the clear color address instead of value. Rafael Antognolli New
[v4,14/18] anv: Add a helper to extract clear color from the attachment. Rafael Antognolli Accepted
[v4,15/18] anv: Emit the fast clear color address, instead of value. Rafael Antognolli New
[v4,16/18] anv: Use clear address for HiZ fast clears too. Rafael Antognolli Accepted
[v4,17/18] anv: Make blorp update the clear color. Rafael Antognolli New 1
[v4,18/18] intel: Remove use_clear_address flag from isl_surf_fill_state_info. Rafael Antognolli New

Patches download mbox

# Name Submitter State A F R T
[v5,01/19] anv/image: Do not override lower bits of dword. Rafael Antognolli Accepted 2
[v5,02/19] genxml: Preserve fields that share dword space with addresses. Rafael Antognolli Accepted 1
[v5,03/19] intel/genxml: Use a single field for clear color address on gen10. Rafael Antognolli New 2
[v5,04/19] intel/genxml: Add Clear Color struct to gen10+. Rafael Antognolli Accepted
[v5,05/19] intel: Use Clear Color struct size. Rafael Antognolli New 1
[v5,06/19] intel/isl: Add support to emit clear value address. Rafael Antognolli New 1
[v5,07/19] intel/blorp: Add support for fast clear address. Rafael Antognolli Accepted 2
[v5,08/19] intel/blorp: Only copy clear color when doing a resolve. Rafael Antognolli Accepted 2
[v5,09/19] intel/blorp: Update clear color state buffer during fast clears. Rafael Antognolli New 2
[v5,10/19] i965/miptree: Add space to store the clear value in the aux surface. Rafael Antognolli Accepted 2
[v5,11/19] i965/miptree: Add new clear color BO for winsys aux buffers Rafael Antognolli Accepted 1
[v5,12/19] i965: Add aux_buf variable to simplify code. Rafael Antognolli New 1
[v5,13/19] i965/blorp: Update the fast clear value buffer. Rafael Antognolli New 1
[v5,14/19] i965/surface_state: Emit the clear color address instead of value. Rafael Antognolli Accepted 2
[v5,15/19] anv: Add a helper to extract clear color from the attachment. Rafael Antognolli New 2
[v5,16/19] anv: Emit the fast clear color address, instead of value. Rafael Antognolli New 2
[v5,17/19] anv: Use clear address for HiZ fast clears too. Rafael Antognolli New 2
[v5,18/19] anv: Make blorp update the clear color. Rafael Antognolli New 2
[v5,19/19] intel: Remove use_clear_address flag from isl_surf_fill_state_info. Rafael Antognolli New 2
SERIES REVISION LOOKS STRANGE. Please double-check patch list and the ordering before proceeding.

Patches download mbox

# Name Submitter State A F R T
[v5,01/19] anv/image: Do not override lower bits of dword. Rafael Antognolli Accepted 2
[v5,02/19] genxml: Preserve fields that share dword space with addresses. Rafael Antognolli Accepted 1
[v5,03/19] intel/genxml: Use a single field for clear color address on gen10. Rafael Antognolli New 2
[v5,04/19] intel/genxml: Add Clear Color struct to gen10+. Rafael Antognolli Accepted
[v5,05/19] intel: Use Clear Color struct size. Rafael Antognolli New 1
[1/2] intel/isl: Add support for enabling clear color conversion Topi Pohjolainen New
[v5,07/19] intel/blorp: Add support for fast clear address. Rafael Antognolli Accepted 2
[v5,08/19] intel/blorp: Only copy clear color when doing a resolve. Rafael Antognolli Accepted 2
[v5,09/19] intel/blorp: Update clear color state buffer during fast clears. Rafael Antognolli New 2
[v5,10/19] i965/miptree: Add space to store the clear value in the aux surface. Rafael Antognolli Accepted 2
[v5,11/19] i965/miptree: Add new clear color BO for winsys aux buffers Rafael Antognolli Accepted 1
[v5,12/19] i965: Add aux_buf variable to simplify code. Rafael Antognolli New 1
[v5,13/19] i965/blorp: Update the fast clear value buffer. Rafael Antognolli New 1
[v5,14/19] i965/surface_state: Emit the clear color address instead of value. Rafael Antognolli Accepted 2
[v5,15/19] anv: Add a helper to extract clear color from the attachment. Rafael Antognolli New 2
[v5,16/19] anv: Emit the fast clear color address, instead of value. Rafael Antognolli New 2
[v5,17/19] anv: Use clear address for HiZ fast clears too. Rafael Antognolli New 2
[v5,18/19] anv: Make blorp update the clear color. Rafael Antognolli New 2
[v5,19/19] intel: Remove use_clear_address flag from isl_surf_fill_state_info. Rafael Antognolli New 2
SERIES REVISION LOOKS STRANGE. Please double-check patch list and the ordering before proceeding.

Patches download mbox

# Name Submitter State A F R T
[v5,01/19] anv/image: Do not override lower bits of dword. Rafael Antognolli Accepted 2
[v5,02/19] genxml: Preserve fields that share dword space with addresses. Rafael Antognolli Accepted 1
[v5,03/19] intel/genxml: Use a single field for clear color address on gen10. Rafael Antognolli New 2
[v5,04/19] intel/genxml: Add Clear Color struct to gen10+. Rafael Antognolli Accepted
[v5,05/19] intel: Use Clear Color struct size. Rafael Antognolli New 1
i965/miptree: Initialize mcs buffer only until clear color Topi Pohjolainen New 1
[v5,07/19] intel/blorp: Add support for fast clear address. Rafael Antognolli Accepted 2
[v5,08/19] intel/blorp: Only copy clear color when doing a resolve. Rafael Antognolli Accepted 2
[v5,09/19] intel/blorp: Update clear color state buffer during fast clears. Rafael Antognolli New 2
[v5,10/19] i965/miptree: Add space to store the clear value in the aux surface. Rafael Antognolli Accepted 2
[v5,11/19] i965/miptree: Add new clear color BO for winsys aux buffers Rafael Antognolli Accepted 1
[v5,12/19] i965: Add aux_buf variable to simplify code. Rafael Antognolli New 1
[v5,13/19] i965/blorp: Update the fast clear value buffer. Rafael Antognolli New 1
[v5,14/19] i965/surface_state: Emit the clear color address instead of value. Rafael Antognolli Accepted 2
[v5,15/19] anv: Add a helper to extract clear color from the attachment. Rafael Antognolli New 2
[v5,16/19] anv: Emit the fast clear color address, instead of value. Rafael Antognolli New 2
[v5,17/19] anv: Use clear address for HiZ fast clears too. Rafael Antognolli New 2
[v5,18/19] anv: Make blorp update the clear color. Rafael Antognolli New 2
[v5,19/19] intel: Remove use_clear_address flag from isl_surf_fill_state_info. Rafael Antognolli New 2