[Mesa-dev] [PATCH 21/25] gallium/r300/r600/radeonsi: handle query_renderer caps

Marek Olšák maraeo at gmail.com
Mon Feb 24 12:43:21 PST 2014


The GTT size shouldn't be reported. I think it's 1 GB on r600 and
later. It's not really important to know that, because the memory is
quite slow.

Marek

On Sat, Feb 22, 2014 at 4:04 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  src/gallium/drivers/r300/r300_screen.c | 12 ++++++++++++
>  src/gallium/drivers/r600/r600_pipe.c   | 12 ++++++++++++
>  src/gallium/drivers/radeonsi/si_pipe.c | 12 ++++++++++++
>  3 files changed, 36 insertions(+)
>
> diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
> index 6be922e..bc0aa37 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -205,6 +205,18 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>              return 11;
>          case PIPE_CAP_MAX_GL_ES2_VERSION:
>              return 20;
> +
> +        case PIPE_CAP_VENDOR_ID:
> +                return 0x1002;
> +        case PIPE_CAP_DEVICE_ID:
> +                return r300screen->info.pci_id;
> +        case PIPE_CAP_ACCELERATED:
> +                return 1;
> +        case PIPE_CAP_VIDEO_MEMORY:
> +                /* XXX: Do we want to return vram_size or gart_size ? */
> +                return r300screen->info.vram_size >> 20;
> +        case PIPE_CAP_UMA:
> +                return 0;
>      }
>      return 0;
>  }
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index 02914b9..274877d 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -462,6 +462,18 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>                 return 11;
>         case PIPE_CAP_MAX_GL_ES2_VERSION:
>                 return 30;
> +
> +       case PIPE_CAP_VENDOR_ID:
> +               return 0x1002;
> +       case PIPE_CAP_DEVICE_ID:
> +               return rscreen->b.info.pci_id;
> +       case PIPE_CAP_ACCELERATED:
> +               return 1;
> +       case PIPE_CAP_VIDEO_MEMORY:
> +               /* XXX: Do we want to return vram_size or gart_size ? */
> +               return rscreen->b.info.vram_size >> 20;
> +       case PIPE_CAP_UMA:
> +               return 0;
>         }
>         return 0;
>  }
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index 4e6478c..adbc981 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -341,6 +341,18 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>                 return 11;
>         case PIPE_CAP_MAX_GL_ES2_VERSION:
>                 return 30;
> +
> +       case PIPE_CAP_VENDOR_ID:
> +               return 0x1002;
> +       case PIPE_CAP_DEVICE_ID:
> +               return sscreen->b.info.pci_id;
> +       case PIPE_CAP_ACCELERATED:
> +               return 1;
> +       case PIPE_CAP_VIDEO_MEMORY:
> +               /* XXX: Do we want to return vram_size or gart_size ? */
> +               return sscreen->b.info.vram_size >> 20;
> +       case PIPE_CAP_UMA:
> +               return 0;
>         }
>         return 0;
>  }
> --
> 1.9.0
>
> _______________________________________________
> 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