[Mesa-dev] [PATCH 01/41] glapi: Added ARB_direct_state_access.xml file.
Emil Velikov
emil.l.velikov at gmail.com
Thu Jan 22 09:27:18 PST 2015
On 05/01/15 17:45, Laura Ekstrand wrote:
> This comment is vague. Do you have a specific recommendation for the
> code here?
>
Seems like I'm way too subtle - yes I have a few.
1. Add ARB_direct_state_access to struct gl_extension
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3731,6 +3731,7 @@ struct gl_extensions
GLboolean ARB_depth_clamp;
GLboolean ARB_depth_texture;
GLboolean ARB_derivative_control;
+ GLboolean ARB_direct_state_access
GLboolean ARB_draw_buffers_blend;
GLboolean ARB_draw_elements_base_vertex;
2. Use it in the extensions table.
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -103,6 +103,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_depth_clamp", o(ARB_depth_clamp),
GL, 2003 },
{ "GL_ARB_depth_texture",
o(ARB_depth_texture), GLL, 2001 },
{ "GL_ARB_derivative_control",
o(ARB_derivative_control), GL, 2014 },
+ { "GL_ARB_direct_state_access",
o(ARB_direct_state_access), GL, 2014 },
3. Make use of if when the spec amends existing behaviour - most of the
spec text as of section "New Tokens" onwards. Clearly with this series
you're adding the new entry points(functions) so it does not apply here :)
if (foo->Extensions.ARB_direct_state_access) {
....
}
Pretty much every extension that was added to mesa follows this approach
so keeping up with traditions is always nice.
Cheers,
Emil
P.S. Pardon if my nitpicking came out a bit wierd.
More information about the mesa-dev
mailing list