[Mesa-dev] [PATCH 10/24] spirv_extensions: add GL_ARB_spirv_extensions boilerplate
Emil Velikov
emil.l.velikov at gmail.com
Thu Nov 16 15:20:23 UTC 2017
Hi Eduardo,
On 15 November 2017 at 13:22, Eduardo Lima Mitev <elima at igalia.com> wrote:
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -8404,6 +8404,8 @@
>
> <xi:include href="ARB_gl_spirv.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
>
Nit: Please mention the gap here - 191-193
> +<xi:include href="ARB_spirv_extensions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
> +
> <!-- Non-ARB extensions sorted by extension number. -->
>
> --- a/src/mesa/main/get_hash_params.py
> +++ b/src/mesa/main/get_hash_params.py
> @@ -378,6 +378,9 @@ descriptor=[
> # GL_ARB_sampler_objects / GL 3.3 / GLES 3.0
> [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, NO_EXTRA" ],
>
> +# GL_ARB_spirv_extensions
> + [ "NUM_SPIR_V_EXTENSIONS", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
> +
There should be a EXTRA_EXT(ARB_spirv_extensions) further up and the
NO_EXTRA will become extra_ARB_spirv_extensions
> # GL_ARB_sync
> [ "MAX_SERVER_WAIT_TIMEOUT", "CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync" ],
>
> diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
> index 4c805ca4d51..d87e29c15af 100644
> --- a/src/mesa/main/getstring.c
> +++ b/src/mesa/main/getstring.c
> @@ -32,6 +32,7 @@
> #include "extensions.h"
> #include "mtypes.h"
> #include "macros.h"
> +#include "spirvextensions.h"
>
> /**
> * Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query.
> @@ -184,6 +185,12 @@ _mesa_GetStringi(GLenum name, GLuint index)
> return (const GLubyte *) 0;
> }
> return _mesa_get_enabled_extension(ctx, index);
> + case GL_SPIR_V_EXTENSIONS:
We should bail with GL_INVALID_ENUM when the extension is not available.
With the above and Eric's comments patches 1 and 10 are
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
-Emil
More information about the mesa-dev
mailing list