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

Michel Dänzer michel at daenzer.net
Sun Feb 23 18:59:18 PST 2014


On Sam, 2014-02-22 at 03:04 +0000, Emil Velikov wrote:
> 
> 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;

VRAM makes more sense to me. If you wanted to consider GTT as well,
you'd need to combine it with VRAM somehow, rather than just reporting
its size instead of VRAM.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer



More information about the mesa-dev mailing list