[Mesa-dev] [PATCH 02/10] i965: Reduce the scope of input in buffer tex setup

Francisco Jerez currojerez at riseup.net
Wed Aug 19 07:22:07 PDT 2015


Topi Pohjolainen <topi.pohjolainen at intel.com> writes:

> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> ---
>  src/mesa/drivers/dri/i965/brw_context.h           | 4 ++--
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c  | 8 +++-----
>  src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 2 +-
>  src/mesa/drivers/dri/i965/gen8_surface_state.c    | 2 +-
>  4 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
> index ae29798..da018bf 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.h
> +++ b/src/mesa/drivers/dri/i965/brw_context.h
> @@ -1710,8 +1710,8 @@ void brw_create_constant_surface(struct brw_context *brw,
>                                   uint32_t size,
>                                   uint32_t *out_offset,
>                                   bool dword_pitch);
> -void brw_update_buffer_texture_surface(struct gl_context *ctx,
> -                                       unsigned unit,
> +void brw_update_buffer_texture_surface(struct brw_context *brw,
> +                                       struct gl_texture_object *tObj,
>                                         uint32_t *surf_offset);
>  void
>  brw_update_sol_surface(struct brw_context *brw,
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> index 72aad96..73aa719 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> @@ -276,12 +276,10 @@ gen4_emit_buffer_surface_state(struct brw_context *brw,
>  }
>  
>  void
> -brw_update_buffer_texture_surface(struct gl_context *ctx,
> -                                  unsigned unit,
> +brw_update_buffer_texture_surface(struct brw_context *brw,
> +                                  struct gl_texture_object *tObj,
>                                    uint32_t *surf_offset)
>  {
> -   struct brw_context *brw = brw_context(ctx);
> -   struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current;
>     struct intel_buffer_object *intel_obj =
>        intel_buffer_object(tObj->BufferObject);
>     uint32_t size = tObj->BufferSize;
> @@ -323,7 +321,7 @@ brw_update_texture_surface(struct gl_context *ctx,
>  
>     /* BRW_NEW_TEXTURE_BUFFER */
>     if (tObj->Target == GL_TEXTURE_BUFFER) {
> -      brw_update_buffer_texture_surface(ctx, unit, surf_offset);
> +      brw_update_buffer_texture_surface(brw, tObj, surf_offset);
>        return;
>     }
>  
> diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
> index 494bc22..6aa8299 100644
> --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
> @@ -357,7 +357,7 @@ gen7_update_texture_surface(struct gl_context *ctx,
>     struct gl_texture_object *obj = ctx->Texture.Unit[unit]._Current;
>  
>     if (obj->Target == GL_TEXTURE_BUFFER) {
> -      brw_update_buffer_texture_surface(ctx, unit, surf_offset);
> +      brw_update_buffer_texture_surface(brw, obj, surf_offset);
>  
>     } else {
>        struct intel_texture_object *intel_obj = intel_texture_object(obj);
> diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
> index c595ec3..11defd1 100644
> --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
> @@ -308,7 +308,7 @@ gen8_update_texture_surface(struct gl_context *ctx,
>     struct gl_texture_object *obj = ctx->Texture.Unit[unit]._Current;
>  
>     if (obj->Target == GL_TEXTURE_BUFFER) {
> -      brw_update_buffer_texture_surface(ctx, unit, surf_offset);
> +      brw_update_buffer_texture_surface(brw, obj, surf_offset);
>  
>     } else {
>        struct gl_texture_image *firstImage = obj->Image[0][obj->BaseLevel];
> -- 
> 1.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150819/d083f2df/attachment.sig>


More information about the mesa-dev mailing list