[Mesa-dev] [PATCH] i965: Shrink size of prog_data's binding table starting indices.

Jason Ekstrand jason at jlekstrand.net
Fri Nov 20 14:27:21 PST 2015


We should probably change the bad binding table entry values in the
binding table setup code to reflect this.

On Fri, Nov 20, 2015 at 2:23 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> The valid range for binding table indices is 0..255, so a uint8_t is a
> perfect fit.  We don't need a full uint32_t.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_compiler.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
> index 1ee01eb..bc8a125 100644
> --- a/src/mesa/drivers/dri/i965/brw_compiler.h
> +++ b/src/mesa/drivers/dri/i965/brw_compiler.h
> @@ -283,14 +283,14 @@ struct brw_stage_prog_data {
>        /** @{
>         * surface indices for the various groups of surfaces
>         */
> -      uint32_t pull_constants_start;
> -      uint32_t texture_start;
> -      uint32_t gather_texture_start;
> -      uint32_t ubo_start;
> -      uint32_t ssbo_start;
> -      uint32_t abo_start;
> -      uint32_t image_start;
> -      uint32_t shader_time_start;
> +      uint8_t pull_constants_start;
> +      uint8_t texture_start;
> +      uint8_t gather_texture_start;
> +      uint8_t ubo_start;
> +      uint8_t ssbo_start;
> +      uint8_t abo_start;
> +      uint8_t image_start;
> +      uint8_t shader_time_start;
>        /** @} */
>     } binding_table;
>
> --
> 2.6.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list