[Mesa-dev] [PATCH 21/25] gallium/r300/r600/radeonsi: handle query_renderer caps
Ian Romanick
idr at freedesktop.org
Tue Feb 25 09:23:55 PST 2014
On 02/21/2014 07:04 PM, Emil Velikov 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;
VRAM. What application developers want to know is, "How much memory can
I use without falling off a performance cliff?"
> + 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;
> }
>
More information about the mesa-dev
mailing list