[Mesa-dev] [PATCH 05/18] i965: Move intel_region_get_aligned_offset() to be a miptree function.

Chad Versace chad.versace at linux.intel.com
Wed Apr 30 22:47:06 PDT 2014


> @@ -856,16 +856,16 @@ gen6_blorp_emit_depth_stencil_config(struct brw_context *brw,
>  
>     /* 3DSTATE_HIER_DEPTH_BUFFER */
>     {
> -      struct intel_region *hiz_region = params->depth.mt->hiz_mt->region;
> +      struct intel_mipmap_tree *hiz_mt = params->depth.mt->hiz_mt;

While you're on a data structure rampage, it would be nice to do
s/hiz_mt/hiz_bo/ too. But that surgery isn't nearly as straightforward
as region removal.


>  /**
>   * This function computes masks that may be used to select the bits of the X
> - * and Y coordinates that indicate the offset within a tile.  If the region is
> + * and Y coordinates that indicate the offset within a tile.  If the BO is
Ah, you got my nit in the previous patch -->                            ^^^^^
This hunk should be squashed, but... whatever.
>   * untiled, the masks are set to 0.
>   */
>  void



> +uint32_t
> +intel_miptree_get_aligned_offset(const struct intel_mipmap_tree *mt,
> +                                 uint32_t x, uint32_t y,
> +                                 bool map_stencil_as_y_tiled)
> +{
I feel the suspense...
> +   int cpp = mt->region->cpp;
I'm waiting for this ^^^^^ to die in the finale mega patch.


Patches up to here are
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


More information about the mesa-dev mailing list