[Mesa-dev] [PATCH 05/23] i965: Pass brw_context instead of gl_context to brw_draw_rectlist

Anuj Phogat anuj.phogat at gmail.com
Tue Nov 10 09:54:01 PST 2015


On Mon, Nov 9, 2015 at 4:56 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Future patches will use the brw_context instead.  Keeping this
> non-functional change separate should make the function changes easier
> to review.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> index 12e7c32..847824c 100644
> --- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> +++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> @@ -165,8 +165,9 @@ struct rect {
>  };
>
>  static void
> -brw_draw_rectlist(struct gl_context *ctx, struct rect *rect, int num_instances)
> +brw_draw_rectlist(struct brw_context *brw, struct rect *rect, int num_instances)
>  {
> +   struct gl_context *ctx = &brw->ctx;
>     int start = 0, count = 3;
>     struct _mesa_prim prim;
>     float verts[6];
> @@ -588,14 +589,14 @@ brw_meta_fast_clear(struct brw_context *brw, struct gl_framebuffer *fb,
>        _mesa_meta_drawbuffers_from_bitfield(fast_clear_buffers);
>        brw_bind_rep_write_shader(brw, (float *) fast_clear_color);
>        set_fast_clear_op(brw, GEN7_PS_RENDER_TARGET_FAST_CLEAR_ENABLE);
> -      brw_draw_rectlist(ctx, &fast_clear_rect, layers);
> +      brw_draw_rectlist(brw, &fast_clear_rect, layers);
>        set_fast_clear_op(brw, 0);
>     }
>
>     if (rep_clear_buffers) {
>        _mesa_meta_drawbuffers_from_bitfield(rep_clear_buffers);
>        brw_bind_rep_write_shader(brw, ctx->Color.ClearColor.f);
> -      brw_draw_rectlist(ctx, &clear_rect, layers);
> +      brw_draw_rectlist(brw, &clear_rect, layers);
>     }
>
>     /* Now set the mts we cleared to INTEL_FAST_CLEAR_STATE_CLEAR so we'll
> @@ -707,7 +708,7 @@ brw_meta_resolve_color(struct brw_context *brw,
>     mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_RESOLVED;
>     get_resolve_rect(brw, mt, &rect);
>
> -   brw_draw_rectlist(ctx, &rect, 1);
> +   brw_draw_rectlist(brw, &rect, 1);
>
>     set_fast_clear_op(brw, 0);
>     use_rectlist(brw, false);
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list