diff options
author | Kenneth Graunke <[email protected]> | 2017-07-24 11:44:46 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-07-26 14:43:00 -0700 |
commit | e1d4030b0bc1c5ec4e48afcd6895b48b9ab5bfea (patch) | |
tree | 48f20c817af682a23ba265ce2824550ad8a2411d /src/mesa | |
parent | 5e81df0f103667d888bd346e148843f510a80adc (diff) |
i965: Expose get_num_logical_layers outside of intel_mipmap_tree.c.
I want to use it in brw_clear.c.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index ed7cb8e2152..628d80c0ff8 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -393,8 +393,8 @@ intel_lower_compressed_format(struct brw_context *brw, mesa_format format) } } -static unsigned -get_num_logical_layers(const struct intel_mipmap_tree *mt, unsigned level) +unsigned +brw_get_num_logical_layers(const struct intel_mipmap_tree *mt, unsigned level) { if (mt->surf.dim == ISL_SURF_DIM_3D) return minify(mt->surf.logical_level0_px.depth, level); @@ -440,7 +440,7 @@ create_aux_state_map(struct intel_mipmap_tree *mt, uint32_t total_slices = 0; for (uint32_t level = 0; level < levels; level++) - total_slices += get_num_logical_layers(mt, level); + total_slices += brw_get_num_logical_layers(mt, level); const size_t per_level_array_size = levels * sizeof(enum isl_aux_state *); @@ -458,7 +458,7 @@ create_aux_state_map(struct intel_mipmap_tree *mt, enum isl_aux_state *s = data + per_level_array_size; for (uint32_t level = 0; level < levels; level++) { per_level_arr[level] = s; - const unsigned level_layers = get_num_logical_layers(mt, level); + const unsigned level_layers = brw_get_num_logical_layers(mt, level); for (uint32_t a = 0; a < level_layers; a++) *(s++) = initial; } @@ -1871,7 +1871,7 @@ miptree_layer_range_length(const struct intel_mipmap_tree *mt, uint32_t level, { assert(level <= mt->last_level); - const uint32_t total_num_layers = get_num_logical_layers(mt, level); + const uint32_t total_num_layers = brw_get_num_logical_layers(mt, level); assert(start_layer < total_num_layers); if (num_layers == INTEL_REMAINING_LAYERS) num_layers = total_num_layers - start_layer; diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 3628345c4e9..2179318413e 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -419,6 +419,9 @@ intel_depth_format_for_depthstencil_format(mesa_format format); mesa_format intel_lower_compressed_format(struct brw_context *brw, mesa_format format); +unsigned +brw_get_num_logical_layers(const struct intel_mipmap_tree *mt, unsigned level); + /** \brief Assert that the level and layer are valid for the miptree. */ void intel_miptree_check_level_layer(const struct intel_mipmap_tree *mt, |