i965/meta_util: Take an isl_device in get_fast_clear_rect
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 19 Aug 2016 07:37:38 +0000 (00:37 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 29 Aug 2016 19:17:34 +0000 (12:17 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/blorp_clear.c
src/mesa/drivers/dri/i965/brw_meta_util.c
src/mesa/drivers/dri/i965/brw_meta_util.h

index afb5475638543ff40858d48592c5cf84ba14f1ff..73b55bd09201989b4c84820af5a4539c73b60e04 100644 (file)
@@ -110,8 +110,8 @@ blorp_fast_clear(struct brw_context *brw, const struct brw_blorp_surf *surf,
    memset(&params.wm_inputs, 0xff, 4*sizeof(float));
    params.fast_clear_op = GEN7_PS_RENDER_TARGET_FAST_CLEAR_ENABLE;
 
-   brw_get_fast_clear_rect(brw, surf->aux_surf, &params.x0, &params.y0,
-                           &params.x1, &params.y1);
+   brw_get_fast_clear_rect(&brw->isl_dev, surf->aux_surf,
+                           &params.x0, &params.y0, &params.x1, &params.y1);
 
    brw_blorp_params_get_clear_kernel(brw, &params, true);
 
index 90f034523156249c871d9cf3e26552c1fc0aadf9..bc3a62d631921e65acd10813d697c04502d27a0e 100644 (file)
@@ -446,7 +446,7 @@ brw_meta_set_fast_clear_color(struct brw_context *brw,
  * area of the framebuffer to be cleared.
  */
 void
-brw_get_fast_clear_rect(const struct brw_context *brw,
+brw_get_fast_clear_rect(const struct isl_device *dev,
                         const struct isl_surf *aux_surf,
                         unsigned *x0, unsigned *y0,
                         unsigned *x1, unsigned *y1)
@@ -479,7 +479,7 @@ brw_get_fast_clear_rect(const struct brw_context *brw,
       /* SKL+ line alignment requirement for Y-tiled are half those of the prior
        * generations.
        */
-      if (brw->gen >= 9)
+      if (dev->info->gen >= 9)
          y_align *= 16;
       else
          y_align *= 32;
index 861392142ba33411980716317869a8f8028a75e9..79a777f991b0701f7c8222b2891506facb3e972c 100644 (file)
@@ -43,7 +43,7 @@ brw_meta_mirror_clip_and_scissor(const struct gl_context *ctx,
                                  bool *mirror_x, bool *mirror_y);
 
 void
-brw_get_fast_clear_rect(const struct brw_context *brw,
+brw_get_fast_clear_rect(const struct isl_device *dev,
                         const struct isl_surf *aux_surf,
                         unsigned *x0, unsigned *y0,
                         unsigned *x1, unsigned *y1);