diff options
author | Nanley Chery <[email protected]> | 2019-08-19 09:17:26 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2019-10-28 10:47:05 -0700 |
commit | c50f8b2fc94913a7c96468ba930091710147b302 (patch) | |
tree | 89e2578ffc5034de5160877c3970c99aa28a5220 /src/mesa/drivers | |
parent | e2e67b3f11bf11dedab77322a28c87c32d5ed30a (diff) |
intel: Support HIZ_CCS in isl_surf_get_ccs_surf
Add an extra aux parameter which will be filled out with CCS if the
first two isl_surf parameters fit the requirements for HiZ_CCS.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index f135125b58c..2fa9f7dfb81 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -712,7 +712,7 @@ create_ccs_buf_for_image(struct brw_context *brw, struct intel_mipmap_tree *mt, enum isl_aux_state initial_state) { - struct isl_surf temp_ccs_surf; + struct isl_surf temp_ccs_surf = {0,}; /* CCS is only supported for very simple miptrees */ assert(image->aux_offset != 0 && image->aux_pitch != 0); @@ -727,7 +727,7 @@ create_ccs_buf_for_image(struct brw_context *brw, /* We shouldn't already have a CCS */ assert(!mt->aux_buf); - if (!isl_surf_get_ccs_surf(&brw->isl_dev, &mt->surf, &temp_ccs_surf, + if (!isl_surf_get_ccs_surf(&brw->isl_dev, &mt->surf, &temp_ccs_surf, NULL, image->aux_pitch)) return false; @@ -1576,7 +1576,7 @@ intel_miptree_alloc_aux(struct brw_context *brw, /* Get the aux buf allocation parameters for this miptree. */ enum isl_aux_state initial_state; uint8_t memset_value; - struct isl_surf aux_surf; + struct isl_surf aux_surf = {0,}; bool aux_surf_ok = false; switch (mt->aux_usage) { @@ -1624,7 +1624,7 @@ intel_miptree_alloc_aux(struct brw_context *brw, initial_state = ISL_AUX_STATE_PASS_THROUGH; memset_value = 0; aux_surf_ok = - isl_surf_get_ccs_surf(&brw->isl_dev, &mt->surf, &aux_surf, 0); + isl_surf_get_ccs_surf(&brw->isl_dev, &mt->surf, &aux_surf, NULL, 0); break; default: diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 45779b06195..6040161d8f9 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -764,9 +764,9 @@ intel_create_image_common(__DRIscreen *dri_screen, return NULL; } - struct isl_surf aux_surf; + struct isl_surf aux_surf = {0,}; if (mod_info->aux_usage == ISL_AUX_USAGE_CCS_E) { - ok = isl_surf_get_ccs_surf(&screen->isl_dev, &surf, &aux_surf, 0); + ok = isl_surf_get_ccs_surf(&screen->isl_dev, &surf, &aux_surf, NULL, 0); if (!ok) { free(image); return NULL; @@ -1185,8 +1185,8 @@ intel_create_image_from_fds_common(__DRIscreen *dri_screen, return NULL; } - struct isl_surf aux_surf; - ok = isl_surf_get_ccs_surf(&screen->isl_dev, &surf, &aux_surf, + struct isl_surf aux_surf = {0,}; + ok = isl_surf_get_ccs_surf(&screen->isl_dev, &surf, &aux_surf, NULL, image->aux_pitch); if (!ok) { brw_bo_unreference(image->bo); |