On Tue, Feb 16, 2016 at 3:59 PM, Samuel Pitoiset
<samuel.pitoi...@gmail.com> wrote:
>  static inline const struct nvc0_hw_sm_query_cfg **
>  nvc0_hw_sm_get_queries(struct nvc0_screen *screen)
>  {
> +   const struct nvc0_hw_sm_query_cfg **queries = NULL;
>     struct nouveau_device *dev = screen->base.device;
>
> -   if (dev->chipset == 0xc0 || dev->chipset == 0xc8)
> -      return sm20_hw_sm_queries;
> -   return sm21_hw_sm_queries;
> +   switch (dev->chipset & ~0xf) {
> +   case 0xc0:
> +   case 0xd0:
> +      if (dev->chipset == 0xc0 || dev->chipset == 0xc8)
> +         queries = sm20_hw_sm_queries;
> +      else
> +         queries = sm21_hw_sm_queries;
> +      break;
> +   case 0xe0:
> +      queries = sm30_hw_sm_queries;
> +      break;
> +   case 0xf0:
> +   case 0x100:
> +      queries = sm35_hw_sm_queries;
> +      break;
> +   default:
> +      break;
> +   }
> +   return queries;
>  }

This might be wider to do based on 3d class. For example GK20A (aka
0xea chipset) uses SM35.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to