Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>


On November 10, 2017 12:17:38 PM Jordan Justen <jordan.l.jus...@intel.com> wrote:

On 2017-11-10 08:43:37, Ian Romanick wrote:

The one thing I would add is an issues section with a single issue about
the decision to use a single enum for everything.

How does this sound?

diff --git a/docs/specs/MESA_program_binary_formats.txt b/docs/specs/MESA_program_binary_formats.txt
index 65bd1a1a739..65a2adab8b7 100644
--- a/docs/specs/MESA_program_binary_formats.txt
+++ b/docs/specs/MESA_program_binary_formats.txt
@@ -54,6 +54,26 @@ New State

     None.

+Issues
+
+    (1) Should we have a different format for each driver?
+
+      RESOLVED. Since Mesa supports multiple hardware drivers, having
+      a single format may cause separate drivers to have to reject a
+      binary for another type of hardware on the same machine. This
+      could lead to an application having to invalidate and get a new
+      binary more often.
+
+      This extension, at least initially, does not to attempt to
+      define a new token for each driver since systems that run
+      multiple drivers are not the common case.
+
+      Additionally, drivers in Mesa are now gaining the ability to
+      transparently cache shader programs. Therefore, although they
+      may need to provide the application with a new binary more
+      often, they likely can retrieve the program from the cache
+      rather than performing an expensive recompile.
+
 Revision History

     #01    10/28/2017    Jordan Justen       First draft.




On November 9, 2017 12:42:58 AM Jordan Justen <jordan.l.jus...@intel.com>
wrote:

> Similar idea to Tim's "spec: MESA_program_binary", but simplified and
> written to support both ARB_get_program_binary and
> OES_get_program_binary.
>
> Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
> Cc: Ian Romanick <i...@freedesktop.org>
> Cc: Timothy Arceri <tarc...@itsqueeze.com>
> ---
> docs/specs/MESA_program_binary_formats.txt | 59 ++++++++++++++++++++++++++++++
>  docs/specs/enums.txt                       |  3 ++
>  src/mapi/glapi/registry/gl.xml             |  2 +-
>  3 files changed, 63 insertions(+), 1 deletion(-)
>  create mode 100644 docs/specs/MESA_program_binary_formats.txt
>
> diff --git a/docs/specs/MESA_program_binary_formats.txt
> b/docs/specs/MESA_program_binary_formats.txt
> new file mode 100644
> index 00000000000..65bd1a1a739
> --- /dev/null
> +++ b/docs/specs/MESA_program_binary_formats.txt
> @@ -0,0 +1,59 @@
> +Name
> +
> +    MESA_program_binary_formats
> +
> +Name Strings
> +
> +    GL_MESA_program_binary_formats
> +
> +Contact
> +
> +    Jordan Justen (jordan.l.justen 'at' intel.com)
> +
> +Status
> +
> +    Complete.
> +
> +Version
> +
> +    Last Modified Date: October 28, 2017
> +    Revision: #1
> +
> +Number
> +
> +    TBD
> +
> +Dependencies
> +
> +    For use with the OpenGL ARB_get_program_binary extension, or the
> +    OpenGL ES OES_get_program_binary extension.
> +
> +Overview
> +
> +    The get_program_binary exensions require a GLenum binaryFormat.
> +    This extension documents that format for use with Mesa.
> +
> +New Procedures and Functions
> +
> +    None.
> +
> +New Tokens
> +
> +        GL_PROGRAM_BINARY_FORMAT_MESA           0x875F
> +
> +    For ARB_get_program_binary, GL_PROGRAM_BINARY_FORMAT_MESA may be
> +    returned from GetProgramBinary calls in the <binaryFormat>
> +    parameter and when retrieving the value of PROGRAM_BINARY_FORMATS.
> +
> +    For OES_get_program_binary, GL_PROGRAM_BINARY_FORMAT_MESA may be
> +    returned from GetProgramBinaryOES calls in the <binaryFormat>
> +    parameter and when retrieving the value of
> +    PROGRAM_BINARY_FORMATS_OES.
> +
> +New State
> +
> +    None.
> +
> +Revision History
> +
> +    #01    10/28/2017    Jordan Justen       First draft.
> diff --git a/docs/specs/enums.txt b/docs/specs/enums.txt
> index 4b0485f3490..8109cc50f97 100644
> --- a/docs/specs/enums.txt
> +++ b/docs/specs/enums.txt
> @@ -63,6 +63,9 @@ GL_MESAX_texture_stack:
>       GL_TEXTURE_1D_STACK_BINDING_MESAX    0x875D
>       GL_TEXTURE_2D_STACK_BINDING_MESAX    0x875E
>
> +GL_MESA_program_binary_formats:
> +        GL_PROGRAM_BINARY_FORMAT_MESA           0x875F
> +
>  GL_MESA_program_debug
>       GL_FRAGMENT_PROGRAM_POSITION_MESA       0x8BB0
>       GL_FRAGMENT_PROGRAM_CALLBACK_MESA       0x8BB1
> diff --git a/src/mapi/glapi/registry/gl.xml b/src/mapi/glapi/registry/gl.xml
> index cbabe11b398..7360414bb35 100644
> --- a/src/mapi/glapi/registry/gl.xml
> +++ b/src/mapi/glapi/registry/gl.xml
> @@ -5505,7 +5505,7 @@ typedef unsigned int GLhandleARB;
>          <enum value="0x875C" name="GL_PROXY_TEXTURE_2D_STACK_MESAX"/>
>          <enum value="0x875D" name="GL_TEXTURE_1D_STACK_BINDING_MESAX"/>
>          <enum value="0x875E" name="GL_TEXTURE_2D_STACK_BINDING_MESAX"/>
> -            <unused start="0x875F" vendor="MESA"/>
> +        <enum value="0x875F" name="GL_PROGRAM_BINARY_FORMAT_MESA"/>
>      </enums>
>
>      <enums namespace="GL" start="0x8760" end="0x883F" vendor="AMD">
> --
> 2.14.1




_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to