[Mesa-dev] [PATCH] i965: Remove special case for layered drawbuffer attachments.

Anuj Phogat anuj.phogat at gmail.com
Thu Jun 25 11:28:57 PDT 2015


On Thu, Jun 25, 2015 at 10:08 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> When binding a layered texture, the layer is already 0.  There's no need
> to special case this.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/gen6_surface_state.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_surface_state.c b/src/mesa/drivers/dri/i965/gen6_surface_state.c
> index 03e913a..39de62f 100644
> --- a/src/mesa/drivers/dri/i965/gen6_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/gen6_surface_state.c
> @@ -88,7 +88,8 @@ gen6_update_renderbuffer_surface(struct brw_context *brw,
>        break;
>     }
>
> -   const int min_array_element = layered ? 0 : irb->mt_layer;
> +   const int min_array_element = irb->mt_layer;
> +   assert(!layered || irb->mt_layer == 0);
>
>     surf[0] = SET_FIELD(surftype, BRW_SURFACE_TYPE) |
>               SET_FIELD(format, BRW_SURFACE_FORMAT);
> --
> 2.4.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