Hi, thanks for looking at this.
On 2015-08-03 16:18, Brian Paul wrote: > On 08/03/2015 06:01 AM, Daniel Scharrer wrote: >> Ping. >> >> Can someone please review and/or commit this. >> >> I noticed ARB_dsa is already exposed in Mesa 10.6 - should this patch be >> Cc'd to that? > > Probably. > >> >> -- >> Daniel >> >> On 2015-07-25 08:12, Daniel Scharrer wrote: >>> --- >>> >>> ARB_dsa / GL 4.5 add indexed GL_TEXTURE_BINDING_* and GL_SAMPLER_BINDING >>> queries, as well as a GL_TEXTURE_TARGET query on texture objects. >>> >>> The implementation for the GL_TEXTURE_BINDING_* and GL_SAMPLER_BINDING >>> queries is based on their non-indexed variants. To map the binding enum >>> to a texture target index I added a new helper based on >>> _mesa_tex_target_to_index. The non-indexed GL_TEXTURE_BINDING_* queries >>> use the offset stored in the get_hash for this, but that didn't seem >>> easy to access. >>> >>> src/mesa/main/get.c | 90 >>> ++++++++++++++++++++++++++++++++++++++++++++++++ >>> src/mesa/main/texparam.c | 12 +++++++ >>> 2 files changed, 102 insertions(+) >>> >>> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c >>> index ce78691..8ffa8b9 100644 >>> --- a/src/mesa/main/get.c >>> +++ b/src/mesa/main/get.c >>> @@ -1746,6 +1746,52 @@ _mesa_GetDoublev(GLenum pname, GLdouble *params) >>> } >>> } >>> >>> +/** >>> + * Convert a GL texture binding enum such as GL_TEXTURE_BINDING_2D >>> + * into the corresponding Mesa texture target index. >>> + * \return TEXTURE_x_INDEX or -1 if binding is invalid >>> + */ >>> +static int >>> +_mesa_tex_binding_to_index(const struct gl_context *ctx, GLenum binding) > > We already have this function in texobj.c: _mesa_tex_target_to_index() That one is for texture targets (GL_TEXTURE_2D, …) while the new one I added is for binding points (GL_TEXTURE_BINDING_2D, …). As far as I can tell the only existing mapping for these is the hash map used for non-indexed glGet*. -- Daniel _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
