i965/miptree: Use enum instead of boolean.

Submitted by Rafael Antognolli on Oct. 10, 2018, 5:41 p.m.

Details

Message ID 20181010174143.20286-1-rafael.antognolli@intel.com
State New
Headers show
Series "i965/miptree: Use enum instead of boolean." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rafael Antognolli Oct. 10, 2018, 5:41 p.m.
ISL_AUX_USAGE_NONE happens to be the same as "false", but let's do the
right thing and use the enum.
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 708757c47b8..b0333655ad5 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -613,9 +613,10 @@  intel_miptree_access_raw(struct brw_context *brw,
                          uint32_t level, uint32_t layer,
                          bool write)
 {
-   intel_miptree_prepare_access(brw, mt, level, 1, layer, 1, false, false);
+   intel_miptree_prepare_access(brw, mt, level, 1, layer, 1,
+                                ISL_AUX_USAGE_NONE, false);
    if (write)
-      intel_miptree_finish_write(brw, mt, level, layer, 1, false);
+      intel_miptree_finish_write(brw, mt, level, layer, 1, ISL_AUX_USAGE_NONE);
 }
 
 enum isl_aux_usage

Comments

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>

Quoting Rafael Antognolli (2018-10-10 10:41:43)
> ISL_AUX_USAGE_NONE happens to be the same as "false", but let's do the
> right thing and use the enum.
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> index 708757c47b8..b0333655ad5 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> @@ -613,9 +613,10 @@ intel_miptree_access_raw(struct brw_context *brw,
>                           uint32_t level, uint32_t layer,
>                           bool write)
>  {
> -   intel_miptree_prepare_access(brw, mt, level, 1, layer, 1, false, false);
> +   intel_miptree_prepare_access(brw, mt, level, 1, layer, 1,
> +                                ISL_AUX_USAGE_NONE, false);
>     if (write)
> -      intel_miptree_finish_write(brw, mt, level, layer, 1, false);
> +      intel_miptree_finish_write(brw, mt, level, layer, 1, ISL_AUX_USAGE_NONE);
>  }
>  
>  enum isl_aux_usage
> -- 
> 2.17.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On Wed, Oct 10, 2018 at 10:41:43AM -0700, Rafael Antognolli wrote:
> ISL_AUX_USAGE_NONE happens to be the same as "false", but let's do the
> right thing and use the enum.
> ---

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>

I think intel_miptree_finish_depth() in intel_mipmap_tree.c might need
a similar change.


Caio
Oops... My bad.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>

On Wed, Oct 10, 2018 at 12:42 PM Rafael Antognolli <
rafael.antognolli@intel.com> wrote:

> ISL_AUX_USAGE_NONE happens to be the same as "false", but let's do the
> right thing and use the enum.
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> index 708757c47b8..b0333655ad5 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> @@ -613,9 +613,10 @@ intel_miptree_access_raw(struct brw_context *brw,
>                           uint32_t level, uint32_t layer,
>                           bool write)
>  {
> -   intel_miptree_prepare_access(brw, mt, level, 1, layer, 1, false,
> false);
> +   intel_miptree_prepare_access(brw, mt, level, 1, layer, 1,
> +                                ISL_AUX_USAGE_NONE, false);
>     if (write)
> -      intel_miptree_finish_write(brw, mt, level, layer, 1, false);
> +      intel_miptree_finish_write(brw, mt, level, layer, 1,
> ISL_AUX_USAGE_NONE);
>  }
>
>  enum isl_aux_usage
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>