[Mesa-dev] [PATCH 15/18] docs: Import extension spec for GLX_MESA_query_renderer
Marek Olšák
maraeo at gmail.com
Fri Oct 25 02:35:30 CEST 2013
On Sat, Oct 12, 2013 at 12:10 AM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> The enumerated values are currently allocated from Intel's range.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> docs/MESA_query_renderer.spec | 381 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 381 insertions(+)
> create mode 100644 docs/MESA_query_renderer.spec
>
> diff --git a/docs/MESA_query_renderer.spec b/docs/MESA_query_renderer.spec
> new file mode 100644
> index 0000000..6d683ee
> --- /dev/null
> +++ b/docs/MESA_query_renderer.spec
> @@ -0,0 +1,381 @@
> +Name
> +
> + MESA_query_renderer
> +
> +Name Strings
> +
> + GLX_MESA_query_renderer
> +
> +Contact
> +
> + Ian Romanick <ian.d.romanick at intel.com>
> +
> +IP Status
> +
> + No known IP claims.
> +
> +Status
> +
> + Incomplete. DO NOT SHIP.
> +
> +Version
> +
> + Version 5, 14-February-2013
> +
> +Number
> +
> + TBD.
> +
> +Dependencies
> +
> + GLX 1.4 is required.
> +
> + GLX_ARB_create_context and GLX_ARB_create_context_profile are required.
> +
> + This extension interacts with GLX_EXT_create_context_es2_profile and
> + GLX_EXT_create_context_es_profile.
> +
> +Overview
> +
> + In many situations, applications want to detect characteristics of a
> + rendering device before creating a context for that device. Information
> + gathered at this stage may guide choices the application makes about
> + color depth, number of samples per-pixel, texture quality, and so on.
> + In addition, versions of supported APIs and implementation API
> + preference may also guide start-up decisions made by the application.
> + For example, one implementation may prefer vertex data be supplied using
> + methods only available in a compatibility profile, but another
> + implementation may only support the desired version in a core profile.
> +
> + There are also cases where more than one renderer may be available per
> + display. For example, there is typically a hardware implementation and
> + a software based implementation. There are cases where an application
> + may want to pick one over the other. One such situation is when the
> + software implementation supports more features than the hardware
> + implementation. Another situation is when a particular version of the
> + hardware implementation is blacklisted due to known bugs.
> +
> + This extension provides a mechanism for the application to query all of
> + the available renderers for a particular display and screen. In
> + addition, this extension provides a mechanism for applications to create
> + contexts with respect to a specific renderer.
> +
> +New Procedures and Functions
> +
> + Bool glXQueryRendererIntegerMESA(Display *dpy, int screen,
> + int renderer, int attribute,
> + unsigned int *value);
> + Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value);
> +
> + const char *glXQueryRendererStringMESA(Display *dpy, int screen,
> + int renderer, int attribute);
> +
> + const char *glXQueryCurrentRendererStringMESA(int attribute);
> +
> +New Tokens
> +
> + Accepted as an <attribute> in glXQueryRendererIntegerMESA:
Also accepted in glXQueryCurrentRendererIntegerMESA?
> +
> + GLX_RENDERER_VENDOR_ID_MESA 0x8183
> + GLX_RENDERER_DEVICE_ID_MESA 0x8184
> + GLX_RENDERER_VERSION_MESA 0x8185
> + GLX_RENDERER_ACCELERATED_MESA 0x8186
> + GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
> + GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
> + GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
> + GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
> + GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
> + GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
> + GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
> +
> + Accepted as an <attribute> in glXQueryRendererStringMESA:
Also accepted in glXQueryCurrentRendererStringMESA?
> +
> + GLX_RENDERER_VENDOR_ID_MESA
> + GLX_RENDERER_DEVICE_ID_MESA
> +
> + Accepted as an attribute name in <*attrib_list> in
> + glXCreateContextAttribsARB:
> +
> + GLX_RENDERER_ID_MESA 0x818E
> +
> +Additions to the OpenGL / WGL Specifications
> +
> + None. This specification is written for GLX.
> +
> +Additions to the GLX 1.4 Specification
> +
> + [Add the following to Section X.Y.Z of the GLX Specification]
> +
> + To obtain information about the available renderers for a particular
> + display and screen,
> +
> + void glXQueryRendererIntegerMESA(Display *dpy, int screen, int renderer,
> + int attribute, unsigned int *value);
> +
> + can be used. The value for <attribute> will be returned in one or more
> + integers specified by <value>. The values, data sizes, and descriptions
> + of each renderer attribute are listed in the table below.
> +
> + GLX renderer attribute number description
> + of values
> + ---------------------- --------- -----------
> + GLX_RENDERER_VENDOR_ID_MESA 1 PCI ID of the device vendor
> + GLX_RENDERER_DEVICE_ID_MESA 1 PCI ID of the device
> + GLX_RENDERER_VERSION_MESA 3 Major, minor, and patch level of
> + the renderer implementation
> + GLX_RENDERER_ACCELERATED_MESA 1 Boolean indicating whether or
> + not the renderer is hardware
> + accelerated
> + GLX_RENDERER_VIDEO_MEMORY_MESA 1 Number of megabytes of video
> + memory available to the renderer
> + GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA
> + 1 Boolean indicating whether or
> + not the renderer uses a unified
> + memory architecture or has
> + separate "on-card" and GART
> + memory.
> + GLX_RENDERER_PREFERRED_PROFILE_MESA
> + 1 Bitmask of the preferred context
> + profile for this renderer. This
> + value is suitable to be supplied
> + with the
> + GLX_CONTEXT_PROFILE_MASK_ARB
> + attribute to
> + glXCreateContextAttribsARB
> + GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA
> + 2 Maximum core profile major and
> + minor version supported by the
> + renderer
> + GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA
> + 2 Maximum compatibility profile
> + major and minor version
> + supported by the renderer
> + GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA
> + 2 Maximum OpenGL ES 1.x
> + major and minor version
> + supported by the renderer
> + GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA
> + 2 Maximum OpenGL ES 2.x or 3.x
> + major and minor version
> + supported by the renderer
> +
> + In the table, boolean attributes will have either the value 0 or 1.
> +
> + GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA,
> + GLX_RENDERER_OPENGL_COMAPTIBILITY_PROFILE_VERSION_MESA,
Typo: COMPATIBILITY.
Acked-by: Marek Olšák <marek.olsak at amd.com>
It's a nice extension, but it's quite unlikely I will have time to work on it.
Marek
More information about the mesa-dev
mailing list