summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorRafael Antognolli <[email protected]>2018-01-18 17:19:30 -0800
committerRafael Antognolli <[email protected]>2018-04-05 07:42:45 -0700
commite8cadb673d6e3a5946e7d9be5811881e99bef952 (patch)
treeb9bfecb2eedd286348e041477ec0c6dc6add5c53 /src/intel/vulkan/anv_image.c
parent021e1885d0d09adf3b9bc40c74172f983a2263dd (diff)
anv: Use clear address for HiZ fast clears too.
Store the default clear address for HiZ fast clears on a global bo, and point to it when needed. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r--src/intel/vulkan/anv_image.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index da4601ce20e..a941559eb3a 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -1061,9 +1061,13 @@ anv_image_fill_surface_state(struct anv_device *device,
struct anv_address clear_address = { .bo = NULL };
state_inout->clear_address = 0;
- if (device->info.gen >= 10 && aux_usage != ISL_AUX_USAGE_NONE &&
- aux_usage != ISL_AUX_USAGE_HIZ) {
- clear_address = anv_image_get_clear_color_addr(device, image, aspect);
+
+ if (device->info.gen >= 10 && aux_usage != ISL_AUX_USAGE_NONE) {
+ if (aux_usage == ISL_AUX_USAGE_HIZ) {
+ clear_address = (struct anv_address) { .bo = &device->hiz_clear_bo };
+ } else {
+ clear_address = anv_image_get_clear_color_addr(device, image, aspect);
+ }
}
if (view_usage == ISL_SURF_USAGE_STORAGE_BIT &&