[Mesa-dev] [PATCH] swrast: remove explicit size from texfetch_funcs array
Kenneth Graunke
kenneth at whitecape.org
Tue Oct 30 09:37:05 PDT 2012
On 10/30/2012 08:40 AM, Brian Paul wrote:
> By removing the array size, the static assertion to check for missing
> elements can do its job properly. This will catch cases where a new
> Mesa format is added but the swrast texfetch code isn't updated.
> ---
> src/mesa/swrast/s_texfetch.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
> index 741dd87..7bfe3b9 100644
> --- a/src/mesa/swrast/s_texfetch.c
> +++ b/src/mesa/swrast/s_texfetch.c
> @@ -115,7 +115,7 @@ static struct {
> FetchTexelFunc Fetch2D;
> FetchTexelFunc Fetch3D;
> }
> -texfetch_funcs[MESA_FORMAT_COUNT] =
> +texfetch_funcs[] =
> {
> {
> MESA_FORMAT_NONE,
>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list