[Mesa-dev] [PATCH EGL/MESA] EGL/mesa: Initial writeup for MESA_query_renderer
Veluri Mithun
velurimithun38 at gmail.com
Mon Nov 5 04:34:28 UTC 2018
Signed-off-by: Veluri Mithun <velurimithun38 at gmail.com>
---
docs/specs/EGL_MESA_query_renderer.txt | 241 +++++++++++++++++++++++++
1 file changed, 241 insertions(+)
create mode 100644 docs/specs/EGL_MESA_query_renderer.txt
diff --git a/docs/specs/EGL_MESA_query_renderer.txt b/docs/specs/EGL_MESA_query_renderer.txt
new file mode 100644
index 0000000000..5aff445b16
--- /dev/null
+++ b/docs/specs/EGL_MESA_query_renderer.txt
@@ -0,0 +1,241 @@
+Name
+
+ MESA_query_renderer
+
+Name Strings
+
+ EGL_MESA_query_renderer
+
+Contact
+
+ Rob Clark <robdclark 'at' gmail.com>
+ Nicolai Hähnle <Nicolai.Haehnle 'at' amd.com>
+
+Contibutors
+
+ Veluri Mithun <velurimithun38 'at' gmail.com>
+
+Status
+
+ XXX - Not complete yet!!! (draft)
+
+Version
+
+ Version 1, 2018-08-24
+
+Number
+
+ EGL Extension ###
+
+Dependencies
+
+ EGL 1.4 is required.
+
+ EGL_ARB_create_context and EGL_ARB_create_context_profile are required.
+
+ This extension interacts with EGL_EXT_create_context_es2_profile and
+ EGL_EXT_create_context_es_profile.
+
+New Procedures and Functions
+
+ Bool EGLQueryRendererIntegerMESA(EGLDisplay *dpy, int screen,
+ int renderer, int attribute,
+ unsigned int *value);
+
+ Bool EGLQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value);
+
+ const char *EGLQueryRendererStringMESA(EGLDisplay *dpy, int screen,
+ int renderer, int attribute);
+
+ const char *EGLQueryCurrentRendererStringMESA(int attribute);
+
+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.
+
+IP Status
+
+ No IP claims
+
+New Tokens
+
+ Accepted as an <attribute> in EGLQueryRendererIntegerMESA and
+ EGLQueryCurrentRendererIntegerMESA:
+
+ EGL_RENDERER_VENDOR_ID_MESA 0xXXXX
+ EGL_RENDERER_DEVICE_ID_MESA 0xXXXX
+ EGL_RENDERER_VERSION_MESA 0xXXXX
+ EGL_RENDERER_ACCELERATED_MESA 0xXXXX
+ EGL_RENDERER_VIDEO_MEMORY_MESA 0xXXXX
+ EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0xXXXX
+ EGL_RENDERER_PREFERRED_PROFILE_MESA 0xXXXX
+ EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0xXXXX
+ EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0xXXXX
+ EGL_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0xXXXX
+ EGL_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0xXXXX
+
+ Accepted as an <attribute> in EGLQueryRendererStringMESA and
+ EGLQueryCurrentRendererStringMESA:
+
+ EGL_RENDERER_VENDOR_ID_MESA
+ EGL_RENDERER_DEVICE_ID_MESA
+
+ Accepted as an attribute name in <*attrib_list> in
+ EGLCreateContextAttribsARB:
+
+ EGL_RENDERER_ID_MESA 0xXXXX
+
+Additions to the EGL 1.4 Specification
+
+ [Add the following to Section X.Y.Z of the EGL Specification]
+
+ To obtain information about the available renderers for a particular
+ display and screen,
+
+ Bool EGLQueryRendererIntegerMESA(EGLDisplay *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.
+
+ EGL renderer attribute number description
+ of values
+ ---------------------- --------- -----------
+ EGL_RENDERER_VENDOR_ID_MESA 1 PCI ID of the device vendor
+ EGL_RENDERER_DEVICE_ID_MESA 1 PCI ID of the device
+ EGL_RENDERER_VERSION_MESA 3 Major, minor, and patch level of
+ the renderer implementation
+ EGL_RENDERER_ACCELERATED_MESA 1 Boolean indicating whether or
+ not the renderer is hardware
+ accelerated
+ EGL_RENDERER_VIDEO_MEMORY_MESA 1 Number of megabytes of video
+ memory available to the renderer
+ EGL_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.
+ EGL_RENDERER_PREFERRED_PROFILE_MESA
+ 1 Bitmask of the preferred context
+ profile for this renderer. This
+ value is suitable to be supplied
+ with the
+ EGL_CONTEXT_PROFILE_MASK_ARB
+ attribute to
+ EGLCreateContextAttribsARB
+ EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA
+ 2 Maximum core profile major and
+ minor version supported by the
+ renderer
+ EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA
+ 2 Maximum compatibility profile
+ major and minor version
+ supported by the renderer
+ EGL_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA
+ 2 Maximum OpenGL ES 1.x
+ major and minor version
+ supported by the renderer
+ EGL_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.
+
+ EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA,
+ EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA,
+ EGL_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA, and
+ EGL_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA each return <0, 0> in
+ *value if no version of that profile is supported.
+
+ EGL_RENDERER_VENDOR_ID_MESA and EGL_RENDERER_DEVICE_ID_MESA may return
+ 0xFFFFFFFF if the device does not have a PCI ID (because it is not a PCI
+ device) or if the PCI ID is not available. In this case the application
+ should rely on the string query instead.
+
+ If <attribute> is not a recognized value, False is returned, but no EGL
+ error is generated. Otherwise, True is returned.
+
+ String versions of some attributes may also be queried using
+
+ const char *EGLQueryRendererStringMESA(EGLDisplay *dpy, int screen,
+ int renderer, int attribute);
+
+ 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.
+
+ EGL renderer attribute description
+ ---------------------- -----------
+ EGL_RENDERER_VENDOR_ID_MESA Name of the renderer provider. This may
+ differ from the vendor name of the
+ underlying hardware.
+ EGL_RENDERER_DEVICE_ID_MESA Name of the renderer. This may differ from
+ the name of the underlying hardware (e.g.,
+ for a software renderer).
+
+ If <attribute> is not a recognized value, NULL is returned, but no EGL
+ error is generated.
+
+ The string returned for EGL_RENDERER_VENDOR_ID_MESA will have the same
+ format as the string that would be returned by glGetString of GL_VENDOR.
+ It may, however, have a different value.
+
+ The string returned for EGL_RENDERER_DEVICE_ID_MESA will have the same
+ format as the string that would be returned by glGetString of GL_RENDERER.
+ It may, however, have a different value.
+
+
+ [Add to section section 3.3.7 "Rendering Contexts"]
+
+ The attribute name EGL_RENDERER_ID_MESA specified the index of the render
+ against which the context should be created. The default value of
+ EGL_RENDERER_ID_MESA is 0.
+
+
+ [Add to list of errors for EGLCreateContextAttribsARB in section section
+ 3.3.7 "Rendering Contexts"]
+
+ * If the value of EGL_RENDERER_ID_MESA specifies a non-existent
+ renderer, BadMatch is generated.
+
+Dependencies on EGL_EXT_create_context_es_profile and
+EGL_EXT_create_context_es2_profile
+
+ If neither extension is supported, remove all mention of
+ EGL_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA from the spec.
+
+ If EGL_EXT_create_context_es_profile is not supported, remove all mention of
+ EGL_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA from the spec.
+
+Issues
+
+ See also issues in GLX_MESA_query_renderer extension.
+
+Revision History
+
+ Version 1, 2018-08-24
+
--
2.17.1
More information about the mesa-dev
mailing list