From bc16c73407d11bb6702cf7de9925bfaeb80a5272 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 15 May 2011 16:41:54 +1000 Subject: gallium: block signals for new thread when spawning threads I'm hard pressed to think of any reason a gallium thread would want to receive a signal, especially considering its probably loaded as a library and you don't want the threads interfering with the main threads signal handling. This solves a problem loading llvmpipe into the X server for AIGLX, where the X server relies on the SIGIO signal going to the main thread, but once llvmpipe loads the SIGIO can end up in any of its threads. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/os/os_thread.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 8173d4cc37f..6b4281ad661 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -56,7 +56,14 @@ typedef pthread_t pipe_thread; static INLINE pipe_thread pipe_thread_create( void *(* routine)( void *), void *param ) { pipe_thread thread; - if (pthread_create( &thread, NULL, routine, param )) + sigset_t saved_set, new_set; + int ret; + + sigfillset(&new_set); + pthread_sigmask(SIG_SETMASK, &new_set, &saved_set); + ret = pthread_create( &thread, NULL, routine, param ); + pthread_sigmask(SIG_SETMASK, &saved_set, NULL); + if (ret) return 0; return thread; } -- cgit v1.2.3 From c9aa3bbda44470c0a92c675abf4bbab83aba3fb7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 14 May 2011 18:04:08 +1000 Subject: st/mesa: overhaul vertex/fragment sampler and sampler views. This fixes piglits fragment-and-vertex-texturing test on llvmpipe for me. I've no idea if someone had another plan for this that is smarter than what I've done here, but what I've basically done is split fragment and vertex sampler and sampler_view setup function, factor out the common chunks of both. side-cleanups: drop st->state.sampler_list - unused don't update border color if we have no border color. should fix https://bugs.freedesktop.org/show_bug.cgi?id=35849 Signed-off-by: Dave Airlie Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_atom_sampler.c | 186 ++++++++++++++++++------------- src/mesa/state_tracker/st_atom_texture.c | 185 ++++++++++++++++++------------ src/mesa/state_tracker/st_context.c | 3 - src/mesa/state_tracker/st_context.h | 5 +- 4 files changed, 225 insertions(+), 154 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index e3d6cbb8e12..ccbd5489226 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -120,14 +120,110 @@ gl_filter_to_img_filter(GLenum filter) } } +static void convert_sampler(struct st_context *st, + struct pipe_sampler_state *sampler, + GLuint texUnit) +{ + struct gl_texture_object *texobj; + struct gl_sampler_object *msamp; + + texobj = st->ctx->Texture.Unit[texUnit]._Current; + if (!texobj) { + texobj = st_get_default_texture(st); + } + + msamp = _mesa_get_samplerobj(st->ctx, texUnit); + sampler->wrap_s = gl_wrap_xlate(msamp->WrapS); + sampler->wrap_t = gl_wrap_xlate(msamp->WrapT); + sampler->wrap_r = gl_wrap_xlate(msamp->WrapR); + + sampler->min_img_filter = gl_filter_to_img_filter(msamp->MinFilter); + sampler->min_mip_filter = gl_filter_to_mip_filter(msamp->MinFilter); + sampler->mag_img_filter = gl_filter_to_img_filter(msamp->MagFilter); + + if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB) + sampler->normalized_coords = 1; + + sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias + + msamp->LodBias; + + sampler->min_lod = CLAMP(msamp->MinLod, + 0.0f, + (GLfloat) texobj->MaxLevel - texobj->BaseLevel); + sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel, + msamp->MaxLod); + if (sampler->max_lod < sampler->min_lod) { + /* The GL spec doesn't seem to specify what to do in this case. + * Swap the values. + */ + float tmp = sampler->max_lod; + sampler->max_lod = sampler->min_lod; + sampler->min_lod = tmp; + assert(sampler->min_lod <= sampler->max_lod); + } + + if (msamp->BorderColor.ui[0] || + msamp->BorderColor.ui[1] || + msamp->BorderColor.ui[2] || + msamp->BorderColor.ui[3]) { + struct gl_texture_image *teximg; + + teximg = texobj->Image[0][texobj->BaseLevel]; + + st_translate_color(msamp->BorderColor.f, + teximg ? teximg->_BaseFormat : GL_RGBA, + sampler->border_color); + } + + sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? + 0 : (GLuint) msamp->MaxAnisotropy); + + /* only care about ARB_shadow, not SGI shadow */ + if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { + sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE; + sampler->compare_func + = st_compare_func_to_pipe(msamp->CompareFunc); + } + + sampler->seamless_cube_map = + st->ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; +} -static void -update_samplers(struct st_context *st) +static void +update_vertex_samplers(struct st_context *st) { struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current; + GLuint su; + + st->state.num_vertex_samplers = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < st->ctx->Const.MaxVertexTextureImageUnits; su++) { + struct pipe_sampler_state *sampler = st->state.vertex_samplers + su; + + memset(sampler, 0, sizeof(*sampler)); + + if (vprog->Base.SamplersUsed & (1 << su)) { + GLuint texUnit; + + texUnit = vprog->Base.SamplerUnits[su]; + + convert_sampler(st, sampler, texUnit); + + st->state.num_vertex_samplers = su + 1; + + cso_single_vertex_sampler(st->cso_context, su, sampler); + } else { + cso_single_vertex_sampler(st->cso_context, su, NULL); + } + } + cso_single_vertex_sampler_done(st->cso_context); +} + +static void +update_fragment_samplers(struct st_context *st) +{ struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; - const GLbitfield samplersUsed = (vprog->Base.SamplersUsed | - fprog->Base.SamplersUsed); GLuint su; st->state.num_samplers = 0; @@ -138,95 +234,33 @@ update_samplers(struct st_context *st) memset(sampler, 0, sizeof(*sampler)); - if (samplersUsed & (1 << su)) { - struct gl_texture_object *texobj; - struct gl_texture_image *teximg; - struct gl_sampler_object *msamp; + if (fprog->Base.SamplersUsed & (1 << su)) { GLuint texUnit; - if (fprog->Base.SamplersUsed & (1 << su)) - texUnit = fprog->Base.SamplerUnits[su]; - else - texUnit = vprog->Base.SamplerUnits[su]; - - texobj = st->ctx->Texture.Unit[texUnit]._Current; - if (!texobj) { - texobj = st_get_default_texture(st); - } - - teximg = texobj->Image[0][texobj->BaseLevel]; - - msamp = _mesa_get_samplerobj(st->ctx, texUnit); - - sampler->wrap_s = gl_wrap_xlate(msamp->WrapS); - sampler->wrap_t = gl_wrap_xlate(msamp->WrapT); - sampler->wrap_r = gl_wrap_xlate(msamp->WrapR); - - sampler->min_img_filter = gl_filter_to_img_filter(msamp->MinFilter); - sampler->min_mip_filter = gl_filter_to_mip_filter(msamp->MinFilter); - sampler->mag_img_filter = gl_filter_to_img_filter(msamp->MagFilter); - - if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB) - sampler->normalized_coords = 1; - - sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias + - msamp->LodBias; - - sampler->min_lod = CLAMP(msamp->MinLod, - 0.0f, - (GLfloat) texobj->MaxLevel - texobj->BaseLevel); - sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel, - msamp->MaxLod); - if (sampler->max_lod < sampler->min_lod) { - /* The GL spec doesn't seem to specify what to do in this case. - * Swap the values. - */ - float tmp = sampler->max_lod; - sampler->max_lod = sampler->min_lod; - sampler->min_lod = tmp; - assert(sampler->min_lod <= sampler->max_lod); - } - - st_translate_color(msamp->BorderColor.f, - teximg ? teximg->_BaseFormat : GL_RGBA, - sampler->border_color); - - sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? - 0 : (GLuint) msamp->MaxAnisotropy); - - /* only care about ARB_shadow, not SGI shadow */ - if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { - sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE; - sampler->compare_func - = st_compare_func_to_pipe(msamp->CompareFunc); - } - - sampler->seamless_cube_map = - st->ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; + texUnit = fprog->Base.SamplerUnits[su]; + + convert_sampler(st, sampler, texUnit); st->state.num_samplers = su + 1; /*printf("%s su=%u non-null\n", __FUNCTION__, su);*/ cso_single_sampler(st->cso_context, su, sampler); - if (su < st->ctx->Const.MaxVertexTextureImageUnits) { - cso_single_vertex_sampler(st->cso_context, su, sampler); - } } else { /*printf("%s su=%u null\n", __FUNCTION__, su);*/ cso_single_sampler(st->cso_context, su, NULL); - if (su < st->ctx->Const.MaxVertexTextureImageUnits) { - cso_single_vertex_sampler(st->cso_context, su, NULL); - } } } cso_single_sampler_done(st->cso_context); - if (st->ctx->Const.MaxVertexTextureImageUnits > 0) { - cso_single_vertex_sampler_done(st->cso_context); - } } +static void +update_samplers(struct st_context *st) +{ + update_fragment_samplers(st); + update_vertex_samplers(st); +} const struct st_tracked_state st_update_sampler = { "st_update_sampler", /* name */ diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 9d437ad086f..990b50438f0 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -182,90 +182,132 @@ st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj, return stObj->sampler_view; } +static GLboolean +update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view, + GLuint texUnit) +{ + struct pipe_context *pipe = st->pipe; + const struct gl_sampler_object *samp; + struct gl_texture_object *texObj; + struct st_texture_object *stObj; + enum pipe_format st_view_format; + GLboolean retval; + + samp = _mesa_get_samplerobj(st->ctx, texUnit); + + texObj = st->ctx->Texture.Unit[texUnit]._Current; + + if (!texObj) { + texObj = st_get_default_texture(st); + samp = &texObj->Sampler; + } + stObj = st_texture_object(texObj); + + retval = st_finalize_texture(st->ctx, st->pipe, texObj); + if (!retval) { + /* out of mem */ + return GL_FALSE; + } + + /* Determine the format of the texture sampler view */ + st_view_format = stObj->pt->format; + { + const struct st_texture_image *firstImage = + st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); + const gl_format texFormat = firstImage->base.TexFormat; + enum pipe_format firstImageFormat = + st_mesa_format_to_pipe_format(texFormat); + + if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) && + (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) { + /* don't do sRGB->RGB conversion. Interpret the texture + * texture data as linear values. + */ + const gl_format linearFormat = + _mesa_get_srgb_format_linear(texFormat); + firstImageFormat = st_mesa_format_to_pipe_format(linearFormat); + } + + if (firstImageFormat != stObj->pt->format) + st_view_format = firstImageFormat; + } + + + /* if sampler view has changed dereference it */ + if (stObj->sampler_view) { + if (check_sampler_swizzle(stObj->sampler_view, + stObj->base._Swizzle, + samp->DepthMode) || + (st_view_format != stObj->sampler_view->format) || + stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) { + pipe_sampler_view_reference(&stObj->sampler_view, NULL); + } + } + + *sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe, + samp, + st_view_format); + return GL_TRUE; +} static void -update_textures(struct st_context *st) +update_vertex_textures(struct st_context *st) { - struct pipe_context *pipe = st->pipe; struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current; - struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; - const GLbitfield samplersUsed = (vprog->Base.SamplersUsed | - fprog->Base.SamplersUsed); GLuint su; - st->state.num_textures = 0; + st->state.num_vertex_textures = 0; /* loop over sampler units (aka tex image units) */ for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { struct pipe_sampler_view *sampler_view = NULL; - enum pipe_format st_view_format; - if (samplersUsed & (1 << su)) { - struct gl_texture_object *texObj; - struct st_texture_object *stObj; + if (vprog->Base.SamplersUsed & (1 << su)) { GLboolean retval; GLuint texUnit; - const struct gl_sampler_object *samp; - if (fprog->Base.SamplersUsed & (1 << su)) - texUnit = fprog->Base.SamplerUnits[su]; - else - texUnit = vprog->Base.SamplerUnits[su]; + texUnit = vprog->Base.SamplerUnits[su]; - samp = _mesa_get_samplerobj(st->ctx, texUnit); + retval = update_single_texture(st, &sampler_view, texUnit); + if (retval == GL_FALSE) + continue; - texObj = st->ctx->Texture.Unit[texUnit]._Current; + st->state.num_vertex_textures = su + 1; - if (!texObj) { - texObj = st_get_default_texture(st); - samp = &texObj->Sampler; - } - stObj = st_texture_object(texObj); + } + pipe_sampler_view_reference(&st->state.sampler_vertex_views[su], sampler_view); + } - retval = st_finalize_texture(st->ctx, st->pipe, texObj); - if (!retval) { - /* out of mem */ - continue; - } + if (st->ctx->Const.MaxVertexTextureImageUnits > 0) { + GLuint numUnits = MIN2(st->state.num_vertex_textures, + st->ctx->Const.MaxVertexTextureImageUnits); + cso_set_vertex_sampler_views(st->cso_context, + numUnits, + st->state.sampler_vertex_views); + } +} - /* Determine the format of the texture sampler view */ - st_view_format = stObj->pt->format; - { - const struct st_texture_image *firstImage = - st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); - const gl_format texFormat = firstImage->base.TexFormat; - enum pipe_format firstImageFormat = - st_mesa_format_to_pipe_format(texFormat); - - if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) && - (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) { - /* don't do sRGB->RGB conversion. Interpret the texture - * texture data as linear values. - */ - const gl_format linearFormat = - _mesa_get_srgb_format_linear(texFormat); - firstImageFormat = st_mesa_format_to_pipe_format(linearFormat); - } - - if (firstImageFormat != stObj->pt->format) - st_view_format = firstImageFormat; - } +static void +update_fragment_textures(struct st_context *st) +{ + struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; + GLuint su; - st->state.num_textures = su + 1; + st->state.num_textures = 0; - /* if sampler view has changed dereference it */ - if (stObj->sampler_view) { - if (check_sampler_swizzle(stObj->sampler_view, - stObj->base._Swizzle, - samp->DepthMode) || - (st_view_format != stObj->sampler_view->format) || - stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) { - pipe_sampler_view_reference(&stObj->sampler_view, NULL); - } - } + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_view *sampler_view = NULL; + if (fprog->Base.SamplersUsed & (1 << su)) { + GLboolean retval; + GLuint texUnit; + + texUnit = fprog->Base.SamplerUnits[su]; - sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe, - samp, - st_view_format); + retval = update_single_texture(st, &sampler_view, texUnit); + if (retval == GL_FALSE) + continue; + + st->state.num_textures = su + 1; } pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view); } @@ -273,16 +315,14 @@ update_textures(struct st_context *st) cso_set_fragment_sampler_views(st->cso_context, st->state.num_textures, st->state.sampler_views); - - if (st->ctx->Const.MaxVertexTextureImageUnits > 0) { - GLuint numUnits = MIN2(st->state.num_textures, - st->ctx->Const.MaxVertexTextureImageUnits); - cso_set_vertex_sampler_views(st->cso_context, - numUnits, - st->state.sampler_views); - } } +static void +update_textures(struct st_context *st) +{ + update_fragment_textures(st); + update_vertex_textures(st); +} const struct st_tracked_state st_update_texture = { "st_update_texture", /* name */ @@ -293,9 +333,6 @@ const struct st_tracked_state st_update_texture = { update_textures /* update */ }; - - - static void finalize_textures(struct st_context *st) { diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index ce78956e359..6eddbfc88e4 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -133,9 +133,6 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe ) else st->internal_target = PIPE_TEXTURE_RECT; - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) - st->state.sampler_list[i] = &st->state.samplers[i]; - for (i = 0; i < 3; i++) { memset(&st->velems_util_draw[i], 0, sizeof(struct pipe_vertex_element)); st->velems_util_draw[i].src_offset = i * 4 * sizeof(float); diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 1fc9c1051a0..c6fc31801d6 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -90,7 +90,7 @@ struct st_context struct pipe_depth_stencil_alpha_state depth_stencil; struct pipe_rasterizer_state rasterizer; struct pipe_sampler_state samplers[PIPE_MAX_SAMPLERS]; - struct pipe_sampler_state *sampler_list[PIPE_MAX_SAMPLERS]; + struct pipe_sampler_state vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_clip_state clip; struct { void *ptr; @@ -98,12 +98,15 @@ struct st_context } constants[PIPE_SHADER_TYPES]; struct pipe_framebuffer_state framebuffer; struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS]; + struct pipe_sampler_view *sampler_vertex_views[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_scissor_state scissor; struct pipe_viewport_state viewport; unsigned sample_mask; GLuint num_samplers; + GLuint num_vertex_samplers; GLuint num_textures; + GLuint num_vertex_textures; GLuint poly_stipple[32]; /**< In OpenGL's bottom-to-top order */ } state; -- cgit v1.2.3 From b8033a5651fbf6f82258d8f0e846cc7324d744da Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 16 May 2011 10:36:36 +0200 Subject: egl: Compile wayland-drm.a into libEGL independent of egl_dri2 Fixes egl_gallium when egl_dri2 is not enabled. --- src/egl/main/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index cb8f0551293..6c242557e7f 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -54,6 +54,10 @@ OBJECTS = $(SOURCES:.c=.o) LOCAL_CFLAGS = -D_EGL_OS_UNIX=1 LOCAL_LIBS = +ifneq ($(findstring wayland, $(EGL_PLATFORMS)),) +LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a +endif + # egl_dri2 and egl_glx are built-ins ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2) LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2 @@ -61,9 +65,6 @@ LOCAL_LIBS += $(TOP)/src/egl/drivers/dri2/libegl_dri2.a ifneq ($(findstring x11, $(EGL_PLATFORMS)),) EGL_LIB_DEPS += $(XCB_DRI2_LIBS) endif -ifneq ($(findstring wayland, $(EGL_PLATFORMS)),) -LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a -endif EGL_LIB_DEPS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS) endif -- cgit v1.2.3 From 2b8e7215eb314aded42d6f13e1f5d6bbae7c7c9c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 15 May 2011 00:21:45 -0700 Subject: i965: Fix "Paramater" typo in gen6_wm_state.c. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen6_wm_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c index 33b233414c6..43e651db3ef 100644 --- a/src/mesa/drivers/dri/i965/gen6_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c @@ -42,7 +42,7 @@ gen6_prepare_wm_push_constants(struct brw_context *brw) const struct brw_fragment_program *fp = brw_fragment_program_const(brw->fragment_program); - /* Updates the ParamaterValues[i] pointers for all parameters of the + /* Updates the ParameterValues[i] pointers for all parameters of the * basic type of PROGRAM_STATE_VAR. */ /* XXX: Should this happen somewhere before to get our state flag set? */ -- cgit v1.2.3 From 1309d2ea723613f1e755dd7785d22456dd39bb08 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 10 May 2011 16:51:12 -0700 Subject: i965: Pass brw_compile pointer to brw_set_src[01]. This makes it symmetric with brw_set_dest, which is convenient, and will also allow for assertions to be made based off of intel->gen. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu.c | 2 +- src/mesa/drivers/dri/i965/brw_eu.h | 5 +- src/mesa/drivers/dri/i965/brw_eu_emit.c | 198 +++++++++++++++++--------------- 3 files changed, 107 insertions(+), 98 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index 7e63482d8fa..18f6a4de4d8 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -295,7 +295,7 @@ brw_resolve_cals(struct brw_compile *c) GLint offset = brw_sub_inst - brw_call_inst; /* patch brw_inst1 to point to brw_inst2 */ - brw_set_src1(brw_call_inst, brw_imm_d(offset * 16)); + brw_set_src1(c, brw_call_inst, brw_imm_d(offset * 16)); } /* free linked list of calls */ diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index 4eb67d57a5a..3243fdf39ac 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -1020,8 +1020,9 @@ void brw_math_invert( struct brw_compile *p, struct brw_reg dst, struct brw_reg src); -void brw_set_src1( struct brw_instruction *insn, - struct brw_reg reg ); +void brw_set_src1(struct brw_compile *p, + struct brw_instruction *insn, + struct brw_reg reg); void brw_set_uip_jip(struct brw_compile *p); diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 633cc03388a..83c06f5e3a7 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -210,8 +210,9 @@ validate_reg(struct brw_instruction *insn, struct brw_reg reg) /* 10. Check destination issues. */ } -static void brw_set_src0( struct brw_instruction *insn, - struct brw_reg reg ) +static void brw_set_src0(struct brw_compile *p, + struct brw_instruction *insn, + struct brw_reg reg) { if (reg.type != BRW_ARCHITECTURE_REGISTER_FILE) assert(reg.nr < 128); @@ -286,8 +287,9 @@ static void brw_set_src0( struct brw_instruction *insn, } -void brw_set_src1( struct brw_instruction *insn, - struct brw_reg reg ) +void brw_set_src1(struct brw_compile *p, + struct brw_instruction *insn, + struct brw_reg reg) { assert(reg.file != BRW_MESSAGE_REGISTER_FILE); @@ -355,7 +357,7 @@ void brw_set_src1( struct brw_instruction *insn, -static void brw_set_math_message( struct brw_context *brw, +static void brw_set_math_message( struct brw_compile *p, struct brw_instruction *insn, GLuint msg_length, GLuint response_length, @@ -365,8 +367,9 @@ static void brw_set_math_message( struct brw_context *brw, GLboolean saturate, GLuint dataType ) { + struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src1(p, insn, brw_imm_d(0)); if (intel->gen == 5) { insn->bits3.math_gen5.function = function; @@ -395,14 +398,15 @@ static void brw_set_math_message( struct brw_context *brw, } -static void brw_set_ff_sync_message(struct brw_context *brw, +static void brw_set_ff_sync_message(struct brw_compile *p, struct brw_instruction *insn, GLboolean allocate, GLuint response_length, GLboolean end_of_thread) { + struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src1(p, insn, brw_imm_d(0)); insn->bits3.urb_gen5.opcode = 1; /* FF_SYNC */ insn->bits3.urb_gen5.offset = 0; /* Not used by FF_SYNC */ @@ -422,7 +426,7 @@ static void brw_set_ff_sync_message(struct brw_context *brw, } } -static void brw_set_urb_message( struct brw_context *brw, +static void brw_set_urb_message( struct brw_compile *p, struct brw_instruction *insn, GLboolean allocate, GLboolean used, @@ -433,8 +437,9 @@ static void brw_set_urb_message( struct brw_context *brw, GLuint offset, GLuint swizzle_control ) { + struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src1(p, insn, brw_imm_d(0)); if (intel->gen >= 5) { insn->bits3.urb_gen5.opcode = 0; /* ? */ @@ -471,7 +476,7 @@ static void brw_set_urb_message( struct brw_context *brw, } } -static void brw_set_dp_write_message( struct brw_context *brw, +static void brw_set_dp_write_message( struct brw_compile *p, struct brw_instruction *insn, GLuint binding_table_index, GLuint msg_control, @@ -483,8 +488,9 @@ static void brw_set_dp_write_message( struct brw_context *brw, GLuint end_of_thread, GLuint send_commit_msg) { + struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; - brw_set_src1(insn, brw_imm_ud(0)); + brw_set_src1(p, insn, brw_imm_ud(0)); if (intel->gen >= 6) { insn->bits3.gen6_dp.binding_table_index = binding_table_index; @@ -525,7 +531,7 @@ static void brw_set_dp_write_message( struct brw_context *brw, } static void -brw_set_dp_read_message(struct brw_context *brw, +brw_set_dp_read_message(struct brw_compile *p, struct brw_instruction *insn, GLuint binding_table_index, GLuint msg_control, @@ -534,8 +540,9 @@ brw_set_dp_read_message(struct brw_context *brw, GLuint msg_length, GLuint response_length) { + struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src1(p, insn, brw_imm_d(0)); if (intel->gen >= 6) { uint32_t target_function; @@ -590,7 +597,7 @@ brw_set_dp_read_message(struct brw_context *brw, } } -static void brw_set_sampler_message(struct brw_context *brw, +static void brw_set_sampler_message(struct brw_compile *p, struct brw_instruction *insn, GLuint binding_table_index, GLuint sampler, @@ -601,9 +608,10 @@ static void brw_set_sampler_message(struct brw_context *brw, GLuint header_present, GLuint simd_mode) { + struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; assert(eot == 0); - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src1(p, insn, brw_imm_d(0)); if (intel->gen >= 5) { insn->bits3.sampler_gen5.binding_table_index = binding_table_index; @@ -672,7 +680,7 @@ static struct brw_instruction *brw_alu1( struct brw_compile *p, { struct brw_instruction *insn = next_insn(p, opcode); brw_set_dest(p, insn, dest); - brw_set_src0(insn, src); + brw_set_src0(p, insn, src); return insn; } @@ -684,8 +692,8 @@ static struct brw_instruction *brw_alu2(struct brw_compile *p, { struct brw_instruction *insn = next_insn(p, opcode); brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_src1(insn, src1); + brw_set_src0(p, insn, src0); + brw_set_src1(p, insn, src1); return insn; } @@ -723,7 +731,7 @@ void brw_##OP(struct brw_compile *p, \ struct brw_instruction *rnd, *add; \ rnd = next_insn(p, BRW_OPCODE_##OP); \ brw_set_dest(p, rnd, dest); \ - brw_set_src0(rnd, src); \ + brw_set_src0(p, rnd, src); \ rnd->header.destreg__conditionalmod = 0x7; /* turn on round-increments */ \ \ add = brw_ADD(p, dest, dest, brw_imm_f(1.0f)); \ @@ -822,8 +830,8 @@ void brw_NOP(struct brw_compile *p) { struct brw_instruction *insn = next_insn(p, BRW_OPCODE_NOP); brw_set_dest(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src0(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src1(insn, brw_imm_ud(0x0)); + brw_set_src0(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src1(p, insn, brw_imm_ud(0x0)); } @@ -883,13 +891,13 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size) */ if (intel->gen < 6) { brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d(0x0)); } else { brw_set_dest(p, insn, brw_imm_w(0)); insn->bits1.branch_gen6.jump_count = 0; - brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); } insn->header.execution_size = execute_size; @@ -915,8 +923,8 @@ gen6_IF(struct brw_compile *p, uint32_t conditional, brw_set_dest(p, insn, brw_imm_w(0)); insn->header.execution_size = BRW_EXECUTE_8; insn->bits1.branch_gen6.jump_count = 0; - brw_set_src0(insn, src0); - brw_set_src1(insn, src1); + brw_set_src0(p, insn, src0); + brw_set_src1(p, insn, src1); assert(insn->header.compression_control == BRW_COMPRESSION_NONE); assert(insn->header.predicate_control == BRW_PREDICATE_NONE); @@ -948,13 +956,13 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p, if (intel->gen < 6) { brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d(0x0)); } else { brw_set_dest(p, insn, brw_imm_w(0)); insn->bits1.branch_gen6.jump_count = 0; - brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); } insn->header.compression_control = BRW_COMPRESSION_NONE; @@ -1008,12 +1016,12 @@ void brw_ENDIF(struct brw_compile *p, if (intel->gen < 6) { brw_set_dest(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src0(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src1(p, insn, brw_imm_d(0x0)); } else { brw_set_dest(p, insn, brw_imm_w(0)); - brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); } insn->header.compression_control = BRW_COMPRESSION_NONE; @@ -1077,12 +1085,12 @@ struct brw_instruction *brw_BREAK(struct brw_compile *p, int pop_count) insn = next_insn(p, BRW_OPCODE_BREAK); if (intel->gen >= 6) { brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, brw_imm_d(0x0)); } else { brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d(0x0)); insn->bits3.if_else.pad0 = 0; insn->bits3.if_else.pop_count = pop_count; } @@ -1100,10 +1108,10 @@ struct brw_instruction *gen6_CONT(struct brw_compile *p, insn = next_insn(p, BRW_OPCODE_CONTINUE); brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d(0x0)); insn->bits3.break_cont.uip = br * (do_insn - insn); @@ -1117,8 +1125,8 @@ struct brw_instruction *brw_CONT(struct brw_compile *p, int pop_count) struct brw_instruction *insn; insn = next_insn(p, BRW_OPCODE_CONTINUE); brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d(0x0)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d(0x0)); insn->header.compression_control = BRW_COMPRESSION_NONE; insn->header.execution_size = BRW_EXECUTE_8; /* insn->header.mask_control = BRW_MASK_DISABLE; */ @@ -1155,8 +1163,8 @@ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size) /* Override the defaults for this instruction: */ brw_set_dest(p, insn, brw_null_reg()); - brw_set_src0(insn, brw_null_reg()); - brw_set_src1(insn, brw_null_reg()); + brw_set_src0(p, insn, brw_null_reg()); + brw_set_src1(p, insn, brw_null_reg()); insn->header.compression_control = BRW_COMPRESSION_NONE; insn->header.execution_size = execute_size; @@ -1185,8 +1193,8 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p, brw_set_dest(p, insn, brw_imm_w(0)); insn->bits1.branch_gen6.jump_count = br * (do_insn - insn); - brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); insn->header.execution_size = do_insn->header.execution_size; assert(insn->header.execution_size == BRW_EXECUTE_8); @@ -1195,8 +1203,8 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p, insn = next_insn(p, BRW_OPCODE_ADD); brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d((do_insn - insn) * 16)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d((do_insn - insn) * 16)); insn->header.execution_size = BRW_EXECUTE_1; } else { insn = next_insn(p, BRW_OPCODE_WHILE); @@ -1204,8 +1212,8 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p, assert(do_insn->header.opcode == BRW_OPCODE_DO); brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(insn, brw_ip_reg()); - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src0(p, insn, brw_ip_reg()); + brw_set_src1(p, insn, brw_imm_d(0)); insn->header.execution_size = do_insn->header.execution_size; insn->bits3.if_else.jump_count = br * (do_insn - insn + 1); @@ -1254,8 +1262,8 @@ void brw_CMP(struct brw_compile *p, insn->header.destreg__conditionalmod = conditional; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_src1(insn, src1); + brw_set_src0(p, insn, src0); + brw_set_src1(p, insn, src1); /* guess_execution_size(insn, src0); */ @@ -1279,8 +1287,8 @@ void brw_WAIT (struct brw_compile *p) struct brw_reg src = brw_notification_1_reg(); brw_set_dest(p, insn, src); - brw_set_src0(insn, src); - brw_set_src1(insn, brw_null_reg()); + brw_set_src0(p, insn, src); + brw_set_src1(p, insn, brw_null_reg()); insn->header.execution_size = 0; /* must */ insn->header.predicate_control = 0; insn->header.compression_control = 0; @@ -1329,8 +1337,8 @@ void brw_math( struct brw_compile *p, insn->header.saturate = saturate; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src); - brw_set_src1(insn, brw_null_reg()); + brw_set_src0(p, insn, src); + brw_set_src1(p, insn, brw_null_reg()); } else { struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND); GLuint msg_length = (function == BRW_MATH_FUNCTION_POW) ? 2 : 1; @@ -1342,8 +1350,8 @@ void brw_math( struct brw_compile *p, insn->header.destreg__conditionalmod = msg_reg_nr; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src); - brw_set_math_message(p->brw, + brw_set_src0(p, insn, src); + brw_set_math_message(p, insn, msg_length, response_length, function, @@ -1395,8 +1403,8 @@ void brw_math2(struct brw_compile *p, insn->header.destreg__conditionalmod = function; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_src1(insn, src1); + brw_set_src0(p, insn, src0); + brw_set_src1(p, insn, src1); } /** @@ -1430,8 +1438,8 @@ void brw_math_16( struct brw_compile *p, assert(!src.abs); brw_set_dest(p, insn, dest); - brw_set_src0(insn, src); - brw_set_src1(insn, brw_null_reg()); + brw_set_src0(p, insn, src); + brw_set_src1(p, insn, brw_null_reg()); return; } @@ -1445,8 +1453,8 @@ void brw_math_16( struct brw_compile *p, insn->header.destreg__conditionalmod = msg_reg_nr; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src); - brw_set_math_message(p->brw, + brw_set_src0(p, insn, src); + brw_set_math_message(p, insn, msg_length, response_length, function, @@ -1462,8 +1470,8 @@ void brw_math_16( struct brw_compile *p, insn->header.destreg__conditionalmod = msg_reg_nr+1; brw_set_dest(p, insn, offset(dest,1)); - brw_set_src0(insn, src); - brw_set_math_message(p->brw, + brw_set_src0(p, insn, src); + brw_set_math_message(p, insn, msg_length, response_length, function, @@ -1561,9 +1569,9 @@ void brw_oword_block_write_scratch(struct brw_compile *p, brw_set_dest(p, insn, dest); if (intel->gen >= 6) { - brw_set_src0(insn, mrf); + brw_set_src0(p, insn, mrf); } else { - brw_set_src0(insn, brw_null_reg()); + brw_set_src0(p, insn, brw_null_reg()); } if (intel->gen >= 6) @@ -1571,7 +1579,7 @@ void brw_oword_block_write_scratch(struct brw_compile *p, else msg_type = BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE; - brw_set_dp_write_message(p->brw, + brw_set_dp_write_message(p, insn, 255, /* binding table index (255=stateless) */ msg_control, @@ -1644,12 +1652,12 @@ brw_oword_block_read_scratch(struct brw_compile *p, brw_set_dest(p, insn, dest); /* UW? */ if (intel->gen >= 6) { - brw_set_src0(insn, mrf); + brw_set_src0(p, insn, mrf); } else { - brw_set_src0(insn, brw_null_reg()); + brw_set_src0(p, insn, brw_null_reg()); } - brw_set_dp_read_message(p->brw, + brw_set_dp_read_message(p, insn, 255, /* binding table index (255=stateless) */ msg_control, @@ -1701,12 +1709,12 @@ void brw_oword_block_read(struct brw_compile *p, brw_set_dest(p, insn, dest); if (intel->gen >= 6) { - brw_set_src0(insn, mrf); + brw_set_src0(p, insn, mrf); } else { - brw_set_src0(insn, brw_null_reg()); + brw_set_src0(p, insn, brw_null_reg()); } - brw_set_dp_read_message(p->brw, + brw_set_dp_read_message(p, insn, bind_table_index, BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW, @@ -1745,9 +1753,9 @@ void brw_dword_scattered_read(struct brw_compile *p, dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW); brw_set_dest(p, insn, dest); - brw_set_src0(insn, brw_null_reg()); + brw_set_src0(p, insn, brw_null_reg()); - brw_set_dp_read_message(p->brw, + brw_set_dp_read_message(p, insn, bind_table_index, BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS, @@ -1796,12 +1804,12 @@ void brw_dp_READ_4_vs(struct brw_compile *p, brw_set_dest(p, insn, dest); if (intel->gen >= 6) { - brw_set_src0(insn, brw_message_reg(msg_reg_nr)); + brw_set_src0(p, insn, brw_message_reg(msg_reg_nr)); } else { - brw_set_src0(insn, brw_null_reg()); + brw_set_src0(p, insn, brw_null_reg()); } - brw_set_dp_read_message(p->brw, + brw_set_dp_read_message(p, insn, bind_table_index, 0, @@ -1848,7 +1856,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p, insn->header.mask_control = BRW_MASK_DISABLE; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src); + brw_set_src0(p, insn, src); if (intel->gen == 6) msg_type = GEN6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ; @@ -1857,7 +1865,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p, else msg_type = BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ; - brw_set_dp_read_message(p->brw, + brw_set_dp_read_message(p, insn, bind_table_index, BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD, @@ -1915,8 +1923,8 @@ void brw_fb_WRITE(struct brw_compile *p, msg_control = BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_SINGLE_SOURCE_SUBSPAN01; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_dp_write_message(p->brw, + brw_set_src0(p, insn, src0); + brw_set_dp_write_message(p, insn, binding_table_index, msg_control, @@ -2033,8 +2041,8 @@ void brw_SAMPLE(struct brw_compile *p, insn->header.destreg__conditionalmod = msg_reg_nr; brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_sampler_message(p->brw, insn, + brw_set_src0(p, insn, src0); + brw_set_sampler_message(p, insn, binding_table_index, sampler, msg_type, @@ -2086,13 +2094,13 @@ void brw_urb_WRITE(struct brw_compile *p, assert(msg_length < BRW_MAX_MRF); brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src0(p, insn, src0); + brw_set_src1(p, insn, brw_imm_d(0)); if (intel->gen < 6) insn->header.destreg__conditionalmod = msg_reg_nr; - brw_set_urb_message(p->brw, + brw_set_urb_message(p, insn, allocate, used, @@ -2193,13 +2201,13 @@ void brw_ff_sync(struct brw_compile *p, insn = next_insn(p, BRW_OPCODE_SEND); brw_set_dest(p, insn, dest); - brw_set_src0(insn, src0); - brw_set_src1(insn, brw_imm_d(0)); + brw_set_src0(p, insn, src0); + brw_set_src1(p, insn, brw_imm_d(0)); if (intel->gen < 6) insn->header.destreg__conditionalmod = msg_reg_nr; - brw_set_ff_sync_message(p->brw, + brw_set_ff_sync_message(p, insn, allocate, response_length, -- cgit v1.2.3 From 947190ab4bbc8ea99bda3c464013af2a87c3286d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 14 May 2011 04:38:36 +0200 Subject: Revert "mesa: set reasonable defaults in update_wrapper" This reverts commit 1d5f16ff8fae936f2e920800b169cf7736a8052a. It breaks fbo-readpixels on swrast. For some reason, swrast likes GL_RGBA and CHAN_TYPE. --- src/mesa/main/texrender.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c index 8ba78b8b477..a7641a5f9a4 100644 --- a/src/mesa/main/texrender.c +++ b/src/mesa/main/texrender.c @@ -530,7 +530,6 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) { struct texture_renderbuffer *trb = (struct texture_renderbuffer *) att->Renderbuffer; - GLuint unused; (void) ctx; ASSERT(trb); @@ -603,10 +602,8 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) trb->Base._BaseFormat = GL_RGBA; break; default: - _mesa_format_to_type_and_comps(trb->TexImage->TexFormat, - &trb->Base.DataType, &unused); - trb->Base._BaseFormat = - _mesa_base_fbo_format(ctx, trb->TexImage->InternalFormat); + trb->Base.DataType = CHAN_TYPE; + trb->Base._BaseFormat = GL_RGBA; } trb->Base.Data = trb->TexImage->Data; } -- cgit v1.2.3 From a3ac28a736c56cbdee0daa6e30c7a8b984a90ec6 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 14 May 2011 04:42:29 +0200 Subject: mesa: make RGB9_E5 non-renderable on swrast again _BaseFormat for RGB9_E5 is GL_RGBA due to the previous revert. --- src/mesa/main/fbobject.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 64f135e21dd..67df53b889c 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -418,18 +418,16 @@ _mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) case GL_RG: fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; return; - case GL_RGB: + + default: switch (rb->Format) { + /* XXX This list is likely incomplete. */ case MESA_FORMAT_RGB9_E5_FLOAT: fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; return; default:; + /* render buffer format is supported by software rendering */ } - break; - - default: - /* render buffer format is supported by software rendering */ - ; } } } -- cgit v1.2.3 From 390196ecc73cd5d6bed48bf460d1abf70deb0eb4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 17 May 2011 01:16:27 +0200 Subject: u_vbuf_mgr: fix max_index computation when src_offset is abused as buffer_offset --- src/gallium/auxiliary/util/u_vbuf_mgr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c index a034483ee5c..04149525ea7 100644 --- a/src/gallium/auxiliary/util/u_vbuf_mgr.c +++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c @@ -581,7 +581,12 @@ static void u_vbuf_mgr_compute_max_index(struct u_vbuf_mgr_priv *mgr) * for that when dividing by stride. */ unused = vb->stride - (mgr->ve->ve[i].src_offset + mgr->ve->src_format_size[i]); - assert(unused >= 0); + + /* If src_offset is greater than stride (which means it's a buffer + * offset rather than a vertex offset)... */ + if (unused < 0) { + unused = 0; + } /* Compute the maximum index for this vertex element. */ max_index = -- cgit v1.2.3 From 217cd216eac65983004ca77a9e49dbfad1b720b6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 17 May 2011 18:51:20 -0700 Subject: r300/compiler: Fix bug in rc_get_variables() Variables that write to the same source select need to pe paired together otherwise the register allocator might fail. https://bugs.freedesktop.org/show_bug.cgi?id=36753 --- .../drivers/dri/r300/compiler/radeon_variable.c | 58 +++++----------------- 1 file changed, 13 insertions(+), 45 deletions(-) diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_variable.c b/src/mesa/drivers/dri/r300/compiler/radeon_variable.c index 33181bdcc88..938fb8421f2 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_variable.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_variable.c @@ -292,20 +292,20 @@ struct rc_variable * rc_variable( } static void get_variable_helper( - struct rc_list ** aborted_list, struct rc_list ** variable_list, - unsigned int aborted, struct rc_variable * variable) { - if (aborted) { - rc_list_add(aborted_list, rc_list(&variable->C->Pool, variable)); - } else { - rc_list_add(variable_list, rc_list(&variable->C->Pool, variable)); + struct rc_list * list_ptr; + for (list_ptr = *variable_list; list_ptr; list_ptr = list_ptr->Next) { + if (readers_intersect(variable, list_ptr->Item)) { + rc_variable_add_friend(list_ptr->Item, variable); + return; + } } + rc_list_add(variable_list, rc_list(&variable->C->Pool, variable)); } static void get_variable_pair_helper( - struct rc_list ** aborted_list, struct rc_list ** variable_list, struct radeon_compiler * c, struct rc_instruction * inst, @@ -338,8 +338,7 @@ static void get_variable_pair_helper( } new_var = rc_variable(c, file, sub_inst->DestIndex, writemask, &reader_data); - get_variable_helper(aborted_list, variable_list, reader_data.Abort, - new_var); + get_variable_helper(variable_list, new_var); } /** @@ -352,10 +351,7 @@ static void get_variable_pair_helper( struct rc_list * rc_get_variables(struct radeon_compiler * c) { struct rc_instruction * inst; - struct rc_list * aborted_list = NULL; struct rc_list * variable_list = NULL; - struct rc_list * var_ptr; - struct rc_list * search_ptr; for (inst = c->Program.Instructions.Next; inst != &c->Program.Instructions; @@ -372,43 +368,15 @@ struct rc_list * rc_get_variables(struct radeon_compiler * c) new_var = rc_variable(c, inst->U.I.DstReg.File, inst->U.I.DstReg.Index, inst->U.I.DstReg.WriteMask, &reader_data); - get_variable_helper(&aborted_list, &variable_list, - reader_data.Abort, new_var); + get_variable_helper(&variable_list, new_var); } else { - get_variable_pair_helper(&aborted_list, &variable_list, - c, inst, &inst->U.P.RGB); - get_variable_pair_helper(&aborted_list, &variable_list, - c, inst, &inst->U.P.Alpha); + get_variable_pair_helper(&variable_list, c, inst, + &inst->U.P.RGB); + get_variable_pair_helper(&variable_list, c, inst, + &inst->U.P.Alpha); } } - /* The aborted_list contains a list of variables that might share a - * reader with another variable. We need to search through this list - * and pair together variables that do share the same reader. - */ - while (aborted_list) { - struct rc_list * search_ptr_next; - struct rc_variable * var; - var_ptr = aborted_list; - for (var = var_ptr->Item; var; var = var->Friend) { - - search_ptr = var_ptr->Next; - while(search_ptr) { - search_ptr_next = search_ptr->Next; - if (readers_intersect(var, search_ptr->Item)){ - rc_list_remove(&aborted_list, - search_ptr); - rc_variable_add_friend(var, - search_ptr->Item); - } - search_ptr = search_ptr_next; - } - } - rc_list_remove(&aborted_list, var_ptr); - rc_list_add(&variable_list, rc_list( - &((struct rc_variable*)(var_ptr->Item))->C->Pool, - var_ptr->Item)); - } return variable_list; } -- cgit v1.2.3 From 355944087365a963d01deb5fcd6727dfd5360470 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 17 May 2011 21:24:05 -0600 Subject: mesa: add some missing GLAPIENTRY keywords NOTE: this is a candidate for the 7.10 branch. --- src/mesa/main/dlist.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 930236c0161..2aba82fc016 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -5351,7 +5351,7 @@ save_SetFragmentShaderConstantATI(GLuint dst, const GLfloat *value) } #endif -static void +static void GLAPIENTRY save_Attr1fNV(GLenum attr, GLfloat x) { GET_CURRENT_CONTEXT(ctx); @@ -5372,7 +5372,7 @@ save_Attr1fNV(GLenum attr, GLfloat x) } } -static void +static void GLAPIENTRY save_Attr2fNV(GLenum attr, GLfloat x, GLfloat y) { GET_CURRENT_CONTEXT(ctx); @@ -5394,7 +5394,7 @@ save_Attr2fNV(GLenum attr, GLfloat x, GLfloat y) } } -static void +static void GLAPIENTRY save_Attr3fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z) { GET_CURRENT_CONTEXT(ctx); @@ -5417,7 +5417,7 @@ save_Attr3fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z) } } -static void +static void GLAPIENTRY save_Attr4fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { GET_CURRENT_CONTEXT(ctx); @@ -5442,7 +5442,7 @@ save_Attr4fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w) } -static void +static void GLAPIENTRY save_Attr1fARB(GLenum attr, GLfloat x) { GET_CURRENT_CONTEXT(ctx); @@ -5463,7 +5463,7 @@ save_Attr1fARB(GLenum attr, GLfloat x) } } -static void +static void GLAPIENTRY save_Attr2fARB(GLenum attr, GLfloat x, GLfloat y) { GET_CURRENT_CONTEXT(ctx); @@ -5485,7 +5485,7 @@ save_Attr2fARB(GLenum attr, GLfloat x, GLfloat y) } } -static void +static void GLAPIENTRY save_Attr3fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z) { GET_CURRENT_CONTEXT(ctx); @@ -5508,7 +5508,7 @@ save_Attr3fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z) } } -static void +static void GLAPIENTRY save_Attr4fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { GET_CURRENT_CONTEXT(ctx); @@ -7040,7 +7040,7 @@ exec_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) /* GL_ARB_instanced_arrays */ -static void +static void GLAPIENTRY save_VertexAttribDivisor(GLuint index, GLuint divisor) { GET_CURRENT_CONTEXT(ctx); @@ -7058,7 +7058,7 @@ save_VertexAttribDivisor(GLuint index, GLuint divisor) /* GL_NV_texture_barrier */ -static void +static void GLAPIENTRY save_TextureBarrierNV(void) { GET_CURRENT_CONTEXT(ctx); @@ -7071,7 +7071,7 @@ save_TextureBarrierNV(void) /* GL_ARB_sampler_objects */ -static void +static void GLAPIENTRY save_BindSampler(GLuint unit, GLuint sampler) { Node *n; -- cgit v1.2.3 From c6175d78705aaca23fc5561a3a73be0b6a952b27 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 22:00:17 -0700 Subject: i965: Add _NEW_LIGHT to Gen6 clip state dirty bits. ctx->Light.ProvokingVertex depends on _NEW_LIGHT. Found by inspection. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/gen6_clip_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c index d6c1f1c893d..872465dacc2 100644 --- a/src/mesa/drivers/dri/i965/gen6_clip_state.c +++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c @@ -42,6 +42,7 @@ upload_clip_state(struct brw_context *brw) if (!ctx->Transform.DepthClamp) depth_clamp = GEN6_CLIP_Z_TEST; + /* _NEW_LIGHT */ if (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION) { provoking = (0 << GEN6_CLIP_TRI_PROVOKE_SHIFT) | @@ -75,7 +76,7 @@ upload_clip_state(struct brw_context *brw) const struct brw_tracked_state gen6_clip_state = { .dirty = { - .mesa = _NEW_TRANSFORM, + .mesa = _NEW_TRANSFORM | _NEW_LIGHT, .brw = BRW_NEW_CONTEXT, .cache = 0 }, -- cgit v1.2.3 From ebeea9857339da5f0f0455c45a8350190bbad189 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 11:41:32 -0700 Subject: i965/gs: Move generation check for bailing earlier. On Sandybridge, we don't need to break down primitives. There's no need to bother setting up brw_compile and such if it's not going to be used; bail as early as possible. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_gs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index f213ae20acd..c6d3a09e06a 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -52,6 +52,12 @@ static void compile_gs_prog( struct brw_context *brw, const GLuint *program; GLuint program_size; + /* Gen6: VF has already converted into polygon, and LINELOOP is + * converted to LINESTRIP at the beginning of the 3D pipeline. + */ + if (intel->gen == 6) + return; + memset(&c, 0, sizeof(c)); c.key = *key; @@ -84,12 +90,6 @@ static void compile_gs_prog( struct brw_context *brw, * already been weeded out by this stage: */ - /* Gen6: VF has already converted into polygon, and LINELOOP is - * converted to LINESTRIP at the beginning of the 3D pipeline. - */ - if (intel->gen == 6) - return; - switch (key->primitive) { case GL_QUADS: brw_gs_quads( &c, key ); -- cgit v1.2.3 From 774fb90db3e83d5e7326b7a72e05ce805c306b24 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 11:49:57 -0700 Subject: i965: Get a ralloc context into brw_compile. This would be so much easier if we were using C++; we could simply use constructors and destructors. Instead, we have to update all the callers. While we're at it, ralloc various brw_wm_compile fields rather than explicitly calloc/free'ing them. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_clip.c | 8 +++++++- src/mesa/drivers/dri/i965/brw_eu.c | 5 ++++- src/mesa/drivers/dri/i965/brw_eu.h | 5 ++++- src/mesa/drivers/dri/i965/brw_gs.c | 8 ++++++-- src/mesa/drivers/dri/i965/brw_sf.c | 7 ++++++- src/mesa/drivers/dri/i965/brw_vs.c | 8 ++++++-- src/mesa/drivers/dri/i965/brw_vtbl.c | 10 +++------- src/mesa/drivers/dri/i965/brw_wm.c | 15 ++++++++------- 8 files changed, 44 insertions(+), 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index 3c175515408..c7d428ba48d 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -42,6 +42,8 @@ #include "brw_state.h" #include "brw_clip.h" +#include "../glsl/ralloc.h" + #define FRONT_UNFILLED_BIT 0x1 #define BACK_UNFILLED_BIT 0x2 @@ -52,16 +54,19 @@ static void compile_clip_prog( struct brw_context *brw, struct intel_context *intel = &brw->intel; struct brw_clip_compile c; const GLuint *program; + void *mem_ctx; GLuint program_size; GLuint delta; GLuint i; GLuint header_regs; memset(&c, 0, sizeof(c)); + + mem_ctx = ralloc_context(NULL); /* Begin the compilation: */ - brw_init_compile(brw, &c.func); + brw_init_compile(brw, &c.func, mem_ctx); c.func.single_program_flow = 1; @@ -150,6 +155,7 @@ static void compile_clip_prog( struct brw_context *brw, program, program_size, &c.prog_data, sizeof(c.prog_data), &brw->clip.prog_data); + ralloc_free(mem_ctx); } /* Calculate interpolants for triangle and line rasterization. diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index 18f6a4de4d8..aa3f878364a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -166,7 +166,8 @@ void brw_pop_insn_state( struct brw_compile *p ) /*********************************************************************** */ -void brw_init_compile( struct brw_context *brw, struct brw_compile *p ) +void +brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx) { p->brw = brw; p->nr_insn = 0; @@ -174,6 +175,8 @@ void brw_init_compile( struct brw_context *brw, struct brw_compile *p ) p->compressed = false; memset(p->current, 0, sizeof(p->current[0])); + p->mem_ctx = mem_ctx; + /* Some defaults? */ brw_set_mask_control(p, BRW_MASK_ENABLE); /* what does this do? */ diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index 3243fdf39ac..a0ac17ac30c 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -104,6 +104,8 @@ struct brw_compile { struct brw_instruction store[BRW_EU_MAX_INSN]; GLuint nr_insn; + void *mem_ctx; + /* Allow clients to push/pop instruction state: */ struct brw_instruction stack[BRW_EU_MAX_INSN_STACK]; @@ -784,7 +786,8 @@ void brw_set_predicate_inverse(struct brw_compile *p, bool predicate_inverse); void brw_set_conditionalmod( struct brw_compile *p, GLuint conditional ); void brw_set_acc_write_control(struct brw_compile *p, GLuint value); -void brw_init_compile( struct brw_context *, struct brw_compile *p ); +void brw_init_compile(struct brw_context *, struct brw_compile *p, + void *mem_ctx); const GLuint *brw_get_program( struct brw_compile *p, GLuint *sz ); diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index c6d3a09e06a..aaffe94e981 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -42,7 +42,7 @@ #include "brw_state.h" #include "brw_gs.h" - +#include "../glsl/ralloc.h" static void compile_gs_prog( struct brw_context *brw, struct brw_gs_prog_key *key ) @@ -50,6 +50,7 @@ static void compile_gs_prog( struct brw_context *brw, struct intel_context *intel = &brw->intel; struct brw_gs_compile c; const GLuint *program; + void *mem_ctx; GLuint program_size; /* Gen6: VF has already converted into polygon, and LINELOOP is @@ -73,10 +74,11 @@ static void compile_gs_prog( struct brw_context *brw, c.nr_bytes = c.nr_regs * REG_SIZE; + mem_ctx = NULL; /* Begin the compilation: */ - brw_init_compile(brw, &c.func); + brw_init_compile(brw, &c.func, mem_ctx); c.func.single_program_flow = 1; @@ -101,6 +103,7 @@ static void compile_gs_prog( struct brw_context *brw, brw_gs_lines( &c ); break; default: + ralloc_free(mem_ctx); return; } @@ -126,6 +129,7 @@ static void compile_gs_prog( struct brw_context *brw, program, program_size, &c.prog_data, sizeof(c.prog_data), &brw->gs.prog_data); + ralloc_free(mem_ctx); } static const GLenum gs_prim[GL_POLYGON+1] = { diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index 5a03851b8e6..9b82fe159f9 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -43,20 +43,24 @@ #include "brw_sf.h" #include "brw_state.h" +#include "../glsl/ralloc.h" + static void compile_sf_prog( struct brw_context *brw, struct brw_sf_prog_key *key ) { struct intel_context *intel = &brw->intel; struct brw_sf_compile c; const GLuint *program; + void *mem_ctx; GLuint program_size; GLuint i, idx; memset(&c, 0, sizeof(c)); + mem_ctx = ralloc_context(NULL); /* Begin the compilation: */ - brw_init_compile(brw, &c.func); + brw_init_compile(brw, &c.func, mem_ctx); c.key = *key; c.nr_attrs = brw_count_bits(c.key.attrs); @@ -124,6 +128,7 @@ static void compile_sf_prog( struct brw_context *brw, program, program_size, &c.prog_data, sizeof(c.prog_data), &brw->sf.prog_data); + ralloc_free(mem_ctx); } /* Calculate interpolants for triangle and line rasterization. diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 31a2b518c40..d6a53995531 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -37,7 +37,7 @@ #include "program/prog_print.h" #include "program/prog_parameter.h" - +#include "../glsl/ralloc.h" static void do_vs_prog( struct brw_context *brw, struct brw_vertex_program *vp, @@ -47,13 +47,16 @@ static void do_vs_prog( struct brw_context *brw, GLuint program_size; const GLuint *program; struct brw_vs_compile c; + void *mem_ctx; int aux_size; int i; memset(&c, 0, sizeof(c)); memcpy(&c.key, key, sizeof(*key)); - brw_init_compile(brw, &c.func); + mem_ctx = ralloc_context(NULL); + + brw_init_compile(brw, &c.func, mem_ctx); c.vp = vp; c.prog_data.outputs_written = vp->program.Base.OutputsWritten; @@ -108,6 +111,7 @@ static void do_vs_prog( struct brw_context *brw, program, program_size, &c.prog_data, aux_size, &brw->vs.prog_data); + ralloc_free(mem_ctx); } diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index f2c417d8a81..28d5f62f34b 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -46,6 +46,8 @@ #include "brw_vs.h" #include "brw_wm.h" +#include "../glsl/ralloc.h" + static void dri_bo_release(drm_intel_bo **bo) { @@ -64,13 +66,7 @@ static void brw_destroy_context( struct intel_context *intel ) brw_destroy_state(brw); brw_draw_destroy( brw ); brw_clear_validated_bos(brw); - if (brw->wm.compile_data) { - free(brw->wm.compile_data->instruction); - free(brw->wm.compile_data->vreg); - free(brw->wm.compile_data->refs); - free(brw->wm.compile_data->prog_instructions); - free(brw->wm.compile_data); - } + ralloc_free(brw->wm.compile_data); intel_region_release(&brw->state.depth_region); diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 06512de940f..40589b0d2e4 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -35,6 +35,8 @@ #include "main/formats.h" #include "main/samplerobj.h" +#include "../glsl/ralloc.h" + /** Return number of src args for given instruction */ GLuint brw_wm_nr_args( GLuint opcode ) { @@ -193,7 +195,7 @@ static void do_wm_prog( struct brw_context *brw, c = brw->wm.compile_data; if (c == NULL) { - brw->wm.compile_data = calloc(1, sizeof(*brw->wm.compile_data)); + brw->wm.compile_data = rzalloc(NULL, struct brw_wm_compile); c = brw->wm.compile_data; if (c == NULL) { /* Ouch - big out of memory problem. Can't continue @@ -202,11 +204,10 @@ static void do_wm_prog( struct brw_context *brw, */ return; } - c->instruction = calloc(1, BRW_WM_MAX_INSN * sizeof(*c->instruction)); - c->prog_instructions = calloc(1, BRW_WM_MAX_INSN * - sizeof(*c->prog_instructions)); - c->vreg = calloc(1, BRW_WM_MAX_VREG * sizeof(*c->vreg)); - c->refs = calloc(1, BRW_WM_MAX_REF * sizeof(*c->refs)); + c->instruction = rzalloc_array(c, struct brw_wm_instruction, BRW_WM_MAX_INSN); + c->prog_instructions = rzalloc_array(c, struct prog_instruction, BRW_WM_MAX_INSN); + c->vreg = rzalloc_array(c, struct brw_wm_value, BRW_WM_MAX_VREG); + c->refs = rzalloc_array(c, struct brw_wm_ref, BRW_WM_MAX_REF); } else { void *instruction = c->instruction; void *prog_instructions = c->prog_instructions; @@ -223,7 +224,7 @@ static void do_wm_prog( struct brw_context *brw, c->fp = fp; c->env_param = brw->intel.ctx.FragmentProgram.Parameters; - brw_init_compile(brw, &c->func); + brw_init_compile(brw, &c->func, c); if (!brw_wm_fs_emit(brw, c)) { /* Fallback for fixed function and ARB_fp shaders. */ -- cgit v1.2.3 From 5936d96d33e767aa99f6afa92f2a6582ff04df23 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 12:25:18 -0700 Subject: i965: Move IF stack handling into the EU abstraction layer/brw_compile. This hides the IF stack and back-patching of IF/ELSE instructions from each of the code generators, greatly simplifying the interface. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_clip_line.c | 26 +++++------ src/mesa/drivers/dri/i965/brw_clip_tri.c | 66 ++++++++++++--------------- src/mesa/drivers/dri/i965/brw_clip_unfilled.c | 45 ++++++++---------- src/mesa/drivers/dri/i965/brw_clip_util.c | 5 +- src/mesa/drivers/dri/i965/brw_eu.c | 8 ++++ src/mesa/drivers/dri/i965/brw_eu.h | 16 ++++--- src/mesa/drivers/dri/i965/brw_eu_emit.c | 36 +++++++++++---- src/mesa/drivers/dri/i965/brw_fs.cpp | 22 ++------- src/mesa/drivers/dri/i965/brw_sf_emit.c | 5 +- src/mesa/drivers/dri/i965/brw_vs_emit.c | 25 ++++------ 10 files changed, 122 insertions(+), 132 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c index 4b9117bb0b1..d771853f421 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_line.c +++ b/src/mesa/drivers/dri/i965/brw_clip_line.c @@ -133,10 +133,6 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) struct brw_indirect newvtx1 = brw_indirect(3, 0); struct brw_indirect plane_ptr = brw_indirect(4, 0); struct brw_instruction *plane_loop; - struct brw_instruction *plane_active; - struct brw_instruction *is_negative; - struct brw_instruction *is_neg2 = NULL; - struct brw_instruction *not_culled; struct brw_reg v1_null_ud = retype(vec1(brw_null_reg()), BRW_REGISTER_TYPE_UD); brw_MOV(p, get_addr_reg(vtx0), brw_address(c->reg.vertex[0])); @@ -169,7 +165,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_AND(p, v1_null_ud, c->reg.planemask, brw_imm_ud(1)); - plane_active = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { if (c->key.nr_userclip) brw_MOV(p, c->reg.plane_equation, deref_4f(plane_ptr, 0)); @@ -184,7 +180,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) */ brw_set_conditionalmod(p, BRW_CONDITIONAL_L); brw_DP4(p, vec4(c->reg.dp1), deref_4f(vtx1, c->offset[VERT_RESULT_HPOS]), c->reg.plane_equation); - is_negative = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { /* * Both can be negative on GM965/G965 due to RHW workaround @@ -192,11 +188,11 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) */ if (brw->has_negative_rhw_bug) { brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_LE, c->reg.dp0, brw_imm_f(0.0)); - is_neg2 = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_kill_thread(c); } - brw_ENDIF(p, is_neg2); + brw_ENDIF(p); } brw_ADD(p, c->reg.t, c->reg.dp1, negate(c->reg.dp0)); @@ -207,7 +203,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) brw_MOV(p, c->reg.t1, c->reg.t); brw_set_predicate_control(p, BRW_PREDICATE_NONE); } - is_negative = brw_ELSE(p, is_negative); + brw_ELSE(p); { /* Coming back in. We know that both cannot be negative * because the line would have been culled in that case. @@ -217,7 +213,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) /* Only on GM965/G965 */ if (brw->has_negative_rhw_bug) { brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.dp0, brw_imm_f(0.0)); - is_neg2 = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); } { @@ -231,12 +227,12 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) } if (brw->has_negative_rhw_bug) { - brw_ENDIF(p, is_neg2); + brw_ENDIF(p); } } - brw_ENDIF(p, is_negative); + brw_ENDIF(p); } - brw_ENDIF(p, plane_active); + brw_ENDIF(p); /* plane_ptr++; */ @@ -251,7 +247,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) brw_ADD(p, c->reg.t, c->reg.t0, c->reg.t1); brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.t, brw_imm_f(1.0)); - not_culled = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_interp_vertex(c, newvtx0, vtx0, vtx1, c->reg.t0, GL_FALSE); brw_clip_interp_vertex(c, newvtx1, vtx1, vtx0, c->reg.t1, GL_FALSE); @@ -259,7 +255,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c ) brw_clip_emit_vue(c, newvtx0, 1, 0, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_START); brw_clip_emit_vue(c, newvtx1, 0, 1, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_END); } - brw_ENDIF(p, not_culled); + brw_ENDIF(p); brw_clip_kill_thread(c); } diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c index cb58d1da9fe..0dca05d0361 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_tri.c +++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c @@ -134,7 +134,6 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; struct brw_reg tmp0 = c->reg.loopcount; /* handy temporary */ - struct brw_instruction *is_rev; /* Initial list of indices for incoming vertexes: */ @@ -148,21 +147,21 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c ) /* XXX: Is there an easier way to do this? Need to reverse every * second tristrip element: Can ignore sometimes? */ - is_rev = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_MOV(p, get_element(c->reg.inlist, 0), brw_address(c->reg.vertex[1]) ); brw_MOV(p, get_element(c->reg.inlist, 1), brw_address(c->reg.vertex[0]) ); if (c->need_direction) brw_MOV(p, c->reg.dir, brw_imm_f(-1)); } - is_rev = brw_ELSE(p, is_rev); + brw_ELSE(p); { brw_MOV(p, get_element(c->reg.inlist, 0), brw_address(c->reg.vertex[0]) ); brw_MOV(p, get_element(c->reg.inlist, 1), brw_address(c->reg.vertex[1]) ); if (c->need_direction) brw_MOV(p, c->reg.dir, brw_imm_f(1)); } - brw_ENDIF(p, is_rev); + brw_ENDIF(p); brw_MOV(p, get_element(c->reg.inlist, 2), brw_address(c->reg.vertex[2]) ); brw_MOV(p, brw_vec8_grf(c->reg.outlist.nr, 0), brw_imm_f(0)); @@ -174,7 +173,6 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c ) void brw_clip_tri_flat_shade( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *is_poly, *is_trifan; struct brw_reg tmp0 = c->reg.loopcount; /* handy temporary */ brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK)); @@ -184,12 +182,12 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c ) tmp0, brw_imm_ud(_3DPRIM_POLYGON)); - is_poly = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_copy_colors(c, 1, 0); brw_clip_copy_colors(c, 2, 0); } - is_poly = brw_ELSE(p, is_poly); + brw_ELSE(p); { if (c->key.pv_first) { brw_CMP(p, @@ -197,24 +195,24 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c ) BRW_CONDITIONAL_EQ, tmp0, brw_imm_ud(_3DPRIM_TRIFAN)); - is_trifan = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_copy_colors(c, 0, 1); brw_clip_copy_colors(c, 2, 1); } - is_trifan = brw_ELSE(p, is_trifan); + brw_ELSE(p); { brw_clip_copy_colors(c, 1, 0); brw_clip_copy_colors(c, 2, 0); } - brw_ENDIF(p, is_trifan); + brw_ENDIF(p); } else { brw_clip_copy_colors(c, 0, 2); brw_clip_copy_colors(c, 1, 2); } } - brw_ENDIF(p, is_poly); + brw_ENDIF(p); } @@ -232,10 +230,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) struct brw_indirect outlist_ptr = brw_indirect(5, 0); struct brw_indirect freelist_ptr = brw_indirect(6, 0); struct brw_instruction *plane_loop; - struct brw_instruction *plane_active; struct brw_instruction *vertex_loop; - struct brw_instruction *next_test; - struct brw_instruction *prev_test; brw_MOV(p, get_addr_reg(vtxPrev), brw_address(c->reg.vertex[2]) ); brw_MOV(p, get_addr_reg(plane_ptr), brw_clip_plane0_address(c)); @@ -251,7 +246,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_AND(p, vec1(brw_null_reg()), c->reg.planemask, brw_imm_ud(1)); - plane_active = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { /* vtxOut = freelist_ptr++ */ @@ -275,13 +270,13 @@ void brw_clip_tri( struct brw_clip_compile *c ) /* IS_NEGATIVE(prev) */ brw_set_conditionalmod(p, BRW_CONDITIONAL_L); brw_DP4(p, vec4(c->reg.dpPrev), deref_4f(vtxPrev, c->offset[VERT_RESULT_HPOS]), c->reg.plane_equation); - prev_test = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { /* IS_POSITIVE(next) */ brw_set_conditionalmod(p, BRW_CONDITIONAL_GE); brw_DP4(p, vec4(c->reg.dp), deref_4f(vtx, c->offset[VERT_RESULT_HPOS]), c->reg.plane_equation); - next_test = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { /* Coming back in. @@ -307,10 +302,10 @@ void brw_clip_tri( struct brw_clip_compile *c ) brw_ADD(p, c->reg.nr_verts, c->reg.nr_verts, brw_imm_ud(1)); brw_MOV(p, get_addr_reg(vtxOut), brw_imm_uw(0) ); } - brw_ENDIF(p, next_test); + brw_ENDIF(p); } - prev_test = brw_ELSE(p, prev_test); + brw_ELSE(p); { /* *outlist_ptr++ = vtxPrev; * nr_verts++; @@ -323,7 +318,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) */ brw_set_conditionalmod(p, BRW_CONDITIONAL_L); brw_DP4(p, vec4(c->reg.dp), deref_4f(vtx, c->offset[VERT_RESULT_HPOS]), c->reg.plane_equation); - next_test = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { /* Going out of bounds. Avoid division by zero as we * know dp != dpPrev from DIFFERENT_SIGNS, above. @@ -349,9 +344,9 @@ void brw_clip_tri( struct brw_clip_compile *c ) brw_ADD(p, c->reg.nr_verts, c->reg.nr_verts, brw_imm_ud(1)); brw_MOV(p, get_addr_reg(vtxOut), brw_imm_uw(0) ); } - brw_ENDIF(p, next_test); + brw_ENDIF(p); } - brw_ENDIF(p, prev_test); + brw_ENDIF(p); /* vtxPrev = vtx; * inlist_ptr++; @@ -377,7 +372,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) brw_MOV(p, get_addr_reg(inlist_ptr), brw_address(c->reg.inlist)); brw_MOV(p, get_addr_reg(outlist_ptr), brw_address(c->reg.outlist)); } - brw_ENDIF(p, plane_active); + brw_ENDIF(p); /* plane_ptr++; */ @@ -404,7 +399,7 @@ void brw_clip_tri( struct brw_clip_compile *c ) void brw_clip_tri_emit_polygon(struct brw_clip_compile *c) { struct brw_compile *p = &c->func; - struct brw_instruction *loop, *if_insn; + struct brw_instruction *loop; /* for (loopcount = nr_verts-2; loopcount > 0; loopcount--) */ @@ -414,7 +409,7 @@ void brw_clip_tri_emit_polygon(struct brw_clip_compile *c) c->reg.nr_verts, brw_imm_d(-2)); - if_insn = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { struct brw_indirect v0 = brw_indirect(0, 0); struct brw_indirect vptr = brw_indirect(1, 0); @@ -441,7 +436,7 @@ void brw_clip_tri_emit_polygon(struct brw_clip_compile *c) brw_clip_emit_vue(c, v0, 0, 1, ((_3DPRIM_TRIFAN << 2) | R02_PRIM_END)); } - brw_ENDIF(p, if_insn); + brw_ENDIF(p); } static void do_clip_tri( struct brw_clip_compile *c ) @@ -455,14 +450,13 @@ static void do_clip_tri( struct brw_clip_compile *c ) static void maybe_do_clip_tri( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *do_clip; brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, c->reg.planemask, brw_imm_ud(0)); - do_clip = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { do_clip_tri(c); } - brw_ENDIF(p, do_clip); + brw_ENDIF(p); } static void brw_clip_test( struct brw_clip_compile *c ) @@ -481,7 +475,6 @@ static void brw_clip_test( struct brw_clip_compile *c ) struct brw_indirect vt2 = brw_indirect(2, 0); struct brw_compile *p = &c->func; - struct brw_instruction *is_outside; struct brw_reg tmp0 = c->reg.loopcount; /* handy temporary */ brw_MOV(p, get_addr_reg(vt0), brw_address(c->reg.vertex[0])); @@ -508,11 +501,11 @@ static void brw_clip_test( struct brw_clip_compile *c ) brw_OR(p, tmp0, tmp0, get_element(t, 2)); brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_AND(p, brw_null_reg(), tmp0, brw_imm_ud(0x1)); - is_outside = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_kill_thread(c); } - brw_ENDIF(p, is_outside); + brw_ENDIF(p); brw_set_predicate_control(p, BRW_PREDICATE_NONE); /* some vertices are inside a plane, some are outside,need to clip */ @@ -549,11 +542,11 @@ static void brw_clip_test( struct brw_clip_compile *c ) brw_OR(p, tmp0, tmp0, get_element(t, 2)); brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_AND(p, brw_null_reg(), tmp0, brw_imm_ud(0x1)); - is_outside = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_kill_thread(c); } - brw_ENDIF(p, is_outside); + brw_ENDIF(p); brw_set_predicate_control(p, BRW_PREDICATE_NONE); /* some vertices are inside a plane, some are outside,need to clip */ @@ -580,7 +573,6 @@ static void brw_clip_test( struct brw_clip_compile *c ) void brw_emit_tri_clip( struct brw_clip_compile *c ) { - struct brw_instruction *neg_rhw; struct brw_compile *p = &c->func; struct brw_context *brw = p->brw; brw_clip_tri_alloc_regs(c, 3 + c->key.nr_userclip + 6); @@ -594,11 +586,11 @@ void brw_emit_tri_clip( struct brw_clip_compile *c ) brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<20)); - neg_rhw = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_test(c); } - brw_ENDIF(p, neg_rhw); + brw_ENDIF(p); } /* Can't push into do_clip_tri because with polygon (or quad) * flatshading, need to apply the flatshade here because we don't diff --git a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c index afd93f8be0b..e761980284c 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c +++ b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c @@ -96,7 +96,6 @@ static void compute_tri_direction( struct brw_clip_compile *c ) static void cull_direction( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *ccw; GLuint conditional; assert (!(c->key.fill_ccw == CLIP_CULL && @@ -113,11 +112,11 @@ static void cull_direction( struct brw_clip_compile *c ) get_element(c->reg.dir, 2), brw_imm_f(0)); - ccw = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_kill_thread(c); } - brw_ENDIF(p, ccw); + brw_ENDIF(p); } @@ -125,7 +124,6 @@ static void cull_direction( struct brw_clip_compile *c ) static void copy_bfc( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *ccw; GLuint conditional; /* Do we have any colors to copy? @@ -149,7 +147,7 @@ static void copy_bfc( struct brw_clip_compile *c ) get_element(c->reg.dir, 2), brw_imm_f(0)); - ccw = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { GLuint i; @@ -165,7 +163,7 @@ static void copy_bfc( struct brw_clip_compile *c ) byte_offset(c->reg.vertex[i], c->offset[VERT_RESULT_BFC1])); } } - brw_ENDIF(p, ccw); + brw_ENDIF(p); } @@ -205,7 +203,6 @@ static void compute_offset( struct brw_clip_compile *c ) static void merge_edgeflags( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *is_poly; struct brw_reg tmp0 = get_element_ud(c->reg.tmp0, 0); brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK)); @@ -218,7 +215,7 @@ static void merge_edgeflags( struct brw_clip_compile *c ) /* Get away with using reg.vertex because we know that this is not * a _3DPRIM_TRISTRIP_REVERSE: */ - is_poly = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ); brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<8)); @@ -230,7 +227,7 @@ static void merge_edgeflags( struct brw_clip_compile *c ) brw_MOV(p, byte_offset(c->reg.vertex[2], c->offset[VERT_RESULT_EDGE]), brw_imm_f(0)); brw_set_predicate_control(p, BRW_PREDICATE_NONE); } - brw_ENDIF(p, is_poly); + brw_ENDIF(p); } @@ -255,7 +252,6 @@ static void emit_lines(struct brw_clip_compile *c, { struct brw_compile *p = &c->func; struct brw_instruction *loop; - struct brw_instruction *draw_edge; struct brw_indirect v0 = brw_indirect(0, 0); struct brw_indirect v1 = brw_indirect(1, 0); struct brw_indirect v0ptr = brw_indirect(2, 0); @@ -300,12 +296,12 @@ static void emit_lines(struct brw_clip_compile *c, vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, deref_1f(v0, c->offset[VERT_RESULT_EDGE]), brw_imm_f(0)); - draw_edge = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_emit_vue(c, v0, 1, 0, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_START); brw_clip_emit_vue(c, v1, 1, 0, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_END); } - brw_ENDIF(p, draw_edge); + brw_ENDIF(p); brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1)); @@ -320,7 +316,6 @@ static void emit_points(struct brw_clip_compile *c, { struct brw_compile *p = &c->func; struct brw_instruction *loop; - struct brw_instruction *draw_point; struct brw_indirect v0 = brw_indirect(0, 0); struct brw_indirect v0ptr = brw_indirect(2, 0); @@ -339,14 +334,14 @@ static void emit_points(struct brw_clip_compile *c, vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, deref_1f(v0, c->offset[VERT_RESULT_EDGE]), brw_imm_f(0)); - draw_point = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { if (do_offset) apply_one_offset(c, v0); brw_clip_emit_vue(c, v0, 1, 0, (_3DPRIM_POINTLIST << 2) | R02_PRIM_START | R02_PRIM_END); } - brw_ENDIF(p, draw_point); + brw_ENDIF(p); brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1)); @@ -388,7 +383,6 @@ static void emit_primitives( struct brw_clip_compile *c, static void emit_unfilled_primitives( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *ccw; /* Direction culling has already been done. */ @@ -402,15 +396,15 @@ static void emit_unfilled_primitives( struct brw_clip_compile *c ) get_element(c->reg.dir, 2), brw_imm_f(0)); - ccw = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { emit_primitives(c, c->key.fill_ccw, c->key.offset_ccw); } - ccw = brw_ELSE(p, ccw); + brw_ELSE(p); { emit_primitives(c, c->key.fill_cw, c->key.offset_cw); } - brw_ENDIF(p, ccw); + brw_ENDIF(p); } else if (c->key.fill_cw != CLIP_CULL) { emit_primitives(c, c->key.fill_cw, c->key.offset_cw); @@ -426,22 +420,19 @@ static void emit_unfilled_primitives( struct brw_clip_compile *c ) static void check_nr_verts( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *if_insn; brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.nr_verts, brw_imm_d(3)); - if_insn = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_kill_thread(c); } - brw_ENDIF(p, if_insn); + brw_ENDIF(p); } void brw_emit_unfilled_clip( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *do_clip; - c->need_direction = ((c->key.offset_ccw || c->key.offset_cw) || (c->key.fill_ccw != c->key.fill_cw) || @@ -488,14 +479,14 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c ) brw_clip_init_clipmask(c); brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, c->reg.planemask, brw_imm_ud(0)); - do_clip = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_clip_init_planes(c); brw_clip_tri(c); check_nr_verts(c); } - brw_ENDIF(p, do_clip); - + brw_ENDIF(p); + emit_unfilled_primitives(c); brw_clip_kill_thread(c); } diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c index d2ac1235e46..29aff2d9905 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_util.c +++ b/src/mesa/drivers/dri/i965/brw_clip_util.c @@ -338,11 +338,10 @@ void brw_clip_ff_sync(struct brw_clip_compile *c) if (intel->needs_ff_sync) { struct brw_compile *p = &c->func; - struct brw_instruction *need_ff_sync; brw_set_conditionalmod(p, BRW_CONDITIONAL_Z); brw_AND(p, brw_null_reg(), c->reg.ff_sync, brw_imm_ud(0x1)); - need_ff_sync = brw_IF(p, BRW_EXECUTE_1); + brw_IF(p, BRW_EXECUTE_1); { brw_OR(p, c->reg.ff_sync, c->reg.ff_sync, brw_imm_ud(0x1)); brw_ff_sync(p, @@ -353,7 +352,7 @@ void brw_clip_ff_sync(struct brw_clip_compile *c) 1, /* response length */ 0 /* eot */); } - brw_ENDIF(p, need_ff_sync); + brw_ENDIF(p); brw_set_predicate_control(p, BRW_PREDICATE_NONE); } } diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index aa3f878364a..c1f2520eed8 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -34,6 +34,8 @@ #include "brw_defines.h" #include "brw_eu.h" +#include "../glsl/ralloc.h" + /* Returns the corresponding conditional mod for swapping src0 and * src1 in e.g. CMP. */ @@ -183,6 +185,12 @@ brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx) brw_set_saturate(p, 0); brw_set_compression_control(p, BRW_COMPRESSION_NONE); brw_set_predicate_control_flag_value(p, 0xff); + + /* Set up control flow stack */ + p->if_stack_depth = 0; + p->if_stack_array_size = 16; + p->if_stack = + rzalloc_array(mem_ctx, struct brw_instruction *, p->if_stack_array_size); } diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index a0ac17ac30c..72d50eadbce 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -117,6 +117,14 @@ struct brw_compile { bool compressed; struct brw_context *brw; + /* Control flow stacks: + * - if_stack contains IF and ELSE instructions which must be patched + * (and popped) once the matching ENDIF instruction is encountered. + */ + struct brw_instruction **if_stack; + int if_stack_depth; + int if_stack_array_size; + struct brw_glsl_label *first_label; /**< linked list of labels */ struct brw_glsl_call *first_call; /**< linked list of CALs */ }; @@ -953,12 +961,8 @@ struct brw_instruction *brw_IF(struct brw_compile *p, struct brw_instruction *gen6_IF(struct brw_compile *p, uint32_t conditional, struct brw_reg src0, struct brw_reg src1); -struct brw_instruction *brw_ELSE(struct brw_compile *p, - struct brw_instruction *if_insn); - -void brw_ENDIF(struct brw_compile *p, - struct brw_instruction *if_or_else_insn); - +void brw_ELSE(struct brw_compile *p); +void brw_ENDIF(struct brw_compile *p); /* DO/WHILE loops: */ diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 83c06f5e3a7..7d63228bd06 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -34,8 +34,7 @@ #include "brw_defines.h" #include "brw_eu.h" - - +#include "../glsl/ralloc.h" /*********************************************************************** * Internal helper for constructing instructions @@ -858,6 +857,19 @@ struct brw_instruction *brw_JMPI(struct brw_compile *p, return insn; } +static void +push_if_stack(struct brw_compile *p, struct brw_instruction *inst) +{ + p->if_stack[p->if_stack_depth] = inst; + + p->if_stack_depth++; + if (p->if_stack_array_size <= p->if_stack_depth) { + p->if_stack_array_size *= 2; + p->if_stack = reralloc(p->mem_ctx, p->if_stack, struct brw_instruction *, + p->if_stack_array_size); + } +} + /* EU takes the value from the flag register and pushes it onto some * sort of a stack (presumably merging with any flag value already on * the stack). Within an if block, the flags at the top of the stack @@ -870,8 +882,6 @@ struct brw_instruction *brw_JMPI(struct brw_compile *p, * * When the matching 'endif' instruction is reached, the flags are * popped off. If the stack is now empty, normal execution resumes. - * - * No attempt is made to deal with stack overflow (14 elements?). */ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size) { @@ -909,6 +919,7 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size) p->current->header.predicate_control = BRW_PREDICATE_NONE; + push_if_stack(p, insn); return insn; } @@ -933,13 +944,15 @@ gen6_IF(struct brw_compile *p, uint32_t conditional, if (!p->single_program_flow) insn->header.thread_control = BRW_THREAD_SWITCH; + push_if_stack(p, insn); return insn; } -struct brw_instruction *brw_ELSE(struct brw_compile *p, - struct brw_instruction *if_insn) +void +brw_ELSE(struct brw_compile *p) { struct intel_context *intel = &p->brw->intel; + struct brw_instruction *if_insn; struct brw_instruction *insn; GLuint br = 1; @@ -965,6 +978,7 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p, brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); } + if_insn = p->if_stack[p->if_stack_depth - 1]; insn->header.compression_control = BRW_COMPRESSION_NONE; insn->header.execution_size = if_insn->header.execution_size; insn->header.mask_control = BRW_MASK_ENABLE; @@ -989,15 +1003,19 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p, } } - return insn; + /* Replace the IF instruction on the stack with the ELSE instruction */ + p->if_stack[p->if_stack_depth - 1] = insn; } -void brw_ENDIF(struct brw_compile *p, - struct brw_instruction *patch_insn) +void +brw_ENDIF(struct brw_compile *p) { struct intel_context *intel = &p->brw->intel; + struct brw_instruction *patch_insn; GLuint br = 1; + p->if_stack_depth--; + patch_insn = p->if_stack[p->if_stack_depth]; if (intel->gen >= 5) br = 2; diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 21eb9e4e5e1..994f65a8c32 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3722,11 +3722,8 @@ fs_visitor::generate_code() const char *last_annotation_string = NULL; ir_instruction *last_annotation_ir = NULL; - int if_stack_array_size = 16; int loop_stack_array_size = 16; - int if_stack_depth = 0, loop_stack_depth = 0; - brw_instruction **if_stack = - rzalloc_array(this->mem_ctx, brw_instruction *, if_stack_array_size); + int loop_stack_depth = 0; brw_instruction **loop_stack = rzalloc_array(this->mem_ctx, brw_instruction *, loop_stack_array_size); int *if_depth_in_loop = @@ -3832,26 +3829,18 @@ fs_visitor::generate_code() case BRW_OPCODE_IF: if (inst->src[0].file != BAD_FILE) { assert(intel->gen >= 6); - if_stack[if_stack_depth] = gen6_IF(p, inst->conditional_mod, src[0], src[1]); + gen6_IF(p, inst->conditional_mod, src[0], src[1]); } else { - if_stack[if_stack_depth] = brw_IF(p, BRW_EXECUTE_8); + brw_IF(p, BRW_EXECUTE_8); } if_depth_in_loop[loop_stack_depth]++; - if_stack_depth++; - if (if_stack_array_size <= if_stack_depth) { - if_stack_array_size *= 2; - if_stack = reralloc(this->mem_ctx, if_stack, brw_instruction *, - if_stack_array_size); - } break; case BRW_OPCODE_ELSE: - if_stack[if_stack_depth - 1] = - brw_ELSE(p, if_stack[if_stack_depth - 1]); + brw_ELSE(p); break; case BRW_OPCODE_ENDIF: - if_stack_depth--; - brw_ENDIF(p , if_stack[if_stack_depth]); + brw_ENDIF(p); if_depth_in_loop[loop_stack_depth]--; break; @@ -3993,7 +3982,6 @@ fs_visitor::generate_code() printf("\n"); } - ralloc_free(if_stack); ralloc_free(loop_stack); ralloc_free(if_depth_in_loop); diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c index d3c975690ce..4b2e26cbed7 100644 --- a/src/mesa/drivers/dri/i965/brw_sf_emit.c +++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c @@ -81,7 +81,6 @@ static void copy_bfc( struct brw_sf_compile *c, static void do_twoside_color( struct brw_sf_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *if_insn; GLuint backface_conditional = c->key.frontface_ccw ? BRW_CONDITIONAL_G : BRW_CONDITIONAL_L; /* Already done in clip program: @@ -104,7 +103,7 @@ static void do_twoside_color( struct brw_sf_compile *c ) */ brw_push_insn_state(p); brw_CMP(p, vec4(brw_null_reg()), backface_conditional, c->det, brw_imm_f(0)); - if_insn = brw_IF(p, BRW_EXECUTE_4); + brw_IF(p, BRW_EXECUTE_4); { switch (c->nr_verts) { case 3: copy_bfc(c, c->vert[2]); @@ -112,7 +111,7 @@ static void do_twoside_color( struct brw_sf_compile *c ) case 1: copy_bfc(c, c->vert[0]); } } - brw_ENDIF(p, if_insn); + brw_ENDIF(p); brw_pop_insn_state(p); } diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index a28cdc0bfe9..7267deaa534 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -1039,7 +1039,6 @@ static void emit_lit_noalias( struct brw_vs_compile *c, struct brw_reg arg0 ) { struct brw_compile *p = &c->func; - struct brw_instruction *if_insn; struct brw_reg tmp = dst; GLboolean need_tmp = (dst.file != BRW_GENERAL_REGISTER_FILE); @@ -1055,7 +1054,7 @@ static void emit_lit_noalias( struct brw_vs_compile *c, * BRW_EXECUTE_1 for all comparisions. */ brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_G, brw_swizzle1(arg0,0), brw_imm_f(0)); - if_insn = brw_IF(p, BRW_EXECUTE_8); + brw_IF(p, BRW_EXECUTE_8); { brw_MOV(p, brw_writemask(dst, WRITEMASK_Y), brw_swizzle1(arg0,0)); @@ -1070,8 +1069,7 @@ static void emit_lit_noalias( struct brw_vs_compile *c, brw_swizzle1(arg0, 3), BRW_MATH_PRECISION_PARTIAL); } - - brw_ENDIF(p, if_insn); + brw_ENDIF(p); release_tmp(c, tmp); } @@ -1881,8 +1879,8 @@ void brw_vs_emit(struct brw_vs_compile *c ) struct brw_context *brw = p->brw; struct intel_context *intel = &brw->intel; const GLuint nr_insns = c->vp->program.Base.NumInstructions; - GLuint insn, if_depth = 0, loop_depth = 0; - struct brw_instruction *if_inst[MAX_IF_DEPTH], *loop_inst[MAX_LOOP_DEPTH] = { 0 }; + GLuint insn, loop_depth = 0; + struct brw_instruction *loop_inst[MAX_LOOP_DEPTH] = { 0 }; int if_depth_in_loop[MAX_LOOP_DEPTH]; const struct brw_indirect stack_index = brw_indirect(0, 0); GLuint index; @@ -2102,23 +2100,20 @@ void brw_vs_emit(struct brw_vs_compile *c ) case OPCODE_XPD: emit_xpd(p, dst, args[0], args[1]); break; - case OPCODE_IF: - assert(if_depth < MAX_IF_DEPTH); - if_inst[if_depth] = brw_IF(p, BRW_EXECUTE_8); + case OPCODE_IF: { + struct brw_instruction *if_inst = brw_IF(p, BRW_EXECUTE_8); /* Note that brw_IF smashes the predicate_control field. */ - if_inst[if_depth]->header.predicate_control = get_predicate(inst); + if_inst->header.predicate_control = get_predicate(inst); if_depth_in_loop[loop_depth]++; - if_depth++; break; + } case OPCODE_ELSE: clear_current_const(c); - assert(if_depth > 0); - if_inst[if_depth-1] = brw_ELSE(p, if_inst[if_depth-1]); + brw_ELSE(p); break; case OPCODE_ENDIF: clear_current_const(c); - assert(if_depth > 0); - brw_ENDIF(p, if_inst[--if_depth]); + brw_ENDIF(p); if_depth_in_loop[loop_depth]--; break; case OPCODE_BGNLOOP: -- cgit v1.2.3 From c638180fc715aff84422c1092926120af966d417 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 13:40:00 -0700 Subject: i965: Rework IF/ELSE jump target back-patching. The primary motivation for this is to better support Ivybridge control flow. Ivybridge IF instructions need to point to the first instruction of the ELSE block -and- the ENDIF instruction; the existing code only supported back-patching one instruction ago. A second goal is to simplify and centralize the back-patching, hopefully clarifying the code somewhat. Previously, brw_ELSE back-patched the IF instruction, and brw_ENDIF back-patched the previous instruction (IF or ELSE). With this patch, brw_ENDIF is responsible for patching both the IF and (optional) ELSE. To support this, the control flow stack (if_stack) maintains pointers to both the IF and ELSE instructions. Unfortunately, in single program flow (SPF) mode, both were emitted as ADD instructions, and thus indistinguishable. To remedy this, this patch simply emits IF and ELSE, rather than ADDs; brw_ENDIF will convert them to ADDs (the SPF version of back-patching). Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 258 ++++++++++++++++++-------------- 1 file changed, 144 insertions(+), 114 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 7d63228bd06..13c925d8227 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -883,19 +883,13 @@ push_if_stack(struct brw_compile *p, struct brw_instruction *inst) * When the matching 'endif' instruction is reached, the flags are * popped off. If the stack is now empty, normal execution resumes. */ -struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size) +struct brw_instruction * +brw_IF(struct brw_compile *p, GLuint execute_size) { struct intel_context *intel = &p->brw->intel; struct brw_instruction *insn; - if (p->single_program_flow) { - assert(execute_size == BRW_EXECUTE_1); - - insn = next_insn(p, BRW_OPCODE_ADD); - insn->header.predicate_inverse = 1; - } else { - insn = next_insn(p, BRW_OPCODE_IF); - } + insn = next_insn(p, BRW_OPCODE_IF); /* Override the defaults for this instruction: */ @@ -948,24 +942,120 @@ gen6_IF(struct brw_compile *p, uint32_t conditional, return insn; } -void -brw_ELSE(struct brw_compile *p) +/** + * In single-program-flow (SPF) mode, convert IF and ELSE into ADDs. + */ +static void +convert_IF_ELSE_to_ADD(struct brw_compile *p, + struct brw_instruction *if_inst, + struct brw_instruction *else_inst) +{ + /* The next instruction (where the ENDIF would be, if it existed) */ + struct brw_instruction *next_inst = &p->store[p->nr_insn]; + + assert(p->single_program_flow); + assert(if_inst != NULL && if_inst->header.opcode == BRW_OPCODE_IF); + assert(else_inst == NULL || else_inst->header.opcode == BRW_OPCODE_ELSE); + assert(if_inst->header.execution_size == BRW_EXECUTE_1); + + /* Convert IF to an ADD instruction that moves the instruction pointer + * to the first instruction of the ELSE block. If there is no ELSE + * block, point to where ENDIF would be. Reverse the predicate. + * + * There's no need to execute an ENDIF since we don't need to do any + * stack operations, and if we're currently executing, we just want to + * continue normally. + */ + if_inst->header.opcode = BRW_OPCODE_ADD; + if_inst->header.predicate_inverse = 1; + + if (else_inst != NULL) { + /* Convert ELSE to an ADD instruction that points where the ENDIF + * would be. + */ + else_inst->header.opcode = BRW_OPCODE_ADD; + + if_inst->bits3.ud = (else_inst - if_inst + 1) * 16; + else_inst->bits3.ud = (next_inst - else_inst) * 16; + } else { + if_inst->bits3.ud = (next_inst - if_inst) * 16; + } +} + +/** + * Patch IF and ELSE instructions with appropriate jump targets. + */ +static void +patch_IF_ELSE(struct brw_compile *p, + struct brw_instruction *if_inst, + struct brw_instruction *else_inst, + struct brw_instruction *endif_inst) { struct intel_context *intel = &p->brw->intel; - struct brw_instruction *if_insn; - struct brw_instruction *insn; - GLuint br = 1; - /* jump count is for 64bit data chunk each, so one 128bit - instruction requires 2 chunks. */ + assert(!p->single_program_flow); + assert(if_inst != NULL && if_inst->header.opcode == BRW_OPCODE_IF); + assert(endif_inst != NULL); + assert(else_inst == NULL || else_inst->header.opcode == BRW_OPCODE_ELSE); + + unsigned br = 1; + /* Jump count is for 64bit data chunk each, so one 128bit instruction + * requires 2 chunks. + */ if (intel->gen >= 5) br = 2; - if (p->single_program_flow) { - insn = next_insn(p, BRW_OPCODE_ADD); + assert(endif_inst->header.opcode == BRW_OPCODE_ENDIF); + endif_inst->header.execution_size = if_inst->header.execution_size; + + if (else_inst == NULL) { + /* Patch IF -> ENDIF */ + if (intel->gen < 6) { + /* Turn it into an IFF, which means no mask stack operations for + * all-false and jumping past the ENDIF. + */ + if_inst->header.opcode = BRW_OPCODE_IFF; + if_inst->bits3.if_else.jump_count = br * (endif_inst - if_inst + 1); + if_inst->bits3.if_else.pop_count = 0; + if_inst->bits3.if_else.pad0 = 0; + } else { + /* As of gen6, there is no IFF and IF must point to the ENDIF. */ + if_inst->bits1.branch_gen6.jump_count = br * (endif_inst - if_inst); + } } else { - insn = next_insn(p, BRW_OPCODE_ELSE); + else_inst->header.execution_size = if_inst->header.execution_size; + + /* Patch IF -> ELSE */ + if (intel->gen < 6) { + if_inst->bits3.if_else.jump_count = br * (else_inst - if_inst); + if_inst->bits3.if_else.pop_count = 0; + if_inst->bits3.if_else.pad0 = 0; + } else if (intel->gen == 6) { + if_inst->bits1.branch_gen6.jump_count = br * (else_inst - if_inst + 1); + } + + /* Patch ELSE -> ENDIF */ + if (intel->gen < 6) { + /* BRW_OPCODE_ELSE pre-gen6 should point just past the + * matching ENDIF. + */ + else_inst->bits3.if_else.jump_count = br*(endif_inst - else_inst + 1); + else_inst->bits3.if_else.pop_count = 1; + else_inst->bits3.if_else.pad0 = 0; + } else { + /* BRW_OPCODE_ELSE on gen6 should point to the matching ENDIF. */ + else_inst->bits1.branch_gen6.jump_count = br*(endif_inst - else_inst); + } } +} + +void +brw_ELSE(struct brw_compile *p) +{ + struct intel_context *intel = &p->brw->intel; + struct brw_instruction *insn; + + insn = next_insn(p, BRW_OPCODE_ELSE); if (intel->gen < 6) { brw_set_dest(p, insn, brw_ip_reg()); @@ -978,121 +1068,61 @@ brw_ELSE(struct brw_compile *p) brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); } - if_insn = p->if_stack[p->if_stack_depth - 1]; insn->header.compression_control = BRW_COMPRESSION_NONE; - insn->header.execution_size = if_insn->header.execution_size; insn->header.mask_control = BRW_MASK_ENABLE; if (!p->single_program_flow) insn->header.thread_control = BRW_THREAD_SWITCH; - /* Patch the if instruction to point at this instruction. - */ - if (p->single_program_flow) { - assert(if_insn->header.opcode == BRW_OPCODE_ADD); - - if_insn->bits3.ud = (insn - if_insn + 1) * 16; - } else { - assert(if_insn->header.opcode == BRW_OPCODE_IF); - - if (intel->gen < 6) { - if_insn->bits3.if_else.jump_count = br * (insn - if_insn); - if_insn->bits3.if_else.pop_count = 0; - if_insn->bits3.if_else.pad0 = 0; - } else { - if_insn->bits1.branch_gen6.jump_count = br * (insn - if_insn + 1); - } - } - - /* Replace the IF instruction on the stack with the ELSE instruction */ - p->if_stack[p->if_stack_depth - 1] = insn; + push_if_stack(p, insn); } void brw_ENDIF(struct brw_compile *p) { struct intel_context *intel = &p->brw->intel; - struct brw_instruction *patch_insn; - GLuint br = 1; + struct brw_instruction *insn; + struct brw_instruction *else_inst = NULL; + struct brw_instruction *if_inst = NULL; + /* Pop the IF and (optional) ELSE instructions from the stack */ p->if_stack_depth--; - patch_insn = p->if_stack[p->if_stack_depth]; - if (intel->gen >= 5) - br = 2; - + if (p->if_stack[p->if_stack_depth]->header.opcode == BRW_OPCODE_ELSE) { + else_inst = p->if_stack[p->if_stack_depth]; + p->if_stack_depth--; + } + if_inst = p->if_stack[p->if_stack_depth]; + if (p->single_program_flow) { - /* In single program flow mode, there's no need to execute an ENDIF, - * since we don't need to do any stack operations, and if we're executing - * currently, we want to just continue executing. - */ - struct brw_instruction *next = &p->store[p->nr_insn]; + /* ENDIF is useless; don't bother emitting it. */ + convert_IF_ELSE_to_ADD(p, if_inst, else_inst); + return; + } - assert(patch_insn->header.opcode == BRW_OPCODE_ADD); + insn = next_insn(p, BRW_OPCODE_ENDIF); - patch_insn->bits3.ud = (next - patch_insn) * 16; + if (intel->gen < 6) { + brw_set_dest(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src0(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src1(p, insn, brw_imm_d(0x0)); } else { - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_ENDIF); - - if (intel->gen < 6) { - brw_set_dest(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src0(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src1(p, insn, brw_imm_d(0x0)); - } else { - brw_set_dest(p, insn, brw_imm_w(0)); - brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); - } - - insn->header.compression_control = BRW_COMPRESSION_NONE; - insn->header.execution_size = patch_insn->header.execution_size; - insn->header.mask_control = BRW_MASK_ENABLE; - insn->header.thread_control = BRW_THREAD_SWITCH; - - if (intel->gen < 6) - assert(patch_insn->bits3.if_else.jump_count == 0); - else - assert(patch_insn->bits1.branch_gen6.jump_count == 0); + brw_set_dest(p, insn, brw_imm_w(0)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + } - /* Patch the if or else instructions to point at this or the next - * instruction respectively. - */ - if (patch_insn->header.opcode == BRW_OPCODE_IF) { - if (intel->gen < 6) { - /* Turn it into an IFF, which means no mask stack operations for - * all-false and jumping past the ENDIF. - */ - patch_insn->header.opcode = BRW_OPCODE_IFF; - patch_insn->bits3.if_else.jump_count = br * (insn - patch_insn + 1); - patch_insn->bits3.if_else.pop_count = 0; - patch_insn->bits3.if_else.pad0 = 0; - } else { - /* As of gen6, there is no IFF and IF must point to the ENDIF. */ - patch_insn->bits1.branch_gen6.jump_count = br * (insn - patch_insn); - } - } else { - assert(patch_insn->header.opcode == BRW_OPCODE_ELSE); - if (intel->gen < 6) { - /* BRW_OPCODE_ELSE pre-gen6 should point just past the - * matching ENDIF. - */ - patch_insn->bits3.if_else.jump_count = br * (insn - patch_insn + 1); - patch_insn->bits3.if_else.pop_count = 1; - patch_insn->bits3.if_else.pad0 = 0; - } else { - /* BRW_OPCODE_ELSE on gen6 should point to the matching ENDIF. */ - patch_insn->bits1.branch_gen6.jump_count = br * (insn - patch_insn); - } - } + insn->header.compression_control = BRW_COMPRESSION_NONE; + insn->header.mask_control = BRW_MASK_ENABLE; + insn->header.thread_control = BRW_THREAD_SWITCH; - /* Also pop item off the stack in the endif instruction: - */ - if (intel->gen < 6) { - insn->bits3.if_else.jump_count = 0; - insn->bits3.if_else.pop_count = 1; - insn->bits3.if_else.pad0 = 0; - } else { - insn->bits1.branch_gen6.jump_count = 2; - } + /* Also pop item off the stack in the endif instruction: */ + if (intel->gen < 6) { + insn->bits3.if_else.jump_count = 0; + insn->bits3.if_else.pop_count = 1; + insn->bits3.if_else.pad0 = 0; + } else { + insn->bits1.branch_gen6.jump_count = 2; } + patch_IF_ELSE(p, if_inst, else_inst, insn); } struct brw_instruction *brw_BREAK(struct brw_compile *p, int pop_count) -- cgit v1.2.3 From d0f0d064825c457964614bee8fedcf31526a0775 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 14:17:15 -0700 Subject: i965: Convert BRW_NEW_* dirty bits to use an enum. This will make it much easier to add new dirty bits. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_context.h | 66 ++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 26cd8209c65..12aae507473 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -120,32 +120,56 @@ struct brw_context; -#define BRW_NEW_URB_FENCE 0x1 -#define BRW_NEW_FRAGMENT_PROGRAM 0x2 -#define BRW_NEW_VERTEX_PROGRAM 0x4 -#define BRW_NEW_INPUT_DIMENSIONS 0x8 -#define BRW_NEW_CURBE_OFFSETS 0x10 -#define BRW_NEW_REDUCED_PRIMITIVE 0x20 -#define BRW_NEW_PRIMITIVE 0x40 -#define BRW_NEW_CONTEXT 0x80 -#define BRW_NEW_WM_INPUT_DIMENSIONS 0x100 -#define BRW_NEW_PSP 0x800 -#define BRW_NEW_WM_SURFACES 0x1000 -#define BRW_NEW_BINDING_TABLE 0x2000 -#define BRW_NEW_INDICES 0x4000 -#define BRW_NEW_VERTICES 0x8000 +enum brw_state_id { + BRW_STATE_URB_FENCE, + BRW_STATE_FRAGMENT_PROGRAM, + BRW_STATE_VERTEX_PROGRAM, + BRW_STATE_INPUT_DIMENSIONS, + BRW_STATE_CURBE_OFFSETS, + BRW_STATE_REDUCED_PRIMITIVE, + BRW_STATE_PRIMITIVE, + BRW_STATE_CONTEXT, + BRW_STATE_WM_INPUT_DIMENSIONS, + BRW_STATE_PSP, + BRW_STATE_WM_SURFACES, + BRW_STATE_BINDING_TABLE, + BRW_STATE_INDICES, + BRW_STATE_VERTICES, + BRW_STATE_BATCH, + BRW_STATE_DEPTH_BUFFER, + BRW_STATE_NR_WM_SURFACES, + BRW_STATE_NR_VS_SURFACES, + BRW_STATE_INDEX_BUFFER, + BRW_STATE_VS_CONSTBUF, + BRW_STATE_WM_CONSTBUF +}; + +#define BRW_NEW_URB_FENCE (1 << BRW_STATE_URB_FENCE) +#define BRW_NEW_FRAGMENT_PROGRAM (1 << BRW_STATE_FRAGMENT_PROGRAM) +#define BRW_NEW_VERTEX_PROGRAM (1 << BRW_STATE_VERTEX_PROGRAM) +#define BRW_NEW_INPUT_DIMENSIONS (1 << BRW_STATE_INPUT_DIMENSIONS) +#define BRW_NEW_CURBE_OFFSETS (1 << BRW_STATE_CURBE_OFFSETS) +#define BRW_NEW_REDUCED_PRIMITIVE (1 << BRW_STATE_REDUCED_PRIMITIVE) +#define BRW_NEW_PRIMITIVE (1 << BRW_STATE_PRIMITIVE) +#define BRW_NEW_CONTEXT (1 << BRW_STATE_CONTEXT) +#define BRW_NEW_WM_INPUT_DIMENSIONS (1 << BRW_STATE_WM_INPUT_DIMENSIONS) +#define BRW_NEW_PSP (1 << BRW_STATE_PSP) +#define BRW_NEW_WM_SURFACES (1 << BRW_STATE_WM_SURFACES) +#define BRW_NEW_BINDING_TABLE (1 << BRW_STATE_BINDING_TABLE) +#define BRW_NEW_INDICES (1 << BRW_STATE_INDICES) +#define BRW_NEW_VERTICES (1 << BRW_STATE_VERTICES) /** * Used for any batch entry with a relocated pointer that will be used * by any 3D rendering. */ -#define BRW_NEW_BATCH 0x10000 +#define BRW_NEW_BATCH (1 << BRW_STATE_BATCH) /** \see brw.state.depth_region */ -#define BRW_NEW_DEPTH_BUFFER 0x20000 -#define BRW_NEW_NR_WM_SURFACES 0x40000 -#define BRW_NEW_NR_VS_SURFACES 0x80000 -#define BRW_NEW_INDEX_BUFFER 0x100000 -#define BRW_NEW_VS_CONSTBUF 0x200000 -#define BRW_NEW_WM_CONSTBUF 0x400000 +#define BRW_NEW_DEPTH_BUFFER (1 << BRW_STATE_DEPTH_BUFFER) +#define BRW_NEW_NR_WM_SURFACES (1 << BRW_STATE_NR_WM_SURFACES) +#define BRW_NEW_NR_VS_SURFACES (1 << BRW_STATE_NR_VS_SURFACES) +#define BRW_NEW_INDEX_BUFFER (1 << BRW_STATE_INDEX_BUFFER) +#define BRW_NEW_VS_CONSTBUF (1 << BRW_STATE_VS_CONSTBUF) +#define BRW_NEW_WM_CONSTBUF (1 << BRW_STATE_WM_CONSTBUF) struct brw_state_flags { /** State update flags signalled by mesa internals */ -- cgit v1.2.3 From d55471768e308853432de7d18f663034ddbc8599 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 14 May 2011 23:42:46 -0700 Subject: i965: Rename max_vs_handles to max_vs_entries for consistency. The documentation uses the term "vertex URB entries", the code talks about "entry size", and so on. Also, handles are just "pointers" to entries (actually small integers). Also rename max_gs_handles to max_gs_entries. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_context.c | 4 ++-- src/mesa/drivers/dri/i965/brw_context.h | 4 ++-- src/mesa/drivers/dri/i965/gen6_urb.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index db6466ff1ae..a4e22776c0c 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -187,12 +187,12 @@ GLboolean brwCreateContext( int api, brw->wm_max_threads = 40; brw->vs_max_threads = 60; brw->urb.size = 64; /* volume 5c.5 section 5.1 */ - brw->urb.max_vs_handles = 128; /* volume 2a (see 3DSTATE_URB) */ + brw->urb.max_vs_entries = 128; /* volume 2a (see 3DSTATE_URB) */ } else { brw->wm_max_threads = 40; brw->vs_max_threads = 24; brw->urb.size = 32; /* volume 5c.5 section 5.1 */ - brw->urb.max_vs_handles = 256; /* volume 2a (see 3DSTATE_URB) */ + brw->urb.max_vs_entries = 256; /* volume 2a (see 3DSTATE_URB) */ } } else if (intel->gen == 5) { brw->urb.size = 1024; diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 12aae507473..94108de7af9 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -591,8 +591,8 @@ struct brw_context GLboolean constrained; - GLuint max_vs_handles; /* Maximum number of VS handles */ - GLuint max_gs_handles; /* Maximum number of GS handles */ + GLuint max_vs_entries; /* Maximum number of VS entries */ + GLuint max_gs_entries; /* Maximum number of GS entries */ GLuint nr_vs_entries; GLuint nr_gs_entries; diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c index 909e1bbe9ba..62645a6a30f 100644 --- a/src/mesa/drivers/dri/i965/gen6_urb.c +++ b/src/mesa/drivers/dri/i965/gen6_urb.c @@ -42,8 +42,8 @@ prepare_urb( struct brw_context *brw ) /* Calculate how many VS URB entries fit in the total URB size */ nr_vs_entries = (brw->urb.size * 1024) / (brw->urb.vs_size * 128); - if (nr_vs_entries > brw->urb.max_vs_handles) - nr_vs_entries = brw->urb.max_vs_handles; + if (nr_vs_entries > brw->urb.max_vs_entries) + nr_vs_entries = brw->urb.max_vs_entries; /* According to volume 2a, nr_vs_entries must be a multiple of 4. */ brw->urb.nr_vs_entries = ROUND_DOWN_TO(nr_vs_entries, 4); -- cgit v1.2.3 From 89a82d72cafc1efbcf099e5229ba9b1cb53504f0 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 May 2011 15:19:22 -0700 Subject: intel: Initial IS_GEN7 plumbing. Currently, IS_GEN7, IS_IVYBRIDGE, IS_IVB_GT1, and IS_IVB_GT2 all return false. This allows me to write the code for them before actually adding the PCI IDs and thus enabling the hardware. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/intel/intel_chipset.h | 11 ++++++++++- src/mesa/drivers/dri/intel/intel_context.c | 5 ++++- src/mesa/drivers/dri/intel/intel_screen.c | 4 +++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index a3f40effc35..50b52bbb36d 100644 --- a/src/mesa/drivers/dri/intel/intel_chipset.h +++ b/src/mesa/drivers/dri/intel/intel_chipset.h @@ -136,10 +136,19 @@ #define IS_GEN6(devid) (IS_GT1(devid) || IS_GT2(devid)) +#define IS_IVB_GT1(devid) 0 + +#define IS_IVB_GT2(devid) 0 + +#define IS_IVYBRIDGE(devid) (IS_IVB_GT1(devid) || IS_IVB_GT2(devid)) + +#define IS_GEN7(devid) IS_IVYBRIDGE(devid) + #define IS_965(devid) (IS_GEN4(devid) || \ IS_G4X(devid) || \ IS_GEN5(devid) || \ - IS_GEN6(devid)) + IS_GEN6(devid) || \ + IS_GEN7(devid)) #define IS_9XX(devid) (IS_915(devid) || \ IS_945(devid) || \ diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index acdf35fc71b..ba3014e1e13 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -653,7 +653,10 @@ intelInitContext(struct intel_context *intel, intel->has_xrgb_textures = GL_TRUE; intel->gen = intelScreen->gen; - if (IS_GEN6(intel->intelScreen->deviceID)) { + if (IS_GEN7(intel->intelScreen->deviceID)) { + intel->needs_ff_sync = GL_TRUE; + intel->has_luminance_srgb = GL_TRUE; + } else if (IS_GEN6(intel->intelScreen->deviceID)) { intel->needs_ff_sync = GL_TRUE; intel->has_luminance_srgb = GL_TRUE; } else if (IS_GEN5(intel->intelScreen->deviceID)) { diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 5dacbb06633..deca11d8c34 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -556,7 +556,9 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) intelScreen->deviceID = strtod(devid_override, NULL); } - if (IS_GEN6(intelScreen->deviceID)) { + if (IS_GEN7(intelScreen->deviceID)) { + intelScreen->gen = 7; + } else if (IS_GEN6(intelScreen->deviceID)) { intelScreen->gen = 6; } else if (IS_GEN5(intelScreen->deviceID)) { intelScreen->gen = 5; -- cgit v1.2.3 From 235fa21a0950150bcb78851e2d0cd2deeb1536f8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 3 Feb 2011 11:10:23 -0800 Subject: i965: Split out tracked state atoms for Ivybridge. Currently, gen7_atoms is a verbatim copy of gen6_atoms; future commits will update it to contain gen7-specific state. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_state_upload.c | 71 +++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 008aceb222b..7524b01bb75 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -170,6 +170,72 @@ static const struct brw_tracked_state *gen6_atoms[] = &brw_vertices, }; +const struct brw_tracked_state *gen7_atoms[] = +{ + &brw_check_fallback, + + &brw_wm_input_sizes, + &brw_vs_prog, + &brw_gs_prog, + &brw_wm_prog, + + &gen6_clip_vp, + &gen6_sf_vp, + + /* Command packets: */ + &brw_invarient_state, + + /* must do before binding table pointers, cc state ptrs */ + &brw_state_base_address, + + &brw_cc_vp, + &gen6_viewport_state, /* must do after *_vp stages */ + + &gen6_urb, + &gen6_blend_state, /* must do before cc unit */ + &gen6_color_calc_state, /* must do before cc unit */ + &gen6_depth_stencil_state, /* must do before cc unit */ + &gen6_cc_state_pointers, + + &brw_vs_constants, /* Before vs_surfaces and constant_buffer */ + &brw_wm_constants, /* Before wm_surfaces and constant_buffer */ + &gen6_vs_constants, /* Before vs_state */ + &gen6_wm_constants, /* Before wm_state */ + + &brw_vs_surfaces, /* must do before unit */ + &brw_wm_constant_surface, /* must do before wm surfaces/bind bo */ + &brw_wm_surfaces, /* must do before samplers and unit */ + &brw_wm_binding_table, + + &brw_wm_samplers, + &gen6_sampler_state, + + &gen6_vs_state, + &gen6_gs_state, + &gen6_clip_state, + &gen6_sf_state, + &gen6_wm_state, + + &gen6_scissor_state, + + &gen6_binding_table_pointers, + + &brw_depthbuffer, + + &brw_polygon_stipple, + &brw_polygon_stipple_offset, + + &brw_line_stipple, + &brw_aa_line_parameters, + + &brw_drawing_rect, + + &brw_indices, + &brw_index_buffer, + &brw_vertices, +}; + + void brw_init_state( struct brw_context *brw ) { const struct brw_tracked_state **atoms; @@ -177,7 +243,10 @@ void brw_init_state( struct brw_context *brw ) brw_init_caches(brw); - if (brw->intel.gen >= 6) { + if (brw->intel.gen >= 7) { + atoms = gen7_atoms; + num_atoms = ARRAY_SIZE(gen7_atoms); + } else if (brw->intel.gen == 6) { atoms = gen6_atoms; num_atoms = ARRAY_SIZE(gen6_atoms); } else { -- cgit v1.2.3 From 477e2fe0318c79978dedd51a5a6039cf05fc59fb Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 9 Apr 2011 01:57:31 -0700 Subject: i965: Set maximum number of threads for Ivybridge. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_context.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index a4e22776c0c..3a7e33145ba 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -178,7 +178,17 @@ GLboolean brwCreateContext( int api, } /* WM maximum threads is number of EUs times number of threads per EU. */ - if (intel->gen >= 6) { + if (intel->gen >= 7) { + if (IS_IVB_GT1(intel->intelScreen->deviceID)) { + brw->wm_max_threads = 86; + brw->vs_max_threads = 36; + } else if (IS_IVB_GT2(intel->intelScreen->deviceID)) { + brw->wm_max_threads = 86; + brw->vs_max_threads = 128; + } else { + assert(!"Unknown gen7 device."); + } + } else if (intel->gen == 6) { if (IS_GT2(intel->intelScreen->deviceID)) { /* This could possibly be 80, but is supposed to require * disabling of WIZ hashing (bit 6 of GT_MODE, 0x20d0) and a -- cgit v1.2.3 From 8832920c298f4e13ffd5e53feeba509be69edb16 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 27 Mar 2011 01:18:41 -0700 Subject: i965: Initial Ivybridge URB space partitioning, including push constants. Currently this always reserves 16kB for push constants, regardless of how much space is needed, and partitions it evenly betwen the VS and FS. This is probably not ideal, but is straightforward. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 3 +- src/mesa/drivers/dri/i965/brw_context.c | 6 ++ src/mesa/drivers/dri/i965/brw_context.h | 2 + src/mesa/drivers/dri/i965/brw_defines.h | 13 ++- src/mesa/drivers/dri/i965/brw_state.h | 1 + src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/brw_vs_emit.c | 11 ++- src/mesa/drivers/dri/i965/gen7_urb.c | 128 +++++++++++++++++++++++++++ 8 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_urb.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 849018b74ae..a1bbc962dee 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -96,7 +96,8 @@ DRIVER_SOURCES = \ gen6_urb.c \ gen6_viewport_state.c \ gen6_vs_state.c \ - gen6_wm_state.c + gen6_wm_state.c \ + gen7_urb.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 3a7e33145ba..cd72bc5c242 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -182,9 +182,15 @@ GLboolean brwCreateContext( int api, if (IS_IVB_GT1(intel->intelScreen->deviceID)) { brw->wm_max_threads = 86; brw->vs_max_threads = 36; + brw->urb.size = 128; + brw->urb.max_vs_entries = 512; + brw->urb.max_gs_entries = 192; } else if (IS_IVB_GT2(intel->intelScreen->deviceID)) { brw->wm_max_threads = 86; brw->vs_max_threads = 128; + brw->urb.size = 256; + brw->urb.max_vs_entries = 704; + brw->urb.max_gs_entries = 320; } else { assert(!"Unknown gen7 device."); } diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 94108de7af9..b3d297deae6 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -603,6 +603,8 @@ struct brw_context /* gen6: * The length of each URB entry owned by the VS (or GS), as * a number of 1024-bit (128-byte) rows. Should be >= 1. + * + * gen7: Same meaning, but in 512-bit (64-byte) rows. */ GLuint vs_size; GLuint gs_size; diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index fd5227d2c55..8135b3909f0 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -875,12 +875,23 @@ #define CMD_VF_STATISTICS_GM45 0x680b #define _3DSTATE_CC_STATE_POINTERS 0x780e /* GEN6+ */ -#define _3DSTATE_URB 0x7805 /* GEN6+ */ +#define _3DSTATE_URB 0x7805 /* GEN6 */ # define GEN6_URB_VS_SIZE_SHIFT 16 # define GEN6_URB_VS_ENTRIES_SHIFT 0 # define GEN6_URB_GS_ENTRIES_SHIFT 8 # define GEN6_URB_GS_SIZE_SHIFT 0 +#define _3DSTATE_URB_VS 0x7830 /* GEN7+ */ +#define _3DSTATE_URB_HS 0x7831 /* GEN7+ */ +#define _3DSTATE_URB_DS 0x7832 /* GEN7+ */ +#define _3DSTATE_URB_GS 0x7833 /* GEN7+ */ +# define GEN7_URB_ENTRY_SIZE_SHIFT 16 +# define GEN7_URB_STARTING_ADDRESS_SHIFT 25 + +#define _3DSTATE_PUSH_CONSTANT_ALLOC_VS 0x7912 /* GEN7+ */ +#define _3DSTATE_PUSH_CONSTANT_ALLOC_PS 0x7916 /* GEN7+ */ +# define GEN7_PUSH_CONSTANT_BUFFER_OFFSET_SHIFT 16 + #define _3DSTATE_VIEWPORT_STATE_POINTERS 0x780d /* GEN6+ */ # define GEN6_CC_VIEWPORT_MODIFY (1 << 12) # define GEN6_SF_VIEWPORT_MODIFY (1 << 11) diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 8b9e3a4ec5d..d67524ff264 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -111,6 +111,7 @@ extern const struct brw_tracked_state gen6_vs_constants; extern const struct brw_tracked_state gen6_vs_state; extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; +extern const struct brw_tracked_state gen7_urb; /*********************************************************************** * brw_state.c diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 7524b01bb75..9476c2c359b 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -191,7 +191,7 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_cc_vp, &gen6_viewport_state, /* must do after *_vp stages */ - &gen6_urb, + &gen7_urb, &gen6_blend_state, /* must do before cc unit */ &gen6_color_calc_state, /* must do before cc unit */ &gen6_depth_stencil_state, /* must do before cc unit */ diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 7267deaa534..7d5eb353eee 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -432,7 +432,16 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c ) /* See emit_vertex_write() for where the VUE's overhead on top of the * attributes comes from. */ - if (intel->gen >= 6) { + if (intel->gen >= 7) { + int header_regs = 2; + if (c->key.nr_userclip) + header_regs += 2; + + /* Each attribute is 16 bytes (1 vec4), so dividing by 4 gives us the + * number of 64-byte (512-bit) units. + */ + c->prog_data.urb_entry_size = (attributes_in_vue + header_regs + 3) / 4; + } else if (intel->gen == 6) { int header_regs = 2; if (c->key.nr_userclip) header_regs += 2; diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c new file mode 100644 index 00000000000..3a614693dfc --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_urb.c @@ -0,0 +1,128 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "main/macros.h" +#include "intel_batchbuffer.h" +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" + +/** + * The following diagram shows how we partition the URB: + * + * 8kB 8kB Rest of the URB space + * ____-____ ____-____ _________________-_________________ + * / \ / \ / \ + * +-------------------------------------------------------------+ + * | VS Push | FS Push | VS | + * | Constants | Constants | Handles | + * +-------------------------------------------------------------+ + * + * Notably, push constants must be stored at the beginning of the URB + * space, while entries can be stored anywhere. Ivybridge has a maximum + * constant buffer size of 16kB. + * + * Currently we split the constant buffer space evenly between VS and FS. + * This is probably not ideal, but simple. + * + * Ivybridge GT1 has 128kB of URB space. + * Ivybridge GT2 has 256kB of URB space. + * + * See "Volume 2a: 3D Pipeline," section 1.8. + */ +static void +prepare_urb(struct brw_context *brw) +{ + /* Total space for entries is URB size - 16kB for push constants */ + int handle_region_size = (brw->urb.size - 16) * 1024; /* bytes */ + + /* CACHE_NEW_VS_PROG */ + brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1); + + int nr_vs_entries = handle_region_size / (brw->urb.vs_size * 64); + if (nr_vs_entries > brw->urb.max_vs_entries) + nr_vs_entries = brw->urb.max_vs_entries; + + /* According to volume 2a, nr_vs_entries must be a multiple of 8. */ + brw->urb.nr_vs_entries = ROUND_DOWN_TO(nr_vs_entries, 8); + + /* URB Starting Addresses are specified in multiples of 8kB. */ + brw->urb.vs_start = 2; /* skip over push constants */ +} + +static void +upload_urb(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + assert(brw->urb.nr_vs_entries % 8 == 0); + assert(brw->urb.nr_gs_entries % 8 == 0); + /* GS requirement */ + assert(!brw->gs.prog_bo); + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_PUSH_CONSTANT_ALLOC_VS << 16 | (2 - 2)); + OUT_BATCH(8); + ADVANCE_BATCH(); + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_PUSH_CONSTANT_ALLOC_PS << 16 | (2 - 2)); + OUT_BATCH(8 | 8 << GEN7_PUSH_CONSTANT_BUFFER_OFFSET_SHIFT); + ADVANCE_BATCH(); + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_URB_VS << 16 | (2 - 2)); + OUT_BATCH(brw->urb.nr_vs_entries | + ((brw->urb.vs_size - 1) << GEN7_URB_ENTRY_SIZE_SHIFT) | + (brw->urb.vs_start << GEN7_URB_STARTING_ADDRESS_SHIFT)); + ADVANCE_BATCH(); + + /* Allocate the GS, HS, and DS zero space - we don't use them. */ + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_URB_GS << 16 | (2 - 2)); + OUT_BATCH((0 << GEN7_URB_ENTRY_SIZE_SHIFT) | + (2 << GEN7_URB_STARTING_ADDRESS_SHIFT)); + ADVANCE_BATCH(); + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_URB_HS << 16 | (2 - 2)); + OUT_BATCH((0 << GEN7_URB_ENTRY_SIZE_SHIFT) | + (2 << GEN7_URB_STARTING_ADDRESS_SHIFT)); + ADVANCE_BATCH(); + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_URB_DS << 16 | (2 - 2)); + OUT_BATCH((0 << GEN7_URB_ENTRY_SIZE_SHIFT) | + (2 << GEN7_URB_STARTING_ADDRESS_SHIFT)); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_urb = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_CONTEXT, + .cache = (CACHE_NEW_VS_PROG | CACHE_NEW_GS_PROG), + }, + .prepare = prepare_urb, + .emit = upload_urb, +}; -- cgit v1.2.3 From 3dc4bc1f78db876d2dcb76153ecf9992fcce73e4 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 29 Apr 2011 00:29:02 -0700 Subject: i965: Make gen6_sf_state.c's get_attr_override non-static. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_state.h | 4 ++++ src/mesa/drivers/dri/i965/gen6_sf_state.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index d67524ff264..324d7eb4ea2 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -163,4 +163,8 @@ void brw_create_constant_surface(struct brw_context *brw, int width, uint32_t *out_offset); +/* gen6_sf_state.c */ +uint32_t +get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color); + #endif diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c index 50a5ad38c6f..8c06ff8f190 100644 --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c @@ -32,7 +32,7 @@ #include "main/macros.h" #include "intel_batchbuffer.h" -static uint32_t +uint32_t get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color) { int attr_index = 0, i, vs_attr; -- cgit v1.2.3 From 7d608d0c331c101088273655708965fb9f1be56e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 5 Jan 2011 01:21:06 -0800 Subject: i965: Initial Ivybridge SF/SBE state setup. Copied from gen6_sf_state.c. The main change from Sandybridge seems to be that 3DSTATE_SF was split into two separate state packet commands: 3DSTATE_SF and 3DSTATE_SBE ("setup backend"). The bit-offsets are even the same - only the DWords numbers have shuffled around a bit. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 23 ++- src/mesa/drivers/dri/i965/brw_state.h | 2 + src/mesa/drivers/dri/i965/brw_state_upload.c | 3 +- src/mesa/drivers/dri/i965/gen7_sf_state.c | 264 +++++++++++++++++++++++++++ 5 files changed, 291 insertions(+), 2 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_sf_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index a1bbc962dee..bcfa01249ab 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -97,6 +97,7 @@ DRIVER_SOURCES = \ gen6_viewport_state.c \ gen6_vs_state.c \ gen6_wm_state.c \ + gen7_sf_state.c \ gen7_urb.c C_SOURCES = \ diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 8135b3909f0..4dafc28b57a 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -966,7 +966,7 @@ # define GEN6_CLIP_FORCE_ZERO_RTAINDEX (1 << 5) #define _3DSTATE_SF 0x7813 /* GEN6+ */ -/* DW1 */ +/* DW1 (for gen6) */ # define GEN6_SF_NUM_OUTPUTS_SHIFT 22 # define GEN6_SF_SWIZZLE_ENABLE (1 << 21) # define GEN6_SF_POINT_SPRITE_LOWERLEFT (1 << 20) @@ -1042,6 +1042,27 @@ /* DW18: attr 0-7 wrap shortest enables */ /* DW19: attr 8-16 wrap shortest enables */ +/* On GEN7, many fields of 3DSTATE_SF were split out into a new command: + * 3DSTATE_SBE. The remaining fields live in different DWords, but retain + * the same bit-offset. The only new field: + */ +/* GEN7/DW1: */ +# define GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT 12 + +#define _3DSTATE_SBE 0x781F /* GEN7+ */ +/* DW1 */ +# define GEN7_SBE_SWIZZLE_CONTROL_MODE (1 << 28) +# define GEN7_SBE_NUM_OUTPUTS_SHIFT 22 +# define GEN7_SBE_SWIZZLE_ENABLE (1 << 21) +# define GEN7_SBE_POINT_SPRITE_LOWERLEFT (1 << 20) +# define GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT 11 +# define GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT 4 +/* DW2-9: Attribute setup (same as DW8-15 of gen6 _3DSTATE_SF) */ +/* DW10: Point sprite texture coordinate enables */ +/* DW11: Constant interpolation enables */ +/* DW12: attr 0-7 wrap shortest enables */ +/* DW13: attr 8-16 wrap shortest enables */ + #define _3DSTATE_WM 0x7814 /* GEN6+ */ /* DW1: kernel pointer */ /* DW2 */ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 324d7eb4ea2..a37ff2457f2 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -111,6 +111,8 @@ extern const struct brw_tracked_state gen6_vs_constants; extern const struct brw_tracked_state gen6_vs_state; extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; +extern const struct brw_tracked_state gen7_sbe_state; +extern const struct brw_tracked_state gen7_sf_state; extern const struct brw_tracked_state gen7_urb; /*********************************************************************** diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 9476c2c359b..e2c690ee568 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -213,7 +213,8 @@ const struct brw_tracked_state *gen7_atoms[] = &gen6_vs_state, &gen6_gs_state, &gen6_clip_state, - &gen6_sf_state, + &gen7_sbe_state, + &gen7_sf_state, &gen6_wm_state, &gen6_scissor_state, diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c new file mode 100644 index 00000000000..37c628d6ec8 --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c @@ -0,0 +1,264 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "brw_util.h" +#include "main/macros.h" +#include "intel_batchbuffer.h" + +static void +upload_sbe_state(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + /* CACHE_NEW_VS_PROG */ + uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written); + /* BRW_NEW_FRAGMENT_PROGRAM */ + uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead); + uint32_t dw1, dw10, dw11; + int i; + int attr = 0; + /* _NEW_TRANSFORM */ + int urb_start = ctx->Transform.ClipPlanesEnabled ? 2 : 1; + /* _NEW_LIGHT */ + int two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide); + + /* FINISHME: Attribute Swizzle Control Mode? */ + dw1 = + GEN7_SBE_SWIZZLE_ENABLE | + num_outputs << GEN7_SBE_NUM_OUTPUTS_SHIFT | + (num_inputs + 1) / 2 << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT | + urb_start << GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT; + + /* _NEW_POINT */ + if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT) + dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT; + + dw10 = 0; + if (ctx->Point.PointSprite) { + for (i = 0; i < 8; i++) { + if (ctx->Point.CoordReplace[i]) + dw10 |= (1 << i); + } + } + + /* _NEW_LIGHT (flat shading) */ + dw11 = 0; + if (ctx->Light.ShadeModel == GL_FLAT) { + dw11 |= ((brw->fragment_program->Base.InputsRead & (FRAG_BIT_COL0 | FRAG_BIT_COL1)) >> + ((brw->fragment_program->Base.InputsRead & FRAG_BIT_WPOS) ? 0 : 1)); + } + + BEGIN_BATCH(14); + OUT_BATCH(_3DSTATE_SBE << 16 | (14 - 2)); + OUT_BATCH(dw1); + + /* Output dwords 2 through 9 */ + for (i = 0; i < 8; i++) { + uint32_t attr_overrides = 0; + + for (; attr < 64; attr++) { + if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)) { + attr_overrides |= get_attr_override(brw, attr, two_side_color); + attr++; + break; + } + } + + for (; attr < 64; attr++) { + if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)) { + attr_overrides |= get_attr_override(brw, attr, two_side_color) << 16; + attr++; + break; + } + } + OUT_BATCH(attr_overrides); + } + + OUT_BATCH(dw10); /* point sprite texcoord bitmask */ + OUT_BATCH(dw11); /* constant interp bitmask */ + OUT_BATCH(0); /* wrapshortest enables 0-7 */ + OUT_BATCH(0); /* wrapshortest enables 8-15 */ + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_sbe_state = { + .dirty = { + .mesa = (_NEW_LIGHT | + _NEW_POINT | + _NEW_TRANSFORM), + .brw = (BRW_NEW_CONTEXT | + BRW_NEW_FRAGMENT_PROGRAM), + .cache = CACHE_NEW_VS_PROG + }, + .emit = upload_sbe_state, +}; + +static void +upload_sf_state(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + uint32_t dw1, dw2, dw3; + float point_size; + /* _NEW_BUFFERS */ + bool render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0; + + /* FINISHME: Depth Buffer Surface Format? */ + dw1 = GEN6_SF_STATISTICS_ENABLE | GEN6_SF_VIEWPORT_TRANSFORM_ENABLE; + + /* _NEW_POLYGON */ + if ((ctx->Polygon.FrontFace == GL_CCW) ^ render_to_fbo) + dw1 |= GEN6_SF_WINDING_CCW; + + if (ctx->Polygon.OffsetFill) + dw1 |= GEN6_SF_GLOBAL_DEPTH_OFFSET_SOLID; + + if (ctx->Polygon.OffsetLine) + dw1 |= GEN6_SF_GLOBAL_DEPTH_OFFSET_WIREFRAME; + + if (ctx->Polygon.OffsetPoint) + dw1 |= GEN6_SF_GLOBAL_DEPTH_OFFSET_POINT; + + switch (ctx->Polygon.FrontMode) { + case GL_FILL: + dw1 |= GEN6_SF_FRONT_SOLID; + break; + + case GL_LINE: + dw1 |= GEN6_SF_FRONT_WIREFRAME; + break; + + case GL_POINT: + dw1 |= GEN6_SF_FRONT_POINT; + break; + + default: + assert(0); + break; + } + + switch (ctx->Polygon.BackMode) { + case GL_FILL: + dw1 |= GEN6_SF_BACK_SOLID; + break; + + case GL_LINE: + dw1 |= GEN6_SF_BACK_WIREFRAME; + break; + + case GL_POINT: + dw1 |= GEN6_SF_BACK_POINT; + break; + + default: + assert(0); + break; + } + + dw2 = 0; + + if (ctx->Polygon.CullFlag) { + switch (ctx->Polygon.CullFaceMode) { + case GL_FRONT: + dw2 |= GEN6_SF_CULL_FRONT; + break; + case GL_BACK: + dw2 |= GEN6_SF_CULL_BACK; + break; + case GL_FRONT_AND_BACK: + dw2 |= GEN6_SF_CULL_BOTH; + break; + default: + assert(0); + break; + } + } else { + dw2 |= GEN6_SF_CULL_NONE; + } + + /* _NEW_SCISSOR */ + if (ctx->Scissor.Enabled) + dw2 |= GEN6_SF_SCISSOR_ENABLE; + + /* _NEW_LINE */ + dw2 |= U_FIXED(CLAMP(ctx->Line.Width, 0.0, 7.99), 7) << + GEN6_SF_LINE_WIDTH_SHIFT; + if (ctx->Line.SmoothFlag) { + dw2 |= GEN6_SF_LINE_AA_ENABLE; + dw2 |= GEN6_SF_LINE_AA_MODE_TRUE; + dw2 |= GEN6_SF_LINE_END_CAP_WIDTH_1_0; + } + + /* FINISHME: Last Pixel Enable? Vertex Sub Pixel Precision Select? + * FINISHME: AA Line Distance Mode? + */ + + dw3 = 0; + + /* _NEW_POINT */ + if (!(ctx->VertexProgram.PointSizeEnabled || ctx->Point._Attenuated)) + dw3 |= GEN6_SF_USE_STATE_POINT_WIDTH; + + /* Clamp to ARB_point_parameters user limits */ + point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); + + /* Clamp to the hardware limits and convert to fixed point */ + dw3 |= U_FIXED(CLAMP(point_size, 0.125, 255.875), 3); + + /* _NEW_LIGHT */ + if (ctx->Light.ProvokingVertex != GL_FIRST_VERTEX_CONVENTION) { + dw3 |= + (2 << GEN6_SF_TRI_PROVOKE_SHIFT) | + (2 << GEN6_SF_TRIFAN_PROVOKE_SHIFT) | + (1 << GEN6_SF_LINE_PROVOKE_SHIFT); + } else { + dw3 |= (1 << GEN6_SF_TRIFAN_PROVOKE_SHIFT); + } + + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_SF << 16 | (7 - 2)); + OUT_BATCH(dw1); + OUT_BATCH(dw2); + OUT_BATCH(dw3); + OUT_BATCH_F(ctx->Polygon.OffsetUnits * 2); /* constant. copied from gen4 */ + OUT_BATCH_F(ctx->Polygon.OffsetFactor); /* scale */ + OUT_BATCH_F(0.0); /* XXX: global depth offset clamp */ + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_sf_state = { + .dirty = { + .mesa = (_NEW_LIGHT | + _NEW_POLYGON | + _NEW_LINE | + _NEW_SCISSOR | + _NEW_BUFFERS | + _NEW_POINT), + .brw = BRW_NEW_CONTEXT, + .cache = CACHE_NEW_VS_PROG + }, + .emit = upload_sf_state, +}; -- cgit v1.2.3 From a924d69b57a82c02f2d4fba3fc0b31bf6a4f744e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 2 Feb 2011 16:00:08 -0800 Subject: i965: Initial Ivybridge WM/PS state setup. Copied from gen6_wm_state.c. The main change from Sandybridge seems to be that 3DSTATE_WM was split into two separate state packet commands: 3DSTATE_WM and 3DSTATE_PS. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 3 +- src/mesa/drivers/dri/i965/brw_defines.h | 71 ++++++++ src/mesa/drivers/dri/i965/brw_state.h | 3 + src/mesa/drivers/dri/i965/brw_state_upload.c | 5 +- src/mesa/drivers/dri/i965/gen7_wm_state.c | 243 +++++++++++++++++++++++++++ 5 files changed, 322 insertions(+), 3 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_wm_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index bcfa01249ab..efe0871aa2e 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -98,7 +98,8 @@ DRIVER_SOURCES = \ gen6_vs_state.c \ gen6_wm_state.c \ gen7_sf_state.c \ - gen7_urb.c + gen7_urb.c \ + gen7_wm_state.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 4dafc28b57a..c569995e112 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -1134,6 +1134,77 @@ # define GEN6_CONSTANT_BUFFER_1_ENABLE (1 << 13) # define GEN6_CONSTANT_BUFFER_0_ENABLE (1 << 12) +/* 3DSTATE_WM for Gen7 */ +/* DW1 */ +# define GEN7_WM_STATISTICS_ENABLE (1 << 31) +# define GEN7_WM_DEPTH_CLEAR (1 << 30) +# define GEN7_WM_DISPATCH_ENABLE (1 << 29) +# define GEN6_WM_DEPTH_RESOLVE (1 << 28) +# define GEN7_WM_HIERARCHICAL_DEPTH_RESOLVE (1 << 27) +# define GEN7_WM_KILL_ENABLE (1 << 25) +# define GEN7_WM_PSCDEPTH_OFF (0 << 23) +# define GEN7_WM_PSCDEPTH_ON (1 << 23) +# define GEN7_WM_PSCDEPTH_ON_GE (2 << 23) +# define GEN7_WM_PSCDEPTH_ON_LE (3 << 23) +# define GEN7_WM_USES_SOURCE_DEPTH (1 << 20) +# define GEN7_WM_USES_SOURCE_W (1 << 19) +# define GEN7_WM_POSITION_ZW_PIXEL (0 << 17) +# define GEN7_WM_POSITION_ZW_CENTROID (2 << 17) +# define GEN7_WM_POSITION_ZW_SAMPLE (3 << 17) +# define GEN7_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 16) +# define GEN7_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC (1 << 15) +# define GEN7_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC (1 << 14) +# define GEN7_WM_PERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 13) +# define GEN7_WM_PERSPECTIVE_CENTROID_BARYCENTRIC (1 << 12) +# define GEN7_WM_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 11) +# define GEN7_WM_USES_INPUT_COVERAGE_MASK (1 << 10) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_0_5 (0 << 8) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_1_0 (1 << 8) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_2_0 (2 << 8) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_4_0 (3 << 8) +# define GEN7_WM_LINE_AA_WIDTH_0_5 (0 << 6) +# define GEN7_WM_LINE_AA_WIDTH_1_0 (1 << 6) +# define GEN7_WM_LINE_AA_WIDTH_2_0 (2 << 6) +# define GEN7_WM_LINE_AA_WIDTH_4_0 (3 << 6) +# define GEN7_WM_POLYGON_STIPPLE_ENABLE (1 << 4) +# define GEN7_WM_LINE_STIPPLE_ENABLE (1 << 3) +# define GEN7_WM_POINT_RASTRULE_UPPER_RIGHT (1 << 2) +# define GEN7_WM_MSRAST_OFF_PIXEL (0 << 0) +# define GEN7_WM_MSRAST_OFF_PATTERN (1 << 0) +# define GEN7_WM_MSRAST_ON_PIXEL (2 << 0) +# define GEN7_WM_MSRAST_ON_PATTERN (3 << 0) +/* DW2 */ +# define GEN7_WM_MSDISPMODE_PERPIXEL (1 << 31) + +#define _3DSTATE_PS 0x7820 /* GEN7+ */ +/* DW1: kernel pointer */ +/* DW2 */ +# define GEN7_PS_SPF_MODE (1 << 31) +# define GEN7_PS_VECTOR_MASK_ENABLE (1 << 30) +# define GEN7_PS_SAMPLER_COUNT_SHIFT 27 +# define GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18 +# define GEN7_PS_FLOATING_POINT_MODE_IEEE_754 (0 << 16) +# define GEN7_PS_FLOATING_POINT_MODE_ALT (1 << 16) +/* DW3: scratch space */ +/* DW4 */ +# define GEN7_PS_MAX_THREADS_SHIFT 23 +# define GEN7_PS_PUSH_CONSTANT_ENABLE (1 << 11) +# define GEN7_PS_ATTRIBUTE_ENABLE (1 << 10) +# define GEN7_PS_OMASK_TO_RENDER_TARGET (1 << 9) +# define GEN7_PS_DUAL_SOURCE_BLEND_ENABLE (1 << 7) +# define GEN7_PS_POSOFFSET_NONE (0 << 3) +# define GEN7_PS_POSOFFSET_CENTROID (2 << 3) +# define GEN7_PS_POSOFFSET_SAMPLE (3 << 3) +# define GEN7_PS_32_DISPATCH_ENABLE (1 << 2) +# define GEN7_PS_16_DISPATCH_ENABLE (1 << 1) +# define GEN7_PS_8_DISPATCH_ENABLE (1 << 0) +/* DW5 */ +# define GEN7_PS_DISPATCH_START_GRF_SHIFT_0 16 +# define GEN7_PS_DISPATCH_START_GRF_SHIFT_1 8 +# define GEN7_PS_DISPATCH_START_GRF_SHIFT_2 0 +/* DW6: kernel 1 pointer */ +/* DW7: kernel 2 pointer */ + #define _3DSTATE_SAMPLE_MASK 0x7818 /* GEN6+ */ #define _3DSTATE_DRAWING_RECTANGLE 0x7900 diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index a37ff2457f2..6125aea8373 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -111,9 +111,12 @@ extern const struct brw_tracked_state gen6_vs_constants; extern const struct brw_tracked_state gen6_vs_state; extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; +extern const struct brw_tracked_state gen7_ps_state; extern const struct brw_tracked_state gen7_sbe_state; extern const struct brw_tracked_state gen7_sf_state; extern const struct brw_tracked_state gen7_urb; +extern const struct brw_tracked_state gen7_wm_constants; +extern const struct brw_tracked_state gen7_wm_state; /*********************************************************************** * brw_state.c diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index e2c690ee568..accc8d47b54 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -200,7 +200,7 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_vs_constants, /* Before vs_surfaces and constant_buffer */ &brw_wm_constants, /* Before wm_surfaces and constant_buffer */ &gen6_vs_constants, /* Before vs_state */ - &gen6_wm_constants, /* Before wm_state */ + &gen7_wm_constants, /* Before wm_state */ &brw_vs_surfaces, /* must do before unit */ &brw_wm_constant_surface, /* must do before wm surfaces/bind bo */ @@ -215,7 +215,8 @@ const struct brw_tracked_state *gen7_atoms[] = &gen6_clip_state, &gen7_sbe_state, &gen7_sf_state, - &gen6_wm_state, + &gen7_wm_state, + &gen7_ps_state, &gen6_scissor_state, diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c new file mode 100644 index 00000000000..9d5a71fda4e --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c @@ -0,0 +1,243 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "brw_util.h" +#include "brw_wm.h" +#include "program/prog_parameter.h" +#include "program/prog_statevars.h" +#include "intel_batchbuffer.h" + +static void +gen7_prepare_wm_constants(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + const struct brw_fragment_program *fp = + brw_fragment_program_const(brw->fragment_program); + + /* Updates the ParameterValues[i] pointers for all parameters of the + * basic type of PROGRAM_STATE_VAR. + */ + /* XXX: Should this happen somewhere before to get our state flag set? */ + _mesa_load_state_parameters(ctx, fp->program.Base.Parameters); + + /* BRW_NEW_FRAGMENT_PROGRAM */ + if (brw->wm.prog_data->nr_params != 0) { + float *constants; + unsigned int i; + + constants = brw_state_batch(brw, + brw->wm.prog_data->nr_params * + sizeof(float), + 32, &brw->wm.push_const_offset); + + for (i = 0; i < brw->wm.prog_data->nr_params; i++) { + constants[i] = convert_param(brw->wm.prog_data->param_convert[i], + *brw->wm.prog_data->param[i]); + } + + if (0) { + printf("WM constants:\n"); + for (i = 0; i < brw->wm.prog_data->nr_params; i++) { + if ((i & 7) == 0) + printf("g%d: ", brw->wm.prog_data->first_curbe_grf + i / 8); + printf("%8f ", constants[i]); + if ((i & 7) == 7) + printf("\n"); + } + if ((i & 7) != 0) + printf("\n"); + printf("\n"); + } + } +} + +const struct brw_tracked_state gen7_wm_constants = { + .dirty = { + .mesa = _NEW_PROGRAM_CONSTANTS, + .brw = (BRW_NEW_BATCH | BRW_NEW_FRAGMENT_PROGRAM), + .cache = 0, + }, + .prepare = gen7_prepare_wm_constants, +}; + +static void +upload_wm_state(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + const struct brw_fragment_program *fp = + brw_fragment_program_const(brw->fragment_program); + bool writes_depth = false; + uint32_t dw1; + + dw1 = 0; + dw1 |= GEN7_WM_STATISTICS_ENABLE; + dw1 |= GEN7_WM_LINE_AA_WIDTH_1_0; + dw1 |= GEN7_WM_LINE_END_CAP_AA_WIDTH_0_5; + + /* _NEW_LINE */ + if (ctx->Line.StippleFlag) + dw1 |= GEN7_WM_LINE_STIPPLE_ENABLE; + + /* _NEW_POLYGONSTIPPLE */ + if (ctx->Polygon.StippleFlag) + dw1 |= GEN7_WM_POLYGON_STIPPLE_ENABLE; + + /* BRW_NEW_FRAGMENT_PROGRAM */ + if (fp->program.Base.InputsRead & (1 << FRAG_ATTRIB_WPOS)) + dw1 |= GEN7_WM_USES_SOURCE_DEPTH | GEN7_WM_USES_SOURCE_W; + if (fp->program.Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) { + writes_depth = true; + dw1 |= GEN7_WM_PSCDEPTH_ON; + } + + /* _NEW_COLOR */ + if (fp->program.UsesKill || ctx->Color.AlphaEnabled) + dw1 |= GEN7_WM_KILL_ENABLE; + + /* _NEW_BUFFERS */ + if (brw_color_buffer_write_enabled(brw) || writes_depth || + dw1 & GEN7_WM_KILL_ENABLE) { + dw1 |= GEN7_WM_DISPATCH_ENABLE; + } + + dw1 |= GEN7_WM_PERSPECTIVE_PIXEL_BARYCENTRIC; + + BEGIN_BATCH(3); + OUT_BATCH(_3DSTATE_WM << 16 | (3 - 2)); + OUT_BATCH(dw1); + OUT_BATCH(0); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_wm_state = { + .dirty = { + .mesa = (_NEW_LINE | _NEW_POLYGON | _NEW_POLYGONSTIPPLE | + _NEW_COLOR | _NEW_BUFFERS), + .brw = (BRW_NEW_CURBE_OFFSETS | + BRW_NEW_FRAGMENT_PROGRAM | + BRW_NEW_NR_WM_SURFACES | + BRW_NEW_URB_FENCE | + BRW_NEW_BATCH), + .cache = 0, + }, + .emit = upload_wm_state, +}; + +static void +upload_ps_state(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + uint32_t dw2, dw4, dw5; + + /* CACHE_NEW_WM_PROG */ + if (brw->wm.prog_data->nr_params == 0) { + /* Disable the push constant buffers. */ + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + } else { + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2)); + + OUT_BATCH(ALIGN(brw->wm.prog_data->nr_params, + brw->wm.prog_data->dispatch_width) / 8); + OUT_BATCH(0); + /* Pointer to the WM constant buffer. Covered by the set of + * state flags from gen7_prepare_wm_constants + */ + OUT_BATCH(brw->wm.push_const_offset); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + } + + dw2 = dw4 = dw5 = 0; + + dw2 |= (ALIGN(brw->wm.sampler_count, 4) / 4) << GEN7_PS_SAMPLER_COUNT_SHIFT; + + /* BRW_NEW_NR_WM_SURFACES */ + dw2 |= brw->wm.nr_surfaces << GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT; + + /* OpenGL non-ieee floating point mode */ + dw2 |= GEN7_PS_FLOATING_POINT_MODE_ALT; + + /* CACHE_NEW_SAMPLER */ + dw4 |= (brw->wm_max_threads - 1) << GEN7_PS_MAX_THREADS_SHIFT; + + /* CACHE_NEW_WM_PROG */ + if (brw->wm.prog_data->nr_params > 0) + dw4 |= GEN7_PS_PUSH_CONSTANT_ENABLE; + + /* BRW_NEW_FRAGMENT_PROGRAM */ + if (brw->fragment_program->Base.InputsRead != 0) + dw4 |= GEN7_PS_ATTRIBUTE_ENABLE; + + if (brw->wm.prog_data->dispatch_width == 8) + dw4 |= GEN7_PS_8_DISPATCH_ENABLE; + else + dw4 |= GEN7_PS_16_DISPATCH_ENABLE; + + /* BRW_NEW_CURBE_OFFSETS */ + dw5 |= (brw->wm.prog_data->first_curbe_grf << + GEN7_PS_DISPATCH_START_GRF_SHIFT_0); + + BEGIN_BATCH(8); + OUT_BATCH(_3DSTATE_PS << 16 | (8 - 2)); + OUT_RELOC(brw->wm.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); + OUT_BATCH(dw2); + OUT_BATCH(0); /* scratch space base offset */ + OUT_BATCH(dw4); + OUT_BATCH(dw5); + /* FINISHME: need to upload the SIMD16 program */ + OUT_BATCH(0); /* kernel 1 pointer */ + OUT_BATCH(0); /* kernel 2 pointer */ + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_ps_state = { + .dirty = { + .mesa = (_NEW_LINE | _NEW_POLYGON | _NEW_POLYGONSTIPPLE | + _NEW_PROGRAM_CONSTANTS), + .brw = (BRW_NEW_CURBE_OFFSETS | + BRW_NEW_FRAGMENT_PROGRAM | + BRW_NEW_NR_WM_SURFACES | + BRW_NEW_URB_FENCE | + BRW_NEW_BATCH), + .cache = (CACHE_NEW_SAMPLER | + CACHE_NEW_WM_PROG) + }, + .emit = upload_ps_state, +}; -- cgit v1.2.3 From 24d0ed72c1817b624e3021b12a0987b2c5edd71b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 9 Feb 2011 01:05:40 -0800 Subject: i965: Initial Ivybridge CC state setup. The state itself still seems to be the same; the only change is that each part (CC, BLEND, DEPTH_STENCIL) can now be uploaded independently. Thus, we still rely on the code in gen6_cc.c to set up the state. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 2 + src/mesa/drivers/dri/i965/brw_state.h | 3 + src/mesa/drivers/dri/i965/brw_state_upload.c | 4 +- src/mesa/drivers/dri/i965/gen7_cc_state.c | 89 ++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_cc_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index efe0871aa2e..dcecf3a741e 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -97,6 +97,7 @@ DRIVER_SOURCES = \ gen6_viewport_state.c \ gen6_vs_state.c \ gen6_wm_state.c \ + gen7_cc_state.c \ gen7_sf_state.c \ gen7_urb.c \ gen7_wm_state.c diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index c569995e112..5e6f88a7530 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -874,6 +874,8 @@ #define CMD_VF_STATISTICS_965 0x780b #define CMD_VF_STATISTICS_GM45 0x680b #define _3DSTATE_CC_STATE_POINTERS 0x780e /* GEN6+ */ +#define _3DSTATE_BLEND_STATE_POINTERS 0x7824 /* GEN7+ */ +#define _3DSTATE_DEPTH_STENCIL_STATE_POINTERS 0x7825 /* GEN7+ */ #define _3DSTATE_URB 0x7805 /* GEN6 */ # define GEN6_URB_VS_SIZE_SHIFT 16 diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 6125aea8373..e9af591c915 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -111,6 +111,9 @@ extern const struct brw_tracked_state gen6_vs_constants; extern const struct brw_tracked_state gen6_vs_state; extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; +extern const struct brw_tracked_state gen7_blend_state_pointer; +extern const struct brw_tracked_state gen7_cc_state_pointer; +extern const struct brw_tracked_state gen7_depth_stencil_state_pointer; extern const struct brw_tracked_state gen7_ps_state; extern const struct brw_tracked_state gen7_sbe_state; extern const struct brw_tracked_state gen7_sf_state; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index accc8d47b54..79a173d4790 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -195,7 +195,9 @@ const struct brw_tracked_state *gen7_atoms[] = &gen6_blend_state, /* must do before cc unit */ &gen6_color_calc_state, /* must do before cc unit */ &gen6_depth_stencil_state, /* must do before cc unit */ - &gen6_cc_state_pointers, + &gen7_blend_state_pointer, + &gen7_cc_state_pointer, + &gen7_depth_stencil_state_pointer, &brw_vs_constants, /* Before vs_surfaces and constant_buffer */ &brw_wm_constants, /* Before wm_surfaces and constant_buffer */ diff --git a/src/mesa/drivers/dri/i965/gen7_cc_state.c b/src/mesa/drivers/dri/i965/gen7_cc_state.c new file mode 100644 index 00000000000..b7395aa791b --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_cc_state.c @@ -0,0 +1,89 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "brw_util.h" +#include "intel_batchbuffer.h" +#include "main/macros.h" + +static void +upload_cc_state_pointers(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_CC_STATE_POINTERS << 16 | (2 - 2)); + OUT_BATCH(brw->cc.state_offset | 1); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_cc_state_pointer = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_BATCH, + .cache = CACHE_NEW_COLOR_CALC_STATE + }, + .emit = upload_cc_state_pointers, +}; + +static void +upload_blend_state_pointer(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_BLEND_STATE_POINTERS << 16 | (2 - 2)); + OUT_BATCH(brw->cc.blend_state_offset | 1); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_blend_state_pointer = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_BATCH, + .cache = CACHE_NEW_BLEND_STATE + }, + .emit = upload_blend_state_pointer, +}; + +static void +upload_depth_stencil_state_pointer(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_DEPTH_STENCIL_STATE_POINTERS << 16 | (2 - 2)); + OUT_BATCH(brw->cc.depth_stencil_state_offset | 1); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_depth_stencil_state_pointer = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_BATCH, + .cache = CACHE_NEW_DEPTH_STENCIL_STATE + }, + .emit = upload_depth_stencil_state_pointer, +}; -- cgit v1.2.3 From 81fd03fe56372c5c702bf257e821cea71ee25448 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 28 Mar 2011 13:12:21 -0700 Subject: i965: Initial Ivybridge Clip state setup. Copied from gen6_clip_state.c. This enables early culling and sets the necessary fields. Otherwise, it is entirely the same, so I doubt this patch is strictly necessary for a functional driver. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 9 +++ src/mesa/drivers/dri/i965/brw_state.h | 1 + src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/gen7_clip_state.c | 113 +++++++++++++++++++++++++++ 5 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_clip_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index dcecf3a741e..c281320c274 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -98,6 +98,7 @@ DRIVER_SOURCES = \ gen6_vs_state.c \ gen6_wm_state.c \ gen7_cc_state.c \ + gen7_clip_state.c \ gen7_sf_state.c \ gen7_urb.c \ gen7_wm_state.c diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 5e6f88a7530..04d5863b889 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -939,6 +939,15 @@ #define _3DSTATE_CLIP 0x7812 /* GEN6+ */ /* DW1 */ +# define GEN7_CLIP_WINDING_CW (0 << 20) +# define GEN7_CLIP_WINDING_CCW (1 << 20) +# define GEN7_CLIP_VERTEX_SUBPIXEL_PRECISION_8 (0 << 19) +# define GEN7_CLIP_VERTEX_SUBPIXEL_PRECISION_4 (1 << 19) +# define GEN7_CLIP_EARLY_CULL (1 << 18) +# define GEN7_CLIP_CULLMODE_BOTH (0 << 16) +# define GEN7_CLIP_CULLMODE_NONE (1 << 16) +# define GEN7_CLIP_CULLMODE_FRONT (2 << 16) +# define GEN7_CLIP_CULLMODE_BACK (3 << 16) # define GEN6_CLIP_STATISTICS_ENABLE (1 << 10) /** * Just does cheap culling based on the clip distance. Bits must be diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index e9af591c915..ec680e4205e 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -113,6 +113,7 @@ extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; extern const struct brw_tracked_state gen7_blend_state_pointer; extern const struct brw_tracked_state gen7_cc_state_pointer; +extern const struct brw_tracked_state gen7_clip_state; extern const struct brw_tracked_state gen7_depth_stencil_state_pointer; extern const struct brw_tracked_state gen7_ps_state; extern const struct brw_tracked_state gen7_sbe_state; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 79a173d4790..e3fd0911029 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -214,7 +214,7 @@ const struct brw_tracked_state *gen7_atoms[] = &gen6_vs_state, &gen6_gs_state, - &gen6_clip_state, + &gen7_clip_state, &gen7_sbe_state, &gen7_sf_state, &gen7_wm_state, diff --git a/src/mesa/drivers/dri/i965/gen7_clip_state.c b/src/mesa/drivers/dri/i965/gen7_clip_state.c new file mode 100644 index 00000000000..c23ba8cab5c --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_clip_state.c @@ -0,0 +1,113 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "brw_util.h" +#include "intel_batchbuffer.h" + +static void +upload_clip_state(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + uint32_t depth_clamp = 0; + uint32_t provoking, userclip; + uint32_t dw1 = GEN6_CLIP_STATISTICS_ENABLE; + + /* _NEW_BUFFERS */ + GLboolean render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0; + + dw1 |= GEN7_CLIP_EARLY_CULL; + + /* _NEW_POLYGON */ + if ((ctx->Polygon.FrontFace == GL_CCW) ^ render_to_fbo) + dw1 |= GEN7_CLIP_WINDING_CCW; + + if (ctx->Polygon.CullFlag) { + switch (ctx->Polygon.CullFaceMode) { + case GL_FRONT: + dw1 |= GEN7_CLIP_CULLMODE_FRONT; + break; + case GL_BACK: + dw1 |= GEN7_CLIP_CULLMODE_BACK; + break; + case GL_FRONT_AND_BACK: + dw1 |= GEN7_CLIP_CULLMODE_BOTH; + break; + default: + assert(!"Should not get here: invalid CullFlag"); + break; + } + } else { + dw1 |= GEN7_CLIP_CULLMODE_NONE; + } + + /* _NEW_TRANSFORM */ + if (!ctx->Transform.DepthClamp) + depth_clamp = GEN6_CLIP_Z_TEST; + + /* _NEW_LIGHT */ + if (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION) { + provoking = + (0 << GEN6_CLIP_TRI_PROVOKE_SHIFT) | + (1 << GEN6_CLIP_TRIFAN_PROVOKE_SHIFT) | + (0 << GEN6_CLIP_LINE_PROVOKE_SHIFT); + } else { + provoking = + (2 << GEN6_CLIP_TRI_PROVOKE_SHIFT) | + (2 << GEN6_CLIP_TRIFAN_PROVOKE_SHIFT) | + (1 << GEN6_CLIP_LINE_PROVOKE_SHIFT); + } + + /* _NEW_TRANSFORM */ + userclip = (1 << brw_count_bits(ctx->Transform.ClipPlanesEnabled)) - 1; + + BEGIN_BATCH(4); + OUT_BATCH(_3DSTATE_CLIP << 16 | (4 - 2)); + OUT_BATCH(dw1); + OUT_BATCH(GEN6_CLIP_ENABLE | + GEN6_CLIP_API_OGL | + GEN6_CLIP_MODE_NORMAL | + GEN6_CLIP_XY_TEST | + userclip << GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT | + depth_clamp | + provoking); + OUT_BATCH(U_FIXED(0.125, 3) << GEN6_CLIP_MIN_POINT_WIDTH_SHIFT | + U_FIXED(255.875, 3) << GEN6_CLIP_MAX_POINT_WIDTH_SHIFT | + GEN6_CLIP_FORCE_ZERO_RTAINDEX); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_clip_state = { + .dirty = { + .mesa = (_NEW_BUFFERS | + _NEW_POLYGON | + _NEW_LIGHT | + _NEW_TRANSFORM), + .brw = BRW_NEW_CONTEXT, + .cache = 0 + }, + .emit = upload_clip_state, +}; -- cgit v1.2.3 From 18402fbf79e96d7afb6b690906a7656f01a92b9d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 9 Feb 2011 00:49:59 -0800 Subject: i965: Initial Ivybridge Viewport state setup. SF and CLIP viewport state has been combined into SF_CLIP_VIEWPORT; SF_CLIP and CC state pointers can now be uploaded independently. Some portions of the hardware documentation refer to separate upload commands for SF and CLIP; these are outdated and incorrect. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 3 + src/mesa/drivers/dri/i965/brw_state.h | 3 + src/mesa/drivers/dri/i965/brw_state_upload.c | 6 +- src/mesa/drivers/dri/i965/brw_structs.h | 22 +++++ src/mesa/drivers/dri/i965/gen7_viewport_state.c | 106 ++++++++++++++++++++++++ 6 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_viewport_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index c281320c274..a0a02eea9f4 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -101,6 +101,7 @@ DRIVER_SOURCES = \ gen7_clip_state.c \ gen7_sf_state.c \ gen7_urb.c \ + gen7_viewport_state.c \ gen7_wm_state.c C_SOURCES = \ diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 04d5863b889..f784456e957 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -899,6 +899,9 @@ # define GEN6_SF_VIEWPORT_MODIFY (1 << 11) # define GEN6_CLIP_VIEWPORT_MODIFY (1 << 10) +#define _3DSTATE_VIEWPORT_STATE_POINTERS_CC 0x7823 /* GEN7+ */ +#define _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL 0x7821 /* GEN7+ */ + #define _3DSTATE_SCISSOR_STATE_POINTERS 0x780f /* GEN6+ */ #define _3DSTATE_VS 0x7810 /* GEN6+ */ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index ec680e4205e..21a94e7a003 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -113,10 +113,13 @@ extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; extern const struct brw_tracked_state gen7_blend_state_pointer; extern const struct brw_tracked_state gen7_cc_state_pointer; +extern const struct brw_tracked_state gen7_cc_viewport_state_pointer; extern const struct brw_tracked_state gen7_clip_state; extern const struct brw_tracked_state gen7_depth_stencil_state_pointer; extern const struct brw_tracked_state gen7_ps_state; extern const struct brw_tracked_state gen7_sbe_state; +extern const struct brw_tracked_state gen7_sf_clip_viewport; +extern const struct brw_tracked_state gen7_sf_clip_viewport_state_pointer; extern const struct brw_tracked_state gen7_sf_state; extern const struct brw_tracked_state gen7_urb; extern const struct brw_tracked_state gen7_wm_constants; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index e3fd0911029..72978676444 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -179,9 +179,6 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_gs_prog, &brw_wm_prog, - &gen6_clip_vp, - &gen6_sf_vp, - /* Command packets: */ &brw_invarient_state, @@ -189,7 +186,8 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_state_base_address, &brw_cc_vp, - &gen6_viewport_state, /* must do after *_vp stages */ + &gen7_cc_viewport_state_pointer, /* must do after brw_cc_vp */ + &gen7_sf_clip_viewport, &gen7_urb, &gen6_blend_state, /* must do before cc unit */ diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 6132bb91abe..561758f4eaa 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1155,6 +1155,28 @@ struct gen6_sf_viewport { GLfloat m32; }; +struct gen7_sf_clip_viewport { + struct { + GLfloat m00; + GLfloat m11; + GLfloat m22; + GLfloat m30; + GLfloat m31; + GLfloat m32; + } viewport; + + GLuint pad0[2]; + + struct { + GLfloat xmin; + GLfloat xmax; + GLfloat ymin; + GLfloat ymax; + } guardband; + + GLfloat pad1[4]; +}; + /* Documented in the subsystem/shared-functions/sampler chapter... */ struct brw_surface_state diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c new file mode 100644 index 00000000000..838ad3a3948 --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c @@ -0,0 +1,106 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "intel_batchbuffer.h" + +static void +prepare_sf_clip_viewport(struct brw_context *brw) +{ + struct gl_context *ctx = &brw->intel.ctx; + const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF; + GLfloat y_scale, y_bias; + const GLboolean render_to_fbo = (ctx->DrawBuffer->Name != 0); + const GLfloat *v = ctx->Viewport._WindowMap.m; + struct gen7_sf_clip_viewport *vp; + + vp = brw_state_batch(brw, sizeof(vp), 64, &brw->sf.vp_offset); + /* Also assign to clip.vp_offset in case something uses it. */ + brw->clip.vp_offset = brw->sf.vp_offset; + + /* Disable guardband clipping (see gen6_viewport_state.c for rationale). */ + vp->guardband.xmin = -1.0; + vp->guardband.xmax = 1.0; + vp->guardband.ymin = -1.0; + vp->guardband.ymax = 1.0; + + /* _NEW_BUFFERS */ + if (render_to_fbo) { + y_scale = 1.0; + y_bias = 0; + } else { + y_scale = -1.0; + y_bias = ctx->DrawBuffer->Height; + } + + /* _NEW_VIEWPORT */ + vp->viewport.m00 = v[MAT_SX]; + vp->viewport.m11 = v[MAT_SY] * y_scale; + vp->viewport.m22 = v[MAT_SZ] * depth_scale; + vp->viewport.m30 = v[MAT_TX]; + vp->viewport.m31 = v[MAT_TY] * y_scale + y_bias; + vp->viewport.m32 = v[MAT_TZ] * depth_scale; +} + +static void upload_sf_clip_viewport_state_pointer(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL << 16 | (2 - 2)); + OUT_BATCH(brw->sf.vp_offset); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_sf_clip_viewport = { + .dirty = { + .mesa = _NEW_VIEWPORT | _NEW_BUFFERS, + .brw = BRW_NEW_BATCH, + .cache = 0, + }, + .prepare = prepare_sf_clip_viewport, + .emit = upload_sf_clip_viewport_state_pointer, +}; + +/* ----------------------------------------------------- */ + +static void upload_cc_viewport_state_pointer(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_VIEWPORT_STATE_POINTERS_CC << 16 | (2 - 2)); + OUT_BATCH(brw->cc.vp_offset); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_cc_viewport_state_pointer = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_BATCH, + .cache = CACHE_NEW_CC_VP + }, + .emit = upload_cc_viewport_state_pointer, +}; -- cgit v1.2.3 From 6b2010df7d55ad9feacbbcf708a83a66cdf91aaf Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 9 Apr 2011 01:16:06 -0700 Subject: i965: Initial Ivybridge VS state. Copied from gen6_vs_state.c; reuses create_vs_constant_bo from there. The 3DSTATE_VS command is identical but 3DSTATE_CONSTANT_VS is not. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_state.h | 1 + src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/gen7_vs_state.c | 93 ++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_vs_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index a0a02eea9f4..63d826f3d6b 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -102,6 +102,7 @@ DRIVER_SOURCES = \ gen7_sf_state.c \ gen7_urb.c \ gen7_viewport_state.c \ + gen7_vs_state.c \ gen7_wm_state.c C_SOURCES = \ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 21a94e7a003..0cfcc044a0d 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -122,6 +122,7 @@ extern const struct brw_tracked_state gen7_sf_clip_viewport; extern const struct brw_tracked_state gen7_sf_clip_viewport_state_pointer; extern const struct brw_tracked_state gen7_sf_state; extern const struct brw_tracked_state gen7_urb; +extern const struct brw_tracked_state gen7_vs_state; extern const struct brw_tracked_state gen7_wm_constants; extern const struct brw_tracked_state gen7_wm_state; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 72978676444..a3a52327483 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -210,7 +210,7 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_wm_samplers, &gen6_sampler_state, - &gen6_vs_state, + &gen7_vs_state, &gen6_gs_state, &gen7_clip_state, &gen7_sbe_state, diff --git a/src/mesa/drivers/dri/i965/gen7_vs_state.c b/src/mesa/drivers/dri/i965/gen7_vs_state.c new file mode 100644 index 00000000000..5697e90a8b8 --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_vs_state.c @@ -0,0 +1,93 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "brw_util.h" +#include "program/prog_parameter.h" +#include "program/prog_statevars.h" +#include "intel_batchbuffer.h" + +static void +upload_vs_state(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + + if (brw->vs.push_const_size == 0) { + /* Disable the push constant buffers. */ + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_VS << 16 | (7 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + } else { + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_VS << 16 | (7 - 2)); + OUT_BATCH(brw->vs.push_const_size); + OUT_BATCH(0); + /* Pointer to the VS constant buffer. Covered by the set of + * state flags from gen6_prepare_wm_contants + */ + OUT_BATCH(brw->vs.push_const_offset); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + } + + BEGIN_BATCH(6); + OUT_BATCH(_3DSTATE_VS << 16 | (6 - 2)); + OUT_RELOC(brw->vs.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); + OUT_BATCH((0 << GEN6_VS_SAMPLER_COUNT_SHIFT) | + GEN6_VS_FLOATING_POINT_MODE_ALT | + (brw->vs.nr_surfaces << GEN6_VS_BINDING_TABLE_ENTRY_COUNT_SHIFT)); + OUT_BATCH(0); /* scratch space base offset */ + OUT_BATCH((1 << GEN6_VS_DISPATCH_START_GRF_SHIFT) | + (brw->vs.prog_data->urb_read_length << GEN6_VS_URB_READ_LENGTH_SHIFT) | + (0 << GEN6_VS_URB_ENTRY_READ_OFFSET_SHIFT)); + + OUT_BATCH(((brw->vs_max_threads - 1) << GEN6_VS_MAX_THREADS_SHIFT) | + GEN6_VS_STATISTICS_ENABLE | + GEN6_VS_ENABLE); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_vs_state = { + .dirty = { + .mesa = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS, + .brw = (BRW_NEW_CURBE_OFFSETS | + BRW_NEW_NR_VS_SURFACES | + BRW_NEW_URB_FENCE | + BRW_NEW_CONTEXT | + BRW_NEW_VERTEX_PROGRAM | + BRW_NEW_BATCH), + .cache = CACHE_NEW_VS_PROG + }, + .emit = upload_vs_state, +}; -- cgit v1.2.3 From bac10b58de69108bdb2cc3358733e2648ab7c5d2 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 9 Apr 2011 02:30:34 -0700 Subject: i965: Explicitly disable unused pipeline stages on Ivybridge. This may not be strictly necessary, but seems wise. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 11 +++ src/mesa/drivers/dri/i965/brw_state.h | 2 + src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/gen7_disable.c | 126 +++++++++++++++++++++++++++ 5 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_disable.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 63d826f3d6b..0c6313a82a9 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -99,6 +99,7 @@ DRIVER_SOURCES = \ gen6_wm_state.c \ gen7_cc_state.c \ gen7_clip_state.c \ + gen7_disable.c \ gen7_sf_state.c \ gen7_urb.c \ gen7_viewport_state.c \ diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index f784456e957..3e35e54d35a 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -930,6 +930,7 @@ # define GEN6_GS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18 /* DW4 */ # define GEN6_GS_URB_READ_LENGTH_SHIFT 11 +# define GEN7_GS_INCLUDE_VERTEX_HANDLES (1 << 10) # define GEN6_GS_URB_ENTRY_READ_OFFSET_SHIFT 4 # define GEN6_GS_DISPATCH_START_GRF_SHIFT 0 /* DW5 */ @@ -937,9 +938,14 @@ # define GEN6_GS_STATISTICS_ENABLE (1 << 10) # define GEN6_GS_SO_STATISTICS_ENABLE (1 << 9) # define GEN6_GS_RENDERING_ENABLE (1 << 8) +# define GEN7_GS_ENABLE (1 << 0) /* DW6 */ # define GEN6_GS_ENABLE (1 << 15) +#define _3DSTATE_HS 0x781B /* GEN7+ */ +#define _3DSTATE_TE 0x781C /* GEN7+ */ +#define _3DSTATE_DS 0x781D /* GEN7+ */ + #define _3DSTATE_CLIP 0x7812 /* GEN6+ */ /* DW1 */ # define GEN7_CLIP_WINDING_CW (0 << 20) @@ -1148,6 +1154,9 @@ # define GEN6_CONSTANT_BUFFER_1_ENABLE (1 << 13) # define GEN6_CONSTANT_BUFFER_0_ENABLE (1 << 12) +#define _3DSTATE_CONSTANT_HS 0x7819 /* GEN7+ */ +#define _3DSTATE_CONSTANT_DS 0x781A /* GEN7+ */ + /* 3DSTATE_WM for Gen7 */ /* DW1 */ # define GEN7_WM_STATISTICS_ENABLE (1 << 31) @@ -1219,6 +1228,8 @@ /* DW6: kernel 1 pointer */ /* DW7: kernel 2 pointer */ +#define _3DSTATE_STREAMOUT 0x781e /* GEN7+ */ + #define _3DSTATE_SAMPLE_MASK 0x7818 /* GEN6+ */ #define _3DSTATE_DRAWING_RECTANGLE 0x7900 diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 0cfcc044a0d..115e8ce17a8 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -116,11 +116,13 @@ extern const struct brw_tracked_state gen7_cc_state_pointer; extern const struct brw_tracked_state gen7_cc_viewport_state_pointer; extern const struct brw_tracked_state gen7_clip_state; extern const struct brw_tracked_state gen7_depth_stencil_state_pointer; +extern const struct brw_tracked_state gen7_disable_stages; extern const struct brw_tracked_state gen7_ps_state; extern const struct brw_tracked_state gen7_sbe_state; extern const struct brw_tracked_state gen7_sf_clip_viewport; extern const struct brw_tracked_state gen7_sf_clip_viewport_state_pointer; extern const struct brw_tracked_state gen7_sf_state; +extern const struct brw_tracked_state gen7_sol_state; extern const struct brw_tracked_state gen7_urb; extern const struct brw_tracked_state gen7_vs_state; extern const struct brw_tracked_state gen7_wm_constants; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index a3a52327483..062d98e4195 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -210,8 +210,8 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_wm_samplers, &gen6_sampler_state, + &gen7_disable_stages, &gen7_vs_state, - &gen6_gs_state, &gen7_clip_state, &gen7_sbe_state, &gen7_sf_state, diff --git a/src/mesa/drivers/dri/i965/gen7_disable.c b/src/mesa/drivers/dri/i965/gen7_disable.c new file mode 100644 index 00000000000..4fbbfe72e3b --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_disable.c @@ -0,0 +1,126 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "intel_batchbuffer.h" + +static void +disable_stages(struct brw_context *brw) +{ + struct intel_context *intel = &brw->intel; + + assert(brw->gs.prog_bo == NULL); + + /* Disable the Geometry Shader (GS) Unit */ + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_GS << 16 | (7 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_GS << 16 | (7 - 2)); + OUT_BATCH(0); /* prog_bo */ + OUT_BATCH((0 << GEN6_GS_SAMPLER_COUNT_SHIFT) | + (0 << GEN6_GS_BINDING_TABLE_ENTRY_COUNT_SHIFT)); + OUT_BATCH(0); /* scratch space base offset */ + OUT_BATCH((1 << GEN6_GS_DISPATCH_START_GRF_SHIFT) | + (0 << GEN6_GS_URB_READ_LENGTH_SHIFT) | + GEN7_GS_INCLUDE_VERTEX_HANDLES | + (0 << GEN6_GS_URB_ENTRY_READ_OFFSET_SHIFT)); + OUT_BATCH((0 << GEN6_GS_MAX_THREADS_SHIFT) | + GEN6_GS_STATISTICS_ENABLE); + OUT_BATCH(0); + ADVANCE_BATCH(); + + /* Disable the HS Unit */ + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_HS << 16 | (7 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_HS << 16 | (7 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + /* Disable the TE */ + BEGIN_BATCH(4); + OUT_BATCH(_3DSTATE_TE << 16 | (4 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + /* Disable the DS Unit */ + BEGIN_BATCH(7); + OUT_BATCH(_3DSTATE_CONSTANT_DS << 16 | (7 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + BEGIN_BATCH(6); + OUT_BATCH(_3DSTATE_DS << 16 | (6 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + /* Disable the SOL stage */ + BEGIN_BATCH(3); + OUT_BATCH(_3DSTATE_STREAMOUT << 16 | (3 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); +} + +const struct brw_tracked_state gen7_disable_stages = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_BATCH, + .cache = 0, + }, + .emit = disable_stages, +}; -- cgit v1.2.3 From e0e2c045965f7bd4becae3dce8394f8455184e0d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 22 Feb 2011 13:30:02 -0800 Subject: i965: Split BRW_NEW_BINDING_TABLE dirty bit into one per stage. Ivybridge can update each stage's binding table pointer independently, so we want separate dirty bits. Previous generations can simply subscribe to all three dirty bits and emit as usual. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_context.h | 22 +++++++++++++--------- src/mesa/drivers/dri/i965/brw_misc_state.c | 10 ++++++++-- src/mesa/drivers/dri/i965/brw_state_upload.c | 4 +++- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 4 ++-- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index b3d297deae6..22a6826420f 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -132,7 +132,9 @@ enum brw_state_id { BRW_STATE_WM_INPUT_DIMENSIONS, BRW_STATE_PSP, BRW_STATE_WM_SURFACES, - BRW_STATE_BINDING_TABLE, + BRW_STATE_VS_BINDING_TABLE, + BRW_STATE_GS_BINDING_TABLE, + BRW_STATE_PS_BINDING_TABLE, BRW_STATE_INDICES, BRW_STATE_VERTICES, BRW_STATE_BATCH, @@ -155,21 +157,23 @@ enum brw_state_id { #define BRW_NEW_WM_INPUT_DIMENSIONS (1 << BRW_STATE_WM_INPUT_DIMENSIONS) #define BRW_NEW_PSP (1 << BRW_STATE_PSP) #define BRW_NEW_WM_SURFACES (1 << BRW_STATE_WM_SURFACES) -#define BRW_NEW_BINDING_TABLE (1 << BRW_STATE_BINDING_TABLE) +#define BRW_NEW_VS_BINDING_TABLE (1 << BRW_STATE_VS_BINDING_TABLE) +#define BRW_NEW_GS_BINDING_TABLE (1 << BRW_STATE_GS_BINDING_TABLE) +#define BRW_NEW_PS_BINDING_TABLE (1 << BRW_STATE_PS_BINDING_TABLE) #define BRW_NEW_INDICES (1 << BRW_STATE_INDICES) #define BRW_NEW_VERTICES (1 << BRW_STATE_VERTICES) /** * Used for any batch entry with a relocated pointer that will be used * by any 3D rendering. */ -#define BRW_NEW_BATCH (1 << BRW_STATE_BATCH) +#define BRW_NEW_BATCH (1 << BRW_STATE_BATCH) /** \see brw.state.depth_region */ -#define BRW_NEW_DEPTH_BUFFER (1 << BRW_STATE_DEPTH_BUFFER) -#define BRW_NEW_NR_WM_SURFACES (1 << BRW_STATE_NR_WM_SURFACES) -#define BRW_NEW_NR_VS_SURFACES (1 << BRW_STATE_NR_VS_SURFACES) -#define BRW_NEW_INDEX_BUFFER (1 << BRW_STATE_INDEX_BUFFER) -#define BRW_NEW_VS_CONSTBUF (1 << BRW_STATE_VS_CONSTBUF) -#define BRW_NEW_WM_CONSTBUF (1 << BRW_STATE_WM_CONSTBUF) +#define BRW_NEW_DEPTH_BUFFER (1 << BRW_STATE_DEPTH_BUFFER) +#define BRW_NEW_NR_WM_SURFACES (1 << BRW_STATE_NR_WM_SURFACES) +#define BRW_NEW_NR_VS_SURFACES (1 << BRW_STATE_NR_VS_SURFACES) +#define BRW_NEW_INDEX_BUFFER (1 << BRW_STATE_INDEX_BUFFER) +#define BRW_NEW_VS_CONSTBUF (1 << BRW_STATE_VS_CONSTBUF) +#define BRW_NEW_WM_CONSTBUF (1 << BRW_STATE_WM_CONSTBUF) struct brw_state_flags { /** State update flags signalled by mesa internals */ diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index 7119786de42..ed6a09d861b 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -86,7 +86,10 @@ static void upload_binding_table_pointers(struct brw_context *brw) const struct brw_tracked_state brw_binding_table_pointers = { .dirty = { .mesa = 0, - .brw = BRW_NEW_BATCH | BRW_NEW_BINDING_TABLE, + .brw = BRW_NEW_BATCH + | BRW_NEW_VS_BINDING_TABLE + | BRW_NEW_GS_BINDING_TABLE + | BRW_NEW_PS_BINDING_TABLE, .cache = 0, }, .emit = upload_binding_table_pointers, @@ -118,7 +121,10 @@ static void upload_gen6_binding_table_pointers(struct brw_context *brw) const struct brw_tracked_state gen6_binding_table_pointers = { .dirty = { .mesa = 0, - .brw = BRW_NEW_BATCH | BRW_NEW_BINDING_TABLE, + .brw = BRW_NEW_BATCH + | BRW_NEW_VS_BINDING_TABLE + | BRW_NEW_GS_BINDING_TABLE + | BRW_NEW_PS_BINDING_TABLE, .cache = 0, }, .emit = upload_gen6_binding_table_pointers, diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 062d98e4195..6684cdc278b 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -370,7 +370,6 @@ static struct dirty_bit_map brw_bits[] = { DEFINE_BIT(BRW_NEW_WM_INPUT_DIMENSIONS), DEFINE_BIT(BRW_NEW_PSP), DEFINE_BIT(BRW_NEW_WM_SURFACES), - DEFINE_BIT(BRW_NEW_BINDING_TABLE), DEFINE_BIT(BRW_NEW_INDICES), DEFINE_BIT(BRW_NEW_INDEX_BUFFER), DEFINE_BIT(BRW_NEW_VERTICES), @@ -380,6 +379,9 @@ static struct dirty_bit_map brw_bits[] = { DEFINE_BIT(BRW_NEW_NR_VS_SURFACES), DEFINE_BIT(BRW_NEW_VS_CONSTBUF), DEFINE_BIT(BRW_NEW_WM_CONSTBUF), + DEFINE_BIT(BRW_NEW_VS_BINDING_TABLE), + DEFINE_BIT(BRW_NEW_GS_BINDING_TABLE), + DEFINE_BIT(BRW_NEW_PS_BINDING_TABLE), {0, 0, 0} }; diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index 48cf265e51b..2b9b63590a0 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -165,7 +165,7 @@ static void upload_vs_surfaces(struct brw_context *brw) /* BRW_NEW_NR_VS_SURFACES */ if (brw->vs.nr_surfaces == 0) { if (brw->vs.bind_bo_offset) { - brw->state.dirty.brw |= BRW_NEW_BINDING_TABLE; + brw->state.dirty.brw |= BRW_NEW_VS_BINDING_TABLE; } brw->vs.bind_bo_offset = 0; return; @@ -184,7 +184,7 @@ static void upload_vs_surfaces(struct brw_context *brw) bind[i] = brw->vs.surf_offset[i]; } - brw->state.dirty.brw |= BRW_NEW_BINDING_TABLE; + brw->state.dirty.brw |= BRW_NEW_VS_BINDING_TABLE; } const struct brw_tracked_state brw_vs_surfaces = { diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 47b8b511f05..e3e035a97ec 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -664,7 +664,7 @@ brw_wm_upload_binding_table(struct brw_context *brw) bind[i] = brw->wm.surf_offset[i]; } - brw->state.dirty.brw |= BRW_NEW_BINDING_TABLE; + brw->state.dirty.brw |= BRW_NEW_PS_BINDING_TABLE; } const struct brw_tracked_state brw_wm_binding_table = { -- cgit v1.2.3 From 706dbf85f15d42c320481dabe2a3db0c2cbbebb8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 22 Feb 2011 13:30:34 -0800 Subject: i965: Upload binding table pointers on Ivybridge. Ivybridge uses per-stage commands to update binding table pointers. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_defines.h | 4 ++++ src/mesa/drivers/dri/i965/brw_state_upload.c | 2 -- src/mesa/drivers/dri/i965/gen7_vs_state.c | 6 ++++++ src/mesa/drivers/dri/i965/gen7_wm_state.c | 6 ++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 3e35e54d35a..7f2b34611b5 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -832,6 +832,10 @@ # define GEN6_BINDING_TABLE_MODIFY_GS (1 << 9) # define GEN6_BINDING_TABLE_MODIFY_PS (1 << 12) +#define _3DSTATE_BINDING_TABLE_POINTERS_VS 0x7826 /* GEN7+ */ +#define _3DSTATE_BINDING_TABLE_POINTERS_GS 0x7829 /* GEN7+ */ +#define _3DSTATE_BINDING_TABLE_POINTERS_PS 0x782A /* GEN7+ */ + #define _3DSTATE_SAMPLER_STATE_POINTERS 0x7802 /* GEN6+ */ # define PS_SAMPLER_STATE_CHANGE (1 << 12) # define GS_SAMPLER_STATE_CHANGE (1 << 9) diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 6684cdc278b..25b2803b0cc 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -220,8 +220,6 @@ const struct brw_tracked_state *gen7_atoms[] = &gen6_scissor_state, - &gen6_binding_table_pointers, - &brw_depthbuffer, &brw_polygon_stipple, diff --git a/src/mesa/drivers/dri/i965/gen7_vs_state.c b/src/mesa/drivers/dri/i965/gen7_vs_state.c index 5697e90a8b8..6a7add8e562 100644 --- a/src/mesa/drivers/dri/i965/gen7_vs_state.c +++ b/src/mesa/drivers/dri/i965/gen7_vs_state.c @@ -35,6 +35,11 @@ upload_vs_state(struct brw_context *brw) struct intel_context *intel = &brw->intel; struct gl_context *ctx = &intel->ctx; + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_VS << 16 | (2 - 2)); + OUT_BATCH(brw->vs.bind_bo_offset); + ADVANCE_BATCH(); + if (brw->vs.push_const_size == 0) { /* Disable the push constant buffers. */ BEGIN_BATCH(7); @@ -86,6 +91,7 @@ const struct brw_tracked_state gen7_vs_state = { BRW_NEW_URB_FENCE | BRW_NEW_CONTEXT | BRW_NEW_VERTEX_PROGRAM | + BRW_NEW_VS_BINDING_TABLE | BRW_NEW_BATCH), .cache = CACHE_NEW_VS_PROG }, diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c index 9d5a71fda4e..bae7f477a88 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c @@ -155,6 +155,11 @@ upload_ps_state(struct brw_context *brw) struct intel_context *intel = &brw->intel; uint32_t dw2, dw4, dw5; + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_PS << 16 | (2 - 2)); + OUT_BATCH(brw->wm.bind_bo_offset); + ADVANCE_BATCH(); + /* CACHE_NEW_WM_PROG */ if (brw->wm.prog_data->nr_params == 0) { /* Disable the push constant buffers. */ @@ -234,6 +239,7 @@ const struct brw_tracked_state gen7_ps_state = { .brw = (BRW_NEW_CURBE_OFFSETS | BRW_NEW_FRAGMENT_PROGRAM | BRW_NEW_NR_WM_SURFACES | + BRW_NEW_PS_BINDING_TABLE | BRW_NEW_URB_FENCE | BRW_NEW_BATCH), .cache = (CACHE_NEW_SAMPLER | -- cgit v1.2.3 From a94fe79464df088d8e26386d3f0db9a231bfdb61 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 20 Apr 2011 18:23:38 -0700 Subject: i965: Disable binding table pointers for unused pipeline stages. This may not be necessary, but it seems like a good idea. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_defines.h | 2 ++ src/mesa/drivers/dri/i965/gen7_disable.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 7f2b34611b5..ff8be24988a 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -833,6 +833,8 @@ # define GEN6_BINDING_TABLE_MODIFY_PS (1 << 12) #define _3DSTATE_BINDING_TABLE_POINTERS_VS 0x7826 /* GEN7+ */ +#define _3DSTATE_BINDING_TABLE_POINTERS_HS 0x7827 /* GEN7+ */ +#define _3DSTATE_BINDING_TABLE_POINTERS_DS 0x7828 /* GEN7+ */ #define _3DSTATE_BINDING_TABLE_POINTERS_GS 0x7829 /* GEN7+ */ #define _3DSTATE_BINDING_TABLE_POINTERS_PS 0x782A /* GEN7+ */ diff --git a/src/mesa/drivers/dri/i965/gen7_disable.c b/src/mesa/drivers/dri/i965/gen7_disable.c index 4fbbfe72e3b..4e9461739d0 100644 --- a/src/mesa/drivers/dri/i965/gen7_disable.c +++ b/src/mesa/drivers/dri/i965/gen7_disable.c @@ -59,6 +59,11 @@ disable_stages(struct brw_context *brw) OUT_BATCH(0); ADVANCE_BATCH(); + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_GS << 16 | (2 - 2)); + OUT_BATCH(0); + ADVANCE_BATCH(); + /* Disable the HS Unit */ BEGIN_BATCH(7); OUT_BATCH(_3DSTATE_CONSTANT_HS << 16 | (7 - 2)); @@ -80,6 +85,11 @@ disable_stages(struct brw_context *brw) OUT_BATCH(0); ADVANCE_BATCH(); + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_HS << 16 | (2 - 2)); + OUT_BATCH(0); + ADVANCE_BATCH(); + /* Disable the TE */ BEGIN_BATCH(4); OUT_BATCH(_3DSTATE_TE << 16 | (4 - 2)); @@ -108,6 +118,11 @@ disable_stages(struct brw_context *brw) OUT_BATCH(0); ADVANCE_BATCH(); + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS_DS << 16 | (2 - 2)); + OUT_BATCH(0); + ADVANCE_BATCH(); + /* Disable the SOL stage */ BEGIN_BATCH(3); OUT_BATCH(_3DSTATE_STREAMOUT << 16 | (3 - 2)); -- cgit v1.2.3 From bc08d4ebb832769aacb4aecaaf1e490f97c53d65 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 8 Feb 2011 17:27:37 -0800 Subject: i965: Upload sampler state pointers on Ivybridge. Since we currently only support sampling in the fragment shader, we only bother to emit the PS variant. In the future we'll need to emit others. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_defines.h | 4 ++++ src/mesa/drivers/dri/i965/brw_state.h | 1 + src/mesa/drivers/dri/i965/brw_state_upload.c | 1 - src/mesa/drivers/dri/i965/gen7_wm_state.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index ff8be24988a..2a195d8862f 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -846,6 +846,10 @@ /* DW2: GS */ /* DW3: PS */ +#define _3DSTATE_SAMPLER_STATE_POINTERS_VS 0x782B /* GEN7+ */ +#define _3DSTATE_SAMPLER_STATE_POINTERS_GS 0x782E /* GEN7+ */ +#define _3DSTATE_SAMPLER_STATE_POINTERS_PS 0x782F /* GEN7+ */ + #define CMD_VERTEX_BUFFER 0x7808 # define BRW_VB0_INDEX_SHIFT 27 # define GEN6_VB0_INDEX_SHIFT 26 diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 115e8ce17a8..bb2b496db98 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -118,6 +118,7 @@ extern const struct brw_tracked_state gen7_clip_state; extern const struct brw_tracked_state gen7_depth_stencil_state_pointer; extern const struct brw_tracked_state gen7_disable_stages; extern const struct brw_tracked_state gen7_ps_state; +extern const struct brw_tracked_state gen7_sampler_state; extern const struct brw_tracked_state gen7_sbe_state; extern const struct brw_tracked_state gen7_sf_clip_viewport; extern const struct brw_tracked_state gen7_sf_clip_viewport_state_pointer; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 25b2803b0cc..e444e2fc8d6 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -208,7 +208,6 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_wm_binding_table, &brw_wm_samplers, - &gen6_sampler_state, &gen7_disable_stages, &gen7_vs_state, diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c index bae7f477a88..993d5bd8465 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c @@ -160,6 +160,12 @@ upload_ps_state(struct brw_context *brw) OUT_BATCH(brw->wm.bind_bo_offset); ADVANCE_BATCH(); + /* CACHE_NEW_SAMPLER */ + BEGIN_BATCH(2); + OUT_BATCH(_3DSTATE_SAMPLER_STATE_POINTERS_PS << 16 | (2 - 2)); + OUT_BATCH(brw->wm.sampler_offset); + ADVANCE_BATCH(); + /* CACHE_NEW_WM_PROG */ if (brw->wm.prog_data->nr_params == 0) { /* Disable the push constant buffers. */ -- cgit v1.2.3 From 8c8985bdd714f43a96ce922a7c0284d50aec3d1a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 8 Apr 2011 23:51:21 -0700 Subject: i965: Add depth buffer support on Ivybridge. This also disables the HiZ and separate stencil buffers. We still need to implement stencil. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_defines.h | 9 +- src/mesa/drivers/dri/i965/brw_state.h | 5 ++ src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/gen7_misc_state.c | 122 +++++++++++++++++++++++++++ src/mesa/drivers/dri/i965/gen7_sf_state.c | 6 +- 6 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_misc_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 0c6313a82a9..4e807854696 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -100,6 +100,7 @@ DRIVER_SOURCES = \ gen7_cc_state.c \ gen7_clip_state.c \ gen7_disable.c \ + gen7_misc_state.c \ gen7_sf_state.c \ gen7_urb.c \ gen7_viewport_state.c \ diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 2a195d8862f..f07f126ab8d 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -1245,7 +1245,7 @@ #define _3DSTATE_DRAWING_RECTANGLE 0x7900 #define _3DSTATE_BLEND_CONSTANT_COLOR 0x7901 #define _3DSTATE_CHROMA_KEY 0x7904 -#define _3DSTATE_DEPTH_BUFFER 0x7905 +#define _3DSTATE_DEPTH_BUFFER 0x7905 /* GEN4-6 */ #define _3DSTATE_POLY_STIPPLE_OFFSET 0x7906 #define _3DSTATE_POLY_STIPPLE_PATTERN 0x7907 #define _3DSTATE_LINE_STIPPLE_PATTERN 0x7908 @@ -1270,7 +1270,12 @@ #define _3DSTATE_STENCIL_BUFFER 0x790e /* ILK, SNB */ #define _3DSTATE_HIER_DEPTH_BUFFER 0x790f /* ILK, SNB */ -#define _3DSTATE_CLEAR_PARAMS 0x7910 /* ILK+ */ +#define GEN7_3DSTATE_CLEAR_PARAMS 0x7804 +#define GEN7_3DSTATE_DEPTH_BUFFER 0x7805 +#define GEN7_3DSTATE_STENCIL_BUFFER 0x7806 +#define GEN7_3DSTATE_HIER_DEPTH_BUFFER 0x7807 + +#define _3DSTATE_CLEAR_PARAMS 0x7910 /* ILK, SNB */ # define DEPTH_CLEAR_VALID (1 << 15) /* DW1: depth clear value */ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index bb2b496db98..99e63e08dd1 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -111,6 +111,7 @@ extern const struct brw_tracked_state gen6_vs_constants; extern const struct brw_tracked_state gen6_vs_state; extern const struct brw_tracked_state gen6_wm_constants; extern const struct brw_tracked_state gen6_wm_state; +extern const struct brw_tracked_state gen7_depthbuffer; extern const struct brw_tracked_state gen7_blend_state_pointer; extern const struct brw_tracked_state gen7_cc_state_pointer; extern const struct brw_tracked_state gen7_cc_viewport_state_pointer; @@ -183,4 +184,8 @@ void brw_create_constant_surface(struct brw_context *brw, uint32_t get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color); +/* gen7_misc_state.c */ +unsigned int +gen7_depth_format(struct brw_context *brw); + #endif diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index e444e2fc8d6..73aca316cb2 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -219,7 +219,7 @@ const struct brw_tracked_state *gen7_atoms[] = &gen6_scissor_state, - &brw_depthbuffer, + &gen7_depthbuffer, &brw_polygon_stipple, &brw_polygon_stipple_offset, diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c new file mode 100644 index 00000000000..adcb31f7a95 --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c @@ -0,0 +1,122 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "intel_batchbuffer.h" +#include "intel_regions.h" +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" + +unsigned int +gen7_depth_format(struct brw_context *brw) +{ + struct intel_region *region = brw->state.depth_region; + struct intel_context *intel = &brw->intel; + + if (region == NULL) + return BRW_DEPTHFORMAT_D32_FLOAT; + + switch (region->cpp) { + case 2: + return BRW_DEPTHFORMAT_D16_UNORM; + case 4: + if (intel->depth_buffer_is_float) + return BRW_DEPTHFORMAT_D32_FLOAT; + else + return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; + default: + assert(!"Should not get here."); + } + return 0; +} + +static void emit_depthbuffer(struct brw_context *brw) +{ + struct intel_region *region = brw->state.depth_region; + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + + if (region == NULL) { + BEGIN_BATCH(7); + OUT_BATCH(GEN7_3DSTATE_DEPTH_BUFFER << 16 | (7 - 2)); + OUT_BATCH((BRW_DEPTHFORMAT_D32_FLOAT << 18) | + (BRW_SURFACE_NULL << 29)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + } else { + assert(region->tiling == I915_TILING_Y); + + BEGIN_BATCH(7); + OUT_BATCH(GEN7_3DSTATE_DEPTH_BUFFER << 16 | (7 - 2)); + OUT_BATCH(((region->pitch * region->cpp) - 1) | + (gen7_depth_format(brw) << 18) | + (0 << 22) /* no HiZ buffer */ | + (0 << 27) /* no stencil write */ | + ((ctx->Depth.Mask != 0) << 28) | + (BRW_SURFACE_2D << 29)); + OUT_RELOC(region->buffer, + I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, + 0); + OUT_BATCH(((region->width - 1) << 4) | ((region->height - 1) << 18)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + } + + BEGIN_BATCH(4); + OUT_BATCH(GEN7_3DSTATE_HIER_DEPTH_BUFFER << 16 | (4 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + BEGIN_BATCH(4); + OUT_BATCH(GEN7_3DSTATE_STENCIL_BUFFER << 16 | (4 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + BEGIN_BATCH(3); + OUT_BATCH(GEN7_3DSTATE_CLEAR_PARAMS << 16 | (3 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); +} + +/** + * \see brw_context.state.depth_region + */ +const struct brw_tracked_state gen7_depthbuffer = { + .dirty = { + .mesa = 0, + .brw = BRW_NEW_DEPTH_BUFFER | BRW_NEW_BATCH, + .cache = 0, + }, + .emit = emit_depthbuffer, +}; diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c index 37c628d6ec8..d1bf8a81874 100644 --- a/src/mesa/drivers/dri/i965/gen7_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c @@ -126,9 +126,10 @@ upload_sf_state(struct brw_context *brw) /* _NEW_BUFFERS */ bool render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0; - /* FINISHME: Depth Buffer Surface Format? */ dw1 = GEN6_SF_STATISTICS_ENABLE | GEN6_SF_VIEWPORT_TRANSFORM_ENABLE; + dw1 |= (gen7_depth_format(brw) << GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT); + /* _NEW_POLYGON */ if ((ctx->Polygon.FrontFace == GL_CCW) ^ render_to_fbo) dw1 |= GEN6_SF_WINDING_CCW; @@ -257,7 +258,8 @@ const struct brw_tracked_state gen7_sf_state = { _NEW_SCISSOR | _NEW_BUFFERS | _NEW_POINT), - .brw = BRW_NEW_CONTEXT, + .brw = (BRW_NEW_CONTEXT | + BRW_NEW_DEPTH_BUFFER), .cache = CACHE_NEW_VS_PROG }, .emit = upload_sf_state, -- cgit v1.2.3 From d58400eb4a2605640267436f63d9e856fb3c1f96 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 9 Apr 2011 00:53:46 -0700 Subject: i965: Emit extra 0's in 3DSTATE_MULTISAMPLE on Ivybridge. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_misc_state.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index ed6a09d861b..cb2814b6eff 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -476,12 +476,15 @@ static void upload_invarient_state( struct brw_context *brw ) if (intel->gen >= 6) { int i; + int len = intel->gen >= 7 ? 4 : 3; - BEGIN_BATCH(3); - OUT_BATCH(_3DSTATE_MULTISAMPLE << 16 | (3 - 2)); + BEGIN_BATCH(len); + OUT_BATCH(_3DSTATE_MULTISAMPLE << 16 | (len - 2)); OUT_BATCH(MS_PIXEL_LOCATION_CENTER | MS_NUMSAMPLES_1); OUT_BATCH(0); /* positions for 4/8-sample */ + if (intel->gen >= 7) + OUT_BATCH(0); ADVANCE_BATCH(); BEGIN_BATCH(2); -- cgit v1.2.3 From fa4b23581b4ee8a07400364dccbd61b749c2d1d1 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 14 Apr 2011 14:56:19 -0700 Subject: i965: Don't use the GS for breaking down quads on Ivybridge. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri/i965/brw_gs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index cd72bc5c242..a7b7c6f086b 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -161,7 +161,7 @@ GLboolean brwCreateContext( int api, but we're not sure how it's actually done for vertex order, that affect provoking vertex decision. Always use last vertex convention for quad primitive which works as expected for now. */ - if (intel->gen == 6) + if (intel->gen >= 6) ctx->Const.QuadsFollowProvokingVertexConvention = GL_FALSE; if (intel->is_g4x || intel->gen >= 5) { diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index aaffe94e981..001cd62f8ca 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -56,7 +56,7 @@ static void compile_gs_prog( struct brw_context *brw, /* Gen6: VF has already converted into polygon, and LINELOOP is * converted to LINESTRIP at the beginning of the 3D pipeline. */ - if (intel->gen == 6) + if (intel->gen >= 6) return; memset(&c, 0, sizeof(c)); @@ -168,7 +168,7 @@ static void populate_key( struct brw_context *brw, key->pv_first = GL_TRUE; } - key->need_gs_prog = (intel->gen == 6) + key->need_gs_prog = (intel->gen >= 6) ? 0 : (brw->primitive == GL_QUADS || brw->primitive == GL_QUAD_STRIP || -- cgit v1.2.3 From 550ad737f77cfae9abf2db1638711713ad9d920e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 12 Apr 2011 11:51:36 -0700 Subject: i965: Emit 3DPRIMITIVE Ivybridge-style. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_defines.h | 3 ++ src/mesa/drivers/dri/i965/brw_draw.c | 60 ++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index f07f126ab8d..9f1234446eb 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -48,6 +48,9 @@ # define GEN4_3DPRIM_TOPOLOGY_TYPE_SHIFT 10 # define GEN4_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL (0 << 15) # define GEN4_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM (1 << 15) +/* DW1 */ +# define GEN7_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL (0 << 8) +# define GEN7_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM (1 << 8) #define _3DPRIM_POINTLIST 0x01 #define _3DPRIM_LINELIST 0x02 diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 9ab533179b8..44ede608b76 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -182,6 +182,61 @@ static void brw_emit_prim(struct brw_context *brw, } } +static void gen7_emit_prim(struct brw_context *brw, + const struct _mesa_prim *prim, + uint32_t hw_prim) +{ + struct intel_context *intel = &brw->intel; + int verts_per_instance; + int vertex_access_type; + int start_vertex_location; + int base_vertex_location; + + DBG("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode), + prim->start, prim->count); + + start_vertex_location = prim->start; + base_vertex_location = prim->basevertex; + if (prim->indexed) { + vertex_access_type = GEN7_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM; + start_vertex_location += brw->ib.start_vertex_offset; + base_vertex_location += brw->vb.start_vertex_bias; + } else { + vertex_access_type = GEN7_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL; + start_vertex_location += brw->vb.start_vertex_bias; + } + + verts_per_instance = trim(prim->mode, prim->count); + + /* If nothing to emit, just return. */ + if (verts_per_instance == 0) + return; + + /* If we're set to always flush, do it before and after the primitive emit. + * We want to catch both missed flushes that hurt instruction/state cache + * and missed flushes of the render cache as it heads to other parts of + * the besides the draw code. + */ + if (intel->always_flush_cache) { + intel_batchbuffer_emit_mi_flush(intel); + } + + BEGIN_BATCH(7); + OUT_BATCH(CMD_3D_PRIM << 16 | (7 - 2)); + OUT_BATCH(hw_prim | vertex_access_type); + OUT_BATCH(verts_per_instance); + OUT_BATCH(start_vertex_location); + OUT_BATCH(1); // instance count + OUT_BATCH(0); // start instance location + OUT_BATCH(base_vertex_location); + ADVANCE_BATCH(); + + if (intel->always_flush_cache) { + intel_batchbuffer_emit_mi_flush(intel); + } +} + + static void brw_merge_inputs( struct brw_context *brw, const struct gl_client_array *arrays[]) { @@ -415,7 +470,10 @@ static GLboolean brw_try_draw_prims( struct gl_context *ctx, brw_upload_state(brw); } - brw_emit_prim(brw, &prim[i], hw_prim); + if (intel->gen >= 7) + gen7_emit_prim(brw, &prim[i], hw_prim); + else + brw_emit_prim(brw, &prim[i], hw_prim); intel->no_batch_wrap = GL_FALSE; -- cgit v1.2.3 From 482e8a6cd59292c58b11a9282632aaa9b24f44ae Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 9 Apr 2011 00:32:46 -0700 Subject: i965: Mad hacks to avoid using MRFs on Ivybridge. Ivybridge's SEND instruction uses GRFs instead of MRFs. Unfortunately, a lot of our code explicitly uses MRFs, and rewriting it would take a fair bit of effort. In the meantime, use a hack: - Change brw_set_dest, brw_set_src0, and brw_set_src1 to implicitly convert any MRFs into the top 16 GRFs. - Enable gen6_resolve_implied_move on Ivybridge: Moving g0 to m0 actually moves it to g111 thanks to the previous hack. It remains to officially reserve these registers so the allocator doesn't try to reuse them. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 13c925d8227..7372f947f6f 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -64,7 +64,7 @@ gen6_resolve_implied_move(struct brw_compile *p, GLuint msg_reg_nr) { struct intel_context *intel = &p->brw->intel; - if (intel->gen != 6) + if (intel->gen < 6) return; if (src->file != BRW_ARCHITECTURE_REGISTER_FILE || src->nr != BRW_ARF_NULL) { @@ -78,15 +78,29 @@ gen6_resolve_implied_move(struct brw_compile *p, *src = brw_message_reg(msg_reg_nr); } +static void +gen7_convert_mrf_to_grf(struct brw_compile *p, struct brw_reg *reg) +{ + struct intel_context *intel = &p->brw->intel; + if (intel->gen == 7 && reg->file == BRW_MESSAGE_REGISTER_FILE) { + reg->file = BRW_GENERAL_REGISTER_FILE; + reg->nr += 111; + } +} + static void brw_set_dest(struct brw_compile *p, struct brw_instruction *insn, struct brw_reg dest) { + struct intel_context *intel = &p->brw->intel; + if (dest.file != BRW_ARCHITECTURE_REGISTER_FILE && dest.file != BRW_MESSAGE_REGISTER_FILE) assert(dest.nr < 128); + gen7_convert_mrf_to_grf(p, &dest); + insn->bits1.da1.dest_reg_file = dest.file; insn->bits1.da1.dest_reg_type = dest.type; insn->bits1.da1.dest_address_mode = dest.address_mode; @@ -216,6 +230,8 @@ static void brw_set_src0(struct brw_compile *p, if (reg.type != BRW_ARCHITECTURE_REGISTER_FILE) assert(reg.nr < 128); + gen7_convert_mrf_to_grf(p, ®); + validate_reg(insn, reg); insn->bits1.da1.src0_reg_file = reg.file; @@ -294,6 +310,8 @@ void brw_set_src1(struct brw_compile *p, assert(reg.nr < 128); + gen7_convert_mrf_to_grf(p, ®); + validate_reg(insn, reg); insn->bits1.da1.src1_reg_file = reg.file; -- cgit v1.2.3 From ce526a7452abf552af38b86bd3546d6ff9a83194 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 18 Apr 2011 23:38:21 -0700 Subject: i965: Fix render target writes on Ivybridge. Ivybridge shifts the data port messages by one bit. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 14 +++++++++++++- src/mesa/drivers/dri/i965/brw_structs.h | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 7372f947f6f..457a4082ecd 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -509,7 +509,19 @@ static void brw_set_dp_write_message( struct brw_compile *p, struct intel_context *intel = &brw->intel; brw_set_src1(p, insn, brw_imm_ud(0)); - if (intel->gen >= 6) { + if (intel->gen >= 7) { + insn->bits3.gen7_dp.binding_table_index = binding_table_index; + insn->bits3.gen7_dp.msg_control = msg_control; + insn->bits3.gen7_dp.pixel_scoreboard_clear = pixel_scoreboard_clear; + insn->bits3.gen7_dp.msg_type = msg_type; + insn->bits3.gen7_dp.header_present = header_present; + insn->bits3.gen7_dp.response_length = response_length; + insn->bits3.gen7_dp.msg_length = msg_length; + insn->bits3.gen7_dp.end_of_thread = end_of_thread; + + /* We always use the render cache for write messages */ + insn->header.destreg__conditionalmod = GEN6_MESSAGE_TARGET_DP_RENDER_CACHE; + } else if (intel->gen == 6) { insn->bits3.gen6_dp.binding_table_index = binding_table_index; insn->bits3.gen6_dp.msg_control = msg_control; insn->bits3.gen6_dp.pixel_scoreboard_clear = pixel_scoreboard_clear; diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 561758f4eaa..967e9a02dff 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1728,6 +1728,22 @@ struct brw_instruction GLuint end_of_thread:1; } gen6_dp; + /* See volume vol5c.2 sections 2.11.2.1.5 and 2.11.21.2.2. */ + struct { + GLuint binding_table_index:8; + GLuint msg_control:3; + GLuint slot_group_select:1; + GLuint pixel_scoreboard_clear:1; + GLuint pad0:1; + GLuint msg_type:4; + GLuint pad1:1; + GLuint header_present:1; + GLuint response_length:5; + GLuint msg_length:4; + GLuint pad2:2; + GLuint end_of_thread:1; + } gen7_dp; + struct { GLuint function_control:16; GLuint response_length:4; -- cgit v1.2.3 From 97d4d6f77e885d2c343697f26a5ecf821caaf13b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 18 Apr 2011 23:59:30 -0700 Subject: i965: Fix the URB write message descriptor on Ivybridge. The message header is still incorrect, but this is a start. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 17 +++++++++++++++-- src/mesa/drivers/dri/i965/brw_structs.h | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 457a4082ecd..8a7bcfc5db2 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -458,8 +458,21 @@ static void brw_set_urb_message( struct brw_compile *p, struct intel_context *intel = &brw->intel; brw_set_src1(p, insn, brw_imm_d(0)); - if (intel->gen >= 5) { - insn->bits3.urb_gen5.opcode = 0; /* ? */ + if (intel->gen == 7) { + insn->bits3.urb_gen7.opcode = 0; /* URB_WRITE_HWORD */ + insn->bits3.urb_gen7.offset = offset; + assert(swizzle_control != BRW_URB_SWIZZLE_TRANSPOSE); + insn->bits3.urb_gen7.swizzle_control = swizzle_control; + /* per_slot_offset = 0 makes it ignore offsets in message header */ + insn->bits3.urb_gen7.per_slot_offset = 0; + insn->bits3.urb_gen7.complete = complete; + insn->bits3.urb_gen7.header_present = 1; + insn->bits3.urb_gen7.response_length = response_length; + insn->bits3.urb_gen7.msg_length = msg_length; + insn->bits3.urb_gen7.end_of_thread = end_of_thread; + insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_URB; + } else if (intel->gen >= 5) { + insn->bits3.urb_gen5.opcode = 0; /* URB_WRITE */ insn->bits3.urb_gen5.offset = offset; insn->bits3.urb_gen5.swizzle_control = swizzle_control; insn->bits3.urb_gen5.allocate = allocate; diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 967e9a02dff..8a5619a750e 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1636,6 +1636,20 @@ struct brw_instruction GLuint end_of_thread:1; } urb_gen5; + struct { + GLuint opcode:3; + GLuint offset:11; + GLuint swizzle_control:1; + GLuint complete:1; + GLuint per_slot_offset:1; + GLuint pad0:2; + GLuint header_present:1; + GLuint response_length:5; + GLuint msg_length:4; + GLuint pad1:2; + GLuint end_of_thread:1; + } urb_gen7; + struct { GLuint binding_table_index:8; GLuint msg_control:4; -- cgit v1.2.3 From 09d881bf7420c97a0f684283c24b8ec3e42404ff Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 26 Apr 2011 17:24:38 -0700 Subject: i965: Enable channel masks in Ivybridge's URB_WRITE_HWORD header. This shouldn't be done using MRFs, but until I have a proper solution for dealing with MRFs, this allows my hack to keep working. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 8a7bcfc5db2..528b907520e 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -2180,6 +2180,14 @@ void brw_urb_WRITE(struct brw_compile *p, gen6_resolve_implied_move(p, &src0, msg_reg_nr); + if (intel->gen == 7) { + /* Enable Channel Masks in the URB_WRITE_HWORD message header */ + brw_OR(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, msg_reg_nr, 5), + BRW_REGISTER_TYPE_UD), + retype(brw_vec1_grf(0, 5), BRW_REGISTER_TYPE_UD), + brw_imm_ud(0xff00)); + } + insn = next_insn(p, BRW_OPCODE_SEND); assert(msg_length < BRW_MAX_MRF); -- cgit v1.2.3 From 62b79b4bb9d8a4a8679c3d1e1f5455ce33d7b90a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 19 Apr 2011 15:38:10 -0700 Subject: i965: Set Address Modify Enable in VERTEX_BUFFER on Ivybridge. Otherwise, Ivybridge seems to ignore the newly supplied data, giving us rubbish for vertices. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965/brw_draw_upload.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 9f1234446eb..5eb7892bb08 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -860,6 +860,7 @@ # define BRW_VB0_ACCESS_INSTANCEDATA (1 << 26) # define GEN6_VB0_ACCESS_VERTEXDATA (0 << 20) # define GEN6_VB0_ACCESS_INSTANCEDATA (1 << 20) +# define GEN7_VB0_ADDRESS_MODIFYENABLE (1 << 14) # define BRW_VB0_PITCH_SHIFT 0 #define CMD_VERTEX_ELEMENT 0x7809 diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 9389eb6733f..3cc33720486 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -570,6 +570,9 @@ static void brw_emit_vertices(struct brw_context *brw) dw0 = BRW_VB0_ACCESS_VERTEXDATA | (i << BRW_VB0_INDEX_SHIFT); } + if (intel->gen >= 7) + dw0 |= GEN7_VB0_ADDRESS_MODIFYENABLE; + OUT_BATCH(dw0 | (buffer->stride << BRW_VB0_PITCH_SHIFT)); OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->offset); if (intel->gen >= 5) { -- cgit v1.2.3 From 70c6cd39bd9396b0d3f9e84df41fd8bef1f26cc4 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 27 Apr 2011 18:03:49 -0700 Subject: i965: Change brw_format_for_mesa_format to a non-static function. This will make it easier to share between files. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_state.h | 2 + src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 116 ++++++++++++----------- 2 files changed, 63 insertions(+), 55 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 99e63e08dd1..763f20fc203 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -180,6 +180,8 @@ void brw_create_constant_surface(struct brw_context *brw, int width, uint32_t *out_offset); +uint32_t brw_format_for_mesa_format(gl_format mesa_format); + /* gen6_sf_state.c */ uint32_t get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color); diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index e3e035a97ec..2847958e79b 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -69,55 +69,61 @@ static GLuint translate_tex_target( GLenum target ) } } -static uint32_t brw_format_for_mesa_format[MESA_FORMAT_COUNT] = +uint32_t +brw_format_for_mesa_format(gl_format mesa_format) { - [MESA_FORMAT_L8] = BRW_SURFACEFORMAT_L8_UNORM, - [MESA_FORMAT_I8] = BRW_SURFACEFORMAT_I8_UNORM, - [MESA_FORMAT_A8] = BRW_SURFACEFORMAT_A8_UNORM, - [MESA_FORMAT_AL88] = BRW_SURFACEFORMAT_L8A8_UNORM, - [MESA_FORMAT_AL1616] = BRW_SURFACEFORMAT_L16A16_UNORM, - [MESA_FORMAT_R8] = BRW_SURFACEFORMAT_R8_UNORM, - [MESA_FORMAT_R16] = BRW_SURFACEFORMAT_R16_UNORM, - [MESA_FORMAT_RG88] = BRW_SURFACEFORMAT_R8G8_UNORM, - [MESA_FORMAT_RG1616] = BRW_SURFACEFORMAT_R16G16_UNORM, - [MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM, - [MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM, - [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM, - [MESA_FORMAT_ARGB1555] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM, - [MESA_FORMAT_ARGB4444] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM, - [MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL, - [MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY, - [MESA_FORMAT_RGB_FXT1] = BRW_SURFACEFORMAT_FXT1, - [MESA_FORMAT_RGBA_FXT1] = BRW_SURFACEFORMAT_FXT1, - [MESA_FORMAT_RGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB, - [MESA_FORMAT_RGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM, - [MESA_FORMAT_RGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM, - [MESA_FORMAT_RGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM, - [MESA_FORMAT_SRGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB_SRGB, - [MESA_FORMAT_SRGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM_SRGB, - [MESA_FORMAT_SRGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM_SRGB, - [MESA_FORMAT_SRGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM_SRGB, - [MESA_FORMAT_SARGB8] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB, - [MESA_FORMAT_SLA8] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB, - [MESA_FORMAT_SL8] = BRW_SURFACEFORMAT_L8_UNORM_SRGB, - [MESA_FORMAT_DUDV8] = BRW_SURFACEFORMAT_R8G8_SNORM, - [MESA_FORMAT_SIGNED_R8] = BRW_SURFACEFORMAT_R8_SNORM, - [MESA_FORMAT_SIGNED_RG88_REV] = BRW_SURFACEFORMAT_R8G8_SNORM, - [MESA_FORMAT_SIGNED_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_SNORM, - [MESA_FORMAT_SIGNED_R16] = BRW_SURFACEFORMAT_R16_SNORM, - [MESA_FORMAT_SIGNED_GR1616] = BRW_SURFACEFORMAT_R16G16_SNORM, - [MESA_FORMAT_RGBA_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT, - [MESA_FORMAT_RG_FLOAT32] = BRW_SURFACEFORMAT_R32G32_FLOAT, - [MESA_FORMAT_R_FLOAT32] = BRW_SURFACEFORMAT_R32_FLOAT, - [MESA_FORMAT_INTENSITY_FLOAT32] = BRW_SURFACEFORMAT_I32_FLOAT, - [MESA_FORMAT_LUMINANCE_FLOAT32] = BRW_SURFACEFORMAT_L32_FLOAT, - [MESA_FORMAT_ALPHA_FLOAT32] = BRW_SURFACEFORMAT_A32_FLOAT, - [MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = BRW_SURFACEFORMAT_L32A32_FLOAT, - [MESA_FORMAT_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_UNORM, - [MESA_FORMAT_SIGNED_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_SNORM, - [MESA_FORMAT_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_UNORM, - [MESA_FORMAT_SIGNED_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_SNORM, -}; + uint32_t table[MESA_FORMAT_COUNT] = + { + [MESA_FORMAT_L8] = BRW_SURFACEFORMAT_L8_UNORM, + [MESA_FORMAT_I8] = BRW_SURFACEFORMAT_I8_UNORM, + [MESA_FORMAT_A8] = BRW_SURFACEFORMAT_A8_UNORM, + [MESA_FORMAT_AL88] = BRW_SURFACEFORMAT_L8A8_UNORM, + [MESA_FORMAT_AL1616] = BRW_SURFACEFORMAT_L16A16_UNORM, + [MESA_FORMAT_R8] = BRW_SURFACEFORMAT_R8_UNORM, + [MESA_FORMAT_R16] = BRW_SURFACEFORMAT_R16_UNORM, + [MESA_FORMAT_RG88] = BRW_SURFACEFORMAT_R8G8_UNORM, + [MESA_FORMAT_RG1616] = BRW_SURFACEFORMAT_R16G16_UNORM, + [MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM, + [MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM, + [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM, + [MESA_FORMAT_ARGB1555] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM, + [MESA_FORMAT_ARGB4444] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM, + [MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL, + [MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY, + [MESA_FORMAT_RGB_FXT1] = BRW_SURFACEFORMAT_FXT1, + [MESA_FORMAT_RGBA_FXT1] = BRW_SURFACEFORMAT_FXT1, + [MESA_FORMAT_RGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB, + [MESA_FORMAT_RGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM, + [MESA_FORMAT_RGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM, + [MESA_FORMAT_RGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM, + [MESA_FORMAT_SRGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB_SRGB, + [MESA_FORMAT_SRGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM_SRGB, + [MESA_FORMAT_SRGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM_SRGB, + [MESA_FORMAT_SRGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM_SRGB, + [MESA_FORMAT_SARGB8] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB, + [MESA_FORMAT_SLA8] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB, + [MESA_FORMAT_SL8] = BRW_SURFACEFORMAT_L8_UNORM_SRGB, + [MESA_FORMAT_DUDV8] = BRW_SURFACEFORMAT_R8G8_SNORM, + [MESA_FORMAT_SIGNED_R8] = BRW_SURFACEFORMAT_R8_SNORM, + [MESA_FORMAT_SIGNED_RG88_REV] = BRW_SURFACEFORMAT_R8G8_SNORM, + [MESA_FORMAT_SIGNED_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_SNORM, + [MESA_FORMAT_SIGNED_R16] = BRW_SURFACEFORMAT_R16_SNORM, + [MESA_FORMAT_SIGNED_GR1616] = BRW_SURFACEFORMAT_R16G16_SNORM, + [MESA_FORMAT_RGBA_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT, + [MESA_FORMAT_RG_FLOAT32] = BRW_SURFACEFORMAT_R32G32_FLOAT, + [MESA_FORMAT_R_FLOAT32] = BRW_SURFACEFORMAT_R32_FLOAT, + [MESA_FORMAT_INTENSITY_FLOAT32] = BRW_SURFACEFORMAT_I32_FLOAT, + [MESA_FORMAT_LUMINANCE_FLOAT32] = BRW_SURFACEFORMAT_L32_FLOAT, + [MESA_FORMAT_ALPHA_FLOAT32] = BRW_SURFACEFORMAT_A32_FLOAT, + [MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = BRW_SURFACEFORMAT_L32A32_FLOAT, + [MESA_FORMAT_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_UNORM, + [MESA_FORMAT_SIGNED_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_SNORM, + [MESA_FORMAT_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_UNORM, + [MESA_FORMAT_SIGNED_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_SNORM, + }; + assert(mesa_format < MESA_FORMAT_COUNT); + return table[mesa_format]; +} bool brw_render_target_supported(gl_format format) @@ -139,7 +145,7 @@ brw_render_target_supported(gl_format format) /* Not exactly true, as some of those formats are not renderable. * But at least we know how to translate them. */ - return brw_format_for_mesa_format[format] != 0; + return brw_format_for_mesa_format(format) != 0; } static GLuint translate_tex_format( gl_format mesa_format, @@ -176,9 +182,9 @@ static GLuint translate_tex_format( gl_format mesa_format, case MESA_FORMAT_SLA8: case MESA_FORMAT_SL8: if (srgb_decode == GL_DECODE_EXT) - return brw_format_for_mesa_format[mesa_format]; + return brw_format_for_mesa_format(mesa_format); else if (srgb_decode == GL_SKIP_DECODE_EXT) - return brw_format_for_mesa_format[_mesa_get_srgb_format_linear(mesa_format)]; + return brw_format_for_mesa_format(_mesa_get_srgb_format_linear(mesa_format)); case MESA_FORMAT_RGBA_FLOAT32: /* The value of this BRW_SURFACEFORMAT is 0, which tricks the @@ -187,8 +193,8 @@ static GLuint translate_tex_format( gl_format mesa_format, return BRW_SURFACEFORMAT_R32G32B32A32_FLOAT; default: - assert(brw_format_for_mesa_format[mesa_format] != 0); - return brw_format_for_mesa_format[mesa_format]; + assert(brw_format_for_mesa_format(mesa_format) != 0); + return brw_format_for_mesa_format(mesa_format); } } @@ -470,13 +476,13 @@ brw_update_renderbuffer_surface(struct brw_context *brw, /* without GL_EXT_framebuffer_sRGB we shouldn't bind sRGB surfaces to the blend/update as sRGB */ if (ctx->Color.sRGBEnabled) - surf->ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format]; + surf->ss0.surface_format = brw_format_for_mesa_format(irb->Base.Format); else surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; break; default: assert(brw_render_target_supported(irb->Base.Format)); - surf->ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format]; + surf->ss0.surface_format = brw_format_for_mesa_format(irb->Base.Format); } surf->ss0.surface_type = BRW_SURFACE_2D; -- cgit v1.2.3 From c12a93d5c452da16ff0c8955e55770b8eda28036 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 27 Apr 2011 18:11:31 -0700 Subject: i965: Mark a few more brw_wm_surface_state functions as non-static. I need to reuse them. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_state.h | 7 +++++++ src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 763f20fc203..527c28055c8 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -182,6 +182,13 @@ void brw_create_constant_surface(struct brw_context *brw, uint32_t brw_format_for_mesa_format(gl_format mesa_format); +GLuint translate_tex_target(GLenum target); + +GLuint translate_tex_format(gl_format mesa_format, + GLenum internal_format, + GLenum depth_mode, + GLenum srgb_decode); + /* gen6_sf_state.c */ uint32_t get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color); diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 2847958e79b..d34059f0e61 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -45,7 +45,8 @@ #include "brw_defines.h" #include "brw_wm.h" -static GLuint translate_tex_target( GLenum target ) +GLuint +translate_tex_target(GLenum target) { switch (target) { case GL_TEXTURE_1D: @@ -148,10 +149,11 @@ brw_render_target_supported(gl_format format) return brw_format_for_mesa_format(format) != 0; } -static GLuint translate_tex_format( gl_format mesa_format, - GLenum internal_format, - GLenum depth_mode, - GLenum srgb_decode ) +GLuint +translate_tex_format(gl_format mesa_format, + GLenum internal_format, + GLenum depth_mode, + GLenum srgb_decode) { switch( mesa_format ) { -- cgit v1.2.3 From b2b6cc662271d611462532222ef2fcc30042bd0f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 27 Apr 2011 18:12:20 -0700 Subject: i965: Update SURFACE_STATE for Ivybridge. I'm still not happy with the amount of code duplication here, but it will have to do for now. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 3 +- src/mesa/drivers/dri/i965/brw_state.h | 2 + src/mesa/drivers/dri/i965/brw_state_upload.c | 6 +- src/mesa/drivers/dri/i965/brw_structs.h | 78 ++++ src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 418 ++++++++++++++++++++++ 5 files changed, 503 insertions(+), 4 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_wm_surface_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 4e807854696..651f09e5e0c 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -105,7 +105,8 @@ DRIVER_SOURCES = \ gen7_urb.c \ gen7_viewport_state.c \ gen7_vs_state.c \ - gen7_wm_state.c + gen7_wm_state.c \ + gen7_wm_surface_state.c \ C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 527c28055c8..4bf4e854f81 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -128,7 +128,9 @@ extern const struct brw_tracked_state gen7_sol_state; extern const struct brw_tracked_state gen7_urb; extern const struct brw_tracked_state gen7_vs_state; extern const struct brw_tracked_state gen7_wm_constants; +extern const struct brw_tracked_state gen7_wm_constant_surface; extern const struct brw_tracked_state gen7_wm_state; +extern const struct brw_tracked_state gen7_wm_surfaces; /*********************************************************************** * brw_state.c diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 73aca316cb2..2ea2a0531f3 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -200,11 +200,11 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_vs_constants, /* Before vs_surfaces and constant_buffer */ &brw_wm_constants, /* Before wm_surfaces and constant_buffer */ &gen6_vs_constants, /* Before vs_state */ - &gen7_wm_constants, /* Before wm_state */ + &gen7_wm_constants, /* Before wm_surfaces and constant_buffer */ &brw_vs_surfaces, /* must do before unit */ - &brw_wm_constant_surface, /* must do before wm surfaces/bind bo */ - &brw_wm_surfaces, /* must do before samplers and unit */ + &gen7_wm_constant_surface, /* must do before wm surfaces/bind bo */ + &gen7_wm_surfaces, /* must do before samplers and unit */ &brw_wm_binding_table, &brw_wm_samplers, diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 8a5619a750e..730e7e22fc9 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1178,6 +1178,8 @@ struct gen7_sf_clip_viewport { }; /* Documented in the subsystem/shared-functions/sampler chapter... + * + * vol5c Shared Functions - 1.13.4.1.1 */ struct brw_surface_state { @@ -1249,6 +1251,82 @@ struct brw_surface_state }; +/* volume 5c Shared Functions - 1.13.4.1.2 */ +struct gen7_surface_state +{ + struct { + GLuint cube_pos_z:1; + GLuint cube_neg_z:1; + GLuint cube_pos_y:1; + GLuint cube_neg_y:1; + GLuint cube_pos_x:1; + GLuint cube_neg_x:1; + GLuint pad2:2; + GLuint render_cache_read_write:1; + GLuint pad1:1; + GLuint surface_array_spacing:1; + GLuint vert_line_stride_ofs:1; + GLuint vert_line_stride:1; + GLuint tile_walk:1; + GLuint tiled_surface:1; + GLuint horizontal_alignment:1; + GLuint vertical_alignment:2; + GLuint surface_format:9; /**< BRW_SURFACEFORMAT_x */ + GLuint pad0:1; + GLuint is_array:1; + GLuint surface_type:3; /**< BRW_SURFACE_1D/2D/3D/CUBE */ + } ss0; + + struct { + GLuint base_addr; + } ss1; + + struct { + GLuint width:14; + GLuint pad1:2; + GLuint height:14; + GLuint pad0:2; + } ss2; + + struct { + GLuint pitch:18; + GLuint pad:3; + GLuint depth:11; + } ss3; + + struct { + GLuint multisample_position_palette_index:3; + GLuint num_multisamples:3; + GLuint multisampled_surface_storage_format:1; + GLuint render_target_view_extent:11; + GLuint min_array_elt:11; + GLuint rotation:2; + GLuint pad0:1; + } ss4; + + struct { + GLuint mip_count:4; + GLuint min_lod:4; + GLuint pad1:12; + GLuint y_offset:4; + GLuint pad0:1; + GLuint x_offset:7; + } ss5; + + struct { + GLuint pad; /* Multisample Control Surface stuff */ + } ss6; + + struct { + GLuint resource_min_lod:12; + GLuint pad0:16; + GLuint alpha_clear_color:1; + GLuint blue_clear_color:1; + GLuint green_clear_color:1; + GLuint red_clear_color:1; + } ss7; +}; + struct brw_vertex_element_state { diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c new file mode 100644 index 00000000000..ff220255311 --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -0,0 +1,418 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +#include "main/mtypes.h" +#include "main/samplerobj.h" +#include "main/texstore.h" +#include "program/prog_parameter.h" + +#include "intel_mipmap_tree.h" +#include "intel_batchbuffer.h" +#include "intel_tex.h" +#include "intel_fbo.h" + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "brw_wm.h" + +static void +gen7_set_surface_tiling(struct gen7_surface_state *surf, uint32_t tiling) +{ + switch (tiling) { + case I915_TILING_NONE: + surf->ss0.tiled_surface = 0; + surf->ss0.tile_walk = 0; + break; + case I915_TILING_X: + surf->ss0.tiled_surface = 1; + surf->ss0.tile_walk = BRW_TILEWALK_XMAJOR; + break; + case I915_TILING_Y: + surf->ss0.tiled_surface = 1; + surf->ss0.tile_walk = BRW_TILEWALK_YMAJOR; + break; + } +} + +static void +gen7_update_texture_surface(struct gl_context *ctx, GLuint unit) +{ + struct brw_context *brw = brw_context(ctx); + struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current; + struct intel_texture_object *intelObj = intel_texture_object(tObj); + struct gl_texture_image *firstImage = tObj->Image[0][tObj->BaseLevel]; + struct gl_sampler_object *sampler = _mesa_get_samplerobj(ctx, unit); + const GLuint surf_index = SURF_INDEX_TEXTURE(unit); + struct gen7_surface_state *surf; + + surf = brw_state_batch(brw, sizeof(*surf), 32, + &brw->wm.surf_offset[surf_index]); + memset(surf, 0, sizeof(*surf)); + + surf->ss0.surface_type = translate_tex_target(tObj->Target); + surf->ss0.surface_format = translate_tex_format(firstImage->TexFormat, + firstImage->InternalFormat, + sampler->DepthMode, + sampler->sRGBDecode); + if (tObj->Target == GL_TEXTURE_CUBE_MAP) { + surf->ss0.cube_pos_x = 1; + surf->ss0.cube_pos_y = 1; + surf->ss0.cube_pos_z = 1; + surf->ss0.cube_neg_x = 1; + surf->ss0.cube_neg_y = 1; + surf->ss0.cube_neg_z = 1; + } + + gen7_set_surface_tiling(surf, intelObj->mt->region->tiling); + + /* ss0 remaining fields: + * - is_array + * - vertical_alignment + * - horizontal_alignment + * - vert_line_stride (exists on gen6 but we ignore it) + * - vert_line_stride_ofs (exists on gen6 but we ignore it) + * - surface_array_spacing + * - render_cache_read_write (exists on gen6 but ignored here) + */ + + surf->ss1.base_addr = intelObj->mt->region->buffer->offset; /* reloc */ + + surf->ss2.width = firstImage->Width - 1; + surf->ss2.height = firstImage->Height - 1; + + surf->ss3.pitch = (intelObj->mt->region->pitch * intelObj->mt->cpp) - 1; + surf->ss3.depth = firstImage->Depth - 1; + + /* ss4: ignored? */ + + surf->ss5.mip_count = intelObj->_MaxLevel - tObj->BaseLevel; + surf->ss5.min_lod = 0; + + /* ss5 remaining fields: + * - x_offset (N/A for textures?) + * - y_offset (ditto) + * - cache_control + */ + + /* Emit relocation to surface contents */ + drm_intel_bo_emit_reloc(brw->intel.batch.bo, + brw->wm.surf_offset[surf_index] + + offsetof(struct gen7_surface_state, ss1), + intelObj->mt->region->buffer, 0, + I915_GEM_DOMAIN_SAMPLER, 0); +} + +/** + * Create the constant buffer surface. Vertex/fragment shader constants will + * be read from this buffer with Data Port Read instructions/messages. + */ +static void +gen7_create_constant_surface(struct brw_context *brw, + drm_intel_bo *bo, + int width, + uint32_t *out_offset) +{ + const GLint w = width - 1; + struct gen7_surface_state *surf; + + surf = brw_state_batch(brw, sizeof(*surf), 32, out_offset); + memset(surf, 0, sizeof(*surf)); + + surf->ss0.surface_type = BRW_SURFACE_BUFFER; + surf->ss0.surface_format = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT; + + surf->ss0.render_cache_read_write = 1; + + assert(bo); + surf->ss1.base_addr = bo->offset; /* reloc */ + + surf->ss2.width = w & 0x7f; /* bits 6:0 of size or width */ + surf->ss2.height = (w >> 7) & 0x1fff; /* bits 19:7 of size or width */ + surf->ss3.depth = (w >> 20) & 0x7f; /* bits 26:20 of size or width */ + surf->ss3.pitch = (width * 16) - 1; /* ignored?? */ + gen7_set_surface_tiling(surf, I915_TILING_NONE); /* tiling now allowed */ + + /* Emit relocation to surface contents. Section 5.1.1 of the gen4 + * bspec ("Data Cache") says that the data cache does not exist as + * a separate cache and is just the sampler cache. + */ + drm_intel_bo_emit_reloc(brw->intel.batch.bo, + (*out_offset + + offsetof(struct gen7_surface_state, ss1)), + bo, 0, + I915_GEM_DOMAIN_SAMPLER, 0); +} + +/** + * Updates surface / buffer for fragment shader constant buffer, if + * one is required. + * + * This consumes the state updates for the constant buffer, and produces + * BRW_NEW_WM_SURFACES to get picked up by brw_prepare_wm_surfaces for + * inclusion in the binding table. + */ +static void upload_wm_constant_surface(struct brw_context *brw) +{ + GLuint surf = SURF_INDEX_FRAG_CONST_BUFFER; + struct brw_fragment_program *fp = + (struct brw_fragment_program *) brw->fragment_program; + const struct gl_program_parameter_list *params = + fp->program.Base.Parameters; + + /* If there's no constant buffer, then no surface BO is needed to point at + * it. + */ + if (brw->wm.const_bo == 0) { + if (brw->wm.surf_offset[surf]) { + brw->state.dirty.brw |= BRW_NEW_WM_SURFACES; + brw->wm.surf_offset[surf] = 0; + } + return; + } + + gen7_create_constant_surface(brw, brw->wm.const_bo, params->NumParameters, + &brw->wm.surf_offset[surf]); + brw->state.dirty.brw |= BRW_NEW_WM_SURFACES; +} + +const struct brw_tracked_state gen7_wm_constant_surface = { + .dirty = { + .mesa = 0, + .brw = (BRW_NEW_WM_CONSTBUF | + BRW_NEW_BATCH), + .cache = 0 + }, + .emit = upload_wm_constant_surface, +}; + +static void +gen7_update_null_renderbuffer_surface(struct brw_context *brw, unsigned unit) +{ + struct gen7_surface_state *surf; + + surf = brw_state_batch(brw, sizeof(*surf), 32, + &brw->wm.surf_offset[unit]); + memset(surf, 0, sizeof(*surf)); + + surf->ss0.surface_type = BRW_SURFACE_NULL; + surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; +} + +/** + * Sets up a surface state structure to point at the given region. + * While it is only used for the front/back buffer currently, it should be + * usable for further buffers when doing ARB_draw_buffer support. + */ +static void +gen7_update_renderbuffer_surface(struct brw_context *brw, + struct gl_renderbuffer *rb, + unsigned int unit) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + struct intel_renderbuffer *irb = intel_renderbuffer(rb); + struct intel_region *region = irb->region; + struct gen7_surface_state *surf; + + surf = brw_state_batch(brw, sizeof(*surf), 32, + &brw->wm.surf_offset[unit]); + memset(surf, 0, sizeof(*surf)); + + switch (irb->Base.Format) { + case MESA_FORMAT_XRGB8888: + /* XRGB is handled as ARGB because the chips in this family + * cannot render to XRGB targets. This means that we have to + * mask writes to alpha (ala glColorMask) and reconfigure the + * alpha blending hardware to use GL_ONE (or GL_ZERO) for + * cases where GL_DST_ALPHA (or GL_ONE_MINUS_DST_ALPHA) is + * used. + */ + surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + break; + case MESA_FORMAT_INTENSITY_FLOAT32: + case MESA_FORMAT_LUMINANCE_FLOAT32: + /* For these formats, we just need to read/write the first + * channel into R, which is to say that we just treat them as + * GL_RED. + */ + surf->ss0.surface_format = BRW_SURFACEFORMAT_R32_FLOAT; + break; + case MESA_FORMAT_SARGB8: + /* without GL_EXT_framebuffer_sRGB we shouldn't bind sRGB + surfaces to the blend/update as sRGB */ + if (ctx->Color.sRGBEnabled) + surf->ss0.surface_format = brw_format_for_mesa_format(irb->Base.Format); + else + surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + break; + default: + assert(brw_render_target_supported(irb->Base.Format)); + surf->ss0.surface_format = brw_format_for_mesa_format(irb->Base.Format); + } + + surf->ss0.surface_type = BRW_SURFACE_2D; + if (region->tiling == I915_TILING_NONE) { + surf->ss1.base_addr = (region->draw_x + + region->draw_y * region->pitch) * region->cpp; + } else { + uint32_t tile_base, tile_x, tile_y; + uint32_t pitch = region->pitch * region->cpp; + + if (region->tiling == I915_TILING_X) { + tile_x = region->draw_x % (512 / region->cpp); + tile_y = region->draw_y % 8; + tile_base = ((region->draw_y / 8) * (8 * pitch)); + tile_base += (region->draw_x - tile_x) / (512 / region->cpp) * 4096; + } else { + /* Y */ + tile_x = region->draw_x % (128 / region->cpp); + tile_y = region->draw_y % 32; + tile_base = ((region->draw_y / 32) * (32 * pitch)); + tile_base += (region->draw_x - tile_x) / (128 / region->cpp) * 4096; + } + assert(brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0)); + assert(tile_x % 4 == 0); + assert(tile_y % 2 == 0); + /* Note that the low bits of these fields are missing, so + * there's the possibility of getting in trouble. + */ + surf->ss1.base_addr = tile_base; + surf->ss5.x_offset = tile_x / 4; + surf->ss5.y_offset = tile_y / 2; + } + surf->ss1.base_addr += region->buffer->offset; /* reloc */ + + surf->ss2.width = rb->Width - 1; + surf->ss2.height = rb->Height - 1; + gen7_set_surface_tiling(surf, region->tiling); + surf->ss3.pitch = (region->pitch * region->cpp) - 1; + + drm_intel_bo_emit_reloc(brw->intel.batch.bo, + brw->wm.surf_offset[unit] + + offsetof(struct gen7_surface_state, ss1), + region->buffer, + surf->ss1.base_addr - region->buffer->offset, + I915_GEM_DOMAIN_RENDER, + I915_GEM_DOMAIN_RENDER); +} + +static void +prepare_wm_surfaces(struct brw_context *brw) +{ + struct gl_context *ctx = &brw->intel.ctx; + int i; + int nr_surfaces = 0; + + if (ctx->DrawBuffer->_NumColorDrawBuffers >= 1) { + for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) { + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[i]; + struct intel_renderbuffer *irb = intel_renderbuffer(rb); + struct intel_region *region = irb ? irb->region : NULL; + + if (region == NULL || region->buffer == NULL) { + brw->intel.Fallback = GL_TRUE; /* boolean, not bitfield */ + return; + } + + brw_add_validated_bo(brw, region->buffer); + nr_surfaces = SURF_INDEX_DRAW(i) + 1; + } + } + + if (brw->wm.const_bo) { + brw_add_validated_bo(brw, brw->wm.const_bo); + nr_surfaces = SURF_INDEX_FRAG_CONST_BUFFER + 1; + } + + for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i]; + struct gl_texture_object *tObj = texUnit->_Current; + struct intel_texture_object *intelObj = intel_texture_object(tObj); + + if (texUnit->_ReallyEnabled) { + brw_add_validated_bo(brw, intelObj->mt->region->buffer); + nr_surfaces = SURF_INDEX_TEXTURE(i) + 1; + } + } + + /* Have to update this in our prepare, since the unit's prepare + * relies on it. + */ + if (brw->wm.nr_surfaces != nr_surfaces) { + brw->wm.nr_surfaces = nr_surfaces; + brw->state.dirty.brw |= BRW_NEW_NR_WM_SURFACES; + } +} + +/** + * Constructs the set of surface state objects pointed to by the + * binding table. + */ +static void +upload_wm_surfaces(struct brw_context *brw) +{ + struct gl_context *ctx = &brw->intel.ctx; + GLuint i; + + /* _NEW_BUFFERS | _NEW_COLOR */ + /* Update surfaces for drawing buffers */ + if (ctx->DrawBuffer->_NumColorDrawBuffers >= 1) { + for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) { + if (intel_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[i])) { + gen7_update_renderbuffer_surface(brw, + ctx->DrawBuffer->_ColorDrawBuffers[i], i); + } else { + gen7_update_null_renderbuffer_surface(brw, i); + } + } + } else { + gen7_update_null_renderbuffer_surface(brw, 0); + } + + /* Update surfaces for textures */ + for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i]; + const GLuint surf = SURF_INDEX_TEXTURE(i); + + /* _NEW_TEXTURE */ + if (texUnit->_ReallyEnabled) { + gen7_update_texture_surface(ctx, i); + } else { + brw->wm.surf_offset[surf] = 0; + } + } + + brw->state.dirty.brw |= BRW_NEW_WM_SURFACES; +} + +const struct brw_tracked_state gen7_wm_surfaces = { + .dirty = { + .mesa = (_NEW_COLOR | + _NEW_TEXTURE | + _NEW_BUFFERS), + .brw = BRW_NEW_BATCH, + .cache = 0 + }, + .prepare = prepare_wm_surfaces, + .emit = upload_wm_surfaces, +}; -- cgit v1.2.3 From 3984372104ec6ac5986dedb07b8ca99d53dede18 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 29 Apr 2011 01:18:20 -0700 Subject: i965: Mark some brw_wm_sampler_state.c helper functions as non-static. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_state.h | 6 ++++++ src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 4bf4e854f81..e58840f6787 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -191,6 +191,12 @@ GLuint translate_tex_format(gl_format mesa_format, GLenum depth_mode, GLenum srgb_decode); +/* brw_wm_sampler_state.c */ +GLuint translate_wrap_mode(GLenum wrap); +void upload_default_color(struct brw_context *brw, + struct gl_sampler_object *sampler, + int unit); + /* gen6_sf_state.c */ uint32_t get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color); diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index 7b93bf90241..6f5057b7347 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -48,7 +48,8 @@ * Intel drivers for "other operating systems" implement GL_CLAMP as * GL_CLAMP_TO_EDGE, so the same is done here. */ -static GLuint translate_wrap_mode( GLenum wrap ) +GLuint +translate_wrap_mode(GLenum wrap) { switch( wrap ) { case GL_REPEAT: @@ -66,7 +67,7 @@ static GLuint translate_wrap_mode( GLenum wrap ) } } -static void +void upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, int unit) { -- cgit v1.2.3 From 3f44043da37bcd0c481ceddf4f878ddb3419b763 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 28 Apr 2011 22:46:15 -0700 Subject: i965: Fix SAMPLER_STATE on Ivybridge. Most of this code copied from brw_wm_sampler_state.c. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/Makefile | 1 + src/mesa/drivers/dri/i965/brw_state.h | 2 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/brw_structs.h | 48 ++++++ src/mesa/drivers/dri/i965/gen7_sampler_state.c | 199 +++++++++++++++++++++++++ 5 files changed, 250 insertions(+), 2 deletions(-) create mode 100644 src/mesa/drivers/dri/i965/gen7_sampler_state.c diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 651f09e5e0c..b96f42bfe88 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -101,6 +101,7 @@ DRIVER_SOURCES = \ gen7_clip_state.c \ gen7_disable.c \ gen7_misc_state.c \ + gen7_sampler_state.c \ gen7_sf_state.c \ gen7_urb.c \ gen7_viewport_state.c \ diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index e58840f6787..11a87320542 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -119,7 +119,7 @@ extern const struct brw_tracked_state gen7_clip_state; extern const struct brw_tracked_state gen7_depth_stencil_state_pointer; extern const struct brw_tracked_state gen7_disable_stages; extern const struct brw_tracked_state gen7_ps_state; -extern const struct brw_tracked_state gen7_sampler_state; +extern const struct brw_tracked_state gen7_samplers; extern const struct brw_tracked_state gen7_sbe_state; extern const struct brw_tracked_state gen7_sf_clip_viewport; extern const struct brw_tracked_state gen7_sf_clip_viewport_state_pointer; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 2ea2a0531f3..f4a7048f525 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -207,7 +207,7 @@ const struct brw_tracked_state *gen7_atoms[] = &gen7_wm_surfaces, /* must do before samplers and unit */ &brw_wm_binding_table, - &brw_wm_samplers, + &gen7_samplers, &gen7_disable_stages, &gen7_vs_state, diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 730e7e22fc9..bcc5ad4b1e6 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1111,6 +1111,54 @@ struct brw_sampler_state } ss3; }; +struct gen7_sampler_state +{ + struct + { + GLuint aniso_algorithm:1; + GLuint lod_bias:13; + GLuint min_filter:3; + GLuint mag_filter:3; + GLuint mip_filter:2; + GLuint base_level:5; + GLuint pad1:1; + GLuint lod_preclamp:1; + GLuint default_color_mode:1; + GLuint pad0:1; + GLuint disable:1; + } ss0; + + struct + { + GLuint cube_control_mode:1; + GLuint shadow_function:3; + GLuint pad:4; + GLuint max_lod:12; + GLuint min_lod:12; + } ss1; + + struct + { + GLuint pad:5; + GLuint default_color_pointer:27; + } ss2; + + struct + { + GLuint r_wrap_mode:3; + GLuint t_wrap_mode:3; + GLuint s_wrap_mode:3; + GLuint pad:1; + GLuint non_normalized_coord:1; + GLuint trilinear_quality:2; + GLuint address_round:6; + GLuint max_aniso:3; + GLuint chroma_key_mode:1; + GLuint chroma_key_index:2; + GLuint chroma_key_enable:1; + GLuint pad0:6; + } ss3; +}; struct brw_clipper_viewport { diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c new file mode 100644 index 00000000000..75d898e5ad7 --- /dev/null +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c @@ -0,0 +1,199 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "brw_context.h" +#include "brw_state.h" +#include "brw_defines.h" +#include "intel_batchbuffer.h" + +#include "main/macros.h" +#include "main/samplerobj.h" + +/** + * Sets the sampler state for a single unit. + */ +static void +gen7_update_sampler_state(struct brw_context *brw, int unit, + struct gen7_sampler_state *sampler) +{ + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + struct gl_texture_object *texObj = texUnit->_Current; + struct gl_sampler_object *gl_sampler = _mesa_get_samplerobj(ctx, unit); + + switch (gl_sampler->MinFilter) { + case GL_NEAREST: + sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST; + sampler->ss0.mip_filter = BRW_MIPFILTER_NONE; + break; + case GL_LINEAR: + sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR; + sampler->ss0.mip_filter = BRW_MIPFILTER_NONE; + break; + case GL_NEAREST_MIPMAP_NEAREST: + sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST; + sampler->ss0.mip_filter = BRW_MIPFILTER_NEAREST; + break; + case GL_LINEAR_MIPMAP_NEAREST: + sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR; + sampler->ss0.mip_filter = BRW_MIPFILTER_NEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST; + sampler->ss0.mip_filter = BRW_MIPFILTER_LINEAR; + break; + case GL_LINEAR_MIPMAP_LINEAR: + sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR; + sampler->ss0.mip_filter = BRW_MIPFILTER_LINEAR; + break; + default: + break; + } + + /* Set Anisotropy: */ + if (gl_sampler->MaxAnisotropy > 1.0) { + sampler->ss0.min_filter = BRW_MAPFILTER_ANISOTROPIC; + sampler->ss0.mag_filter = BRW_MAPFILTER_ANISOTROPIC; + + if (gl_sampler->MaxAnisotropy > 2.0) { + sampler->ss3.max_aniso = MIN2((gl_sampler->MaxAnisotropy - 2) / 2, + BRW_ANISORATIO_16); + } + } + else { + switch (gl_sampler->MagFilter) { + case GL_NEAREST: + sampler->ss0.mag_filter = BRW_MAPFILTER_NEAREST; + break; + case GL_LINEAR: + sampler->ss0.mag_filter = BRW_MAPFILTER_LINEAR; + break; + default: + break; + } + } + + sampler->ss3.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR); + sampler->ss3.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS); + sampler->ss3.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT); + + /* Cube-maps on 965 and later must use the same wrap mode for all 3 + * coordinate dimensions. Futher, only CUBE and CLAMP are valid. + */ + if (texObj->Target == GL_TEXTURE_CUBE_MAP) { + if (ctx->Texture.CubeMapSeamless && + (gl_sampler->MinFilter != GL_NEAREST || + gl_sampler->MagFilter != GL_NEAREST)) { + sampler->ss3.r_wrap_mode = BRW_TEXCOORDMODE_CUBE; + sampler->ss3.s_wrap_mode = BRW_TEXCOORDMODE_CUBE; + sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_CUBE; + } else { + sampler->ss3.r_wrap_mode = BRW_TEXCOORDMODE_CLAMP; + sampler->ss3.s_wrap_mode = BRW_TEXCOORDMODE_CLAMP; + sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_CLAMP; + } + } else if (texObj->Target == GL_TEXTURE_1D) { + /* There's a bug in 1D texture sampling - it actually pays + * attention to the wrap_t value, though it should not. + * Override the wrap_t value here to GL_REPEAT to keep + * any nonexistent border pixels from floating in. + */ + sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_WRAP; + } + + /* Set shadow function: */ + if (gl_sampler->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB) { + /* Shadowing is "enabled" by emitting a particular sampler + * message (sample_c). So need to recompile WM program when + * shadow comparison is enabled on each/any texture unit. + */ + sampler->ss1.shadow_function = + intel_translate_shadow_compare_func(gl_sampler->CompareFunc); + } + + /* Set LOD bias: */ + sampler->ss0.lod_bias = S_FIXED(CLAMP(texUnit->LodBias + + gl_sampler->LodBias, -16, 15), 6); + + sampler->ss0.lod_preclamp = 1; /* OpenGL mode */ + sampler->ss0.default_color_mode = 0; /* OpenGL/DX10 mode */ + + /* Set BaseMipLevel, MaxLOD, MinLOD: + * + * XXX: I don't think that using firstLevel, lastLevel works, + * because we always setup the surface state as if firstLevel == + * level zero. Probably have to subtract firstLevel from each of + * these: + */ + sampler->ss0.base_level = U_FIXED(0, 1); + + sampler->ss1.max_lod = U_FIXED(CLAMP(gl_sampler->MaxLod, 0, 13), 6); + sampler->ss1.min_lod = U_FIXED(CLAMP(gl_sampler->MinLod, 0, 13), 6); + + upload_default_color(brw, gl_sampler, unit); + + sampler->ss2.default_color_pointer = brw->wm.sdc_offset[unit] >> 5; +} + + +/* All samplers must be uploaded in a single contiguous array, which + * complicates various things. However, this is still too confusing - + * FIXME: simplify all the different new texture state flags. + */ +static void +gen7_prepare_samplers(struct brw_context *brw) +{ + struct gl_context *ctx = &brw->intel.ctx; + struct gen7_sampler_state *samplers; + int i; + + brw->wm.sampler_count = 0; + for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { + if (ctx->Texture.Unit[i]._ReallyEnabled) + brw->wm.sampler_count = i + 1; + } + + if (brw->wm.sampler_count == 0) + return; + + samplers = brw_state_batch(brw, brw->wm.sampler_count * sizeof(*samplers), + 32, &brw->wm.sampler_offset); + memset(samplers, 0, brw->wm.sampler_count * sizeof(*samplers)); + + for (i = 0; i < brw->wm.sampler_count; i++) { + if (ctx->Texture.Unit[i]._ReallyEnabled) + gen7_update_sampler_state(brw, i, &samplers[i]); + } + + brw->state.dirty.cache |= CACHE_NEW_SAMPLER; +} + +const struct brw_tracked_state gen7_samplers = { + .dirty = { + .mesa = _NEW_TEXTURE, + .brw = BRW_NEW_BATCH, + .cache = 0 + }, + .prepare = gen7_prepare_samplers, +}; -- cgit v1.2.3 From 36f8de02e71ee5c2ca55d86c486eb00d043ae1f5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 29 Apr 2011 01:43:10 -0700 Subject: i965: Fix sampler message descriptor on Ivybridge. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 12 +++++++++++- src/mesa/drivers/dri/i965/brw_structs.h | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 528b907520e..cff6bcad7fd 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -655,7 +655,17 @@ static void brw_set_sampler_message(struct brw_compile *p, assert(eot == 0); brw_set_src1(p, insn, brw_imm_d(0)); - if (intel->gen >= 5) { + if (intel->gen >= 7) { + insn->bits3.sampler_gen7.binding_table_index = binding_table_index; + insn->bits3.sampler_gen7.sampler = sampler; + insn->bits3.sampler_gen7.msg_type = msg_type; + insn->bits3.sampler_gen7.simd_mode = simd_mode; + insn->bits3.sampler_gen7.header_present = header_present; + insn->bits3.sampler_gen7.response_length = response_length; + insn->bits3.sampler_gen7.msg_length = msg_length; + insn->bits3.sampler_gen7.end_of_thread = eot; + insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_SAMPLER; + } else if (intel->gen >= 5) { insn->bits3.sampler_gen5.binding_table_index = binding_table_index; insn->bits3.sampler_gen5.sampler = sampler; insn->bits3.sampler_gen5.msg_type = msg_type; diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index bcc5ad4b1e6..a63df37def2 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1744,6 +1744,18 @@ struct brw_instruction GLuint end_of_thread:1; } sampler_gen5; + struct { + GLuint binding_table_index:8; + GLuint sampler:4; + GLuint msg_type:5; + GLuint simd_mode:2; + GLuint header_present:1; + GLuint response_length:5; + GLuint msg_length:4; + GLuint pad1:2; + GLuint end_of_thread:1; + } sampler_gen7; + struct brw_urb_immediate urb; struct { -- cgit v1.2.3 From ff6e3c73f6553cd29b915497b5b00e3ef158a27d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 29 Apr 2011 14:19:04 -0700 Subject: i965: Add support for Ivybridge texturing messages. Ivybridge puts the shadow comparator first, then lod/bias, and finally the coordinate---unlike previous generations which always reserved four slots for the coordinate at the beginning. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_fs.cpp | 68 ++++++++++++++++++++++++++++++++++-- src/mesa/drivers/dri/i965/brw_fs.h | 1 + 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 994f65a8c32..30e771aea4e 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1358,6 +1358,66 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate) return inst; } +fs_inst * +fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate) +{ + int mlen = 1; /* g0 header always present. */ + int base_mrf = 1; + int reg_width = c->dispatch_width / 8; + + if (ir->shadow_comparitor) { + ir->shadow_comparitor->accept(this); + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result); + mlen += reg_width; + } + + /* Set up the LOD info */ + switch (ir->op) { + case ir_tex: + break; + case ir_txb: + ir->lod_info.bias->accept(this); + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result); + mlen += reg_width; + break; + case ir_txl: + ir->lod_info.lod->accept(this); + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result); + mlen += reg_width; + break; + case ir_txd: + case ir_txf: + assert(!"GLSL 1.30 features unsupported"); + break; + } + + /* Set up the coordinate */ + for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), + coordinate); + coordinate.reg_offset++; + mlen += reg_width; + } + + /* Generate the SEND */ + fs_inst *inst = NULL; + switch (ir->op) { + case ir_tex: inst = emit(FS_OPCODE_TEX, dst); break; + case ir_txb: inst = emit(FS_OPCODE_TXB, dst); break; + case ir_txl: inst = emit(FS_OPCODE_TXL, dst); break; + case ir_txd: inst = emit(FS_OPCODE_TXD, dst); break; + case ir_txf: assert(!"TXF unsupported."); + } + inst->base_mrf = base_mrf; + inst->mlen = mlen; + + if (mlen > 11) { + fail("Message length >11 disallowed by hardware\n"); + } + + return inst; +} + void fs_visitor::visit(ir_texture *ir) { @@ -1458,10 +1518,12 @@ fs_visitor::visit(ir_texture *ir) */ fs_reg dst = fs_reg(this, glsl_type::vec4_type); - if (intel->gen < 5) { - inst = emit_texture_gen4(ir, dst, coordinate); - } else { + if (intel->gen >= 7) { + inst = emit_texture_gen7(ir, dst, coordinate); + } else if (intel->gen >= 5) { inst = emit_texture_gen5(ir, dst, coordinate); + } else { + inst = emit_texture_gen4(ir, dst, coordinate); } /* If there's an offset, we already set up m1. To avoid the implied move, diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 518d09180c4..154ce7fdafb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -516,6 +516,7 @@ public: void emit_interpolation_setup_gen6(); fs_inst *emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate); fs_inst *emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate); + fs_inst *emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate); fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0); fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0, fs_reg src1); bool try_emit_saturate(ir_expression *ir); -- cgit v1.2.3 From 64ce592679a5b08d66e3cbbf964f9e695e14aee1 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 15 Mar 2011 23:53:40 -0700 Subject: i965: Add support for IF/ELSE/ENDIF control flow on Ivybridge. Ivybridge's IF instruction doesn't support conditional modifiers. It also introduces UIP, which must point to the ENDIF instruction. ELSE and ENDIF remain the same except that JIP moves from dst to src1. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 42 ++++++++++++++++++++++++++++----- src/mesa/drivers/dri/i965/brw_fs.cpp | 5 ++-- src/mesa/drivers/dri/i965/brw_structs.h | 1 + 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index cff6bcad7fd..fb03b62a4c9 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -950,11 +950,17 @@ brw_IF(struct brw_compile *p, GLuint execute_size) brw_set_dest(p, insn, brw_ip_reg()); brw_set_src0(p, insn, brw_ip_reg()); brw_set_src1(p, insn, brw_imm_d(0x0)); - } else { + } else if (intel->gen == 6) { brw_set_dest(p, insn, brw_imm_w(0)); insn->bits1.branch_gen6.jump_count = 0; brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + } else { + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, brw_imm_ud(0)); + insn->bits3.break_cont.jip = 0; + insn->bits3.break_cont.uip = 0; } insn->header.execution_size = execute_size; @@ -970,6 +976,9 @@ brw_IF(struct brw_compile *p, GLuint execute_size) return insn; } +/* This function is only used for gen6-style IF instructions with an + * embedded comparison (conditional modifier). It is not used on gen7. + */ struct brw_instruction * gen6_IF(struct brw_compile *p, uint32_t conditional, struct brw_reg src0, struct brw_reg src1) @@ -1071,9 +1080,12 @@ patch_IF_ELSE(struct brw_compile *p, if_inst->bits3.if_else.jump_count = br * (endif_inst - if_inst + 1); if_inst->bits3.if_else.pop_count = 0; if_inst->bits3.if_else.pad0 = 0; - } else { + } else if (intel->gen == 6) { /* As of gen6, there is no IFF and IF must point to the ENDIF. */ if_inst->bits1.branch_gen6.jump_count = br * (endif_inst - if_inst); + } else { + if_inst->bits3.break_cont.uip = br * (endif_inst - if_inst); + if_inst->bits3.break_cont.jip = br * (endif_inst - if_inst); } } else { else_inst->header.execution_size = if_inst->header.execution_size; @@ -1095,9 +1107,15 @@ patch_IF_ELSE(struct brw_compile *p, else_inst->bits3.if_else.jump_count = br*(endif_inst - else_inst + 1); else_inst->bits3.if_else.pop_count = 1; else_inst->bits3.if_else.pad0 = 0; - } else { + } else if (intel->gen == 6) { /* BRW_OPCODE_ELSE on gen6 should point to the matching ENDIF. */ else_inst->bits1.branch_gen6.jump_count = br*(endif_inst - else_inst); + } else { + /* The IF instruction's JIP should point just past the ELSE */ + if_inst->bits3.break_cont.jip = br * (else_inst - if_inst + 1); + /* The IF instruction's UIP and ELSE's JIP should point to ENDIF */ + if_inst->bits3.break_cont.uip = br * (endif_inst - if_inst); + else_inst->bits3.break_cont.jip = br * (endif_inst - else_inst); } } } @@ -1114,11 +1132,17 @@ brw_ELSE(struct brw_compile *p) brw_set_dest(p, insn, brw_ip_reg()); brw_set_src0(p, insn, brw_ip_reg()); brw_set_src1(p, insn, brw_imm_d(0x0)); - } else { + } else if (intel->gen == 6) { brw_set_dest(p, insn, brw_imm_w(0)); insn->bits1.branch_gen6.jump_count = 0; brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + } else { + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, brw_imm_ud(0)); + insn->bits3.break_cont.jip = 0; + insn->bits3.break_cont.uip = 0; } insn->header.compression_control = BRW_COMPRESSION_NONE; @@ -1157,10 +1181,14 @@ brw_ENDIF(struct brw_compile *p) brw_set_dest(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); brw_set_src0(p, insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); brw_set_src1(p, insn, brw_imm_d(0x0)); - } else { + } else if (intel->gen == 6) { brw_set_dest(p, insn, brw_imm_w(0)); brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); brw_set_src1(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + } else { + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, brw_imm_ud(0)); } insn->header.compression_control = BRW_COMPRESSION_NONE; @@ -1172,8 +1200,10 @@ brw_ENDIF(struct brw_compile *p) insn->bits3.if_else.jump_count = 0; insn->bits3.if_else.pop_count = 1; insn->bits3.if_else.pad0 = 0; - } else { + } else if (intel->gen == 6) { insn->bits1.branch_gen6.jump_count = 2; + } else { + insn->bits3.break_cont.jip = 2; } patch_IF_ELSE(p, if_inst, else_inst, insn); } diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 30e771aea4e..8dee849edd4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1873,7 +1873,7 @@ fs_visitor::visit(ir_if *ir) */ this->base_ir = ir->condition; - if (intel->gen >= 6) { + if (intel->gen == 6) { emit_if_gen6(ir); } else { emit_bool_to_cond_code(ir->condition); @@ -3890,7 +3890,8 @@ fs_visitor::generate_code() case BRW_OPCODE_IF: if (inst->src[0].file != BAD_FILE) { - assert(intel->gen >= 6); + /* The instruction has an embedded compare (only allowed on gen6) */ + assert(intel->gen == 6); gen6_IF(p, inst->conditional_mod, src[0], src[1]); } else { brw_IF(p, BRW_EXECUTE_8); diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index a63df37def2..ad31222e9ec 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -1664,6 +1664,7 @@ struct brw_instruction GLuint pad0:12; } if_else; + /* This is also used for gen7 IF/ELSE instructions */ struct { /* Signed jump distance to the ip to jump to if all channels -- cgit v1.2.3 From 77397ef96edbc17a698ae2a02ec4807b1059c036 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 30 Apr 2011 01:17:52 -0700 Subject: i965: Add support for loops on Ivybridge. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index fb03b62a4c9..6cfa8fb052c 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1319,7 +1319,17 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p, if (intel->gen >= 5) br = 2; - if (intel->gen >= 6) { + if (intel->gen >= 7) { + insn = next_insn(p, BRW_OPCODE_WHILE); + + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, brw_imm_ud(0)); + insn->bits3.break_cont.jip = br * (do_insn - insn); + + insn->header.execution_size = do_insn->header.execution_size; + assert(insn->header.execution_size == BRW_EXECUTE_8); + } else if (intel->gen == 6) { insn = next_insn(p, BRW_OPCODE_WHILE); brw_set_dest(p, insn, brw_imm_w(0)); @@ -2277,6 +2287,7 @@ brw_find_next_block_end(struct brw_compile *p, int start) static int brw_find_loop_end(struct brw_compile *p, int start) { + struct intel_context *intel = &p->brw->intel; int ip; int br = 2; @@ -2284,7 +2295,9 @@ brw_find_loop_end(struct brw_compile *p, int start) struct brw_instruction *insn = &p->store[ip]; if (insn->header.opcode == BRW_OPCODE_WHILE) { - if (ip + insn->bits1.branch_gen6.jump_count / br < start) + int jip = intel->gen == 6 ? insn->bits1.branch_gen6.jump_count + : insn->bits3.break_cont.jip; + if (ip + jip / br < start) return ip; } } @@ -2311,7 +2324,9 @@ brw_set_uip_jip(struct brw_compile *p) switch (insn->header.opcode) { case BRW_OPCODE_BREAK: insn->bits3.break_cont.jip = br * (brw_find_next_block_end(p, ip) - ip); - insn->bits3.break_cont.uip = br * (brw_find_loop_end(p, ip) - ip + 1); + /* Gen7 UIP points to WHILE; Gen6 points just after it */ + insn->bits3.break_cont.uip = + br * (brw_find_loop_end(p, ip) - ip + (intel->gen == 6 ? 1 : 0)); break; case BRW_OPCODE_CONTINUE: /* JIP is set at CONTINUE emit time, since that's when we -- cgit v1.2.3 From 6e918163dfbdc829f31a0aefc07248c49b890d1d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 30 Apr 2011 01:30:55 -0700 Subject: i965: Make the CONT instruction point to the WHILE instruction. This fixes piglit test glsl-fs-loop-continue.shader_test on Ivybridge. According to the documentation, the CONT instruction's UIP field should point to the WHILE instruction on both Sandybridge and Ivybridge. The previous code made UIP point to the implicit DO instruction, which seems incorrect. I'm not sure how it could have worked on Sandybridge. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 6cfa8fb052c..a00caba822a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1244,8 +1244,6 @@ struct brw_instruction *gen6_CONT(struct brw_compile *p, brw_set_src0(p, insn, brw_ip_reg()); brw_set_src1(p, insn, brw_imm_d(0x0)); - insn->bits3.break_cont.uip = br * (do_insn - insn); - insn->header.compression_control = BRW_COMPRESSION_NONE; insn->header.execution_size = BRW_EXECUTE_8; return insn; @@ -2329,10 +2327,9 @@ brw_set_uip_jip(struct brw_compile *p) br * (brw_find_loop_end(p, ip) - ip + (intel->gen == 6 ? 1 : 0)); break; case BRW_OPCODE_CONTINUE: - /* JIP is set at CONTINUE emit time, since that's when we - * know where the start of the loop is. - */ insn->bits3.break_cont.jip = br * (brw_find_next_block_end(p, ip) - ip); + insn->bits3.break_cont.uip = br * (brw_find_loop_end(p, ip) - ip); + assert(insn->bits3.break_cont.uip != 0); assert(insn->bits3.break_cont.jip != 0); break; -- cgit v1.2.3 From 2a95568f64a6641a49a2d4855272e9be2ac2db6d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 11 May 2011 07:54:57 -0700 Subject: i965: Avoid register coalescing away MATH workarounds on Ivybridge. The MATH instruction cannot handle source modifiers, even on Gen7. So, apply this workaround for Sandybridge on Ivybridge as well. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 8dee849edd4..1b0e7e82fbe 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3386,7 +3386,7 @@ fs_visitor::register_coalesce() /* The gen6 MATH instruction can't handle source modifiers, so avoid * coalescing those for now. We should do something more specific. */ - if (intel->gen == 6 && scan_inst->is_math() && has_source_modifiers) { + if (intel->gen >= 6 && scan_inst->is_math() && has_source_modifiers) { interfered = true; break; } -- cgit v1.2.3 From 199a2f90abdd5dd11f8e2b95e587401d3b46f3ff Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 11 May 2011 01:49:10 -0700 Subject: i965: Fix data port reads on Ivybridge. These also need to use gen7_dp. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index a00caba822a..19346b5917f 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -586,7 +586,17 @@ brw_set_dp_read_message(struct brw_compile *p, struct intel_context *intel = &brw->intel; brw_set_src1(p, insn, brw_imm_d(0)); - if (intel->gen >= 6) { + if (intel->gen >= 7) { + insn->bits3.gen7_dp.binding_table_index = binding_table_index; + insn->bits3.gen7_dp.msg_control = msg_control; + insn->bits3.gen7_dp.pixel_scoreboard_clear = 0; + insn->bits3.gen7_dp.msg_type = msg_type; + insn->bits3.gen7_dp.header_present = 1; + insn->bits3.gen7_dp.response_length = response_length; + insn->bits3.gen7_dp.msg_length = msg_length; + insn->bits3.gen7_dp.end_of_thread = 0; + insn->header.destreg__conditionalmod = GEN6_MESSAGE_TARGET_DP_CONST_CACHE; + } else if (intel->gen == 6) { uint32_t target_function; if (target_cache == BRW_DATAPORT_READ_TARGET_DATA_CACHE) @@ -1997,7 +2007,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p, brw_set_dest(p, insn, dest); brw_set_src0(p, insn, src); - if (intel->gen == 6) + if (intel->gen >= 6) msg_type = GEN6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ; else if (intel->gen == 5 || intel->is_g4x) msg_type = G45_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ; -- cgit v1.2.3 From 344283de5d3f4e2bfa10455f6b974cf731184b55 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 11 May 2011 02:18:24 -0700 Subject: i965: Fix RNDZ and RNDE on Sandybridge and Ivybridge. On gen4/5, the RNDZ and RNDE instructions return floor(x), but set special "round increment bits" in the flag register; a predicated ADD (+1) fixes the result. The documentation still lists '.r' as existing, and says that the predicated add is necessary, but it apparently lies. According to the simulator, BRW_CONDITIONAL_R (7) is not a valid conditional modifier and the RNDZ and RNDE instructions simply produce the correct value. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 19346b5917f..007f58c341c 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -784,6 +784,8 @@ struct brw_instruction *brw_##OP(struct brw_compile *p, \ * stores a rounded value (possibly the wrong way) in the dest register, but * also sets a per-channel "increment bit" in the flag register. A predicated * add of 1.0 fixes dest to contain the desired result. + * + * Sandybridge and later appear to round correctly without an ADD. */ #define ROUND(OP) \ void brw_##OP(struct brw_compile *p, \ @@ -794,10 +796,13 @@ void brw_##OP(struct brw_compile *p, \ rnd = next_insn(p, BRW_OPCODE_##OP); \ brw_set_dest(p, rnd, dest); \ brw_set_src0(p, rnd, src); \ - rnd->header.destreg__conditionalmod = 0x7; /* turn on round-increments */ \ \ - add = brw_ADD(p, dest, dest, brw_imm_f(1.0f)); \ - add->header.predicate_control = BRW_PREDICATE_NORMAL; \ + if (p->brw->intel.gen < 6) { \ + /* turn on round-increments */ \ + rnd->header.destreg__conditionalmod = BRW_CONDITIONAL_R; \ + add = brw_ADD(p, dest, dest, brw_imm_f(1.0f)); \ + add->header.predicate_control = BRW_PREDICATE_NORMAL; \ + } \ } -- cgit v1.2.3 From 7f5e0d2a908d4f7ba781d70731172a07b640f401 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 13 May 2011 09:25:27 -0700 Subject: i965: Disable register spilling on Ivybridge for now. The data port messages for this are rather different. For now, fail to compile rather than hanging the GPU. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 1e2cf917116..f88b1316775 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -244,6 +244,8 @@ fs_visitor::assign_regs() if (reg == -1) { fail("no register to spill\n"); + } else if (intel->gen >= 7) { + fail("no spilling support on gen7 yet\n"); } else if (c->dispatch_width == 16) { fail("no spilling support on 16-wide yet\n"); } else { -- cgit v1.2.3 From 1b3d354743269ac1da80984da55d7545974f7345 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 22 Mar 2011 16:45:52 -0700 Subject: intel: Recognize new Ivybridge PCI IDs. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/intel/intel_chipset.h | 13 +++++++++++-- src/mesa/drivers/dri/intel/intel_context.c | 11 +++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index 50b52bbb36d..40fb69049c1 100644 --- a/src/mesa/drivers/dri/intel/intel_chipset.h +++ b/src/mesa/drivers/dri/intel/intel_chipset.h @@ -80,6 +80,12 @@ #define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126 #define PCI_CHIP_SANDYBRIDGE_S 0x010A /* Server */ +#define PCI_CHIP_IVYBRIDGE_GT1 0x0152 /* Desktop */ +#define PCI_CHIP_IVYBRIDGE_GT2 0x0162 +#define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156 /* Mobile */ +#define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166 +#define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a /* Server */ + #define IS_MOBILE(devid) (devid == PCI_CHIP_I855_GM || \ devid == PCI_CHIP_I915_GM || \ devid == PCI_CHIP_I945_GM || \ @@ -136,9 +142,12 @@ #define IS_GEN6(devid) (IS_GT1(devid) || IS_GT2(devid)) -#define IS_IVB_GT1(devid) 0 +#define IS_IVB_GT1(devid) (devid == PCI_CHIP_IVYBRIDGE_GT1 || \ + devid == PCI_CHIP_IVYBRIDGE_M_GT1 || \ + devid == PCI_CHIP_IVYBRIDGE_S_GT1) -#define IS_IVB_GT2(devid) 0 +#define IS_IVB_GT2(devid) (devid == PCI_CHIP_IVYBRIDGE_GT2 || \ + devid == PCI_CHIP_IVYBRIDGE_M_GT2) #define IS_IVYBRIDGE(devid) (IS_IVB_GT1(devid) || IS_IVB_GT2(devid)) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index ba3014e1e13..4516db20ffc 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -173,6 +173,17 @@ intelGetString(struct gl_context * ctx, GLenum name) case PCI_CHIP_SANDYBRIDGE_S: chipset = "Intel(R) Sandybridge Server"; break; + case PCI_CHIP_IVYBRIDGE_GT1: + case PCI_CHIP_IVYBRIDGE_GT2: + chipset = "Intel(R) Ivybridge Desktop"; + break; + case PCI_CHIP_IVYBRIDGE_M_GT1: + case PCI_CHIP_IVYBRIDGE_M_GT2: + chipset = "Intel(R) Ivybridge Mobile"; + break; + case PCI_CHIP_IVYBRIDGE_S_GT1: + chipset = "Intel(R) Ivybridge Server"; + break; default: chipset = "Unknown Intel Chipset"; break; -- cgit v1.2.3 From b2c1f8ff1d98f03be79892b7730372afdb94ba58 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 26 Apr 2011 12:25:56 -0700 Subject: egl: Recognize Ivybridge PCI IDs. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/egl/drivers/dri2/platform_drm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 9811b280299..d2be66ccc2b 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -81,6 +81,11 @@ const int i965_chip_ids[] = { 0x0116, /* PCI_CHIP_SANDYBRIDGE_M_GT2 */ 0x0122, /* PCI_CHIP_SANDYBRIDGE_GT2_PLUS */ 0x0126, /* PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS */ + 0x0152, /* PCI_CHIP_IVYBRIDGE_GT1 */ + 0x0162, /* PCI_CHIP_IVYBRIDGE_GT2 */ + 0x0156, /* PCI_CHIP_IVYBRIDGE_M_GT1 */ + 0x0166, /* PCI_CHIP_IVYBRIDGE_M_GT2 */ + 0x015a, /* PCI_CHIP_IVYBRIDGE_S_GT1 */ 0x29a2, /* PCI_CHIP_I965_G */ 0x2992, /* PCI_CHIP_I965_Q */ 0x2982, /* PCI_CHIP_I965_G_1 */ -- cgit v1.2.3 From ead7d73a5143ccfc55e6c00b8ab5ba0b893e5f33 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 17 May 2011 14:17:21 -0700 Subject: i965: Ivybridge uses the Gen4 SAMPLER_BORDER_COLOR_STATE. Volume 5c 1.13.7 lists it as [PreDevILK] and [DevIVB+]. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index 6f5057b7347..918c1d6243d 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -67,6 +67,9 @@ translate_wrap_mode(GLenum wrap) } } +/** + * Upload SAMPLER_BORDER_COLOR_STATE. + */ void upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, int unit) @@ -94,7 +97,7 @@ upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, color[3] = sampler->BorderColor.f[3]; } - if (intel->gen >= 5) { + if (intel->gen == 5 || intel->gen == 6) { struct gen5_sampler_default_color *sdc; sdc = brw_state_batch(brw, sizeof(*sdc), 32, &brw->wm.sdc_offset[unit]); -- cgit v1.2.3 From 461e193971db4ac456be0d383e9aebf15868542a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 17 May 2011 12:53:55 -0700 Subject: i965: Updated fixed-point sizes in Ivybridge SAMPLER_STATE. Texture LOD Bias is now S4.8 instead of S4.6; Min LOD, and Max LOD are now U4.8 instead of U4.6. Fixes piglit test tex-miplevel-selection. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen7_sampler_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c index 75d898e5ad7..8487a8fa4b0 100644 --- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c @@ -134,7 +134,7 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, /* Set LOD bias: */ sampler->ss0.lod_bias = S_FIXED(CLAMP(texUnit->LodBias + - gl_sampler->LodBias, -16, 15), 6); + gl_sampler->LodBias, -16, 15), 8); sampler->ss0.lod_preclamp = 1; /* OpenGL mode */ sampler->ss0.default_color_mode = 0; /* OpenGL/DX10 mode */ @@ -148,8 +148,8 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, */ sampler->ss0.base_level = U_FIXED(0, 1); - sampler->ss1.max_lod = U_FIXED(CLAMP(gl_sampler->MaxLod, 0, 13), 6); - sampler->ss1.min_lod = U_FIXED(CLAMP(gl_sampler->MinLod, 0, 13), 6); + sampler->ss1.max_lod = U_FIXED(CLAMP(gl_sampler->MaxLod, 0, 13), 8); + sampler->ss1.min_lod = U_FIXED(CLAMP(gl_sampler->MinLod, 0, 13), 8); upload_default_color(brw, gl_sampler, unit); -- cgit v1.2.3 From 4e98318fc1722171a07d867a99ab7608ecf758cd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 May 2011 21:05:30 -0700 Subject: i965: Instead of fallback on missing region, just bind a null renderbuffer. The change for GPU hanging in 13bab58f04c1ec6d0d52760eab490a0997d9abe2 fell back even when rb == NULL, which is wrong for GLES2 and caused segfaulting in GLES2 conformance. For the GPU hang case (where the broken 2D driver failed to allocate a BO for the window system renderbuffer), it also would assertion fail/segfault immediately after the fallback setup when the renderbuffer map failed. Fixes GLES2 conformance packed_depth_stencil. Signed-off-by: Eric Anholt Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 ++------ src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index d34059f0e61..cef0c65e478 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -562,12 +562,8 @@ prepare_wm_surfaces(struct brw_context *brw) struct intel_renderbuffer *irb = intel_renderbuffer(rb); struct intel_region *region = irb ? irb->region : NULL; - if (region == NULL || region->buffer == NULL) { - brw->intel.Fallback = GL_TRUE; /* boolean, not bitfield */ - return; - } - - brw_add_validated_bo(brw, region->buffer); + if (region) + brw_add_validated_bo(brw, region->buffer); nr_surfaces = SURF_INDEX_DRAW(i) + 1; } } diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index ff220255311..361db2fead8 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -329,12 +329,8 @@ prepare_wm_surfaces(struct brw_context *brw) struct intel_renderbuffer *irb = intel_renderbuffer(rb); struct intel_region *region = irb ? irb->region : NULL; - if (region == NULL || region->buffer == NULL) { - brw->intel.Fallback = GL_TRUE; /* boolean, not bitfield */ - return; - } - - brw_add_validated_bo(brw, region->buffer); + if (region) + brw_add_validated_bo(brw, region->buffer); nr_surfaces = SURF_INDEX_DRAW(i) + 1; } } -- cgit v1.2.3 From ecc051d65b6e17115439fb3609cccfd59f6272bf Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 13 May 2011 14:16:31 +1000 Subject: r600g: bump domain selection up one layer. this is taken from a patch from Mathias Froehlich, just going to stage it in a few pieces. Signed-off-by: Dave Airlie --- src/gallium/winsys/r600/drm/r600_bo.c | 24 +++++++++++++++++++++--- src/gallium/winsys/r600/drm/r600_priv.h | 2 +- src/gallium/winsys/r600/drm/radeon_bo.c | 4 ++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c index e9c650d23be..2bfb8e4e193 100644 --- a/src/gallium/winsys/r600/drm/r600_bo.c +++ b/src/gallium/winsys/r600/drm/r600_bo.c @@ -38,7 +38,8 @@ struct r600_bo *r600_bo(struct radeon *radeon, { struct r600_bo *bo; struct radeon_bo *rbo; - + uint32_t initial_domain; + if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) { bo = r600_bomgr_bo_create(radeon->bomgr, size, alignment, *radeon->cfence); if (bo) { @@ -46,7 +47,24 @@ struct r600_bo *r600_bo(struct radeon *radeon, } } - rbo = radeon_bo(radeon, 0, size, alignment); + if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) { + initial_domain = RADEON_GEM_DOMAIN_GTT; + } else { + switch(usage) { + case PIPE_USAGE_DYNAMIC: + case PIPE_USAGE_STREAM: + case PIPE_USAGE_STAGING: + initial_domain = RADEON_GEM_DOMAIN_GTT; + break; + case PIPE_USAGE_DEFAULT: + case PIPE_USAGE_STATIC: + case PIPE_USAGE_IMMUTABLE: + default: + initial_domain = RADEON_GEM_DOMAIN_VRAM; + break; + } + } + rbo = radeon_bo(radeon, 0, size, alignment, initial_domain); if (rbo == NULL) { return NULL; } @@ -80,7 +98,7 @@ struct r600_bo *r600_bo_handle(struct radeon *radeon, struct r600_bo *bo = calloc(1, sizeof(struct r600_bo)); struct radeon_bo *rbo; - rbo = bo->bo = radeon_bo(radeon, handle, 0, 0); + rbo = bo->bo = radeon_bo(radeon, handle, 0, 0, 0); if (rbo == NULL) { free(bo); return NULL; diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h index 4f7e60c3413..78b8190d6f5 100644 --- a/src/gallium/winsys/r600/drm/r600_priv.h +++ b/src/gallium/winsys/r600/drm/r600_priv.h @@ -132,7 +132,7 @@ unsigned radeon_family_from_device(unsigned device); * radeon_bo.c */ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle, - unsigned size, unsigned alignment); + unsigned size, unsigned alignment, unsigned initial_domain); void radeon_bo_reference(struct radeon *radeon, struct radeon_bo **dst, struct radeon_bo *src); int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo); diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c index cd817fc240b..45cf6f09671 100644 --- a/src/gallium/winsys/r600/drm/radeon_bo.c +++ b/src/gallium/winsys/r600/drm/radeon_bo.c @@ -71,7 +71,7 @@ static void radeon_bo_fixed_unmap(struct radeon *radeon, struct radeon_bo *bo) } struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle, - unsigned size, unsigned alignment) + unsigned size, unsigned alignment, unsigned initial_domain) { struct radeon_bo *bo; int r; @@ -115,7 +115,7 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle, args.size = size; args.alignment = alignment; - args.initial_domain = RADEON_GEM_DOMAIN_CPU; + args.initial_domain = initial_domain; args.flags = 0; args.handle = 0; r = drmCommandWriteRead(radeon->fd, DRM_RADEON_GEM_CREATE, -- cgit v1.2.3 From 6bd8647b54054a59bdb4f0c170c4481eaadc81ff Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 16 May 2011 09:44:10 +1000 Subject: st/mesa: only memset sampler when about to use it. This function was taking a lot more CPU than required due to it memsetting a bunch of memory that didn't require it from what I can see. We should only memset here when we are about to fill out the sampler, otherwise we end up doing a bunch of memsets for everytime this function is called, basically setting 0 memory to 0. Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_atom_sampler.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index ccbd5489226..06024ad2657 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -133,6 +133,8 @@ static void convert_sampler(struct st_context *st, } msamp = _mesa_get_samplerobj(st->ctx, texUnit); + + memset(sampler, 0, sizeof(*sampler)); sampler->wrap_s = gl_wrap_xlate(msamp->WrapS); sampler->wrap_t = gl_wrap_xlate(msamp->WrapT); sampler->wrap_r = gl_wrap_xlate(msamp->WrapR); @@ -201,8 +203,6 @@ update_vertex_samplers(struct st_context *st) for (su = 0; su < st->ctx->Const.MaxVertexTextureImageUnits; su++) { struct pipe_sampler_state *sampler = st->state.vertex_samplers + su; - memset(sampler, 0, sizeof(*sampler)); - if (vprog->Base.SamplersUsed & (1 << su)) { GLuint texUnit; @@ -232,7 +232,6 @@ update_fragment_samplers(struct st_context *st) for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { struct pipe_sampler_state *sampler = st->state.samplers + su; - memset(sampler, 0, sizeof(*sampler)); if (fprog->Base.SamplersUsed & (1 << su)) { GLuint texUnit; -- cgit v1.2.3 From bb31ecf4fb5b2dc9bad801397562535bf38ccf9b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 18 May 2011 17:27:39 +1000 Subject: mesa/st: split updating vertex and fragment shader stages. this seems like a logical thing to do and sets the correct st flags for vertex textures. Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_atom.c | 1 + src/mesa/state_tracker/st_atom.h | 1 + src/mesa/state_tracker/st_atom_texture.c | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index bf160fe1080..e1eac818e11 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -56,6 +56,7 @@ static const struct st_tracked_state *atoms[] = &st_update_scissor, &st_update_blend, &st_update_sampler, + &st_update_vertex_texture, &st_update_texture, &st_update_framebuffer, &st_update_msaa, diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h index 6a5ea365ebc..930a08444ab 100644 --- a/src/mesa/state_tracker/st_atom.h +++ b/src/mesa/state_tracker/st_atom.h @@ -60,6 +60,7 @@ extern const struct st_tracked_state st_update_blend; extern const struct st_tracked_state st_update_msaa; extern const struct st_tracked_state st_update_sampler; extern const struct st_tracked_state st_update_texture; +extern const struct st_tracked_state st_update_vertex_texture; extern const struct st_tracked_state st_finalize_textures; extern const struct st_tracked_state st_update_fs_constants; extern const struct st_tracked_state st_update_gs_constants; diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 990b50438f0..072eb977ebb 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -317,20 +317,22 @@ update_fragment_textures(struct st_context *st) st->state.sampler_views); } -static void -update_textures(struct st_context *st) -{ - update_fragment_textures(st); - update_vertex_textures(st); -} - const struct st_tracked_state st_update_texture = { "st_update_texture", /* name */ { /* dirty */ _NEW_TEXTURE, /* mesa */ ST_NEW_FRAGMENT_PROGRAM, /* st */ }, - update_textures /* update */ + update_fragment_textures /* update */ +}; + +const struct st_tracked_state st_update_vertex_texture = { + "st_update_vertex_texture", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + ST_NEW_VERTEX_PROGRAM, /* st */ + }, + update_vertex_textures /* update */ }; static void -- cgit v1.2.3 From 2758e65f28cc68411775ec41c53f773268cddc05 Mon Sep 17 00:00:00 2001 From: Tapani Pälli Date: Mon, 16 May 2011 16:56:43 +0300 Subject: add $SELINUX_LIBS to EGL and OpenVG lib deps Correctly links against selinux library when MESA is built with --enable-selinux option. Fixes bug #36333 in Freedesktop bugzilla Signed-off-by: Dave Airlie --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index c705d4505ab..a95012c2421 100644 --- a/configure.ac +++ b/configure.ac @@ -1186,7 +1186,7 @@ if test "x$enable_egl" = xno; then fi if test "x$enable_egl" = xyes; then SRC_DIRS="$SRC_DIRS egl" - EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread" + EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread" EGL_DRIVERS_DIRS="" if test "$enable_static" != yes; then # build egl_glx when libGL is built @@ -1581,7 +1581,7 @@ x*yes*) esac if test "x$enable_openvg" = xyes; then EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)' - VG_LIB_DEPS="$VG_LIB_DEPS -lpthread" + VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS -lpthread" fi AC_SUBST([VG_LIB_DEPS]) -- cgit v1.2.3 From 3e0bb02358d627e784a2b7041d6e2e23e3dfd2c5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 17 May 2011 23:53:52 -0700 Subject: i965: Rename IS_GT1 and IS_GT2 to IS_SNB_GT1 and IS_SNB_GT2. This should help distinguish Sandybridge GT1/GT2 from Ivybridge GT1/GT2. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri/intel/intel_chipset.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index a7b7c6f086b..df753abed02 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -195,7 +195,7 @@ GLboolean brwCreateContext( int api, assert(!"Unknown gen7 device."); } } else if (intel->gen == 6) { - if (IS_GT2(intel->intelScreen->deviceID)) { + if (IS_SNB_GT2(intel->intelScreen->deviceID)) { /* This could possibly be 80, but is supposed to require * disabling of WIZ hashing (bit 6 of GT_MODE, 0x20d0) and a * GPU reset to change. diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h index 40fb69049c1..ca5c295545f 100644 --- a/src/mesa/drivers/dri/intel/intel_chipset.h +++ b/src/mesa/drivers/dri/intel/intel_chipset.h @@ -131,16 +131,16 @@ /* Compat macro for intel_decode.c */ #define IS_IRONLAKE(devid) IS_GEN5(devid) -#define IS_GT1(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT1 || \ +#define IS_SNB_GT1(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT1 || \ devid == PCI_CHIP_SANDYBRIDGE_M_GT1 || \ devid == PCI_CHIP_SANDYBRIDGE_S) -#define IS_GT2(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT2 || \ +#define IS_SNB_GT2(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT2 || \ devid == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \ devid == PCI_CHIP_SANDYBRIDGE_M_GT2 || \ devid == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS) -#define IS_GEN6(devid) (IS_GT1(devid) || IS_GT2(devid)) +#define IS_GEN6(devid) (IS_SNB_GT1(devid) || IS_SNB_GT2(devid)) #define IS_IVB_GT1(devid) (devid == PCI_CHIP_IVYBRIDGE_GT1 || \ devid == PCI_CHIP_IVYBRIDGE_M_GT1 || \ -- cgit v1.2.3 From de1df26b5c11a45f2b1ff2ddc7b8ec764356aa94 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 May 2011 07:50:21 -0600 Subject: mesa: check that flex/bison are installed Fixes https://bugs.freedesktop.org/show_bug.cgi?id=36651 NOTE: This is a candidate for the 7.10 branch. --- configs/autoconf.in | 4 ++++ configs/default | 2 ++ configure.ac | 6 ++++++ src/glsl/Makefile | 8 ++++---- src/mesa/Makefile | 4 ++-- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/configs/autoconf.in b/configs/autoconf.in index 4e931a3a9cc..a484bcff996 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -58,6 +58,10 @@ INSTALL = @INSTALL@ PYTHON2 = @PYTHON2@ PYTHON_FLAGS = -t -O -O +# Flex and Bison for GLSL compiler +FLEX = @FLEX@ +BISON = @BISON@ + # Library names (base name) GL_LIB = GL GLU_LIB = GLU diff --git a/configs/default b/configs/default index 0582a0210af..b7acfd2f1a5 100644 --- a/configs/default +++ b/configs/default @@ -38,6 +38,8 @@ MKLIB_OPTIONS = MKDEP = makedepend MKDEP_OPTIONS = -fdepend MAKE = make +FLEX = flex +BISON = bison # Use MINSTALL for installing libraries, INSTALL for everything else MINSTALL = $(SHELL) $(TOP)/bin/minstall diff --git a/configure.ac b/configure.ac index a95012c2421..b55473ffec9 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,12 @@ if test "x$MKDEP" = "x"; then AC_MSG_ERROR([makedepend is required to build Mesa]) fi +AC_PATH_PROG([FLEX], [flex]) +test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build Mesa]) + +AC_PATH_PROG([BISON], [bison]) +test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build Mesa]) + dnl Our fallback install-sh is a symlink to minstall. Use the existing dnl configuration in that case. AC_PROG_INSTALL diff --git a/src/glsl/Makefile b/src/glsl/Makefile index e4b992dbc11..4100414a37d 100644 --- a/src/glsl/Makefile +++ b/src/glsl/Makefile @@ -192,16 +192,16 @@ $(DRICORE_OBJ_DIR)/%.o : %.c $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DEFINES) $< -o $@ glsl_lexer.cpp: glsl_lexer.ll - flex --nounistd -o$@ $< + $(FLEX) --nounistd -o$@ $< glsl_parser.cpp: glsl_parser.yy - bison -v -o "$@" -p "_mesa_glsl_" --defines=glsl_parser.h $< + $(BISON) -v -o "$@" -p "_mesa_glsl_" --defines=glsl_parser.h $< glcpp/glcpp-lex.c: glcpp/glcpp-lex.l - flex --nounistd -o$@ $< + $(FLEX) --nounistd -o$@ $< glcpp/glcpp-parse.c: glcpp/glcpp-parse.y - bison -v -o "$@" --defines=glcpp/glcpp-parse.h $< + $(BISON) -v -o "$@" --defines=glcpp/glcpp-parse.h $< builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o $(APP_CXX) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(GLSL2_OBJECTS) builtin_stubs.o -o $@ diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 03962e9c194..a903a260ac9 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -75,10 +75,10 @@ main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py m $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@ program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y - bison -v -d --output=program/program_parse.tab.c $< + $(BISON) -v -d --output=program/program_parse.tab.c $< program/lex.yy.c: program/program_lexer.l - flex --never-interactive --outfile=$@ $< + $(FLEX) --never-interactive --outfile=$@ $< ###################################################################### # Helper libraries used by many drivers: -- cgit v1.2.3 From 496bf04905197dc46c2dffe281008bd7f5edf8a8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 May 2011 08:14:32 -0600 Subject: mesa: only update array _MaxElement if array is enabled Fixes failed assertion when calling _mesa_print_arrays() debug function. --- src/mesa/main/arrayobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 4bfb2424004..83a82e86860 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -289,9 +289,10 @@ remove_array_object( struct gl_context *ctx, struct gl_array_object *obj ) static GLuint update_min(GLuint min, struct gl_client_array *array) { - _mesa_update_array_max_element(array); - if (array->Enabled) + if (array->Enabled) { + _mesa_update_array_max_element(array); return MIN2(min, array->_MaxElement); + } else return min; } -- cgit v1.2.3 From 707eadcb7f603e803978a541a16e9893663c33e2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 May 2011 08:14:32 -0600 Subject: mesa: simplify error check in _mesa_MapBufferRange() --- src/mesa/main/bufferobj.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 78105883c97..3e28d342674 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1416,14 +1416,13 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, return NULL; } - if (access & GL_MAP_READ_BIT) { - if ((access & GL_MAP_INVALIDATE_RANGE_BIT) || - (access & GL_MAP_INVALIDATE_BUFFER_BIT) || - (access & GL_MAP_UNSYNCHRONIZED_BIT)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glMapBufferRange(invalid access flags)"); - return NULL; - } + if ((access & GL_MAP_READ_BIT) && + (access & (GL_MAP_INVALIDATE_RANGE_BIT | + GL_MAP_INVALIDATE_BUFFER_BIT | + GL_MAP_UNSYNCHRONIZED_BIT))) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glMapBufferRange(invalid access flags)"); + return NULL; } if ((access & GL_MAP_FLUSH_EXPLICIT_BIT) && -- cgit v1.2.3 From 8a98aabe0bcea42cfdc982001ae4876e3d9b1214 Mon Sep 17 00:00:00 2001 From: Andreas Faenger Date: Wed, 18 May 2011 08:14:33 -0600 Subject: swrast: anisotropic filtering extension Anisotropic filtering extension for swrast intended to be used by osmesa to create high quality renderings. Based on Higher Quality Elliptical Weighted Avarage Filter (EWA). A 2nd implementation using footprint assembly is also provided. Signed-off-by: Brian Paul --- docs/relnotes-7.11.html | 1 + src/mesa/main/extensions.c | 1 + src/mesa/swrast/s_span.c | 7 + src/mesa/swrast/s_texcombine.c | 12 ++ src/mesa/swrast/s_texfilter.c | 395 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 416 insertions(+) diff --git a/docs/relnotes-7.11.html b/docs/relnotes-7.11.html index f2ff9c7c587..aaeabc25288 100644 --- a/docs/relnotes-7.11.html +++ b/docs/relnotes-7.11.html @@ -52,6 +52,7 @@ tbd
  • GL_EXT_packed_float (gallium r600)
  • GL_EXT_texture_compression_latc (gallium drivers, swrast)
  • GL_EXT_texture_compression_rgtc (gallium drivers, swrast, i965) +
  • GL_EXT_texture_filter_anisotropic (swrast)
  • GL_EXT_texture_shared_exponent (gallium drivers, swrast)
  • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965)
  • GL_EXT_texture_snorm (gallium drivers) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 8672ac2a730..bc61c50a90f 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -503,6 +503,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.EXT_texture_env_add = GL_TRUE; ctx->Extensions.EXT_texture_env_combine = GL_TRUE; ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; + ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE; ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE; ctx->Extensions.EXT_texture_lod_bias = GL_TRUE; ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE; diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index f0524e0610e..f81de3c0c7b 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -492,6 +492,13 @@ interpolate_texcoords(struct gl_context *ctx, SWspan *span) const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; needLambda = (obj->Sampler.MinFilter != obj->Sampler.MagFilter) || ctx->FragmentProgram._Current; + /* LOD is calculated directly in the ansiotropic filter, we can + * skip the normal lambda function as the result is ignored. + */ + if (obj->Sampler.MaxAnisotropy > 1.0 && + obj->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + needLambda = GL_FALSE; + } texW = img->WidthScale; texH = img->HeightScale; } diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index 7f49b6ffa50..086ed0b33d7 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -710,6 +710,18 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span ) } } } + else if (curObj->Sampler.MaxAnisotropy > 1.0 && + curObj->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + /* sample_lambda_2d_aniso is beeing used as texture_sample_func, + * it requires the current SWspan *span as an additional parameter. + * In order to keep the same function signature, the unused lambda + * parameter will be modified to actually contain the SWspan pointer. + * This is a Hack. To make it right, the texture_sample_func + * signature and all implementing functions need to be modified. + */ + /* "hide" SWspan struct; cast to (GLfloat *) to suppress warning */ + lambda = (GLfloat *)span; + } /* Sample the texture (span->end = number of fragments) */ swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end, diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 106f8b75f9e..e17a7aa0b35 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1531,6 +1531,396 @@ sample_lambda_2d(struct gl_context *ctx, } +/* For anisotropic filtering */ +#define WEIGHT_LUT_SIZE 1024 + +static GLfloat *weightLut = NULL; + +/** + * Creates the look-up table used to speed-up EWA sampling + */ +static void +create_filter_table(void) +{ + GLuint i; + if (!weightLut) { + weightLut = (GLfloat *) malloc(WEIGHT_LUT_SIZE * sizeof(GLfloat)); + + for (i = 0; i < WEIGHT_LUT_SIZE; ++i) { + GLfloat alpha = 2; + GLfloat r2 = (GLfloat) i / (GLfloat) (WEIGHT_LUT_SIZE - 1); + GLfloat weight = (GLfloat) exp(-alpha * r2); + weightLut[i] = weight; + } + } +} + + +/** + * Elliptical weighted average (EWA) filter for producing high quality + * anisotropic filtered results. + * Based on the Higher Quality Elliptical Weighted Avarage Filter + * published by Paul S. Heckbert in his Master's Thesis + * "Fundamentals of Texture Mapping and Image Warping" (1989) + */ +static void +sample_2d_ewa(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const GLfloat texcoord[4], + const GLfloat dudx, const GLfloat dvdx, + const GLfloat dudy, const GLfloat dvdy, const GLint lod, + GLfloat rgba[]) +{ + GLint level = lod > 0 ? lod : 0; + GLfloat scaling = 1.0 / (1 << level); + const struct gl_texture_image *img = tObj->Image[0][level]; + const struct gl_texture_image *mostDetailedImage = + tObj->Image[0][tObj->BaseLevel]; + GLfloat tex_u=-0.5 + texcoord[0] * mostDetailedImage->WidthScale * scaling; + GLfloat tex_v=-0.5 + texcoord[1] * mostDetailedImage->HeightScale * scaling; + + GLfloat ux = dudx * scaling; + GLfloat vx = dvdx * scaling; + GLfloat uy = dudy * scaling; + GLfloat vy = dvdy * scaling; + + /* compute ellipse coefficients to bound the region: + * A*x*x + B*x*y + C*y*y = F. + */ + GLfloat A = vx*vx+vy*vy+1; + GLfloat B = -2*(ux*vx+uy*vy); + GLfloat C = ux*ux+uy*uy+1; + GLfloat F = A*C-B*B/4.0; + + /* check if it is an ellipse */ + /* ASSERT(F > 0.0); */ + + /* Compute the ellipse's (u,v) bounding box in texture space */ + GLfloat d = -B*B+4.0*C*A; + GLfloat box_u = 2.0 / d * sqrt(d*C*F); /* box_u -> half of bbox with */ + GLfloat box_v = 2.0 / d * sqrt(A*d*F); /* box_v -> half of bbox height */ + + GLint u0 = floor(tex_u - box_u); + GLint u1 = ceil (tex_u + box_u); + GLint v0 = floor(tex_v - box_v); + GLint v1 = ceil (tex_v + box_v); + + GLfloat num[4] = {0.0F, 0.0F, 0.0F, 0.0F}; + GLfloat newCoord[2]; + GLfloat den = 0.0F; + GLfloat ddq; + GLfloat U = u0 - tex_u; + GLint v; + + /* Scale ellipse formula to directly index the Filter Lookup Table. + * i.e. scale so that F = WEIGHT_LUT_SIZE-1 + */ + double formScale = (double) (WEIGHT_LUT_SIZE - 1) / F; + A *= formScale; + B *= formScale; + C *= formScale; + /* F *= formScale; */ /* no need to scale F as we don't use it below here */ + + /* Heckbert MS thesis, p. 59; scan over the bounding box of the ellipse + * and incrementally update the value of Ax^2+Bxy*Cy^2; when this + * value, q, is less than F, we're inside the ellipse + */ + ddq = 2 * A; + for (v = v0; v <= v1; ++v) { + GLfloat V = v - tex_v; + GLfloat dq = A * (2 * U + 1) + B * V; + GLfloat q = (C * V + B * U) * V + A * U * U; + + GLint u; + for (u = u0; u <= u1; ++u) { + /* Note that the ellipse has been pre-scaled so F = WEIGHT_LUT_SIZE - 1 */ + if (q < WEIGHT_LUT_SIZE) { + /* as a LUT is used, q must never be negative; + * should not happen, though + */ + const GLint qClamped = q >= 0.0F ? q : 0; + GLfloat weight = weightLut[qClamped]; + + newCoord[0] = u / ((GLfloat) img->Width2); + newCoord[1] = v / ((GLfloat) img->Height2); + + sample_2d_nearest(ctx, tObj, img, newCoord, rgba); + num[0] += weight * rgba[0]; + num[1] += weight * rgba[1]; + num[2] += weight * rgba[2]; + num[3] += weight * rgba[3]; + + den += weight; + } + q += dq; + dq += ddq; + } + } + + if (den <= 0.0F) { + /* Reaching this place would mean + * that no pixels intersected the ellipse. + * This should never happen because + * the filter we use always + * intersects at least one pixel. + */ + + /*rgba[0]=0; + rgba[1]=0; + rgba[2]=0; + rgba[3]=0;*/ + /* not enough pixels in resampling, resort to direct interpolation */ + sample_2d_linear(ctx, tObj, img, texcoord, rgba); + return; + } + + rgba[0] = num[0] / den; + rgba[1] = num[1] / den; + rgba[2] = num[2] / den; + rgba[3] = num[3] / den; +} + + +/** + * Anisotropic filtering using footprint assembly as outlined in the + * EXT_texture_filter_anisotropic spec: + * http://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt + * Faster than EWA but has less quality (more aliasing effects) + */ +static void +sample_2d_footprint(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const GLfloat texcoord[4], + const GLfloat dudx, const GLfloat dvdx, + const GLfloat dudy, const GLfloat dvdy, const GLint lod, + GLfloat rgba[]) +{ + GLint level = lod > 0 ? lod : 0; + GLfloat scaling = 1.0F / (1 << level); + const struct gl_texture_image *img = tObj->Image[0][level]; + + GLfloat ux = dudx * scaling; + GLfloat vx = dvdx * scaling; + GLfloat uy = dudy * scaling; + GLfloat vy = dvdy * scaling; + + GLfloat Px2 = ux * ux + vx * vx; /* squared length of dx */ + GLfloat Py2 = uy * uy + vy * vy; /* squared length of dy */ + + GLint numSamples; + GLfloat ds; + GLfloat dt; + + GLfloat num[4] = {0.0F, 0.0F, 0.0F, 0.0F}; + GLfloat newCoord[2]; + GLint s; + + /* Calculate the per anisotropic sample offsets in s,t space. */ + if (Px2 > Py2) { + numSamples = ceil(SQRTF(Px2)); + ds = ux / ((GLfloat) img->Width2); + dt = vx / ((GLfloat) img->Height2); + } + else { + numSamples = ceil(SQRTF(Py2)); + ds = uy / ((GLfloat) img->Width2); + dt = vy / ((GLfloat) img->Height2); + } + + for (s = 0; sTexture._EnabledCoordUnits > 1) ? ctx->Const.MaxTextureUnits : 1; + GLuint u; + + /* XXX CoordUnits vs. ImageUnits */ + for (u = 0; u < maxUnit; u++) { + if (ctx->Texture.Unit[u]._Current == tObj) + break; /* found */ + } + if (u >= maxUnit) + u = 0; /* not found, use 1st one; should never happen */ + + return u; +} + + +/** + * Sample 2D texture using an anisotropic filter. + * NOTE: the const GLfloat lambda_iso[] parameter does *NOT* contain + * the lambda float array but a "hidden" SWspan struct which is required + * by this function but is not available in the texture_sample_func signature. + * See _swrast_texture_span( struct gl_context *ctx, SWspan *span ) on how + * this function is called. + */ +static void +sample_lambda_2d_aniso(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda_iso[], GLfloat rgba[][4]) +{ + const struct gl_texture_image *tImg = tObj->Image[0][tObj->BaseLevel]; + const GLfloat maxEccentricity = + tObj->Sampler.MaxAnisotropy * tObj->Sampler.MaxAnisotropy; + + /* re-calculate the lambda values so that they are usable with anisotropic + * filtering + */ + SWspan *span = (SWspan *)lambda_iso; /* access the "hidden" SWspan struct */ + + /* based on interpolate_texcoords(struct gl_context *ctx, SWspan *span) + * in swrast/s_span.c + */ + + /* find the texture unit index by looking up the current texture object + * from the context list of available texture objects. + */ + const GLuint u = texture_unit_index(ctx, tObj); + const GLuint attr = FRAG_ATTRIB_TEX0 + u; + GLfloat texW, texH; + + const GLfloat dsdx = span->attrStepX[attr][0]; + const GLfloat dsdy = span->attrStepY[attr][0]; + const GLfloat dtdx = span->attrStepX[attr][1]; + const GLfloat dtdy = span->attrStepY[attr][1]; + const GLfloat dqdx = span->attrStepX[attr][3]; + const GLfloat dqdy = span->attrStepY[attr][3]; + GLfloat s = span->attrStart[attr][0] + span->leftClip * dsdx; + GLfloat t = span->attrStart[attr][1] + span->leftClip * dtdx; + GLfloat q = span->attrStart[attr][3] + span->leftClip * dqdx; + + /* from swrast/s_texcombine.c _swrast_texture_span */ + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u]; + const GLboolean adjustLOD = + (texUnit->LodBias + tObj->Sampler.LodBias != 0.0F) + || (tObj->Sampler.MinLod != -1000.0 || tObj->Sampler.MaxLod != 1000.0); + + GLuint i; + + /* on first access create the lookup table containing the filter weights. */ + if (!weightLut) { + create_filter_table(); + } + + texW = tImg->WidthScale; + texH = tImg->HeightScale; + + for (i = 0; i < n; i++) { + const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); + + GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ); + GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ); + GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ); + GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ); + + /* note: instead of working with Px and Py, we will use the + * squared length instead, to avoid sqrt. + */ + GLfloat Px2 = dudx * dudx + dvdx * dvdx; + GLfloat Py2 = dudy * dudy + dvdy * dvdy; + + GLfloat Pmax2; + GLfloat Pmin2; + GLfloat e; + GLfloat lod; + + s += dsdx; + t += dtdx; + q += dqdx; + + if (Px2 < Py2) { + Pmax2 = Py2; + Pmin2 = Px2; + } + else { + Pmax2 = Px2; + Pmin2 = Py2; + } + + /* if the eccentricity of the ellipse is too big, scale up the shorter + * of the two vectors to limit the maximum amount of work per pixel + */ + e = Pmax2 / Pmin2; + if (e > maxEccentricity) { + /* GLfloat s=e / maxEccentricity; + minor[0] *= s; + minor[1] *= s; + Pmin2 *= s; */ + Pmin2 = Pmax2 / maxEccentricity; + } + + /* note: we need to have Pmin=sqrt(Pmin2) here, but we can avoid + * this since 0.5*log(x) = log(sqrt(x)) + */ + lod = 0.5 * LOG2(Pmin2); + + if (adjustLOD) { + /* from swrast/s_texcombine.c _swrast_texture_span */ + if (texUnit->LodBias + tObj->Sampler.LodBias != 0.0F) { + /* apply LOD bias, but don't clamp yet */ + const GLfloat bias = + CLAMP(texUnit->LodBias + tObj->Sampler.LodBias, + -ctx->Const.MaxTextureLodBias, + ctx->Const.MaxTextureLodBias); + lod += bias; + + if (tObj->Sampler.MinLod != -1000.0 || + tObj->Sampler.MaxLod != 1000.0) { + /* apply LOD clamping to lambda */ + lod = CLAMP(lod, tObj->Sampler.MinLod, tObj->Sampler.MaxLod); + } + } + } + + /* If the ellipse covers the whole image, we can + * simply return the average of the whole image. + */ + if (lod >= tObj->_MaxLevel) { + sample_2d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoords[i], rgba[i]); + } + else { + /* don't bother interpolating between multiple LODs; it doesn't + * seem to be worth the extra running time. + */ + sample_2d_ewa(ctx, tObj, texcoords[i], + dudx, dvdx, dudy, dvdy, floor(lod), rgba[i]); + + /* unused: */ + (void) sample_2d_footprint; + /* + sample_2d_footprint(ctx, tObj, texcoords[i], + dudx, dvdx, dudy, dvdy, floor(lod), rgba[i]); + */ + } + } +} + + /**********************************************************************/ /* 3-D Texture Sampling Functions */ @@ -3221,6 +3611,11 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_depth_texture; } else if (needLambda) { + /* Anisotropic filtering extension. Activated only if mipmaps are used */ + if (t->Sampler.MaxAnisotropy > 1.0 && + t->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + return &sample_lambda_2d_aniso; + } return &sample_lambda_2d; } else if (t->Sampler.MinFilter == GL_LINEAR) { -- cgit v1.2.3 From 61c67eca7dbcef4b7b1398f5a9e0193597f304ed Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 18 May 2011 18:00:55 +0100 Subject: gallivm: Tell LLVM to not assume a 16-byte aligned stack on x86. Fixes fdo 36738. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 843a14a500c..0ccf6a698bd 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -73,6 +73,19 @@ lp_set_target_options(void) #endif #endif + /* + * LLVM revision 123367 switched the default stack alignment to 16 bytes on + * Linux (and several other Unices in later revisions), to match recent gcc + * versions. + * + * However our drivers can be loaded by old binary applications, still + * maintaining a 4 bytes stack alignment. Therefore we must tell LLVM here + * to only assume a 4 bytes alignment for backwards compatibility. + */ +#if defined(PIPE_ARCH_X86) + llvm::StackAlignment = 4; +#endif + #if defined(DEBUG) || defined(PROFILE) llvm::NoFramePointerElim = true; #endif -- cgit v1.2.3 From 5dd5be69f099211db027b6e39150cacefcfdf8b6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2011 14:58:39 -0700 Subject: i965/fs: Fix compiler warnings about dead code from 963431829055f63ec94d --- src/mesa/drivers/dri/i965/brw_fs.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 1b0e7e82fbe..00f39d4b534 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -485,8 +485,6 @@ fs_visitor::emit_fragcoord_interpolation(ir_variable *ir) { fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type); fs_reg wpos = *reg; - fs_reg neg_y = this->pixel_y; - neg_y.negate = true; bool flip = !ir->origin_upper_left ^ c->key.render_to_fbo; /* gl_FragCoord.x */ @@ -3070,7 +3068,6 @@ fs_visitor::calculate_live_intervals() int *use = ralloc_array(mem_ctx, int, num_vars); int loop_depth = 0; int loop_start = 0; - int bb_header_ip = 0; if (this->live_intervals_valid) return; @@ -3130,22 +3127,6 @@ fs_visitor::calculate_live_intervals() } ip++; - - /* Set the basic block header IP. This is used for determining - * if a complete def of single-register virtual GRF in a loop - * dominates a use in the same basic block. It's a quick way to - * reduce the live interval range of most register used in a - * loop. - */ - if (inst->opcode == BRW_OPCODE_IF || - inst->opcode == BRW_OPCODE_ELSE || - inst->opcode == BRW_OPCODE_ENDIF || - inst->opcode == BRW_OPCODE_DO || - inst->opcode == BRW_OPCODE_WHILE || - inst->opcode == BRW_OPCODE_BREAK || - inst->opcode == BRW_OPCODE_CONTINUE) { - bb_header_ip = ip; - } } ralloc_free(this->virtual_grf_def); -- cgit v1.2.3 From 51761a1aefd31b7df12edd9467ac630b9cbbbbc9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 10 May 2011 15:30:11 -0700 Subject: i965/fs: Cut an instruction and a temporary from gen6 discard statements. I thought I was thwarted initially when I couldn't do conditional mod on a MOV, and couldn't use two immediate constants in one instruction. But g0 != g0 is also a way to produce a failing comparison. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 64 ++++++++++++++++-------------------- src/mesa/drivers/dri/i965/brw_fs.h | 6 ++-- 2 files changed, 30 insertions(+), 40 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 00f39d4b534..bd5e8d2e843 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1606,12 +1606,9 @@ fs_visitor::visit(ir_swizzle *ir) void fs_visitor::visit(ir_discard *ir) { - fs_reg temp = fs_reg(this, glsl_type::uint_type); - assert(ir->condition == NULL); /* FINISHME */ - emit(FS_OPCODE_DISCARD_NOT, temp, reg_null_d); - emit(FS_OPCODE_DISCARD_AND, reg_null_d, temp); + emit(FS_OPCODE_DISCARD); kill_emitted = true; } @@ -2671,56 +2668,54 @@ fs_visitor::generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src) } void -fs_visitor::generate_discard_not(fs_inst *inst, struct brw_reg mask) +fs_visitor::generate_discard(fs_inst *inst) { - if (intel->gen >= 6) { - /* Gen6 no longer has the mask reg for us to just read the - * active channels from. However, cmp updates just the channels - * of the flag reg that are enabled, so we can get at the - * channel enables that way. In this step, make a reg of ones - * we'll compare to. - */ - brw_MOV(p, mask, brw_imm_ud(1)); - } else { - brw_push_insn_state(p); - brw_set_mask_control(p, BRW_MASK_DISABLE); - brw_set_compression_control(p, BRW_COMPRESSION_NONE); - brw_NOT(p, mask, brw_mask_reg(1)); /* IMASK */ - brw_pop_insn_state(p); - } -} + struct brw_reg f0 = brw_flag_reg(); -void -fs_visitor::generate_discard_and(fs_inst *inst, struct brw_reg mask) -{ if (intel->gen >= 6) { - struct brw_reg f0 = brw_flag_reg(); struct brw_reg g1 = retype(brw_vec1_grf(1, 7), BRW_REGISTER_TYPE_UW); + struct brw_reg some_register; + + /* As of gen6, we no longer have the mask register to look at, + * so life gets a bit more complicated. + */ + /* Load the flag register with all ones. */ brw_push_insn_state(p); brw_set_mask_control(p, BRW_MASK_DISABLE); - brw_MOV(p, f0, brw_imm_uw(0xffff)); /* inactive channels undiscarded */ + brw_MOV(p, f0, brw_imm_uw(0xffff)); brw_pop_insn_state(p); + /* Do a comparison that should always fail, to produce 0s in the flag + * reg where we have active channels. + */ + some_register = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW); brw_CMP(p, retype(brw_null_reg(), BRW_REGISTER_TYPE_UD), - BRW_CONDITIONAL_Z, mask, brw_imm_ud(0)); /* active channels fail test */ + BRW_CONDITIONAL_NZ, some_register, some_register); + /* Undo CMP's whacking of predication*/ brw_set_predicate_control(p, BRW_PREDICATE_NONE); brw_push_insn_state(p); brw_set_mask_control(p, BRW_MASK_DISABLE); - brw_set_compression_control(p, BRW_COMPRESSION_NONE); brw_AND(p, g1, f0, g1); brw_pop_insn_state(p); } else { struct brw_reg g0 = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW); - - mask = brw_uw1_reg(mask.file, mask.nr, 0); + struct brw_reg mask = brw_uw1_reg(mask.file, mask.nr, 0); brw_push_insn_state(p); brw_set_mask_control(p, BRW_MASK_DISABLE); brw_set_compression_control(p, BRW_COMPRESSION_NONE); - brw_AND(p, g0, mask, g0); + + /* Unlike the 965, we have the mask reg, so we just need + * somewhere to invert that (containing channels to be disabled) + * so it can be ANDed with the mask of pixels still to be + * written. Use the flag reg for consistency with gen6+. + */ + brw_NOT(p, f0, brw_mask_reg(1)); /* IMASK */ + brw_AND(p, g0, f0, g0); + brw_pop_insn_state(p); } } @@ -3968,11 +3963,8 @@ fs_visitor::generate_code() case FS_OPCODE_TXL: generate_tex(inst, dst, src[0]); break; - case FS_OPCODE_DISCARD_NOT: - generate_discard_not(inst, dst); - break; - case FS_OPCODE_DISCARD_AND: - generate_discard_and(inst, src[0]); + case FS_OPCODE_DISCARD: + generate_discard(inst); break; case FS_OPCODE_DDX: generate_ddx(inst, dst, src[0]); diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 154ce7fdafb..1b37ef5d087 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -75,8 +75,7 @@ enum fs_opcodes { FS_OPCODE_TXB, FS_OPCODE_TXD, FS_OPCODE_TXL, - FS_OPCODE_DISCARD_NOT, - FS_OPCODE_DISCARD_AND, + FS_OPCODE_DISCARD, FS_OPCODE_SPILL, FS_OPCODE_UNSPILL, FS_OPCODE_PULL_CONSTANT_LOAD, @@ -500,8 +499,7 @@ public: struct brw_reg *src); void generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src); void generate_math(fs_inst *inst, struct brw_reg dst, struct brw_reg *src); - void generate_discard_not(fs_inst *inst, struct brw_reg temp); - void generate_discard_and(fs_inst *inst, struct brw_reg temp); + void generate_discard(fs_inst *inst); void generate_ddx(fs_inst *inst, struct brw_reg dst, struct brw_reg src); void generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src); void generate_spill(fs_inst *inst, struct brw_reg src); -- cgit v1.2.3 From 367020d87ce8c27aeb58b3887fbd29d216fdc151 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 11 May 2011 14:07:44 -0700 Subject: i965/gen6: Fix blending state when no color buffer is bound. This is part of fixing fbo-alphatest-nocolor -- a regression in 35e8fe5c99b285f348cb8a1bba2931f120f7c0a1 after the initial regression, that had us using a garbage BLEND_STATE[0] (in particular, the alpha test enable) if no color buffer was bound. --- src/mesa/drivers/dri/i965/gen6_cc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c index 66357f00fa6..2b16d6cdc01 100644 --- a/src/mesa/drivers/dri/i965/gen6_cc.c +++ b/src/mesa/drivers/dri/i965/gen6_cc.c @@ -39,8 +39,18 @@ prepare_blend_state(struct brw_context *brw) struct gen6_blend_state *blend; int b; int nr_draw_buffers = ctx->DrawBuffer->_NumColorDrawBuffers; - int size = sizeof(*blend) * nr_draw_buffers; - + int size; + + /* We need at least one BLEND_STATE written, because we might do + * thread dispatch even if _NumColorDrawBuffers is 0 (for example + * for computed depth or alpha test), which will do an FB write + * with render target 0, which will reference BLEND_STATE[0] for + * alpha test enable. + */ + if (nr_draw_buffers == 0 && ctx->Color.AlphaEnabled) + nr_draw_buffers = 1; + + size = sizeof(*blend) * nr_draw_buffers; blend = brw_state_batch(brw, size, 64, &brw->cc.blend_state_offset); memset(blend, 0, size); -- cgit v1.2.3 From 27b03926618ddcafabb7b61e652fe6458b017b24 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 11 May 2011 12:43:28 -0700 Subject: i965/fs: Fix discard and alpha test in 16-wide. As of gen6, alt-mode (which we use) MOVs of floats are not raw -- they'll modify infs/nans. This broke discard and alpha test in 16-wide, where apparently the upper 8 bits of the pixel enables being set were causing the whole value to get trashed upon being moved. Treating the values as UD instead of float makes sure they get preserved. While I'm here, replace the two 8-wide moves of the halves of the header with a single compressed move. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36648 Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index bd5e8d2e843..018a16e4322 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2317,9 +2317,11 @@ fs_visitor::generate_fb_write(fs_inst *inst) if (inst->header_present) { if (intel->gen >= 6) { + brw_set_compression_control(p, BRW_COMPRESSION_COMPRESSED); brw_MOV(p, - brw_message_reg(inst->base_mrf), - brw_vec8_grf(0, 0)); + retype(brw_message_reg(inst->base_mrf), BRW_REGISTER_TYPE_UD), + retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD)); + brw_set_compression_control(p, BRW_COMPRESSION_NONE); if (inst->target > 0) { /* Set the render target index for choosing BLEND_STATE. */ @@ -2337,11 +2339,11 @@ fs_visitor::generate_fb_write(fs_inst *inst) implied_header = brw_null_reg(); } else { implied_header = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW); - } - brw_MOV(p, - brw_message_reg(inst->base_mrf + 1), - brw_vec8_grf(1, 0)); + brw_MOV(p, + brw_message_reg(inst->base_mrf + 1), + brw_vec8_grf(1, 0)); + } } else { implied_header = brw_null_reg(); } -- cgit v1.2.3 From 136eb2bde769713b100351ff96bceb970f068c0a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 10 May 2011 12:55:12 -0700 Subject: i965/fs: Add support for "if" statements in 16-wide mode on gen6+. It turns out there's nothing in the hardware preventing this. It appears that it ought to work on pre-gen6 as well, but just produces GPU hangs. Improves glbenchmark Egypt framerate 4.4% +/- 0.3% (n=3), and Pro by 2.6% +/- 0.6% (n=3). Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 6 +++++- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 007f58c341c..2d41302d15a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1003,7 +1003,11 @@ gen6_IF(struct brw_compile *p, uint32_t conditional, insn = next_insn(p, BRW_OPCODE_IF); brw_set_dest(p, insn, brw_imm_w(0)); - insn->header.execution_size = BRW_EXECUTE_8; + if (p->compressed) { + insn->header.execution_size = BRW_EXECUTE_16; + } else { + insn->header.execution_size = BRW_EXECUTE_8; + } insn->bits1.branch_gen6.jump_count = 0; brw_set_src0(p, insn, src0); brw_set_src1(p, insn, src1); diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 018a16e4322..5232a7f77af 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1859,7 +1859,7 @@ fs_visitor::visit(ir_if *ir) { fs_inst *inst; - if (c->dispatch_width == 16) { + if (intel->gen != 6 && c->dispatch_width == 16) { fail("Can't support (non-uniform) control flow on 16-wide\n"); } @@ -3872,7 +3872,7 @@ fs_visitor::generate_code() assert(intel->gen == 6); gen6_IF(p, inst->conditional_mod, src[0], src[1]); } else { - brw_IF(p, BRW_EXECUTE_8); + brw_IF(p, c->dispatch_width == 16 ? BRW_EXECUTE_16 : BRW_EXECUTE_8); } if_depth_in_loop[loop_stack_depth]++; break; -- cgit v1.2.3 From 7592f005608e6c03d53c18d27d9af84bde802014 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 11 May 2011 13:08:03 -0700 Subject: i965/fs: Drop the viewport index/rtai clearing in gen6 fb writes. These fields are documented to be in the payload, and though the FB write docs say they *aren't* in the payload, for all other fields the payload and header is structured so that no overwriting is required except for non-default options. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 5232a7f77af..2157c935711 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2330,12 +2330,6 @@ fs_visitor::generate_fb_write(fs_inst *inst) brw_imm_ud(inst->target)); } - /* Clear viewport index, render target array index. */ - brw_AND(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 0), - BRW_REGISTER_TYPE_UD), - retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UD), - brw_imm_ud(0xf7ff)); - implied_header = brw_null_reg(); } else { implied_header = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW); -- cgit v1.2.3 From b126a0c0cb30b1e2f2df1953fe14d8596d1cf4f7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 2 Nov 2010 09:11:17 -0700 Subject: i965: Add support for correct GL_CLAMP behavior by clamping coordinates. This removes the stupid strict-conformance fallback code I broke when adding ARB_sampler_objects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36572 Reviewed-by: Kenneth Graunke (v1) --- src/mesa/drivers/dri/i965/brw_draw.c | 36 ------------------- src/mesa/drivers/dri/i965/brw_fs.cpp | 45 +++++++++++++++++------- src/mesa/drivers/dri/i965/brw_fs.h | 9 +++-- src/mesa/drivers/dri/i965/brw_state.h | 2 +- src/mesa/drivers/dri/i965/brw_wm.c | 10 ++++++ src/mesa/drivers/dri/i965/brw_wm.h | 2 +- src/mesa/drivers/dri/i965/brw_wm_emit.c | 5 +++ src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 38 +++++++++++++------- src/mesa/drivers/dri/i965/gen7_sampler_state.c | 12 +++++-- 9 files changed, 90 insertions(+), 69 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 44ede608b76..bcfd678a924 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -325,42 +325,6 @@ static GLboolean check_fallbacks( struct brw_context *brw, return GL_TRUE; } - /* BRW hardware doesn't handle GL_CLAMP texturing correctly; - * brw_wm_sampler_state:translate_wrap_mode() treats GL_CLAMP - * as GL_CLAMP_TO_EDGE instead. If we're using GL_CLAMP, and - * we want strict conformance, force the fallback. - * Right now, we only do this for 2D textures. - */ - { - int u; - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u]; - - if (texUnit->Enabled) { - struct gl_sampler_object *sampler = _mesa_get_samplerobj(ctx, u); - - if (texUnit->Enabled & TEXTURE_1D_BIT) { - if (sampler->WrapS == GL_CLAMP) { - return GL_TRUE; - } - } - if (texUnit->Enabled & TEXTURE_2D_BIT) { - if (sampler->WrapS == GL_CLAMP || - sampler->WrapT == GL_CLAMP) { - return GL_TRUE; - } - } - if (texUnit->Enabled & TEXTURE_3D_BIT) { - if (sampler->WrapS == GL_CLAMP || - sampler->WrapT == GL_CLAMP || - sampler->WrapR == GL_CLAMP) { - return GL_TRUE; - } - } - } - } - } - /* Nothing stopping us from the fast path now */ return GL_FALSE; } diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 2157c935711..1943ab6021f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1172,7 +1172,8 @@ fs_visitor::visit(ir_assignment *ir) } fs_inst * -fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate) +fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate, + int sampler) { int mlen; int base_mrf = 1; @@ -1184,7 +1185,11 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate) if (ir->shadow_comparitor) { for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), coordinate); + fs_inst *inst = emit(BRW_OPCODE_MOV, + fs_reg(MRF, base_mrf + mlen + i), coordinate); + if (i < 3 && c->key.gl_clamp_mask[i] & (1 << sampler)) + inst->saturate = true; + coordinate.reg_offset++; } /* gen4's SIMD8 sampler always has the slots for u,v,r present. */ @@ -1212,7 +1217,10 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate) mlen++; } else if (ir->op == ir_tex) { for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), coordinate); + fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), + coordinate); + if (i < 3 && c->key.gl_clamp_mask[i] & (1 << sampler)) + inst->saturate = true; coordinate.reg_offset++; } /* gen4's SIMD8 sampler always has the slots for u,v,r present. */ @@ -1226,7 +1234,11 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate) assert(ir->op == ir_txb || ir->op == ir_txl); for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i * 2), coordinate); + fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, + base_mrf + mlen + i * 2), + coordinate); + if (i < 3 && c->key.gl_clamp_mask[i] & (1 << sampler)) + inst->saturate = true; coordinate.reg_offset++; } @@ -1298,15 +1310,19 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate) * surprising in the disassembly. */ fs_inst * -fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate) +fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, + int sampler) { int mlen = 1; /* g0 header always present. */ int base_mrf = 1; int reg_width = c->dispatch_width / 8; for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i * reg_width), - coordinate); + fs_inst *inst = emit(BRW_OPCODE_MOV, + fs_reg(MRF, base_mrf + mlen + i * reg_width), + coordinate); + if (i < 3 && c->key.gl_clamp_mask[i] & (1 << sampler)) + inst->saturate = true; coordinate.reg_offset++; } mlen += ir->coordinate->type->vector_elements * reg_width; @@ -1357,7 +1373,8 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate) } fs_inst * -fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate) +fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate, + int sampler) { int mlen = 1; /* g0 header always present. */ int base_mrf = 1; @@ -1391,8 +1408,10 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate) /* Set up the coordinate */ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), - coordinate); + fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), + coordinate); + if (i < 3 && c->key.gl_clamp_mask[i] & (1 << sampler)) + inst->saturate = true; coordinate.reg_offset++; mlen += reg_width; } @@ -1517,11 +1536,11 @@ fs_visitor::visit(ir_texture *ir) fs_reg dst = fs_reg(this, glsl_type::vec4_type); if (intel->gen >= 7) { - inst = emit_texture_gen7(ir, dst, coordinate); + inst = emit_texture_gen7(ir, dst, coordinate, sampler); } else if (intel->gen >= 5) { - inst = emit_texture_gen5(ir, dst, coordinate); + inst = emit_texture_gen5(ir, dst, coordinate, sampler); } else { - inst = emit_texture_gen4(ir, dst, coordinate); + inst = emit_texture_gen4(ir, dst, coordinate, sampler); } /* If there's an offset, we already set up m1. To avoid the implied move, diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 1b37ef5d087..4b355c979eb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -512,9 +512,12 @@ public: fs_reg *emit_general_interpolation(ir_variable *ir); void emit_interpolation_setup_gen4(); void emit_interpolation_setup_gen6(); - fs_inst *emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate); - fs_inst *emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate); - fs_inst *emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate); + fs_inst *emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate, + int sampler); + fs_inst *emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, + int sampler); + fs_inst *emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate, + int sampler); fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0); fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0, fs_reg src1); bool try_emit_saturate(ir_expression *ir); diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 11a87320542..3aaa7c6d794 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -192,7 +192,7 @@ GLuint translate_tex_format(gl_format mesa_format, GLenum srgb_decode); /* brw_wm_sampler_state.c */ -GLuint translate_wrap_mode(GLenum wrap); +uint32_t translate_wrap_mode(GLenum wrap, bool using_nearest); void upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, int unit); diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 40589b0d2e4..907976295ab 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -410,6 +410,16 @@ static void brw_wm_populate_key( struct brw_context *brw, swizzles[GET_SWZ(t->_Swizzle, 1)], swizzles[GET_SWZ(t->_Swizzle, 2)], swizzles[GET_SWZ(t->_Swizzle, 3)]); + + if (sampler->MinFilter != GL_NEAREST && + sampler->MagFilter != GL_NEAREST) { + if (sampler->WrapS == GL_CLAMP) + key->gl_clamp_mask[0] |= 1 << i; + if (sampler->WrapT == GL_CLAMP) + key->gl_clamp_mask[1] |= 1 << i; + if (sampler->WrapR == GL_CLAMP) + key->gl_clamp_mask[2] |= 1 << i; + } } else { key->tex_swizzles[i] = SWIZZLE_NOOP; diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h index a5f99a0a657..8ab531bdf87 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.h +++ b/src/mesa/drivers/dri/i965/brw_wm.h @@ -71,9 +71,9 @@ struct brw_wm_prog_key { GLuint shadowtex_mask:16; GLuint yuvtex_mask:16; GLuint yuvtex_swap_mask:16; /* UV swaped */ + uint16_t gl_clamp_mask[3]; GLushort tex_swizzles[BRW_MAX_TEX_UNIT]; - GLushort drawable_height; GLbitfield64 vp_outputs_written; GLuint iz_lookup; diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index fd4cd892f41..f61757a8cac 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -1100,11 +1100,16 @@ void emit_tex(struct brw_wm_compile *c, /* Emit the texcoords. */ for (i = 0; i < nr_texcoords; i++) { + if (c->key.gl_clamp_mask[i] & (1 << sampler)) + brw_set_saturate(p, true); + if (emit & (1<Texture.Unit[unit]; struct gl_texture_object *texObj = texUnit->_Current; struct gl_sampler_object *gl_sampler = _mesa_get_samplerobj(ctx, unit); + bool using_nearest = false; switch (gl_sampler->MinFilter) { case GL_NEAREST: sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST; sampler->ss0.mip_filter = BRW_MIPFILTER_NONE; + using_nearest = true; break; case GL_LINEAR: sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR; @@ -200,6 +210,7 @@ static void brw_update_sampler_state(struct brw_context *brw, switch (gl_sampler->MagFilter) { case GL_NEAREST: sampler->ss0.mag_filter = BRW_MAPFILTER_NEAREST; + using_nearest = true; break; case GL_LINEAR: sampler->ss0.mag_filter = BRW_MAPFILTER_LINEAR; @@ -209,9 +220,12 @@ static void brw_update_sampler_state(struct brw_context *brw, } } - sampler->ss1.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR); - sampler->ss1.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS); - sampler->ss1.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT); + sampler->ss1.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR, + using_nearest); + sampler->ss1.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS, + using_nearest); + sampler->ss1.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT, + using_nearest); if (intel->gen >= 6 && sampler->ss0.min_filter != sampler->ss0.mag_filter) diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c index 8487a8fa4b0..95f6fbf7414 100644 --- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c @@ -41,11 +41,13 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; struct gl_texture_object *texObj = texUnit->_Current; struct gl_sampler_object *gl_sampler = _mesa_get_samplerobj(ctx, unit); + bool using_nearest = false; switch (gl_sampler->MinFilter) { case GL_NEAREST: sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST; sampler->ss0.mip_filter = BRW_MIPFILTER_NONE; + using_nearest = true; break; case GL_LINEAR: sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR; @@ -85,6 +87,7 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, switch (gl_sampler->MagFilter) { case GL_NEAREST: sampler->ss0.mag_filter = BRW_MAPFILTER_NEAREST; + using_nearest = true; break; case GL_LINEAR: sampler->ss0.mag_filter = BRW_MAPFILTER_LINEAR; @@ -94,9 +97,12 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, } } - sampler->ss3.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR); - sampler->ss3.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS); - sampler->ss3.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT); + sampler->ss3.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR, + using_nearest); + sampler->ss3.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS, + using_nearest); + sampler->ss3.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT, + using_nearest); /* Cube-maps on 965 and later must use the same wrap mode for all 3 * coordinate dimensions. Futher, only CUBE and CLAMP are valid. -- cgit v1.2.3 From 4bbc7915f16a8b0dcead3f34aa1b4f0328147bea Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 May 2011 08:49:53 -0700 Subject: i965/fs: Fix GPU hang on texture2d-bias on pre-Ironlake. In the 16-wide rework, I missed that we were setting some things to be SIMD16 mode (corresponding to their setup in emit_texture_gen4()). Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 1943ab6021f..75454be13ed 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2531,11 +2531,8 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src) int rlen = 4; uint32_t simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD8; - if (c->dispatch_width == 16) { - rlen = 8; - dst = vec16(dst); + if (c->dispatch_width == 16) simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16; - } if (intel->gen >= 5) { switch (inst->opcode) { @@ -2570,6 +2567,7 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src) /* Note that G45 and older determines shadow compare and dispatch width * from message length for most messages. */ + assert(c->dispatch_width == 8); msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE; if (inst->shadow_compare) { assert(inst->mlen == 6); @@ -2604,6 +2602,11 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src) } assert(msg_type != -1); + if (simd_mode == BRW_SAMPLER_SIMD_MODE_SIMD16) { + rlen = 8; + dst = vec16(dst); + } + brw_SAMPLE(p, retype(dst, BRW_REGISTER_TYPE_UW), inst->base_mrf, -- cgit v1.2.3 From 90e922267a89fa9bef254bb257405531ceff7356 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 May 2011 10:30:23 -0700 Subject: i965/fs: Don't emit a header on gen5+ sample messages unless required. Improves glbenchmark egypt performance 0.6% +/- 0.4% (n=6). Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 75454be13ed..add69b16737 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1289,6 +1289,7 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate, } inst->base_mrf = base_mrf; inst->mlen = mlen; + inst->header_present = true; if (simd16) { for (int i = 0; i < 4; i++) { @@ -1313,9 +1314,19 @@ fs_inst * fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, int sampler) { - int mlen = 1; /* g0 header always present. */ - int base_mrf = 1; + int mlen = 0; + int base_mrf = 2; int reg_width = c->dispatch_width / 8; + bool header_present = false; + + if (ir->offset) { + /* The TXD offsets set up by the ir_texture visitor are in the + * m1 header, so we can't go headerless. + */ + header_present = true; + mlen++; + base_mrf--; + } for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { fs_inst *inst = emit(BRW_OPCODE_MOV, @@ -1328,7 +1339,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, mlen += ir->coordinate->type->vector_elements * reg_width; if (ir->shadow_comparitor) { - mlen = MAX2(mlen, 1 + 4 * reg_width); + mlen = MAX2(mlen, header_present + 4 * reg_width); ir->shadow_comparitor->accept(this); emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result); @@ -1342,7 +1353,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, break; case ir_txb: ir->lod_info.bias->accept(this); - mlen = MAX2(mlen, 1 + 4 * reg_width); + mlen = MAX2(mlen, header_present + 4 * reg_width); emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result); mlen += reg_width; @@ -1351,7 +1362,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, break; case ir_txl: ir->lod_info.lod->accept(this); - mlen = MAX2(mlen, 1 + 4 * reg_width); + mlen = MAX2(mlen, header_present + 4 * reg_width); emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result); mlen += reg_width; @@ -1364,6 +1375,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate, } inst->base_mrf = base_mrf; inst->mlen = mlen; + inst->header_present = header_present; if (mlen > 11) { fail("Message length >11 disallowed by hardware\n"); @@ -1546,7 +1558,7 @@ fs_visitor::visit(ir_texture *ir) /* If there's an offset, we already set up m1. To avoid the implied move, * use the null register. Otherwise, we want an implied move from g0. */ - if (ir->offset != NULL) + if (ir->offset != NULL || !inst->header_present) inst->src[0] = fs_reg(brw_null_reg()); else inst->src[0] = fs_reg(retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW)); @@ -2618,7 +2630,7 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src) rlen, inst->mlen, 0, - 1, + inst->header_present, simd_mode); } -- cgit v1.2.3 From 64f8ddaf9b89e99396862fa38af631dd08b8c0c5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 May 2011 14:19:51 -0700 Subject: i965/gen6: Add support for point min/max size from ARB_point_parameters. Fixes glean pointAtten. --- src/mesa/drivers/dri/i965/gen6_sf_state.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c index 8c06ff8f190..84028e4e758 100644 --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c @@ -103,6 +103,7 @@ upload_sf_state(struct brw_context *brw) int attr = 0; int urb_start; int two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide); + float point_size; /* _NEW_TRANSFORM */ if (ctx->Transform.ClipPlanesEnabled) @@ -209,8 +210,12 @@ upload_sf_state(struct brw_context *brw) ctx->Point._Attenuated)) dw4 |= GEN6_SF_USE_STATE_POINT_WIDTH; - dw4 |= U_FIXED(CLAMP(ctx->Point.Size, 0.125, 255.875), 3) << - GEN6_SF_POINT_WIDTH_SHIFT; + /* Clamp to ARB_point_parameters user limits */ + point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); + + /* Clamp to the hardware limits and convert to fixed point */ + dw4 |= U_FIXED(CLAMP(point_size, 0.125, 255.875), 3); + if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT) dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT; -- cgit v1.2.3 From a98dd64af750fb6dae54b2dc02e0c5a3711156af Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 13 May 2011 11:54:15 -0700 Subject: i965: Stop caching the combined depth/stencil region in brw_context.c. This was going to get in the way of separate depth/stencil (which wants to know about both, and whether they are the same rb), and also wasn't a sufficient flag for the fix in the following commit. --- src/mesa/drivers/dri/i965/brw_context.h | 24 ------------------- src/mesa/drivers/dri/i965/brw_misc_state.c | 36 +++++++++++++++++++--------- src/mesa/drivers/dri/i965/brw_state_upload.c | 1 - src/mesa/drivers/dri/i965/brw_vtbl.c | 9 ------- src/mesa/drivers/dri/i965/brw_wm_state.c | 6 ++--- src/mesa/drivers/dri/i965/gen7_misc_state.c | 28 ++++++++++++++++++---- src/mesa/drivers/dri/i965/gen7_sf_state.c | 4 ++-- 7 files changed, 53 insertions(+), 55 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 22a6826420f..1d2ef066db2 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -138,7 +138,6 @@ enum brw_state_id { BRW_STATE_INDICES, BRW_STATE_VERTICES, BRW_STATE_BATCH, - BRW_STATE_DEPTH_BUFFER, BRW_STATE_NR_WM_SURFACES, BRW_STATE_NR_VS_SURFACES, BRW_STATE_INDEX_BUFFER, @@ -168,7 +167,6 @@ enum brw_state_id { */ #define BRW_NEW_BATCH (1 << BRW_STATE_BATCH) /** \see brw.state.depth_region */ -#define BRW_NEW_DEPTH_BUFFER (1 << BRW_STATE_DEPTH_BUFFER) #define BRW_NEW_NR_WM_SURFACES (1 << BRW_STATE_NR_WM_SURFACES) #define BRW_NEW_NR_VS_SURFACES (1 << BRW_STATE_NR_VS_SURFACES) #define BRW_NEW_INDEX_BUFFER (1 << BRW_STATE_INDEX_BUFFER) @@ -490,28 +488,6 @@ struct brw_context struct { struct brw_state_flags dirty; - - /** - * \name Cached region pointers - * - * When the draw buffer is updated, often the depth buffer is not - * changed. Caching the pointer to the buffer's region allows us to - * detect when the buffer has in fact changed, and allows us to avoid - * updating the buffer's GPU state when it has not. - * - * The original of each cached pointer is an instance of - * \c intel_renderbuffer.region. - * - * \see brw_set_draw_region() - * - * \{ - */ - - /** \see struct brw_tracked_state brw_depthbuffer */ - struct intel_region *depth_region; - - /** \} */ - /** * List of buffers accumulated in brw_validate_state to receive * drm_intel_bo_check_aperture treatment before exec, so we can diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index cb2814b6eff..938f6cf070d 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -32,6 +32,7 @@ #include "intel_batchbuffer.h" +#include "intel_fbo.h" #include "intel_regions.h" #include "brw_context.h" @@ -193,18 +194,33 @@ const struct brw_tracked_state brw_psp_urb_cbs = { static void prepare_depthbuffer(struct brw_context *brw) { - struct intel_region *region = brw->state.depth_region; - - if (region != NULL) - brw_add_validated_bo(brw, region->buffer); + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + struct gl_framebuffer *fb = ctx->DrawBuffer; + struct intel_renderbuffer *drb = intel_get_renderbuffer(fb, BUFFER_DEPTH); + struct intel_renderbuffer *srb = intel_get_renderbuffer(fb, BUFFER_STENCIL); + + if (drb) + brw_add_validated_bo(brw, drb->region->buffer); + if (srb) + brw_add_validated_bo(brw, srb->region->buffer); } static void emit_depthbuffer(struct brw_context *brw) { struct intel_context *intel = &brw->intel; - struct intel_region *region = brw->state.depth_region; + struct gl_context *ctx = &intel->ctx; + struct gl_framebuffer *fb = ctx->DrawBuffer; + /* _NEW_BUFFERS */ + struct intel_renderbuffer *irb = intel_get_renderbuffer(fb, BUFFER_DEPTH); unsigned int len; + /* If we're combined depth stencil but no depth is attached, look + * up stencil. + */ + if (!irb) + irb = intel_get_renderbuffer(fb, BUFFER_STENCIL); + if (intel->gen >= 6) len = 7; else if (intel->is_g4x || intel->gen == 5) @@ -212,7 +228,7 @@ static void emit_depthbuffer(struct brw_context *brw) else len = 5; - if (region == NULL) { + if (!irb) { BEGIN_BATCH(len); OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2)); OUT_BATCH((BRW_DEPTHFORMAT_D32_FLOAT << 18) | @@ -229,6 +245,7 @@ static void emit_depthbuffer(struct brw_context *brw) ADVANCE_BATCH(); } else { + struct intel_region *region = irb->region; unsigned int format; switch (region->cpp) { @@ -282,13 +299,10 @@ static void emit_depthbuffer(struct brw_context *brw) } } -/** - * \see brw_context.state.depth_region - */ const struct brw_tracked_state brw_depthbuffer = { .dirty = { - .mesa = 0, - .brw = BRW_NEW_DEPTH_BUFFER | BRW_NEW_BATCH, + .mesa = _NEW_BUFFERS, + .brw = BRW_NEW_BATCH, .cache = 0, }, .prepare = prepare_depthbuffer, diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index f4a7048f525..6a4c112dcf5 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -371,7 +371,6 @@ static struct dirty_bit_map brw_bits[] = { DEFINE_BIT(BRW_NEW_INDEX_BUFFER), DEFINE_BIT(BRW_NEW_VERTICES), DEFINE_BIT(BRW_NEW_BATCH), - DEFINE_BIT(BRW_NEW_DEPTH_BUFFER), DEFINE_BIT(BRW_NEW_NR_WM_SURFACES), DEFINE_BIT(BRW_NEW_NR_VS_SURFACES), DEFINE_BIT(BRW_NEW_VS_CONSTBUF), diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 28d5f62f34b..9f99ef57214 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -68,8 +68,6 @@ static void brw_destroy_context( struct intel_context *intel ) brw_clear_validated_bos(brw); ralloc_free(brw->wm.compile_data); - intel_region_release(&brw->state.depth_region); - dri_bo_release(&brw->curbe.curbe_bo); dri_bo_release(&brw->vs.prog_bo); dri_bo_release(&brw->vs.const_bo); @@ -93,13 +91,6 @@ static void brw_set_draw_region( struct intel_context *intel, struct intel_region *depth_region, GLuint num_color_regions) { - struct brw_context *brw = brw_context(&intel->ctx); - - if (brw->state.depth_region != depth_region) { - brw->state.dirty.brw |= BRW_NEW_DEPTH_BUFFER; - intel_region_release(&brw->state.depth_region); - intel_region_reference(&brw->state.depth_region, depth_region); - } } diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c index a91ae511b7f..a356711470a 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_state.c @@ -31,6 +31,7 @@ +#include "intel_fbo.h" #include "brw_context.h" #include "brw_state.h" #include "brw_defines.h" @@ -144,11 +145,11 @@ brw_prepare_wm_unit(struct brw_context *brw) (1 << FRAG_ATTRIB_WPOS)) != 0; wm->wm5.program_computes_depth = (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) != 0; - /* BRW_NEW_DEPTH_BUFFER + /* _NEW_BUFFERS * Override for NULL depthbuffer case, required by the Pixel Shader Computed * Depth field. */ - if (brw->state.depth_region == NULL) + if (!intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_DEPTH)) wm->wm5.program_computes_depth = 0; /* _NEW_COLOR */ @@ -266,7 +267,6 @@ const struct brw_tracked_state brw_wm_unit = { .brw = (BRW_NEW_BATCH | BRW_NEW_FRAGMENT_PROGRAM | BRW_NEW_CURBE_OFFSETS | - BRW_NEW_DEPTH_BUFFER | BRW_NEW_NR_WM_SURFACES), .cache = (CACHE_NEW_WM_PROG | diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c index adcb31f7a95..68a222eb3fb 100644 --- a/src/mesa/drivers/dri/i965/gen7_misc_state.c +++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c @@ -23,6 +23,7 @@ #include "intel_batchbuffer.h" #include "intel_regions.h" +#include "intel_fbo.h" #include "brw_context.h" #include "brw_state.h" #include "brw_defines.h" @@ -30,10 +31,18 @@ unsigned int gen7_depth_format(struct brw_context *brw) { - struct intel_region *region = brw->state.depth_region; struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; + struct gl_framebuffer *fb = ctx->DrawBuffer; + struct intel_renderbuffer *drb = intel_get_renderbuffer(fb, BUFFER_DEPTH); + struct intel_renderbuffer *srb = intel_get_renderbuffer(fb, BUFFER_STENCIL); + struct intel_region *region = NULL; - if (region == NULL) + if (drb) + region = drb->region; + else if (srb) + region = srb->region; + else return BRW_DEPTHFORMAT_D32_FLOAT; switch (region->cpp) { @@ -52,9 +61,18 @@ gen7_depth_format(struct brw_context *brw) static void emit_depthbuffer(struct brw_context *brw) { - struct intel_region *region = brw->state.depth_region; struct intel_context *intel = &brw->intel; struct gl_context *ctx = &intel->ctx; + struct gl_framebuffer *fb = ctx->DrawBuffer; + struct intel_renderbuffer *drb = intel_get_renderbuffer(fb, BUFFER_DEPTH); + struct intel_renderbuffer *srb = intel_get_renderbuffer(fb, BUFFER_STENCIL); + struct intel_region *region = NULL; + + /* _NEW_BUFFERS */ + if (drb) + region = drb->region; + else if (srb) + region = srb->region; if (region == NULL) { BEGIN_BATCH(7); @@ -114,8 +132,8 @@ static void emit_depthbuffer(struct brw_context *brw) */ const struct brw_tracked_state gen7_depthbuffer = { .dirty = { - .mesa = 0, - .brw = BRW_NEW_DEPTH_BUFFER | BRW_NEW_BATCH, + .mesa = _NEW_BUFFERS, + .brw = BRW_NEW_BATCH, .cache = 0, }, .emit = emit_depthbuffer, diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c index d1bf8a81874..99efe96a1fa 100644 --- a/src/mesa/drivers/dri/i965/gen7_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c @@ -128,6 +128,7 @@ upload_sf_state(struct brw_context *brw) dw1 = GEN6_SF_STATISTICS_ENABLE | GEN6_SF_VIEWPORT_TRANSFORM_ENABLE; + /* _NEW_BUFFERS */ dw1 |= (gen7_depth_format(brw) << GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT); /* _NEW_POLYGON */ @@ -258,8 +259,7 @@ const struct brw_tracked_state gen7_sf_state = { _NEW_SCISSOR | _NEW_BUFFERS | _NEW_POINT), - .brw = (BRW_NEW_CONTEXT | - BRW_NEW_DEPTH_BUFFER), + .brw = (BRW_NEW_CONTEXT), .cache = CACHE_NEW_VS_PROG }, .emit = upload_sf_state, -- cgit v1.2.3 From 3e43adef95ee24dd218279d2de56939b90edcb4c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 13 May 2011 12:13:40 -0700 Subject: i965: Add support for rendering to depthbuffer mipmap levels > 0. Fixes GL_ARB_depth_texture/fbo-clear-formats GL_EXT_packed_depth_stencil/fbo-clear-formats --- src/mesa/drivers/dri/i965/brw_misc_state.c | 10 ++++-- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 41 +++++++----------------- src/mesa/drivers/dri/intel/intel_regions.c | 35 ++++++++++++++++++++ src/mesa/drivers/dri/intel/intel_regions.h | 4 +++ 4 files changed, 58 insertions(+), 32 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index 938f6cf070d..3ec90096212 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -247,6 +247,7 @@ static void emit_depthbuffer(struct brw_context *brw) } else { struct intel_region *region = irb->region; unsigned int format; + uint32_t tile_x, tile_y, offset; switch (region->cpp) { case 2: @@ -263,7 +264,8 @@ static void emit_depthbuffer(struct brw_context *brw) return; } - assert(region->tiling != I915_TILING_X); + offset = intel_region_tile_offsets(region, &tile_x, &tile_y); + assert(intel->gen < 6 || region->tiling == I915_TILING_Y); BEGIN_BATCH(len); @@ -275,14 +277,16 @@ static void emit_depthbuffer(struct brw_context *brw) (BRW_SURFACE_2D << 29)); OUT_RELOC(region->buffer, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, - 0); + offset); OUT_BATCH((BRW_SURFACE_MIPMAPLAYOUT_BELOW << 1) | ((region->width - 1) << 6) | ((region->height - 1) << 19)); OUT_BATCH(0); if (intel->is_g4x || intel->gen >= 5) - OUT_BATCH(0); + OUT_BATCH(tile_x | (tile_y << 16)); + else + assert(tile_x == 0 && tile_y == 0); if (intel->gen >= 6) OUT_BATCH(0); diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index cef0c65e478..de1953ed600 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -450,6 +450,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw, struct intel_renderbuffer *irb = intel_renderbuffer(rb); struct intel_region *region = irb->region; struct brw_surface_state *surf; + uint32_t tile_x, tile_y; surf = brw_state_batch(brw, sizeof(*surf), 32, &brw->wm.surf_offset[unit]); @@ -488,37 +489,19 @@ brw_update_renderbuffer_surface(struct brw_context *brw, } surf->ss0.surface_type = BRW_SURFACE_2D; - if (region->tiling == I915_TILING_NONE) { - surf->ss1.base_addr = (region->draw_x + - region->draw_y * region->pitch) * region->cpp; - } else { - uint32_t tile_base, tile_x, tile_y; - uint32_t pitch = region->pitch * region->cpp; - - if (region->tiling == I915_TILING_X) { - tile_x = region->draw_x % (512 / region->cpp); - tile_y = region->draw_y % 8; - tile_base = ((region->draw_y / 8) * (8 * pitch)); - tile_base += (region->draw_x - tile_x) / (512 / region->cpp) * 4096; - } else { - /* Y */ - tile_x = region->draw_x % (128 / region->cpp); - tile_y = region->draw_y % 32; - tile_base = ((region->draw_y / 32) * (32 * pitch)); - tile_base += (region->draw_x - tile_x) / (128 / region->cpp) * 4096; - } - assert(brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0)); - assert(tile_x % 4 == 0); - assert(tile_y % 2 == 0); - /* Note that the low bits of these fields are missing, so - * there's the possibility of getting in trouble. - */ - surf->ss1.base_addr = tile_base; - surf->ss5.x_offset = tile_x / 4; - surf->ss5.y_offset = tile_y / 2; - } + /* reloc */ + surf->ss1.base_addr = intel_region_tile_offsets(region, &tile_x, &tile_y); surf->ss1.base_addr += region->buffer->offset; /* reloc */ + assert(brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0)); + /* Note that the low bits of these fields are missing, so + * there's the possibility of getting in trouble. + */ + assert(tile_x % 4 == 0); + assert(tile_y % 2 == 0); + surf->ss5.x_offset = tile_x / 4; + surf->ss5.y_offset = tile_y / 2; + surf->ss2.width = rb->Width - 1; surf->ss2.height = rb->Height - 1; brw_set_surface_tiling(surf, region->tiling); diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c index a4da1ce4fa5..0253bbc2aa0 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.c +++ b/src/mesa/drivers/dri/intel/intel_regions.c @@ -524,3 +524,38 @@ intel_region_buffer(struct intel_context *intel, return region->buffer; } + +/** + * Rendering to tiled buffers requires that the base address of the + * buffer be aligned to a page boundary. We generally render to + * textures by pointing the surface at the mipmap image level, which + * may not be aligned to a tile boundary. + * + * This function returns an appropriately-aligned base offset + * according to the tiling restrictions, plus any required x/y offset + * from there. + */ +uint32_t +intel_region_tile_offsets(struct intel_region *region, + uint32_t *tile_x, + uint32_t *tile_y) +{ + uint32_t pitch = region->pitch * region->cpp; + + if (region->tiling == I915_TILING_NONE) { + *tile_x = 0; + *tile_y = 0; + return region->draw_x * region->cpp + region->draw_y * pitch; + } else if (region->tiling == I915_TILING_X) { + *tile_x = region->draw_x % (512 / region->cpp); + *tile_y = region->draw_y % 8; + return ((region->draw_y / 8) * (8 * pitch) + + (region->draw_x - *tile_x) / (512 / region->cpp) * 4096); + } else { + assert(region->tiling == I915_TILING_Y); + *tile_x = region->draw_x % (128 / region->cpp); + *tile_y = region->draw_y % 32; + return ((region->draw_y / 32) * (32 * pitch) + + (region->draw_x - *tile_x) / (128 / region->cpp) * 4096); + } +} diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h index 8464a5e937d..a8a300d863c 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.h +++ b/src/mesa/drivers/dri/intel/intel_regions.h @@ -142,6 +142,10 @@ drm_intel_bo *intel_region_buffer(struct intel_context *intel, struct intel_region *region, GLuint flag); +uint32_t intel_region_tile_offsets(struct intel_region *region, + uint32_t *tile_x, + uint32_t *tile_y); + void _mesa_copy_rect(GLubyte * dst, GLuint cpp, GLuint dst_pitch, -- cgit v1.2.3 From bfaa458445978b5210e6866256d19448db2c6dd0 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 16 May 2011 16:29:53 -0400 Subject: wayland: Fix link order for libwayland-drm.a --- src/egl/main/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index 6c242557e7f..6c4a392760f 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -54,10 +54,6 @@ OBJECTS = $(SOURCES:.c=.o) LOCAL_CFLAGS = -D_EGL_OS_UNIX=1 LOCAL_LIBS = -ifneq ($(findstring wayland, $(EGL_PLATFORMS)),) -LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a -endif - # egl_dri2 and egl_glx are built-ins ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2) LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2 @@ -68,6 +64,10 @@ endif EGL_LIB_DEPS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS) endif +ifneq ($(findstring wayland, $(EGL_PLATFORMS)),) +LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a +endif + ifeq ($(filter glx, $(EGL_DRIVERS_DIRS)),glx) LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX LOCAL_LIBS += $(TOP)/src/egl/drivers/glx/libegl_glx.a -- cgit v1.2.3 From 116133af3499947500a6d0c877fbc8f564ee4c76 Mon Sep 17 00:00:00 2001 From: Maxim Levitsky Date: Thu, 19 May 2011 12:50:28 +0200 Subject: nv50: add support for user clip planes Clip distance is calculated each time vertex position is written which is suboptiomal is some cases but very safe. User clip planes are an obsolete feature anyway. Every time number of clip planes increases, the vertex program is recompiled. That ensures no overhead in normal case (no user clip planes) and reasonable overhead otherwise. Fixes 3D windows in compiz, and reflection effect in neverball. Also fixes compiz expo plugin when windows were dragged and each window shown 3 times. --- src/gallium/drivers/nv50/nv50_program.c | 3 +++ src/gallium/drivers/nv50/nv50_shader_state.c | 8 +++++++- src/gallium/drivers/nv50/nv50_state_validate.c | 3 +++ src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | 27 ++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 41d3e14dc0f..4def93d6b84 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -395,6 +395,9 @@ nv50_vertprog_prepare(struct nv50_translation_info *ti) } } + p->vp.clpd = p->max_out; + p->max_out += p->vp.clpd_nr; + for (i = 0; i < TGSI_SEMANTIC_COUNT; ++i) { switch (ti->sysval_map[i]) { case 2: diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c index 82c346cb5ea..5d3f52c38c1 100644 --- a/src/gallium/drivers/nv50/nv50_shader_state.c +++ b/src/gallium/drivers/nv50/nv50_shader_state.c @@ -170,6 +170,12 @@ nv50_vertprog_validate(struct nv50_context *nv50) struct nouveau_channel *chan = nv50->screen->base.channel; struct nv50_program *vp = nv50->vertprog; + if (nv50->clip.nr > vp->vp.clpd_nr) { + if (vp->translated) + nv50_program_destroy(nv50, vp); + vp->vp.clpd_nr = nv50->clip.nr; + } + if (!nv50_program_validate(nv50, vp)) return; @@ -369,7 +375,7 @@ nv50_fp_linkage_validate(struct nv50_context *nv50) m = nv50_vec4_map(map, 0, lin, &dummy, &vp->out[0]); for (c = 0; c < vp->vp.clpd_nr; ++c) - map[m++] |= vp->vp.clpd + c; + map[m++] = vp->vp.clpd + c; colors |= m << 8; /* adjust BFC0 id */ diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c index cdf1a982fcc..11561f5a8e6 100644 --- a/src/gallium/drivers/nv50/nv50_state_validate.c +++ b/src/gallium/drivers/nv50/nv50_state_validate.c @@ -225,6 +225,9 @@ nv50_validate_clip(struct nv50_context *nv50) BEGIN_RING(chan, RING_3D(VP_CLIP_DISTANCE_ENABLE), 1); OUT_RING (chan, (1 << nv50->clip.nr) - 1); + + if (nv50->vertprog && nv50->clip.nr > nv50->vertprog->vp.clpd_nr) + nv50->dirty |= NV50_NEW_VERTPROG; } static void diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c index 25dcaaea14f..15aa40cddd1 100644 --- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c +++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c @@ -1552,6 +1552,8 @@ static void bld_instruction(struct bld_context *bld, const struct tgsi_full_instruction *insn) { + struct nv50_program *prog = bld->ti->p; + const struct tgsi_full_dst_register *dreg = &insn->Dst[0]; struct nv_value *src0; struct nv_value *src1; struct nv_value *src2; @@ -1990,6 +1992,31 @@ bld_instruction(struct bld_context *bld, FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) emit_store(bld, insn, c, dst0[c]); + + if (prog->type == PIPE_SHADER_VERTEX && prog->vp.clpd_nr && + dreg->Register.File == TGSI_FILE_OUTPUT && !dreg->Register.Indirect && + prog->out[dreg->Register.Index].sn == TGSI_SEMANTIC_POSITION) { + + int p; + for (p = 0; p < prog->vp.clpd_nr; p++) { + struct nv_value *clipd = NULL; + + for (c = 0; c < 4; c++) { + temp = new_value(bld->pc, NV_FILE_MEM_C(15), NV_TYPE_F32); + temp->reg.id = p * 4 + c; + temp = bld_insn_1(bld, NV_OP_LDA, temp); + + clipd = clipd ? + bld_insn_3(bld, NV_OP_MAD, dst0[c], temp, clipd) : + bld_insn_2(bld, NV_OP_MUL, dst0[c], temp); + } + + temp = bld_insn_1(bld, NV_OP_MOV, clipd); + temp->reg.file = NV_FILE_OUT; + temp->reg.id = bld->ti->p->vp.clpd + p; + temp->insn->fixed = 1; + } + } } static INLINE void -- cgit v1.2.3 From f4a98688113ef189ed2017b12d41915e2bc034de Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 19 May 2011 16:39:57 +0100 Subject: mesa: add another missing GLAPIENTRY keyword NOTE: this is a candidate for the 7.10 branch. --- src/mesa/main/blend.c | 2 +- src/mesa/main/blend.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 95c101c34ae..1856f00d53b 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -447,7 +447,7 @@ _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ) /** * Set separate blend equations for one color buffer/target. */ -void +void GLAPIENTRY _mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h index 39e7c9fd49b..d74f17ef160 100644 --- a/src/mesa/main/blend.h +++ b/src/mesa/main/blend.h @@ -68,7 +68,7 @@ extern void GLAPIENTRY _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ); -extern void +extern void GLAPIENTRY _mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA); -- cgit v1.2.3 From ec4dfc2aad16ed3d04f47657e9f2cb22e791d511 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 19 May 2011 16:49:49 +0100 Subject: glapi: Implement SET_xxx as inline functions instead of macros. In order to have the benefit of type checking, and detect missing GLAPIENTRY keywords on public entrypoints. --- src/mapi/glapi/gen/gl_table.py | 5 +- src/mesa/main/glapidispatch.h | 4640 ++++++++++++++++++++++++++++++++-------- 2 files changed, 3716 insertions(+), 929 deletions(-) diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py index c7cb5a40a1c..f590c76c3b2 100644 --- a/src/mapi/glapi/gen/gl_table.py +++ b/src/mapi/glapi/gen/gl_table.py @@ -171,7 +171,10 @@ class PrintRemapTable(gl_XML.gl_print_base): print '#define CALL_%s(disp, parameters) CALL_by_offset(disp, (%s), _gloffset_%s, parameters)' % (f.name, cast, f.name) print '#define GET_%s(disp) GET_by_offset(disp, _gloffset_%s)' % (f.name, f.name) - print '#define SET_%s(disp, fn) SET_by_offset(disp, _gloffset_%s, fn)' % (f.name, f.name) + print 'static void INLINE SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string) + print ' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name) + print '}' + print if alias_functions: print '' diff --git a/src/mesa/main/glapidispatch.h b/src/mesa/main/glapidispatch.h index 93cc0122df0..1d62b08256c 100644 --- a/src/mesa/main/glapidispatch.h +++ b/src/mesa/main/glapidispatch.h @@ -2044,2787 +2044,5571 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_NewList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_NewList, parameters) #define GET_NewList(disp) GET_by_offset(disp, _gloffset_NewList) -#define SET_NewList(disp, fn) SET_by_offset(disp, _gloffset_NewList, fn) +static void INLINE SET_NewList(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_NewList, fn); +} + #define CALL_EndList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndList, parameters) #define GET_EndList(disp) GET_by_offset(disp, _gloffset_EndList) -#define SET_EndList(disp, fn) SET_by_offset(disp, _gloffset_EndList, fn) +static void INLINE SET_EndList(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndList, fn); +} + #define CALL_CallList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_CallList, parameters) #define GET_CallList(disp) GET_by_offset(disp, _gloffset_CallList) -#define SET_CallList(disp, fn) SET_by_offset(disp, _gloffset_CallList, fn) +static void INLINE SET_CallList(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_CallList, fn); +} + #define CALL_CallLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, const GLvoid *)), _gloffset_CallLists, parameters) #define GET_CallLists(disp) GET_by_offset(disp, _gloffset_CallLists) -#define SET_CallLists(disp, fn) SET_by_offset(disp, _gloffset_CallLists, fn) +static void INLINE SET_CallLists(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CallLists, fn); +} + #define CALL_DeleteLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei)), _gloffset_DeleteLists, parameters) #define GET_DeleteLists(disp) GET_by_offset(disp, _gloffset_DeleteLists) -#define SET_DeleteLists(disp, fn) SET_by_offset(disp, _gloffset_DeleteLists, fn) +static void INLINE SET_DeleteLists(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei)) { + SET_by_offset(disp, _gloffset_DeleteLists, fn); +} + #define CALL_GenLists(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLsizei)), _gloffset_GenLists, parameters) #define GET_GenLists(disp) GET_by_offset(disp, _gloffset_GenLists) -#define SET_GenLists(disp, fn) SET_by_offset(disp, _gloffset_GenLists, fn) +static void INLINE SET_GenLists(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLsizei)) { + SET_by_offset(disp, _gloffset_GenLists, fn); +} + #define CALL_ListBase(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ListBase, parameters) #define GET_ListBase(disp) GET_by_offset(disp, _gloffset_ListBase) -#define SET_ListBase(disp, fn) SET_by_offset(disp, _gloffset_ListBase, fn) +static void INLINE SET_ListBase(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_ListBase, fn); +} + #define CALL_Begin(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Begin, parameters) #define GET_Begin(disp) GET_by_offset(disp, _gloffset_Begin) -#define SET_Begin(disp, fn) SET_by_offset(disp, _gloffset_Begin, fn) +static void INLINE SET_Begin(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_Begin, fn); +} + #define CALL_Bitmap(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)), _gloffset_Bitmap, parameters) #define GET_Bitmap(disp) GET_by_offset(disp, _gloffset_Bitmap) -#define SET_Bitmap(disp, fn) SET_by_offset(disp, _gloffset_Bitmap, fn) +static void INLINE SET_Bitmap(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)) { + SET_by_offset(disp, _gloffset_Bitmap, fn); +} + #define CALL_Color3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Color3b, parameters) #define GET_Color3b(disp) GET_by_offset(disp, _gloffset_Color3b) -#define SET_Color3b(disp, fn) SET_by_offset(disp, _gloffset_Color3b, fn) +static void INLINE SET_Color3b(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_Color3b, fn); +} + #define CALL_Color3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color3bv, parameters) #define GET_Color3bv(disp) GET_by_offset(disp, _gloffset_Color3bv) -#define SET_Color3bv(disp, fn) SET_by_offset(disp, _gloffset_Color3bv, fn) +static void INLINE SET_Color3bv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_Color3bv, fn); +} + #define CALL_Color3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Color3d, parameters) #define GET_Color3d(disp) GET_by_offset(disp, _gloffset_Color3d) -#define SET_Color3d(disp, fn) SET_by_offset(disp, _gloffset_Color3d, fn) +static void INLINE SET_Color3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Color3d, fn); +} + #define CALL_Color3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color3dv, parameters) #define GET_Color3dv(disp) GET_by_offset(disp, _gloffset_Color3dv) -#define SET_Color3dv(disp, fn) SET_by_offset(disp, _gloffset_Color3dv, fn) +static void INLINE SET_Color3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Color3dv, fn); +} + #define CALL_Color3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Color3f, parameters) #define GET_Color3f(disp) GET_by_offset(disp, _gloffset_Color3f) -#define SET_Color3f(disp, fn) SET_by_offset(disp, _gloffset_Color3f, fn) +static void INLINE SET_Color3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Color3f, fn); +} + #define CALL_Color3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color3fv, parameters) #define GET_Color3fv(disp) GET_by_offset(disp, _gloffset_Color3fv) -#define SET_Color3fv(disp, fn) SET_by_offset(disp, _gloffset_Color3fv, fn) +static void INLINE SET_Color3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Color3fv, fn); +} + #define CALL_Color3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Color3i, parameters) #define GET_Color3i(disp) GET_by_offset(disp, _gloffset_Color3i) -#define SET_Color3i(disp, fn) SET_by_offset(disp, _gloffset_Color3i, fn) +static void INLINE SET_Color3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Color3i, fn); +} + #define CALL_Color3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color3iv, parameters) #define GET_Color3iv(disp) GET_by_offset(disp, _gloffset_Color3iv) -#define SET_Color3iv(disp, fn) SET_by_offset(disp, _gloffset_Color3iv, fn) +static void INLINE SET_Color3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Color3iv, fn); +} + #define CALL_Color3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Color3s, parameters) #define GET_Color3s(disp) GET_by_offset(disp, _gloffset_Color3s) -#define SET_Color3s(disp, fn) SET_by_offset(disp, _gloffset_Color3s, fn) +static void INLINE SET_Color3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Color3s, fn); +} + #define CALL_Color3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color3sv, parameters) #define GET_Color3sv(disp) GET_by_offset(disp, _gloffset_Color3sv) -#define SET_Color3sv(disp, fn) SET_by_offset(disp, _gloffset_Color3sv, fn) +static void INLINE SET_Color3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Color3sv, fn); +} + #define CALL_Color3ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_Color3ub, parameters) #define GET_Color3ub(disp) GET_by_offset(disp, _gloffset_Color3ub) -#define SET_Color3ub(disp, fn) SET_by_offset(disp, _gloffset_Color3ub, fn) +static void INLINE SET_Color3ub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_Color3ub, fn); +} + #define CALL_Color3ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color3ubv, parameters) #define GET_Color3ubv(disp) GET_by_offset(disp, _gloffset_Color3ubv) -#define SET_Color3ubv(disp, fn) SET_by_offset(disp, _gloffset_Color3ubv, fn) +static void INLINE SET_Color3ubv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_Color3ubv, fn); +} + #define CALL_Color3ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_Color3ui, parameters) #define GET_Color3ui(disp) GET_by_offset(disp, _gloffset_Color3ui) -#define SET_Color3ui(disp, fn) SET_by_offset(disp, _gloffset_Color3ui, fn) +static void INLINE SET_Color3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Color3ui, fn); +} + #define CALL_Color3uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color3uiv, parameters) #define GET_Color3uiv(disp) GET_by_offset(disp, _gloffset_Color3uiv) -#define SET_Color3uiv(disp, fn) SET_by_offset(disp, _gloffset_Color3uiv, fn) +static void INLINE SET_Color3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) { + SET_by_offset(disp, _gloffset_Color3uiv, fn); +} + #define CALL_Color3us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_Color3us, parameters) #define GET_Color3us(disp) GET_by_offset(disp, _gloffset_Color3us) -#define SET_Color3us(disp, fn) SET_by_offset(disp, _gloffset_Color3us, fn) +static void INLINE SET_Color3us(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort)) { + SET_by_offset(disp, _gloffset_Color3us, fn); +} + #define CALL_Color3usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color3usv, parameters) #define GET_Color3usv(disp) GET_by_offset(disp, _gloffset_Color3usv) -#define SET_Color3usv(disp, fn) SET_by_offset(disp, _gloffset_Color3usv, fn) +static void INLINE SET_Color3usv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) { + SET_by_offset(disp, _gloffset_Color3usv, fn); +} + #define CALL_Color4b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte, GLbyte)), _gloffset_Color4b, parameters) #define GET_Color4b(disp) GET_by_offset(disp, _gloffset_Color4b) -#define SET_Color4b(disp, fn) SET_by_offset(disp, _gloffset_Color4b, fn) +static void INLINE SET_Color4b(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_Color4b, fn); +} + #define CALL_Color4bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color4bv, parameters) #define GET_Color4bv(disp) GET_by_offset(disp, _gloffset_Color4bv) -#define SET_Color4bv(disp, fn) SET_by_offset(disp, _gloffset_Color4bv, fn) +static void INLINE SET_Color4bv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_Color4bv, fn); +} + #define CALL_Color4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Color4d, parameters) #define GET_Color4d(disp) GET_by_offset(disp, _gloffset_Color4d) -#define SET_Color4d(disp, fn) SET_by_offset(disp, _gloffset_Color4d, fn) +static void INLINE SET_Color4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Color4d, fn); +} + #define CALL_Color4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color4dv, parameters) #define GET_Color4dv(disp) GET_by_offset(disp, _gloffset_Color4dv) -#define SET_Color4dv(disp, fn) SET_by_offset(disp, _gloffset_Color4dv, fn) +static void INLINE SET_Color4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Color4dv, fn); +} + #define CALL_Color4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Color4f, parameters) #define GET_Color4f(disp) GET_by_offset(disp, _gloffset_Color4f) -#define SET_Color4f(disp, fn) SET_by_offset(disp, _gloffset_Color4f, fn) +static void INLINE SET_Color4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Color4f, fn); +} + #define CALL_Color4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color4fv, parameters) #define GET_Color4fv(disp) GET_by_offset(disp, _gloffset_Color4fv) -#define SET_Color4fv(disp, fn) SET_by_offset(disp, _gloffset_Color4fv, fn) +static void INLINE SET_Color4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Color4fv, fn); +} + #define CALL_Color4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Color4i, parameters) #define GET_Color4i(disp) GET_by_offset(disp, _gloffset_Color4i) -#define SET_Color4i(disp, fn) SET_by_offset(disp, _gloffset_Color4i, fn) +static void INLINE SET_Color4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Color4i, fn); +} + #define CALL_Color4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color4iv, parameters) #define GET_Color4iv(disp) GET_by_offset(disp, _gloffset_Color4iv) -#define SET_Color4iv(disp, fn) SET_by_offset(disp, _gloffset_Color4iv, fn) +static void INLINE SET_Color4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Color4iv, fn); +} + #define CALL_Color4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Color4s, parameters) #define GET_Color4s(disp) GET_by_offset(disp, _gloffset_Color4s) -#define SET_Color4s(disp, fn) SET_by_offset(disp, _gloffset_Color4s, fn) +static void INLINE SET_Color4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Color4s, fn); +} + #define CALL_Color4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color4sv, parameters) #define GET_Color4sv(disp) GET_by_offset(disp, _gloffset_Color4sv) -#define SET_Color4sv(disp, fn) SET_by_offset(disp, _gloffset_Color4sv, fn) +static void INLINE SET_Color4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Color4sv, fn); +} + #define CALL_Color4ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_Color4ub, parameters) #define GET_Color4ub(disp) GET_by_offset(disp, _gloffset_Color4ub) -#define SET_Color4ub(disp, fn) SET_by_offset(disp, _gloffset_Color4ub, fn) +static void INLINE SET_Color4ub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_Color4ub, fn); +} + #define CALL_Color4ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color4ubv, parameters) #define GET_Color4ubv(disp) GET_by_offset(disp, _gloffset_Color4ubv) -#define SET_Color4ubv(disp, fn) SET_by_offset(disp, _gloffset_Color4ubv, fn) +static void INLINE SET_Color4ubv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_Color4ubv, fn); +} + #define CALL_Color4ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_Color4ui, parameters) #define GET_Color4ui(disp) GET_by_offset(disp, _gloffset_Color4ui) -#define SET_Color4ui(disp, fn) SET_by_offset(disp, _gloffset_Color4ui, fn) +static void INLINE SET_Color4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Color4ui, fn); +} + #define CALL_Color4uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color4uiv, parameters) #define GET_Color4uiv(disp) GET_by_offset(disp, _gloffset_Color4uiv) -#define SET_Color4uiv(disp, fn) SET_by_offset(disp, _gloffset_Color4uiv, fn) +static void INLINE SET_Color4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) { + SET_by_offset(disp, _gloffset_Color4uiv, fn); +} + #define CALL_Color4us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort, GLushort)), _gloffset_Color4us, parameters) #define GET_Color4us(disp) GET_by_offset(disp, _gloffset_Color4us) -#define SET_Color4us(disp, fn) SET_by_offset(disp, _gloffset_Color4us, fn) +static void INLINE SET_Color4us(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort, GLushort)) { + SET_by_offset(disp, _gloffset_Color4us, fn); +} + #define CALL_Color4usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color4usv, parameters) #define GET_Color4usv(disp) GET_by_offset(disp, _gloffset_Color4usv) -#define SET_Color4usv(disp, fn) SET_by_offset(disp, _gloffset_Color4usv, fn) +static void INLINE SET_Color4usv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) { + SET_by_offset(disp, _gloffset_Color4usv, fn); +} + #define CALL_EdgeFlag(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_EdgeFlag, parameters) #define GET_EdgeFlag(disp) GET_by_offset(disp, _gloffset_EdgeFlag) -#define SET_EdgeFlag(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlag, fn) +static void INLINE SET_EdgeFlag(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean)) { + SET_by_offset(disp, _gloffset_EdgeFlag, fn); +} + #define CALL_EdgeFlagv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLboolean *)), _gloffset_EdgeFlagv, parameters) #define GET_EdgeFlagv(disp) GET_by_offset(disp, _gloffset_EdgeFlagv) -#define SET_EdgeFlagv(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagv, fn) +static void INLINE SET_EdgeFlagv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLboolean *)) { + SET_by_offset(disp, _gloffset_EdgeFlagv, fn); +} + #define CALL_End(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_End, parameters) #define GET_End(disp) GET_by_offset(disp, _gloffset_End) -#define SET_End(disp, fn) SET_by_offset(disp, _gloffset_End, fn) +static void INLINE SET_End(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_End, fn); +} + #define CALL_Indexd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_Indexd, parameters) #define GET_Indexd(disp) GET_by_offset(disp, _gloffset_Indexd) -#define SET_Indexd(disp, fn) SET_by_offset(disp, _gloffset_Indexd, fn) +static void INLINE SET_Indexd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_Indexd, fn); +} + #define CALL_Indexdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Indexdv, parameters) #define GET_Indexdv(disp) GET_by_offset(disp, _gloffset_Indexdv) -#define SET_Indexdv(disp, fn) SET_by_offset(disp, _gloffset_Indexdv, fn) +static void INLINE SET_Indexdv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Indexdv, fn); +} + #define CALL_Indexf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_Indexf, parameters) #define GET_Indexf(disp) GET_by_offset(disp, _gloffset_Indexf) -#define SET_Indexf(disp, fn) SET_by_offset(disp, _gloffset_Indexf, fn) +static void INLINE SET_Indexf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_Indexf, fn); +} + #define CALL_Indexfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Indexfv, parameters) #define GET_Indexfv(disp) GET_by_offset(disp, _gloffset_Indexfv) -#define SET_Indexfv(disp, fn) SET_by_offset(disp, _gloffset_Indexfv, fn) +static void INLINE SET_Indexfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Indexfv, fn); +} + #define CALL_Indexi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_Indexi, parameters) #define GET_Indexi(disp) GET_by_offset(disp, _gloffset_Indexi) -#define SET_Indexi(disp, fn) SET_by_offset(disp, _gloffset_Indexi, fn) +static void INLINE SET_Indexi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_Indexi, fn); +} + #define CALL_Indexiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Indexiv, parameters) #define GET_Indexiv(disp) GET_by_offset(disp, _gloffset_Indexiv) -#define SET_Indexiv(disp, fn) SET_by_offset(disp, _gloffset_Indexiv, fn) +static void INLINE SET_Indexiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Indexiv, fn); +} + #define CALL_Indexs(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_Indexs, parameters) #define GET_Indexs(disp) GET_by_offset(disp, _gloffset_Indexs) -#define SET_Indexs(disp, fn) SET_by_offset(disp, _gloffset_Indexs, fn) +static void INLINE SET_Indexs(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort)) { + SET_by_offset(disp, _gloffset_Indexs, fn); +} + #define CALL_Indexsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Indexsv, parameters) #define GET_Indexsv(disp) GET_by_offset(disp, _gloffset_Indexsv) -#define SET_Indexsv(disp, fn) SET_by_offset(disp, _gloffset_Indexsv, fn) +static void INLINE SET_Indexsv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Indexsv, fn); +} + #define CALL_Normal3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Normal3b, parameters) #define GET_Normal3b(disp) GET_by_offset(disp, _gloffset_Normal3b) -#define SET_Normal3b(disp, fn) SET_by_offset(disp, _gloffset_Normal3b, fn) +static void INLINE SET_Normal3b(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_Normal3b, fn); +} + #define CALL_Normal3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Normal3bv, parameters) #define GET_Normal3bv(disp) GET_by_offset(disp, _gloffset_Normal3bv) -#define SET_Normal3bv(disp, fn) SET_by_offset(disp, _gloffset_Normal3bv, fn) +static void INLINE SET_Normal3bv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_Normal3bv, fn); +} + #define CALL_Normal3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Normal3d, parameters) #define GET_Normal3d(disp) GET_by_offset(disp, _gloffset_Normal3d) -#define SET_Normal3d(disp, fn) SET_by_offset(disp, _gloffset_Normal3d, fn) +static void INLINE SET_Normal3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Normal3d, fn); +} + #define CALL_Normal3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Normal3dv, parameters) #define GET_Normal3dv(disp) GET_by_offset(disp, _gloffset_Normal3dv) -#define SET_Normal3dv(disp, fn) SET_by_offset(disp, _gloffset_Normal3dv, fn) +static void INLINE SET_Normal3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Normal3dv, fn); +} + #define CALL_Normal3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Normal3f, parameters) #define GET_Normal3f(disp) GET_by_offset(disp, _gloffset_Normal3f) -#define SET_Normal3f(disp, fn) SET_by_offset(disp, _gloffset_Normal3f, fn) +static void INLINE SET_Normal3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Normal3f, fn); +} + #define CALL_Normal3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Normal3fv, parameters) #define GET_Normal3fv(disp) GET_by_offset(disp, _gloffset_Normal3fv) -#define SET_Normal3fv(disp, fn) SET_by_offset(disp, _gloffset_Normal3fv, fn) +static void INLINE SET_Normal3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Normal3fv, fn); +} + #define CALL_Normal3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Normal3i, parameters) #define GET_Normal3i(disp) GET_by_offset(disp, _gloffset_Normal3i) -#define SET_Normal3i(disp, fn) SET_by_offset(disp, _gloffset_Normal3i, fn) +static void INLINE SET_Normal3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Normal3i, fn); +} + #define CALL_Normal3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Normal3iv, parameters) #define GET_Normal3iv(disp) GET_by_offset(disp, _gloffset_Normal3iv) -#define SET_Normal3iv(disp, fn) SET_by_offset(disp, _gloffset_Normal3iv, fn) +static void INLINE SET_Normal3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Normal3iv, fn); +} + #define CALL_Normal3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Normal3s, parameters) #define GET_Normal3s(disp) GET_by_offset(disp, _gloffset_Normal3s) -#define SET_Normal3s(disp, fn) SET_by_offset(disp, _gloffset_Normal3s, fn) +static void INLINE SET_Normal3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Normal3s, fn); +} + #define CALL_Normal3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Normal3sv, parameters) #define GET_Normal3sv(disp) GET_by_offset(disp, _gloffset_Normal3sv) -#define SET_Normal3sv(disp, fn) SET_by_offset(disp, _gloffset_Normal3sv, fn) +static void INLINE SET_Normal3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Normal3sv, fn); +} + #define CALL_RasterPos2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_RasterPos2d, parameters) #define GET_RasterPos2d(disp) GET_by_offset(disp, _gloffset_RasterPos2d) -#define SET_RasterPos2d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2d, fn) +static void INLINE SET_RasterPos2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_RasterPos2d, fn); +} + #define CALL_RasterPos2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos2dv, parameters) #define GET_RasterPos2dv(disp) GET_by_offset(disp, _gloffset_RasterPos2dv) -#define SET_RasterPos2dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2dv, fn) +static void INLINE SET_RasterPos2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_RasterPos2dv, fn); +} + #define CALL_RasterPos2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_RasterPos2f, parameters) #define GET_RasterPos2f(disp) GET_by_offset(disp, _gloffset_RasterPos2f) -#define SET_RasterPos2f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2f, fn) +static void INLINE SET_RasterPos2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_RasterPos2f, fn); +} + #define CALL_RasterPos2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos2fv, parameters) #define GET_RasterPos2fv(disp) GET_by_offset(disp, _gloffset_RasterPos2fv) -#define SET_RasterPos2fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2fv, fn) +static void INLINE SET_RasterPos2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_RasterPos2fv, fn); +} + #define CALL_RasterPos2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_RasterPos2i, parameters) #define GET_RasterPos2i(disp) GET_by_offset(disp, _gloffset_RasterPos2i) -#define SET_RasterPos2i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2i, fn) +static void INLINE SET_RasterPos2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_RasterPos2i, fn); +} + #define CALL_RasterPos2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos2iv, parameters) #define GET_RasterPos2iv(disp) GET_by_offset(disp, _gloffset_RasterPos2iv) -#define SET_RasterPos2iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2iv, fn) +static void INLINE SET_RasterPos2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_RasterPos2iv, fn); +} + #define CALL_RasterPos2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_RasterPos2s, parameters) #define GET_RasterPos2s(disp) GET_by_offset(disp, _gloffset_RasterPos2s) -#define SET_RasterPos2s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2s, fn) +static void INLINE SET_RasterPos2s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_RasterPos2s, fn); +} + #define CALL_RasterPos2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos2sv, parameters) #define GET_RasterPos2sv(disp) GET_by_offset(disp, _gloffset_RasterPos2sv) -#define SET_RasterPos2sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2sv, fn) +static void INLINE SET_RasterPos2sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_RasterPos2sv, fn); +} + #define CALL_RasterPos3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos3d, parameters) #define GET_RasterPos3d(disp) GET_by_offset(disp, _gloffset_RasterPos3d) -#define SET_RasterPos3d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3d, fn) +static void INLINE SET_RasterPos3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_RasterPos3d, fn); +} + #define CALL_RasterPos3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos3dv, parameters) #define GET_RasterPos3dv(disp) GET_by_offset(disp, _gloffset_RasterPos3dv) -#define SET_RasterPos3dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3dv, fn) +static void INLINE SET_RasterPos3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_RasterPos3dv, fn); +} + #define CALL_RasterPos3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos3f, parameters) #define GET_RasterPos3f(disp) GET_by_offset(disp, _gloffset_RasterPos3f) -#define SET_RasterPos3f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3f, fn) +static void INLINE SET_RasterPos3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_RasterPos3f, fn); +} + #define CALL_RasterPos3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos3fv, parameters) #define GET_RasterPos3fv(disp) GET_by_offset(disp, _gloffset_RasterPos3fv) -#define SET_RasterPos3fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3fv, fn) +static void INLINE SET_RasterPos3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_RasterPos3fv, fn); +} + #define CALL_RasterPos3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_RasterPos3i, parameters) #define GET_RasterPos3i(disp) GET_by_offset(disp, _gloffset_RasterPos3i) -#define SET_RasterPos3i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3i, fn) +static void INLINE SET_RasterPos3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_RasterPos3i, fn); +} + #define CALL_RasterPos3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos3iv, parameters) #define GET_RasterPos3iv(disp) GET_by_offset(disp, _gloffset_RasterPos3iv) -#define SET_RasterPos3iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3iv, fn) +static void INLINE SET_RasterPos3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_RasterPos3iv, fn); +} + #define CALL_RasterPos3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_RasterPos3s, parameters) #define GET_RasterPos3s(disp) GET_by_offset(disp, _gloffset_RasterPos3s) -#define SET_RasterPos3s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3s, fn) +static void INLINE SET_RasterPos3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_RasterPos3s, fn); +} + #define CALL_RasterPos3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos3sv, parameters) #define GET_RasterPos3sv(disp) GET_by_offset(disp, _gloffset_RasterPos3sv) -#define SET_RasterPos3sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3sv, fn) +static void INLINE SET_RasterPos3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_RasterPos3sv, fn); +} + #define CALL_RasterPos4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos4d, parameters) #define GET_RasterPos4d(disp) GET_by_offset(disp, _gloffset_RasterPos4d) -#define SET_RasterPos4d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4d, fn) +static void INLINE SET_RasterPos4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_RasterPos4d, fn); +} + #define CALL_RasterPos4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos4dv, parameters) #define GET_RasterPos4dv(disp) GET_by_offset(disp, _gloffset_RasterPos4dv) -#define SET_RasterPos4dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4dv, fn) +static void INLINE SET_RasterPos4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_RasterPos4dv, fn); +} + #define CALL_RasterPos4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos4f, parameters) #define GET_RasterPos4f(disp) GET_by_offset(disp, _gloffset_RasterPos4f) -#define SET_RasterPos4f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4f, fn) +static void INLINE SET_RasterPos4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_RasterPos4f, fn); +} + #define CALL_RasterPos4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos4fv, parameters) #define GET_RasterPos4fv(disp) GET_by_offset(disp, _gloffset_RasterPos4fv) -#define SET_RasterPos4fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4fv, fn) +static void INLINE SET_RasterPos4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_RasterPos4fv, fn); +} + #define CALL_RasterPos4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_RasterPos4i, parameters) #define GET_RasterPos4i(disp) GET_by_offset(disp, _gloffset_RasterPos4i) -#define SET_RasterPos4i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4i, fn) +static void INLINE SET_RasterPos4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_RasterPos4i, fn); +} + #define CALL_RasterPos4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos4iv, parameters) #define GET_RasterPos4iv(disp) GET_by_offset(disp, _gloffset_RasterPos4iv) -#define SET_RasterPos4iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4iv, fn) +static void INLINE SET_RasterPos4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_RasterPos4iv, fn); +} + #define CALL_RasterPos4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_RasterPos4s, parameters) #define GET_RasterPos4s(disp) GET_by_offset(disp, _gloffset_RasterPos4s) -#define SET_RasterPos4s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4s, fn) +static void INLINE SET_RasterPos4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_RasterPos4s, fn); +} + #define CALL_RasterPos4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos4sv, parameters) #define GET_RasterPos4sv(disp) GET_by_offset(disp, _gloffset_RasterPos4sv) -#define SET_RasterPos4sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4sv, fn) +static void INLINE SET_RasterPos4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_RasterPos4sv, fn); +} + #define CALL_Rectd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rectd, parameters) #define GET_Rectd(disp) GET_by_offset(disp, _gloffset_Rectd) -#define SET_Rectd(disp, fn) SET_by_offset(disp, _gloffset_Rectd, fn) +static void INLINE SET_Rectd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Rectd, fn); +} + #define CALL_Rectdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *, const GLdouble *)), _gloffset_Rectdv, parameters) #define GET_Rectdv(disp) GET_by_offset(disp, _gloffset_Rectdv) -#define SET_Rectdv(disp, fn) SET_by_offset(disp, _gloffset_Rectdv, fn) +static void INLINE SET_Rectdv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *, const GLdouble *)) { + SET_by_offset(disp, _gloffset_Rectdv, fn); +} + #define CALL_Rectf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rectf, parameters) #define GET_Rectf(disp) GET_by_offset(disp, _gloffset_Rectf) -#define SET_Rectf(disp, fn) SET_by_offset(disp, _gloffset_Rectf, fn) +static void INLINE SET_Rectf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Rectf, fn); +} + #define CALL_Rectfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *, const GLfloat *)), _gloffset_Rectfv, parameters) #define GET_Rectfv(disp) GET_by_offset(disp, _gloffset_Rectfv) -#define SET_Rectfv(disp, fn) SET_by_offset(disp, _gloffset_Rectfv, fn) +static void INLINE SET_Rectfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Rectfv, fn); +} + #define CALL_Recti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Recti, parameters) #define GET_Recti(disp) GET_by_offset(disp, _gloffset_Recti) -#define SET_Recti(disp, fn) SET_by_offset(disp, _gloffset_Recti, fn) +static void INLINE SET_Recti(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Recti, fn); +} + #define CALL_Rectiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *, const GLint *)), _gloffset_Rectiv, parameters) #define GET_Rectiv(disp) GET_by_offset(disp, _gloffset_Rectiv) -#define SET_Rectiv(disp, fn) SET_by_offset(disp, _gloffset_Rectiv, fn) +static void INLINE SET_Rectiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *, const GLint *)) { + SET_by_offset(disp, _gloffset_Rectiv, fn); +} + #define CALL_Rects(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Rects, parameters) #define GET_Rects(disp) GET_by_offset(disp, _gloffset_Rects) -#define SET_Rects(disp, fn) SET_by_offset(disp, _gloffset_Rects, fn) +static void INLINE SET_Rects(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Rects, fn); +} + #define CALL_Rectsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *, const GLshort *)), _gloffset_Rectsv, parameters) #define GET_Rectsv(disp) GET_by_offset(disp, _gloffset_Rectsv) -#define SET_Rectsv(disp, fn) SET_by_offset(disp, _gloffset_Rectsv, fn) +static void INLINE SET_Rectsv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *, const GLshort *)) { + SET_by_offset(disp, _gloffset_Rectsv, fn); +} + #define CALL_TexCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_TexCoord1d, parameters) #define GET_TexCoord1d(disp) GET_by_offset(disp, _gloffset_TexCoord1d) -#define SET_TexCoord1d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1d, fn) +static void INLINE SET_TexCoord1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord1d, fn); +} + #define CALL_TexCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord1dv, parameters) #define GET_TexCoord1dv(disp) GET_by_offset(disp, _gloffset_TexCoord1dv) -#define SET_TexCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1dv, fn) +static void INLINE SET_TexCoord1dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord1dv, fn); +} + #define CALL_TexCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_TexCoord1f, parameters) #define GET_TexCoord1f(disp) GET_by_offset(disp, _gloffset_TexCoord1f) -#define SET_TexCoord1f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1f, fn) +static void INLINE SET_TexCoord1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord1f, fn); +} + #define CALL_TexCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord1fv, parameters) #define GET_TexCoord1fv(disp) GET_by_offset(disp, _gloffset_TexCoord1fv) -#define SET_TexCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1fv, fn) +static void INLINE SET_TexCoord1fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord1fv, fn); +} + #define CALL_TexCoord1i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_TexCoord1i, parameters) #define GET_TexCoord1i(disp) GET_by_offset(disp, _gloffset_TexCoord1i) -#define SET_TexCoord1i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1i, fn) +static void INLINE SET_TexCoord1i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_TexCoord1i, fn); +} + #define CALL_TexCoord1iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord1iv, parameters) #define GET_TexCoord1iv(disp) GET_by_offset(disp, _gloffset_TexCoord1iv) -#define SET_TexCoord1iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1iv, fn) +static void INLINE SET_TexCoord1iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord1iv, fn); +} + #define CALL_TexCoord1s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_TexCoord1s, parameters) #define GET_TexCoord1s(disp) GET_by_offset(disp, _gloffset_TexCoord1s) -#define SET_TexCoord1s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1s, fn) +static void INLINE SET_TexCoord1s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord1s, fn); +} + #define CALL_TexCoord1sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord1sv, parameters) #define GET_TexCoord1sv(disp) GET_by_offset(disp, _gloffset_TexCoord1sv) -#define SET_TexCoord1sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1sv, fn) +static void INLINE SET_TexCoord1sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord1sv, fn); +} + #define CALL_TexCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_TexCoord2d, parameters) #define GET_TexCoord2d(disp) GET_by_offset(disp, _gloffset_TexCoord2d) -#define SET_TexCoord2d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2d, fn) +static void INLINE SET_TexCoord2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord2d, fn); +} + #define CALL_TexCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord2dv, parameters) #define GET_TexCoord2dv(disp) GET_by_offset(disp, _gloffset_TexCoord2dv) -#define SET_TexCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2dv, fn) +static void INLINE SET_TexCoord2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord2dv, fn); +} + #define CALL_TexCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_TexCoord2f, parameters) #define GET_TexCoord2f(disp) GET_by_offset(disp, _gloffset_TexCoord2f) -#define SET_TexCoord2f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2f, fn) +static void INLINE SET_TexCoord2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord2f, fn); +} + #define CALL_TexCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord2fv, parameters) #define GET_TexCoord2fv(disp) GET_by_offset(disp, _gloffset_TexCoord2fv) -#define SET_TexCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2fv, fn) +static void INLINE SET_TexCoord2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord2fv, fn); +} + #define CALL_TexCoord2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_TexCoord2i, parameters) #define GET_TexCoord2i(disp) GET_by_offset(disp, _gloffset_TexCoord2i) -#define SET_TexCoord2i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2i, fn) +static void INLINE SET_TexCoord2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_TexCoord2i, fn); +} + #define CALL_TexCoord2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord2iv, parameters) #define GET_TexCoord2iv(disp) GET_by_offset(disp, _gloffset_TexCoord2iv) -#define SET_TexCoord2iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2iv, fn) +static void INLINE SET_TexCoord2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord2iv, fn); +} + #define CALL_TexCoord2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_TexCoord2s, parameters) #define GET_TexCoord2s(disp) GET_by_offset(disp, _gloffset_TexCoord2s) -#define SET_TexCoord2s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2s, fn) +static void INLINE SET_TexCoord2s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord2s, fn); +} + #define CALL_TexCoord2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord2sv, parameters) #define GET_TexCoord2sv(disp) GET_by_offset(disp, _gloffset_TexCoord2sv) -#define SET_TexCoord2sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2sv, fn) +static void INLINE SET_TexCoord2sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord2sv, fn); +} + #define CALL_TexCoord3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord3d, parameters) #define GET_TexCoord3d(disp) GET_by_offset(disp, _gloffset_TexCoord3d) -#define SET_TexCoord3d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3d, fn) +static void INLINE SET_TexCoord3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord3d, fn); +} + #define CALL_TexCoord3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord3dv, parameters) #define GET_TexCoord3dv(disp) GET_by_offset(disp, _gloffset_TexCoord3dv) -#define SET_TexCoord3dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3dv, fn) +static void INLINE SET_TexCoord3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord3dv, fn); +} + #define CALL_TexCoord3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord3f, parameters) #define GET_TexCoord3f(disp) GET_by_offset(disp, _gloffset_TexCoord3f) -#define SET_TexCoord3f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3f, fn) +static void INLINE SET_TexCoord3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord3f, fn); +} + #define CALL_TexCoord3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord3fv, parameters) #define GET_TexCoord3fv(disp) GET_by_offset(disp, _gloffset_TexCoord3fv) -#define SET_TexCoord3fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3fv, fn) +static void INLINE SET_TexCoord3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord3fv, fn); +} + #define CALL_TexCoord3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_TexCoord3i, parameters) #define GET_TexCoord3i(disp) GET_by_offset(disp, _gloffset_TexCoord3i) -#define SET_TexCoord3i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3i, fn) +static void INLINE SET_TexCoord3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_TexCoord3i, fn); +} + #define CALL_TexCoord3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord3iv, parameters) #define GET_TexCoord3iv(disp) GET_by_offset(disp, _gloffset_TexCoord3iv) -#define SET_TexCoord3iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3iv, fn) +static void INLINE SET_TexCoord3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord3iv, fn); +} + #define CALL_TexCoord3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_TexCoord3s, parameters) #define GET_TexCoord3s(disp) GET_by_offset(disp, _gloffset_TexCoord3s) -#define SET_TexCoord3s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3s, fn) +static void INLINE SET_TexCoord3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord3s, fn); +} + #define CALL_TexCoord3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord3sv, parameters) #define GET_TexCoord3sv(disp) GET_by_offset(disp, _gloffset_TexCoord3sv) -#define SET_TexCoord3sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3sv, fn) +static void INLINE SET_TexCoord3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord3sv, fn); +} + #define CALL_TexCoord4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord4d, parameters) #define GET_TexCoord4d(disp) GET_by_offset(disp, _gloffset_TexCoord4d) -#define SET_TexCoord4d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4d, fn) +static void INLINE SET_TexCoord4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord4d, fn); +} + #define CALL_TexCoord4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord4dv, parameters) #define GET_TexCoord4dv(disp) GET_by_offset(disp, _gloffset_TexCoord4dv) -#define SET_TexCoord4dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4dv, fn) +static void INLINE SET_TexCoord4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord4dv, fn); +} + #define CALL_TexCoord4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord4f, parameters) #define GET_TexCoord4f(disp) GET_by_offset(disp, _gloffset_TexCoord4f) -#define SET_TexCoord4f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4f, fn) +static void INLINE SET_TexCoord4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord4f, fn); +} + #define CALL_TexCoord4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord4fv, parameters) #define GET_TexCoord4fv(disp) GET_by_offset(disp, _gloffset_TexCoord4fv) -#define SET_TexCoord4fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4fv, fn) +static void INLINE SET_TexCoord4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord4fv, fn); +} + #define CALL_TexCoord4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_TexCoord4i, parameters) #define GET_TexCoord4i(disp) GET_by_offset(disp, _gloffset_TexCoord4i) -#define SET_TexCoord4i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4i, fn) +static void INLINE SET_TexCoord4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_TexCoord4i, fn); +} + #define CALL_TexCoord4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord4iv, parameters) #define GET_TexCoord4iv(disp) GET_by_offset(disp, _gloffset_TexCoord4iv) -#define SET_TexCoord4iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4iv, fn) +static void INLINE SET_TexCoord4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord4iv, fn); +} + #define CALL_TexCoord4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_TexCoord4s, parameters) #define GET_TexCoord4s(disp) GET_by_offset(disp, _gloffset_TexCoord4s) -#define SET_TexCoord4s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4s, fn) +static void INLINE SET_TexCoord4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord4s, fn); +} + #define CALL_TexCoord4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord4sv, parameters) #define GET_TexCoord4sv(disp) GET_by_offset(disp, _gloffset_TexCoord4sv) -#define SET_TexCoord4sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4sv, fn) +static void INLINE SET_TexCoord4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord4sv, fn); +} + #define CALL_Vertex2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_Vertex2d, parameters) #define GET_Vertex2d(disp) GET_by_offset(disp, _gloffset_Vertex2d) -#define SET_Vertex2d(disp, fn) SET_by_offset(disp, _gloffset_Vertex2d, fn) +static void INLINE SET_Vertex2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Vertex2d, fn); +} + #define CALL_Vertex2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex2dv, parameters) #define GET_Vertex2dv(disp) GET_by_offset(disp, _gloffset_Vertex2dv) -#define SET_Vertex2dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2dv, fn) +static void INLINE SET_Vertex2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Vertex2dv, fn); +} + #define CALL_Vertex2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_Vertex2f, parameters) #define GET_Vertex2f(disp) GET_by_offset(disp, _gloffset_Vertex2f) -#define SET_Vertex2f(disp, fn) SET_by_offset(disp, _gloffset_Vertex2f, fn) +static void INLINE SET_Vertex2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Vertex2f, fn); +} + #define CALL_Vertex2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex2fv, parameters) #define GET_Vertex2fv(disp) GET_by_offset(disp, _gloffset_Vertex2fv) -#define SET_Vertex2fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2fv, fn) +static void INLINE SET_Vertex2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Vertex2fv, fn); +} + #define CALL_Vertex2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Vertex2i, parameters) #define GET_Vertex2i(disp) GET_by_offset(disp, _gloffset_Vertex2i) -#define SET_Vertex2i(disp, fn) SET_by_offset(disp, _gloffset_Vertex2i, fn) +static void INLINE SET_Vertex2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_Vertex2i, fn); +} + #define CALL_Vertex2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex2iv, parameters) #define GET_Vertex2iv(disp) GET_by_offset(disp, _gloffset_Vertex2iv) -#define SET_Vertex2iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2iv, fn) +static void INLINE SET_Vertex2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Vertex2iv, fn); +} + #define CALL_Vertex2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_Vertex2s, parameters) #define GET_Vertex2s(disp) GET_by_offset(disp, _gloffset_Vertex2s) -#define SET_Vertex2s(disp, fn) SET_by_offset(disp, _gloffset_Vertex2s, fn) +static void INLINE SET_Vertex2s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Vertex2s, fn); +} + #define CALL_Vertex2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex2sv, parameters) #define GET_Vertex2sv(disp) GET_by_offset(disp, _gloffset_Vertex2sv) -#define SET_Vertex2sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2sv, fn) +static void INLINE SET_Vertex2sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Vertex2sv, fn); +} + #define CALL_Vertex3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Vertex3d, parameters) #define GET_Vertex3d(disp) GET_by_offset(disp, _gloffset_Vertex3d) -#define SET_Vertex3d(disp, fn) SET_by_offset(disp, _gloffset_Vertex3d, fn) +static void INLINE SET_Vertex3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Vertex3d, fn); +} + #define CALL_Vertex3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex3dv, parameters) #define GET_Vertex3dv(disp) GET_by_offset(disp, _gloffset_Vertex3dv) -#define SET_Vertex3dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3dv, fn) +static void INLINE SET_Vertex3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Vertex3dv, fn); +} + #define CALL_Vertex3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Vertex3f, parameters) #define GET_Vertex3f(disp) GET_by_offset(disp, _gloffset_Vertex3f) -#define SET_Vertex3f(disp, fn) SET_by_offset(disp, _gloffset_Vertex3f, fn) +static void INLINE SET_Vertex3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Vertex3f, fn); +} + #define CALL_Vertex3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex3fv, parameters) #define GET_Vertex3fv(disp) GET_by_offset(disp, _gloffset_Vertex3fv) -#define SET_Vertex3fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3fv, fn) +static void INLINE SET_Vertex3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Vertex3fv, fn); +} + #define CALL_Vertex3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Vertex3i, parameters) #define GET_Vertex3i(disp) GET_by_offset(disp, _gloffset_Vertex3i) -#define SET_Vertex3i(disp, fn) SET_by_offset(disp, _gloffset_Vertex3i, fn) +static void INLINE SET_Vertex3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Vertex3i, fn); +} + #define CALL_Vertex3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex3iv, parameters) #define GET_Vertex3iv(disp) GET_by_offset(disp, _gloffset_Vertex3iv) -#define SET_Vertex3iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3iv, fn) +static void INLINE SET_Vertex3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Vertex3iv, fn); +} + #define CALL_Vertex3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Vertex3s, parameters) #define GET_Vertex3s(disp) GET_by_offset(disp, _gloffset_Vertex3s) -#define SET_Vertex3s(disp, fn) SET_by_offset(disp, _gloffset_Vertex3s, fn) +static void INLINE SET_Vertex3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Vertex3s, fn); +} + #define CALL_Vertex3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex3sv, parameters) #define GET_Vertex3sv(disp) GET_by_offset(disp, _gloffset_Vertex3sv) -#define SET_Vertex3sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3sv, fn) +static void INLINE SET_Vertex3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Vertex3sv, fn); +} + #define CALL_Vertex4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Vertex4d, parameters) #define GET_Vertex4d(disp) GET_by_offset(disp, _gloffset_Vertex4d) -#define SET_Vertex4d(disp, fn) SET_by_offset(disp, _gloffset_Vertex4d, fn) +static void INLINE SET_Vertex4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Vertex4d, fn); +} + #define CALL_Vertex4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex4dv, parameters) #define GET_Vertex4dv(disp) GET_by_offset(disp, _gloffset_Vertex4dv) -#define SET_Vertex4dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4dv, fn) +static void INLINE SET_Vertex4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Vertex4dv, fn); +} + #define CALL_Vertex4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Vertex4f, parameters) #define GET_Vertex4f(disp) GET_by_offset(disp, _gloffset_Vertex4f) -#define SET_Vertex4f(disp, fn) SET_by_offset(disp, _gloffset_Vertex4f, fn) +static void INLINE SET_Vertex4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Vertex4f, fn); +} + #define CALL_Vertex4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex4fv, parameters) #define GET_Vertex4fv(disp) GET_by_offset(disp, _gloffset_Vertex4fv) -#define SET_Vertex4fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4fv, fn) +static void INLINE SET_Vertex4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Vertex4fv, fn); +} + #define CALL_Vertex4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Vertex4i, parameters) #define GET_Vertex4i(disp) GET_by_offset(disp, _gloffset_Vertex4i) -#define SET_Vertex4i(disp, fn) SET_by_offset(disp, _gloffset_Vertex4i, fn) +static void INLINE SET_Vertex4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Vertex4i, fn); +} + #define CALL_Vertex4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex4iv, parameters) #define GET_Vertex4iv(disp) GET_by_offset(disp, _gloffset_Vertex4iv) -#define SET_Vertex4iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4iv, fn) +static void INLINE SET_Vertex4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Vertex4iv, fn); +} + #define CALL_Vertex4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Vertex4s, parameters) #define GET_Vertex4s(disp) GET_by_offset(disp, _gloffset_Vertex4s) -#define SET_Vertex4s(disp, fn) SET_by_offset(disp, _gloffset_Vertex4s, fn) +static void INLINE SET_Vertex4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Vertex4s, fn); +} + #define CALL_Vertex4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex4sv, parameters) #define GET_Vertex4sv(disp) GET_by_offset(disp, _gloffset_Vertex4sv) -#define SET_Vertex4sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4sv, fn) +static void INLINE SET_Vertex4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Vertex4sv, fn); +} + #define CALL_ClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_ClipPlane, parameters) #define GET_ClipPlane(disp) GET_by_offset(disp, _gloffset_ClipPlane) -#define SET_ClipPlane(disp, fn) SET_by_offset(disp, _gloffset_ClipPlane, fn) +static void INLINE SET_ClipPlane(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ClipPlane, fn); +} + #define CALL_ColorMaterial(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ColorMaterial, parameters) #define GET_ColorMaterial(disp) GET_by_offset(disp, _gloffset_ColorMaterial) -#define SET_ColorMaterial(disp, fn) SET_by_offset(disp, _gloffset_ColorMaterial, fn) +static void INLINE SET_ColorMaterial(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_ColorMaterial, fn); +} + #define CALL_CullFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_CullFace, parameters) #define GET_CullFace(disp) GET_by_offset(disp, _gloffset_CullFace) -#define SET_CullFace(disp, fn) SET_by_offset(disp, _gloffset_CullFace, fn) +static void INLINE SET_CullFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CullFace, fn); +} + #define CALL_Fogf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Fogf, parameters) #define GET_Fogf(disp) GET_by_offset(disp, _gloffset_Fogf) -#define SET_Fogf(disp, fn) SET_by_offset(disp, _gloffset_Fogf, fn) +static void INLINE SET_Fogf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Fogf, fn); +} + #define CALL_Fogfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_Fogfv, parameters) #define GET_Fogfv(disp) GET_by_offset(disp, _gloffset_Fogfv) -#define SET_Fogfv(disp, fn) SET_by_offset(disp, _gloffset_Fogfv, fn) +static void INLINE SET_Fogfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Fogfv, fn); +} + #define CALL_Fogi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_Fogi, parameters) #define GET_Fogi(disp) GET_by_offset(disp, _gloffset_Fogi) -#define SET_Fogi(disp, fn) SET_by_offset(disp, _gloffset_Fogi, fn) +static void INLINE SET_Fogi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_Fogi, fn); +} + #define CALL_Fogiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_Fogiv, parameters) #define GET_Fogiv(disp) GET_by_offset(disp, _gloffset_Fogiv) -#define SET_Fogiv(disp, fn) SET_by_offset(disp, _gloffset_Fogiv, fn) +static void INLINE SET_Fogiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_Fogiv, fn); +} + #define CALL_FrontFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_FrontFace, parameters) #define GET_FrontFace(disp) GET_by_offset(disp, _gloffset_FrontFace) -#define SET_FrontFace(disp, fn) SET_by_offset(disp, _gloffset_FrontFace, fn) +static void INLINE SET_FrontFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_FrontFace, fn); +} + #define CALL_Hint(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_Hint, parameters) #define GET_Hint(disp) GET_by_offset(disp, _gloffset_Hint) -#define SET_Hint(disp, fn) SET_by_offset(disp, _gloffset_Hint, fn) +static void INLINE SET_Hint(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_Hint, fn); +} + #define CALL_Lightf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Lightf, parameters) #define GET_Lightf(disp) GET_by_offset(disp, _gloffset_Lightf) -#define SET_Lightf(disp, fn) SET_by_offset(disp, _gloffset_Lightf, fn) +static void INLINE SET_Lightf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Lightf, fn); +} + #define CALL_Lightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Lightfv, parameters) #define GET_Lightfv(disp) GET_by_offset(disp, _gloffset_Lightfv) -#define SET_Lightfv(disp, fn) SET_by_offset(disp, _gloffset_Lightfv, fn) +static void INLINE SET_Lightfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Lightfv, fn); +} + #define CALL_Lighti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Lighti, parameters) #define GET_Lighti(disp) GET_by_offset(disp, _gloffset_Lighti) -#define SET_Lighti(disp, fn) SET_by_offset(disp, _gloffset_Lighti, fn) +static void INLINE SET_Lighti(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_Lighti, fn); +} + #define CALL_Lightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Lightiv, parameters) #define GET_Lightiv(disp) GET_by_offset(disp, _gloffset_Lightiv) -#define SET_Lightiv(disp, fn) SET_by_offset(disp, _gloffset_Lightiv, fn) +static void INLINE SET_Lightiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_Lightiv, fn); +} + #define CALL_LightModelf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_LightModelf, parameters) #define GET_LightModelf(disp) GET_by_offset(disp, _gloffset_LightModelf) -#define SET_LightModelf(disp, fn) SET_by_offset(disp, _gloffset_LightModelf, fn) +static void INLINE SET_LightModelf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_LightModelf, fn); +} + #define CALL_LightModelfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_LightModelfv, parameters) #define GET_LightModelfv(disp) GET_by_offset(disp, _gloffset_LightModelfv) -#define SET_LightModelfv(disp, fn) SET_by_offset(disp, _gloffset_LightModelfv, fn) +static void INLINE SET_LightModelfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_LightModelfv, fn); +} + #define CALL_LightModeli(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_LightModeli, parameters) #define GET_LightModeli(disp) GET_by_offset(disp, _gloffset_LightModeli) -#define SET_LightModeli(disp, fn) SET_by_offset(disp, _gloffset_LightModeli, fn) +static void INLINE SET_LightModeli(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_LightModeli, fn); +} + #define CALL_LightModeliv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_LightModeliv, parameters) #define GET_LightModeliv(disp) GET_by_offset(disp, _gloffset_LightModeliv) -#define SET_LightModeliv(disp, fn) SET_by_offset(disp, _gloffset_LightModeliv, fn) +static void INLINE SET_LightModeliv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_LightModeliv, fn); +} + #define CALL_LineStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLushort)), _gloffset_LineStipple, parameters) #define GET_LineStipple(disp) GET_by_offset(disp, _gloffset_LineStipple) -#define SET_LineStipple(disp, fn) SET_by_offset(disp, _gloffset_LineStipple, fn) +static void INLINE SET_LineStipple(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLushort)) { + SET_by_offset(disp, _gloffset_LineStipple, fn); +} + #define CALL_LineWidth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_LineWidth, parameters) #define GET_LineWidth(disp) GET_by_offset(disp, _gloffset_LineWidth) -#define SET_LineWidth(disp, fn) SET_by_offset(disp, _gloffset_LineWidth, fn) +static void INLINE SET_LineWidth(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_LineWidth, fn); +} + #define CALL_Materialf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Materialf, parameters) #define GET_Materialf(disp) GET_by_offset(disp, _gloffset_Materialf) -#define SET_Materialf(disp, fn) SET_by_offset(disp, _gloffset_Materialf, fn) +static void INLINE SET_Materialf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Materialf, fn); +} + #define CALL_Materialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Materialfv, parameters) #define GET_Materialfv(disp) GET_by_offset(disp, _gloffset_Materialfv) -#define SET_Materialfv(disp, fn) SET_by_offset(disp, _gloffset_Materialfv, fn) +static void INLINE SET_Materialfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Materialfv, fn); +} + #define CALL_Materiali(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Materiali, parameters) #define GET_Materiali(disp) GET_by_offset(disp, _gloffset_Materiali) -#define SET_Materiali(disp, fn) SET_by_offset(disp, _gloffset_Materiali, fn) +static void INLINE SET_Materiali(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_Materiali, fn); +} + #define CALL_Materialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Materialiv, parameters) #define GET_Materialiv(disp) GET_by_offset(disp, _gloffset_Materialiv) -#define SET_Materialiv(disp, fn) SET_by_offset(disp, _gloffset_Materialiv, fn) +static void INLINE SET_Materialiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_Materialiv, fn); +} + #define CALL_PointSize(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PointSize, parameters) #define GET_PointSize(disp) GET_by_offset(disp, _gloffset_PointSize) -#define SET_PointSize(disp, fn) SET_by_offset(disp, _gloffset_PointSize, fn) +static void INLINE SET_PointSize(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_PointSize, fn); +} + #define CALL_PolygonMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_PolygonMode, parameters) #define GET_PolygonMode(disp) GET_by_offset(disp, _gloffset_PolygonMode) -#define SET_PolygonMode(disp, fn) SET_by_offset(disp, _gloffset_PolygonMode, fn) +static void INLINE SET_PolygonMode(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_PolygonMode, fn); +} + #define CALL_PolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_PolygonStipple, parameters) #define GET_PolygonStipple(disp) GET_by_offset(disp, _gloffset_PolygonStipple) -#define SET_PolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_PolygonStipple, fn) +static void INLINE SET_PolygonStipple(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_PolygonStipple, fn); +} + #define CALL_Scissor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Scissor, parameters) #define GET_Scissor(disp) GET_by_offset(disp, _gloffset_Scissor) -#define SET_Scissor(disp, fn) SET_by_offset(disp, _gloffset_Scissor, fn) +static void INLINE SET_Scissor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_Scissor, fn); +} + #define CALL_ShadeModel(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ShadeModel, parameters) #define GET_ShadeModel(disp) GET_by_offset(disp, _gloffset_ShadeModel) -#define SET_ShadeModel(disp, fn) SET_by_offset(disp, _gloffset_ShadeModel, fn) +static void INLINE SET_ShadeModel(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ShadeModel, fn); +} + #define CALL_TexParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexParameterf, parameters) #define GET_TexParameterf(disp) GET_by_offset(disp, _gloffset_TexParameterf) -#define SET_TexParameterf(disp, fn) SET_by_offset(disp, _gloffset_TexParameterf, fn) +static void INLINE SET_TexParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_TexParameterf, fn); +} + #define CALL_TexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexParameterfv, parameters) #define GET_TexParameterfv(disp) GET_by_offset(disp, _gloffset_TexParameterfv) -#define SET_TexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_TexParameterfv, fn) +static void INLINE SET_TexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexParameterfv, fn); +} + #define CALL_TexParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexParameteri, parameters) #define GET_TexParameteri(disp) GET_by_offset(disp, _gloffset_TexParameteri) -#define SET_TexParameteri(disp, fn) SET_by_offset(disp, _gloffset_TexParameteri, fn) +static void INLINE SET_TexParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_TexParameteri, fn); +} + #define CALL_TexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameteriv, parameters) #define GET_TexParameteriv(disp) GET_by_offset(disp, _gloffset_TexParameteriv) -#define SET_TexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_TexParameteriv, fn) +static void INLINE SET_TexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexParameteriv, fn); +} + #define CALL_TexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage1D, parameters) #define GET_TexImage1D(disp) GET_by_offset(disp, _gloffset_TexImage1D) -#define SET_TexImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexImage1D, fn) +static void INLINE SET_TexImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexImage1D, fn); +} + #define CALL_TexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage2D, parameters) #define GET_TexImage2D(disp) GET_by_offset(disp, _gloffset_TexImage2D) -#define SET_TexImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexImage2D, fn) +static void INLINE SET_TexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexImage2D, fn); +} + #define CALL_TexEnvf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexEnvf, parameters) #define GET_TexEnvf(disp) GET_by_offset(disp, _gloffset_TexEnvf) -#define SET_TexEnvf(disp, fn) SET_by_offset(disp, _gloffset_TexEnvf, fn) +static void INLINE SET_TexEnvf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_TexEnvf, fn); +} + #define CALL_TexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexEnvfv, parameters) #define GET_TexEnvfv(disp) GET_by_offset(disp, _gloffset_TexEnvfv) -#define SET_TexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_TexEnvfv, fn) +static void INLINE SET_TexEnvfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexEnvfv, fn); +} + #define CALL_TexEnvi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexEnvi, parameters) #define GET_TexEnvi(disp) GET_by_offset(disp, _gloffset_TexEnvi) -#define SET_TexEnvi(disp, fn) SET_by_offset(disp, _gloffset_TexEnvi, fn) +static void INLINE SET_TexEnvi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_TexEnvi, fn); +} + #define CALL_TexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexEnviv, parameters) #define GET_TexEnviv(disp) GET_by_offset(disp, _gloffset_TexEnviv) -#define SET_TexEnviv(disp, fn) SET_by_offset(disp, _gloffset_TexEnviv, fn) +static void INLINE SET_TexEnviv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexEnviv, fn); +} + #define CALL_TexGend(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble)), _gloffset_TexGend, parameters) #define GET_TexGend(disp) GET_by_offset(disp, _gloffset_TexGend) -#define SET_TexGend(disp, fn) SET_by_offset(disp, _gloffset_TexGend, fn) +static void INLINE SET_TexGend(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLdouble)) { + SET_by_offset(disp, _gloffset_TexGend, fn); +} + #define CALL_TexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLdouble *)), _gloffset_TexGendv, parameters) #define GET_TexGendv(disp) GET_by_offset(disp, _gloffset_TexGendv) -#define SET_TexGendv(disp, fn) SET_by_offset(disp, _gloffset_TexGendv, fn) +static void INLINE SET_TexGendv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexGendv, fn); +} + #define CALL_TexGenf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexGenf, parameters) #define GET_TexGenf(disp) GET_by_offset(disp, _gloffset_TexGenf) -#define SET_TexGenf(disp, fn) SET_by_offset(disp, _gloffset_TexGenf, fn) +static void INLINE SET_TexGenf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_TexGenf, fn); +} + #define CALL_TexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexGenfv, parameters) #define GET_TexGenfv(disp) GET_by_offset(disp, _gloffset_TexGenfv) -#define SET_TexGenfv(disp, fn) SET_by_offset(disp, _gloffset_TexGenfv, fn) +static void INLINE SET_TexGenfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexGenfv, fn); +} + #define CALL_TexGeni(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexGeni, parameters) #define GET_TexGeni(disp) GET_by_offset(disp, _gloffset_TexGeni) -#define SET_TexGeni(disp, fn) SET_by_offset(disp, _gloffset_TexGeni, fn) +static void INLINE SET_TexGeni(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_TexGeni, fn); +} + #define CALL_TexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexGeniv, parameters) #define GET_TexGeniv(disp) GET_by_offset(disp, _gloffset_TexGeniv) -#define SET_TexGeniv(disp, fn) SET_by_offset(disp, _gloffset_TexGeniv, fn) +static void INLINE SET_TexGeniv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexGeniv, fn); +} + #define CALL_FeedbackBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, GLfloat *)), _gloffset_FeedbackBuffer, parameters) #define GET_FeedbackBuffer(disp) GET_by_offset(disp, _gloffset_FeedbackBuffer) -#define SET_FeedbackBuffer(disp, fn) SET_by_offset(disp, _gloffset_FeedbackBuffer, fn) +static void INLINE SET_FeedbackBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_FeedbackBuffer, fn); +} + #define CALL_SelectBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_SelectBuffer, parameters) #define GET_SelectBuffer(disp) GET_by_offset(disp, _gloffset_SelectBuffer) -#define SET_SelectBuffer(disp, fn) SET_by_offset(disp, _gloffset_SelectBuffer, fn) +static void INLINE SET_SelectBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_SelectBuffer, fn); +} + #define CALL_RenderMode(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLenum)), _gloffset_RenderMode, parameters) #define GET_RenderMode(disp) GET_by_offset(disp, _gloffset_RenderMode) -#define SET_RenderMode(disp, fn) SET_by_offset(disp, _gloffset_RenderMode, fn) +static void INLINE SET_RenderMode(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_RenderMode, fn); +} + #define CALL_InitNames(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_InitNames, parameters) #define GET_InitNames(disp) GET_by_offset(disp, _gloffset_InitNames) -#define SET_InitNames(disp, fn) SET_by_offset(disp, _gloffset_InitNames, fn) +static void INLINE SET_InitNames(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_InitNames, fn); +} + #define CALL_LoadName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_LoadName, parameters) #define GET_LoadName(disp) GET_by_offset(disp, _gloffset_LoadName) -#define SET_LoadName(disp, fn) SET_by_offset(disp, _gloffset_LoadName, fn) +static void INLINE SET_LoadName(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_LoadName, fn); +} + #define CALL_PassThrough(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PassThrough, parameters) #define GET_PassThrough(disp) GET_by_offset(disp, _gloffset_PassThrough) -#define SET_PassThrough(disp, fn) SET_by_offset(disp, _gloffset_PassThrough, fn) +static void INLINE SET_PassThrough(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_PassThrough, fn); +} + #define CALL_PopName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopName, parameters) #define GET_PopName(disp) GET_by_offset(disp, _gloffset_PopName) -#define SET_PopName(disp, fn) SET_by_offset(disp, _gloffset_PopName, fn) +static void INLINE SET_PopName(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopName, fn); +} + #define CALL_PushName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PushName, parameters) #define GET_PushName(disp) GET_by_offset(disp, _gloffset_PushName) -#define SET_PushName(disp, fn) SET_by_offset(disp, _gloffset_PushName, fn) +static void INLINE SET_PushName(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_PushName, fn); +} + #define CALL_DrawBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DrawBuffer, parameters) #define GET_DrawBuffer(disp) GET_by_offset(disp, _gloffset_DrawBuffer) -#define SET_DrawBuffer(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffer, fn) +static void INLINE SET_DrawBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_DrawBuffer, fn); +} + #define CALL_Clear(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_Clear, parameters) #define GET_Clear(disp) GET_by_offset(disp, _gloffset_Clear) -#define SET_Clear(disp, fn) SET_by_offset(disp, _gloffset_Clear, fn) +static void INLINE SET_Clear(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { + SET_by_offset(disp, _gloffset_Clear, fn); +} + #define CALL_ClearAccum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ClearAccum, parameters) #define GET_ClearAccum(disp) GET_by_offset(disp, _gloffset_ClearAccum) -#define SET_ClearAccum(disp, fn) SET_by_offset(disp, _gloffset_ClearAccum, fn) +static void INLINE SET_ClearAccum(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ClearAccum, fn); +} + #define CALL_ClearIndex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_ClearIndex, parameters) #define GET_ClearIndex(disp) GET_by_offset(disp, _gloffset_ClearIndex) -#define SET_ClearIndex(disp, fn) SET_by_offset(disp, _gloffset_ClearIndex, fn) +static void INLINE SET_ClearIndex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_ClearIndex, fn); +} + #define CALL_ClearColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_ClearColor, parameters) #define GET_ClearColor(disp) GET_by_offset(disp, _gloffset_ClearColor) -#define SET_ClearColor(disp, fn) SET_by_offset(disp, _gloffset_ClearColor, fn) +static void INLINE SET_ClearColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { + SET_by_offset(disp, _gloffset_ClearColor, fn); +} + #define CALL_ClearStencil(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ClearStencil, parameters) #define GET_ClearStencil(disp) GET_by_offset(disp, _gloffset_ClearStencil) -#define SET_ClearStencil(disp, fn) SET_by_offset(disp, _gloffset_ClearStencil, fn) +static void INLINE SET_ClearStencil(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_ClearStencil, fn); +} + #define CALL_ClearDepth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd)), _gloffset_ClearDepth, parameters) #define GET_ClearDepth(disp) GET_by_offset(disp, _gloffset_ClearDepth) -#define SET_ClearDepth(disp, fn) SET_by_offset(disp, _gloffset_ClearDepth, fn) +static void INLINE SET_ClearDepth(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampd)) { + SET_by_offset(disp, _gloffset_ClearDepth, fn); +} + #define CALL_StencilMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_StencilMask, parameters) #define GET_StencilMask(disp) GET_by_offset(disp, _gloffset_StencilMask) -#define SET_StencilMask(disp, fn) SET_by_offset(disp, _gloffset_StencilMask, fn) +static void INLINE SET_StencilMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_StencilMask, fn); +} + #define CALL_ColorMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMask, parameters) #define GET_ColorMask(disp) GET_by_offset(disp, _gloffset_ColorMask) -#define SET_ColorMask(disp, fn) SET_by_offset(disp, _gloffset_ColorMask, fn) +static void INLINE SET_ColorMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean, GLboolean, GLboolean, GLboolean)) { + SET_by_offset(disp, _gloffset_ColorMask, fn); +} + #define CALL_DepthMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_DepthMask, parameters) #define GET_DepthMask(disp) GET_by_offset(disp, _gloffset_DepthMask) -#define SET_DepthMask(disp, fn) SET_by_offset(disp, _gloffset_DepthMask, fn) +static void INLINE SET_DepthMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean)) { + SET_by_offset(disp, _gloffset_DepthMask, fn); +} + #define CALL_IndexMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_IndexMask, parameters) #define GET_IndexMask(disp) GET_by_offset(disp, _gloffset_IndexMask) -#define SET_IndexMask(disp, fn) SET_by_offset(disp, _gloffset_IndexMask, fn) +static void INLINE SET_IndexMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IndexMask, fn); +} + #define CALL_Accum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Accum, parameters) #define GET_Accum(disp) GET_by_offset(disp, _gloffset_Accum) -#define SET_Accum(disp, fn) SET_by_offset(disp, _gloffset_Accum, fn) +static void INLINE SET_Accum(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Accum, fn); +} + #define CALL_Disable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Disable, parameters) #define GET_Disable(disp) GET_by_offset(disp, _gloffset_Disable) -#define SET_Disable(disp, fn) SET_by_offset(disp, _gloffset_Disable, fn) +static void INLINE SET_Disable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_Disable, fn); +} + #define CALL_Enable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Enable, parameters) #define GET_Enable(disp) GET_by_offset(disp, _gloffset_Enable) -#define SET_Enable(disp, fn) SET_by_offset(disp, _gloffset_Enable, fn) +static void INLINE SET_Enable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_Enable, fn); +} + #define CALL_Finish(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Finish, parameters) #define GET_Finish(disp) GET_by_offset(disp, _gloffset_Finish) -#define SET_Finish(disp, fn) SET_by_offset(disp, _gloffset_Finish, fn) +static void INLINE SET_Finish(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_Finish, fn); +} + #define CALL_Flush(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Flush, parameters) #define GET_Flush(disp) GET_by_offset(disp, _gloffset_Flush) -#define SET_Flush(disp, fn) SET_by_offset(disp, _gloffset_Flush, fn) +static void INLINE SET_Flush(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_Flush, fn); +} + #define CALL_PopAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopAttrib, parameters) #define GET_PopAttrib(disp) GET_by_offset(disp, _gloffset_PopAttrib) -#define SET_PopAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopAttrib, fn) +static void INLINE SET_PopAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopAttrib, fn); +} + #define CALL_PushAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushAttrib, parameters) #define GET_PushAttrib(disp) GET_by_offset(disp, _gloffset_PushAttrib) -#define SET_PushAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushAttrib, fn) +static void INLINE SET_PushAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { + SET_by_offset(disp, _gloffset_PushAttrib, fn); +} + #define CALL_Map1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map1d, parameters) #define GET_Map1d(disp) GET_by_offset(disp, _gloffset_Map1d) -#define SET_Map1d(disp, fn) SET_by_offset(disp, _gloffset_Map1d, fn) +static void INLINE SET_Map1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_Map1d, fn); +} + #define CALL_Map1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map1f, parameters) #define GET_Map1f(disp) GET_by_offset(disp, _gloffset_Map1f) -#define SET_Map1f(disp, fn) SET_by_offset(disp, _gloffset_Map1f, fn) +static void INLINE SET_Map1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Map1f, fn); +} + #define CALL_Map2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map2d, parameters) #define GET_Map2d(disp) GET_by_offset(disp, _gloffset_Map2d) -#define SET_Map2d(disp, fn) SET_by_offset(disp, _gloffset_Map2d, fn) +static void INLINE SET_Map2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_Map2d, fn); +} + #define CALL_Map2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map2f, parameters) #define GET_Map2f(disp) GET_by_offset(disp, _gloffset_Map2f) -#define SET_Map2f(disp, fn) SET_by_offset(disp, _gloffset_Map2f, fn) +static void INLINE SET_Map2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Map2f, fn); +} + #define CALL_MapGrid1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble)), _gloffset_MapGrid1d, parameters) #define GET_MapGrid1d(disp) GET_by_offset(disp, _gloffset_MapGrid1d) -#define SET_MapGrid1d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1d, fn) +static void INLINE SET_MapGrid1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MapGrid1d, fn); +} + #define CALL_MapGrid1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_MapGrid1f, parameters) #define GET_MapGrid1f(disp) GET_by_offset(disp, _gloffset_MapGrid1f) -#define SET_MapGrid1f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1f, fn) +static void INLINE SET_MapGrid1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MapGrid1f, fn); +} + #define CALL_MapGrid2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)), _gloffset_MapGrid2d, parameters) #define GET_MapGrid2d(disp) GET_by_offset(disp, _gloffset_MapGrid2d) -#define SET_MapGrid2d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2d, fn) +static void INLINE SET_MapGrid2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MapGrid2d, fn); +} + #define CALL_MapGrid2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)), _gloffset_MapGrid2f, parameters) #define GET_MapGrid2f(disp) GET_by_offset(disp, _gloffset_MapGrid2f) -#define SET_MapGrid2f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2f, fn) +static void INLINE SET_MapGrid2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MapGrid2f, fn); +} + #define CALL_EvalCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_EvalCoord1d, parameters) #define GET_EvalCoord1d(disp) GET_by_offset(disp, _gloffset_EvalCoord1d) -#define SET_EvalCoord1d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1d, fn) +static void INLINE SET_EvalCoord1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_EvalCoord1d, fn); +} + #define CALL_EvalCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord1dv, parameters) #define GET_EvalCoord1dv(disp) GET_by_offset(disp, _gloffset_EvalCoord1dv) -#define SET_EvalCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1dv, fn) +static void INLINE SET_EvalCoord1dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_EvalCoord1dv, fn); +} + #define CALL_EvalCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_EvalCoord1f, parameters) #define GET_EvalCoord1f(disp) GET_by_offset(disp, _gloffset_EvalCoord1f) -#define SET_EvalCoord1f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1f, fn) +static void INLINE SET_EvalCoord1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_EvalCoord1f, fn); +} + #define CALL_EvalCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord1fv, parameters) #define GET_EvalCoord1fv(disp) GET_by_offset(disp, _gloffset_EvalCoord1fv) -#define SET_EvalCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1fv, fn) +static void INLINE SET_EvalCoord1fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_EvalCoord1fv, fn); +} + #define CALL_EvalCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_EvalCoord2d, parameters) #define GET_EvalCoord2d(disp) GET_by_offset(disp, _gloffset_EvalCoord2d) -#define SET_EvalCoord2d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2d, fn) +static void INLINE SET_EvalCoord2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_EvalCoord2d, fn); +} + #define CALL_EvalCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord2dv, parameters) #define GET_EvalCoord2dv(disp) GET_by_offset(disp, _gloffset_EvalCoord2dv) -#define SET_EvalCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2dv, fn) +static void INLINE SET_EvalCoord2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_EvalCoord2dv, fn); +} + #define CALL_EvalCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_EvalCoord2f, parameters) #define GET_EvalCoord2f(disp) GET_by_offset(disp, _gloffset_EvalCoord2f) -#define SET_EvalCoord2f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2f, fn) +static void INLINE SET_EvalCoord2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_EvalCoord2f, fn); +} + #define CALL_EvalCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord2fv, parameters) #define GET_EvalCoord2fv(disp) GET_by_offset(disp, _gloffset_EvalCoord2fv) -#define SET_EvalCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2fv, fn) +static void INLINE SET_EvalCoord2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_EvalCoord2fv, fn); +} + #define CALL_EvalMesh1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_EvalMesh1, parameters) #define GET_EvalMesh1(disp) GET_by_offset(disp, _gloffset_EvalMesh1) -#define SET_EvalMesh1(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh1, fn) +static void INLINE SET_EvalMesh1(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint)) { + SET_by_offset(disp, _gloffset_EvalMesh1, fn); +} + #define CALL_EvalPoint1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_EvalPoint1, parameters) #define GET_EvalPoint1(disp) GET_by_offset(disp, _gloffset_EvalPoint1) -#define SET_EvalPoint1(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint1, fn) +static void INLINE SET_EvalPoint1(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_EvalPoint1, fn); +} + #define CALL_EvalMesh2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_EvalMesh2, parameters) #define GET_EvalMesh2(disp) GET_by_offset(disp, _gloffset_EvalMesh2) -#define SET_EvalMesh2(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh2, fn) +static void INLINE SET_EvalMesh2(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_EvalMesh2, fn); +} + #define CALL_EvalPoint2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_EvalPoint2, parameters) #define GET_EvalPoint2(disp) GET_by_offset(disp, _gloffset_EvalPoint2) -#define SET_EvalPoint2(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint2, fn) +static void INLINE SET_EvalPoint2(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_EvalPoint2, fn); +} + #define CALL_AlphaFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLclampf)), _gloffset_AlphaFunc, parameters) #define GET_AlphaFunc(disp) GET_by_offset(disp, _gloffset_AlphaFunc) -#define SET_AlphaFunc(disp, fn) SET_by_offset(disp, _gloffset_AlphaFunc, fn) +static void INLINE SET_AlphaFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLclampf)) { + SET_by_offset(disp, _gloffset_AlphaFunc, fn); +} + #define CALL_BlendFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendFunc, parameters) #define GET_BlendFunc(disp) GET_by_offset(disp, _gloffset_BlendFunc) -#define SET_BlendFunc(disp, fn) SET_by_offset(disp, _gloffset_BlendFunc, fn) +static void INLINE SET_BlendFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFunc, fn); +} + #define CALL_LogicOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_LogicOp, parameters) #define GET_LogicOp(disp) GET_by_offset(disp, _gloffset_LogicOp) -#define SET_LogicOp(disp, fn) SET_by_offset(disp, _gloffset_LogicOp, fn) +static void INLINE SET_LogicOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_LogicOp, fn); +} + #define CALL_StencilFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLuint)), _gloffset_StencilFunc, parameters) #define GET_StencilFunc(disp) GET_by_offset(disp, _gloffset_StencilFunc) -#define SET_StencilFunc(disp, fn) SET_by_offset(disp, _gloffset_StencilFunc, fn) +static void INLINE SET_StencilFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLuint)) { + SET_by_offset(disp, _gloffset_StencilFunc, fn); +} + #define CALL_StencilOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum)), _gloffset_StencilOp, parameters) #define GET_StencilOp(disp) GET_by_offset(disp, _gloffset_StencilOp) -#define SET_StencilOp(disp, fn) SET_by_offset(disp, _gloffset_StencilOp, fn) +static void INLINE SET_StencilOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_StencilOp, fn); +} + #define CALL_DepthFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DepthFunc, parameters) #define GET_DepthFunc(disp) GET_by_offset(disp, _gloffset_DepthFunc) -#define SET_DepthFunc(disp, fn) SET_by_offset(disp, _gloffset_DepthFunc, fn) +static void INLINE SET_DepthFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_DepthFunc, fn); +} + #define CALL_PixelZoom(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PixelZoom, parameters) #define GET_PixelZoom(disp) GET_by_offset(disp, _gloffset_PixelZoom) -#define SET_PixelZoom(disp, fn) SET_by_offset(disp, _gloffset_PixelZoom, fn) +static void INLINE SET_PixelZoom(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelZoom, fn); +} + #define CALL_PixelTransferf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTransferf, parameters) #define GET_PixelTransferf(disp) GET_by_offset(disp, _gloffset_PixelTransferf) -#define SET_PixelTransferf(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferf, fn) +static void INLINE SET_PixelTransferf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelTransferf, fn); +} + #define CALL_PixelTransferi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTransferi, parameters) #define GET_PixelTransferi(disp) GET_by_offset(disp, _gloffset_PixelTransferi) -#define SET_PixelTransferi(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferi, fn) +static void INLINE SET_PixelTransferi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PixelTransferi, fn); +} + #define CALL_PixelStoref(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelStoref, parameters) #define GET_PixelStoref(disp) GET_by_offset(disp, _gloffset_PixelStoref) -#define SET_PixelStoref(disp, fn) SET_by_offset(disp, _gloffset_PixelStoref, fn) +static void INLINE SET_PixelStoref(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelStoref, fn); +} + #define CALL_PixelStorei(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelStorei, parameters) #define GET_PixelStorei(disp) GET_by_offset(disp, _gloffset_PixelStorei) -#define SET_PixelStorei(disp, fn) SET_by_offset(disp, _gloffset_PixelStorei, fn) +static void INLINE SET_PixelStorei(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PixelStorei, fn); +} + #define CALL_PixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLfloat *)), _gloffset_PixelMapfv, parameters) #define GET_PixelMapfv(disp) GET_by_offset(disp, _gloffset_PixelMapfv) -#define SET_PixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapfv, fn) +static void INLINE SET_PixelMapfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_PixelMapfv, fn); +} + #define CALL_PixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLuint *)), _gloffset_PixelMapuiv, parameters) #define GET_PixelMapuiv(disp) GET_by_offset(disp, _gloffset_PixelMapuiv) -#define SET_PixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapuiv, fn) +static void INLINE SET_PixelMapuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_PixelMapuiv, fn); +} + #define CALL_PixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLushort *)), _gloffset_PixelMapusv, parameters) #define GET_PixelMapusv(disp) GET_by_offset(disp, _gloffset_PixelMapusv) -#define SET_PixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapusv, fn) +static void INLINE SET_PixelMapusv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLushort *)) { + SET_by_offset(disp, _gloffset_PixelMapusv, fn); +} + #define CALL_ReadBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ReadBuffer, parameters) #define GET_ReadBuffer(disp) GET_by_offset(disp, _gloffset_ReadBuffer) -#define SET_ReadBuffer(disp, fn) SET_by_offset(disp, _gloffset_ReadBuffer, fn) +static void INLINE SET_ReadBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ReadBuffer, fn); +} + #define CALL_CopyPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum)), _gloffset_CopyPixels, parameters) #define GET_CopyPixels(disp) GET_by_offset(disp, _gloffset_CopyPixels) -#define SET_CopyPixels(disp, fn) SET_by_offset(disp, _gloffset_CopyPixels, fn) +static void INLINE SET_CopyPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum)) { + SET_by_offset(disp, _gloffset_CopyPixels, fn); +} + #define CALL_ReadPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)), _gloffset_ReadPixels, parameters) #define GET_ReadPixels(disp) GET_by_offset(disp, _gloffset_ReadPixels) -#define SET_ReadPixels(disp, fn) SET_by_offset(disp, _gloffset_ReadPixels, fn) +static void INLINE SET_ReadPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_ReadPixels, fn); +} + #define CALL_DrawPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_DrawPixels, parameters) #define GET_DrawPixels(disp) GET_by_offset(disp, _gloffset_DrawPixels) -#define SET_DrawPixels(disp, fn) SET_by_offset(disp, _gloffset_DrawPixels, fn) +static void INLINE SET_DrawPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_DrawPixels, fn); +} + #define CALL_GetBooleanv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean *)), _gloffset_GetBooleanv, parameters) #define GET_GetBooleanv(disp) GET_by_offset(disp, _gloffset_GetBooleanv) -#define SET_GetBooleanv(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanv, fn) +static void INLINE SET_GetBooleanv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean *)) { + SET_by_offset(disp, _gloffset_GetBooleanv, fn); +} + #define CALL_GetClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetClipPlane, parameters) #define GET_GetClipPlane(disp) GET_by_offset(disp, _gloffset_GetClipPlane) -#define SET_GetClipPlane(disp, fn) SET_by_offset(disp, _gloffset_GetClipPlane, fn) +static void INLINE SET_GetClipPlane(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetClipPlane, fn); +} + #define CALL_GetDoublev(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetDoublev, parameters) #define GET_GetDoublev(disp) GET_by_offset(disp, _gloffset_GetDoublev) -#define SET_GetDoublev(disp, fn) SET_by_offset(disp, _gloffset_GetDoublev, fn) +static void INLINE SET_GetDoublev(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetDoublev, fn); +} + #define CALL_GetError(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetError, parameters) #define GET_GetError(disp) GET_by_offset(disp, _gloffset_GetError) -#define SET_GetError(disp, fn) SET_by_offset(disp, _gloffset_GetError, fn) +static void INLINE SET_GetError(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_GetError, fn); +} + #define CALL_GetFloatv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetFloatv, parameters) #define GET_GetFloatv(disp) GET_by_offset(disp, _gloffset_GetFloatv) -#define SET_GetFloatv(disp, fn) SET_by_offset(disp, _gloffset_GetFloatv, fn) +static void INLINE SET_GetFloatv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetFloatv, fn); +} + #define CALL_GetIntegerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetIntegerv, parameters) #define GET_GetIntegerv(disp) GET_by_offset(disp, _gloffset_GetIntegerv) -#define SET_GetIntegerv(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerv, fn) +static void INLINE SET_GetIntegerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetIntegerv, fn); +} + #define CALL_GetLightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetLightfv, parameters) #define GET_GetLightfv(disp) GET_by_offset(disp, _gloffset_GetLightfv) -#define SET_GetLightfv(disp, fn) SET_by_offset(disp, _gloffset_GetLightfv, fn) +static void INLINE SET_GetLightfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetLightfv, fn); +} + #define CALL_GetLightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetLightiv, parameters) #define GET_GetLightiv(disp) GET_by_offset(disp, _gloffset_GetLightiv) -#define SET_GetLightiv(disp, fn) SET_by_offset(disp, _gloffset_GetLightiv, fn) +static void INLINE SET_GetLightiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetLightiv, fn); +} + #define CALL_GetMapdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetMapdv, parameters) #define GET_GetMapdv(disp) GET_by_offset(disp, _gloffset_GetMapdv) -#define SET_GetMapdv(disp, fn) SET_by_offset(disp, _gloffset_GetMapdv, fn) +static void INLINE SET_GetMapdv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetMapdv, fn); +} + #define CALL_GetMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMapfv, parameters) #define GET_GetMapfv(disp) GET_by_offset(disp, _gloffset_GetMapfv) -#define SET_GetMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetMapfv, fn) +static void INLINE SET_GetMapfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetMapfv, fn); +} + #define CALL_GetMapiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMapiv, parameters) #define GET_GetMapiv(disp) GET_by_offset(disp, _gloffset_GetMapiv) -#define SET_GetMapiv(disp, fn) SET_by_offset(disp, _gloffset_GetMapiv, fn) +static void INLINE SET_GetMapiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetMapiv, fn); +} + #define CALL_GetMaterialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMaterialfv, parameters) #define GET_GetMaterialfv(disp) GET_by_offset(disp, _gloffset_GetMaterialfv) -#define SET_GetMaterialfv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialfv, fn) +static void INLINE SET_GetMaterialfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetMaterialfv, fn); +} + #define CALL_GetMaterialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMaterialiv, parameters) #define GET_GetMaterialiv(disp) GET_by_offset(disp, _gloffset_GetMaterialiv) -#define SET_GetMaterialiv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialiv, fn) +static void INLINE SET_GetMaterialiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetMaterialiv, fn); +} + #define CALL_GetPixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelMapfv, parameters) #define GET_GetPixelMapfv(disp) GET_by_offset(disp, _gloffset_GetPixelMapfv) -#define SET_GetPixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapfv, fn) +static void INLINE SET_GetPixelMapfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetPixelMapfv, fn); +} + #define CALL_GetPixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint *)), _gloffset_GetPixelMapuiv, parameters) #define GET_GetPixelMapuiv(disp) GET_by_offset(disp, _gloffset_GetPixelMapuiv) -#define SET_GetPixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn) +static void INLINE SET_GetPixelMapuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn); +} + #define CALL_GetPixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLushort *)), _gloffset_GetPixelMapusv, parameters) #define GET_GetPixelMapusv(disp) GET_by_offset(disp, _gloffset_GetPixelMapusv) -#define SET_GetPixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapusv, fn) +static void INLINE SET_GetPixelMapusv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLushort *)) { + SET_by_offset(disp, _gloffset_GetPixelMapusv, fn); +} + #define CALL_GetPolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte *)), _gloffset_GetPolygonStipple, parameters) #define GET_GetPolygonStipple(disp) GET_by_offset(disp, _gloffset_GetPolygonStipple) -#define SET_GetPolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_GetPolygonStipple, fn) +static void INLINE SET_GetPolygonStipple(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte *)) { + SET_by_offset(disp, _gloffset_GetPolygonStipple, fn); +} + #define CALL_GetString(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum)), _gloffset_GetString, parameters) #define GET_GetString(disp) GET_by_offset(disp, _gloffset_GetString) -#define SET_GetString(disp, fn) SET_by_offset(disp, _gloffset_GetString, fn) +static void INLINE SET_GetString(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_GetString, fn); +} + #define CALL_GetTexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexEnvfv, parameters) #define GET_GetTexEnvfv(disp) GET_by_offset(disp, _gloffset_GetTexEnvfv) -#define SET_GetTexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnvfv, fn) +static void INLINE SET_GetTexEnvfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexEnvfv, fn); +} + #define CALL_GetTexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexEnviv, parameters) #define GET_GetTexEnviv(disp) GET_by_offset(disp, _gloffset_GetTexEnviv) -#define SET_GetTexEnviv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnviv, fn) +static void INLINE SET_GetTexEnviv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexEnviv, fn); +} + #define CALL_GetTexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetTexGendv, parameters) #define GET_GetTexGendv(disp) GET_by_offset(disp, _gloffset_GetTexGendv) -#define SET_GetTexGendv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGendv, fn) +static void INLINE SET_GetTexGendv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetTexGendv, fn); +} + #define CALL_GetTexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexGenfv, parameters) #define GET_GetTexGenfv(disp) GET_by_offset(disp, _gloffset_GetTexGenfv) -#define SET_GetTexGenfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGenfv, fn) +static void INLINE SET_GetTexGenfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexGenfv, fn); +} + #define CALL_GetTexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexGeniv, parameters) #define GET_GetTexGeniv(disp) GET_by_offset(disp, _gloffset_GetTexGeniv) -#define SET_GetTexGeniv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGeniv, fn) +static void INLINE SET_GetTexGeniv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexGeniv, fn); +} + #define CALL_GetTexImage(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLvoid *)), _gloffset_GetTexImage, parameters) #define GET_GetTexImage(disp) GET_by_offset(disp, _gloffset_GetTexImage) -#define SET_GetTexImage(disp, fn) SET_by_offset(disp, _gloffset_GetTexImage, fn) +static void INLINE SET_GetTexImage(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetTexImage, fn); +} + #define CALL_GetTexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexParameterfv, parameters) #define GET_GetTexParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexParameterfv) -#define SET_GetTexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterfv, fn) +static void INLINE SET_GetTexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexParameterfv, fn); +} + #define CALL_GetTexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameteriv, parameters) #define GET_GetTexParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexParameteriv) -#define SET_GetTexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameteriv, fn) +static void INLINE SET_GetTexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexParameteriv, fn); +} + #define CALL_GetTexLevelParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLfloat *)), _gloffset_GetTexLevelParameterfv, parameters) #define GET_GetTexLevelParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameterfv) -#define SET_GetTexLevelParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn) +static void INLINE SET_GetTexLevelParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn); +} + #define CALL_GetTexLevelParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint *)), _gloffset_GetTexLevelParameteriv, parameters) #define GET_GetTexLevelParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameteriv) -#define SET_GetTexLevelParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn) +static void INLINE SET_GetTexLevelParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn); +} + #define CALL_IsEnabled(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_IsEnabled, parameters) #define GET_IsEnabled(disp) GET_by_offset(disp, _gloffset_IsEnabled) -#define SET_IsEnabled(disp, fn) SET_by_offset(disp, _gloffset_IsEnabled, fn) +static void INLINE SET_IsEnabled(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_IsEnabled, fn); +} + #define CALL_IsList(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsList, parameters) #define GET_IsList(disp) GET_by_offset(disp, _gloffset_IsList) -#define SET_IsList(disp, fn) SET_by_offset(disp, _gloffset_IsList, fn) +static void INLINE SET_IsList(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsList, fn); +} + #define CALL_DepthRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthRange, parameters) #define GET_DepthRange(disp) GET_by_offset(disp, _gloffset_DepthRange) -#define SET_DepthRange(disp, fn) SET_by_offset(disp, _gloffset_DepthRange, fn) +static void INLINE SET_DepthRange(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampd, GLclampd)) { + SET_by_offset(disp, _gloffset_DepthRange, fn); +} + #define CALL_Frustum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Frustum, parameters) #define GET_Frustum(disp) GET_by_offset(disp, _gloffset_Frustum) -#define SET_Frustum(disp, fn) SET_by_offset(disp, _gloffset_Frustum, fn) +static void INLINE SET_Frustum(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Frustum, fn); +} + #define CALL_LoadIdentity(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_LoadIdentity, parameters) #define GET_LoadIdentity(disp) GET_by_offset(disp, _gloffset_LoadIdentity) -#define SET_LoadIdentity(disp, fn) SET_by_offset(disp, _gloffset_LoadIdentity, fn) +static void INLINE SET_LoadIdentity(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_LoadIdentity, fn); +} + #define CALL_LoadMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadMatrixf, parameters) #define GET_LoadMatrixf(disp) GET_by_offset(disp, _gloffset_LoadMatrixf) -#define SET_LoadMatrixf(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixf, fn) +static void INLINE SET_LoadMatrixf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_LoadMatrixf, fn); +} + #define CALL_LoadMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadMatrixd, parameters) #define GET_LoadMatrixd(disp) GET_by_offset(disp, _gloffset_LoadMatrixd) -#define SET_LoadMatrixd(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixd, fn) +static void INLINE SET_LoadMatrixd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_LoadMatrixd, fn); +} + #define CALL_MatrixMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_MatrixMode, parameters) #define GET_MatrixMode(disp) GET_by_offset(disp, _gloffset_MatrixMode) -#define SET_MatrixMode(disp, fn) SET_by_offset(disp, _gloffset_MatrixMode, fn) +static void INLINE SET_MatrixMode(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_MatrixMode, fn); +} + #define CALL_MultMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultMatrixf, parameters) #define GET_MultMatrixf(disp) GET_by_offset(disp, _gloffset_MultMatrixf) -#define SET_MultMatrixf(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixf, fn) +static void INLINE SET_MultMatrixf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultMatrixf, fn); +} + #define CALL_MultMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultMatrixd, parameters) #define GET_MultMatrixd(disp) GET_by_offset(disp, _gloffset_MultMatrixd) -#define SET_MultMatrixd(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixd, fn) +static void INLINE SET_MultMatrixd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultMatrixd, fn); +} + #define CALL_Ortho(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Ortho, parameters) #define GET_Ortho(disp) GET_by_offset(disp, _gloffset_Ortho) -#define SET_Ortho(disp, fn) SET_by_offset(disp, _gloffset_Ortho, fn) +static void INLINE SET_Ortho(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Ortho, fn); +} + #define CALL_PopMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopMatrix, parameters) #define GET_PopMatrix(disp) GET_by_offset(disp, _gloffset_PopMatrix) -#define SET_PopMatrix(disp, fn) SET_by_offset(disp, _gloffset_PopMatrix, fn) +static void INLINE SET_PopMatrix(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopMatrix, fn); +} + #define CALL_PushMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PushMatrix, parameters) #define GET_PushMatrix(disp) GET_by_offset(disp, _gloffset_PushMatrix) -#define SET_PushMatrix(disp, fn) SET_by_offset(disp, _gloffset_PushMatrix, fn) +static void INLINE SET_PushMatrix(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PushMatrix, fn); +} + #define CALL_Rotated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rotated, parameters) #define GET_Rotated(disp) GET_by_offset(disp, _gloffset_Rotated) -#define SET_Rotated(disp, fn) SET_by_offset(disp, _gloffset_Rotated, fn) +static void INLINE SET_Rotated(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Rotated, fn); +} + #define CALL_Rotatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rotatef, parameters) #define GET_Rotatef(disp) GET_by_offset(disp, _gloffset_Rotatef) -#define SET_Rotatef(disp, fn) SET_by_offset(disp, _gloffset_Rotatef, fn) +static void INLINE SET_Rotatef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Rotatef, fn); +} + #define CALL_Scaled(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Scaled, parameters) #define GET_Scaled(disp) GET_by_offset(disp, _gloffset_Scaled) -#define SET_Scaled(disp, fn) SET_by_offset(disp, _gloffset_Scaled, fn) +static void INLINE SET_Scaled(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Scaled, fn); +} + #define CALL_Scalef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Scalef, parameters) #define GET_Scalef(disp) GET_by_offset(disp, _gloffset_Scalef) -#define SET_Scalef(disp, fn) SET_by_offset(disp, _gloffset_Scalef, fn) +static void INLINE SET_Scalef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Scalef, fn); +} + #define CALL_Translated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Translated, parameters) #define GET_Translated(disp) GET_by_offset(disp, _gloffset_Translated) -#define SET_Translated(disp, fn) SET_by_offset(disp, _gloffset_Translated, fn) +static void INLINE SET_Translated(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Translated, fn); +} + #define CALL_Translatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Translatef, parameters) #define GET_Translatef(disp) GET_by_offset(disp, _gloffset_Translatef) -#define SET_Translatef(disp, fn) SET_by_offset(disp, _gloffset_Translatef, fn) +static void INLINE SET_Translatef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Translatef, fn); +} + #define CALL_Viewport(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Viewport, parameters) #define GET_Viewport(disp) GET_by_offset(disp, _gloffset_Viewport) -#define SET_Viewport(disp, fn) SET_by_offset(disp, _gloffset_Viewport, fn) +static void INLINE SET_Viewport(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_Viewport, fn); +} + #define CALL_ArrayElement(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ArrayElement, parameters) #define GET_ArrayElement(disp) GET_by_offset(disp, _gloffset_ArrayElement) -#define SET_ArrayElement(disp, fn) SET_by_offset(disp, _gloffset_ArrayElement, fn) +static void INLINE SET_ArrayElement(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_ArrayElement, fn); +} + #define CALL_BindTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTexture, parameters) #define GET_BindTexture(disp) GET_by_offset(disp, _gloffset_BindTexture) -#define SET_BindTexture(disp, fn) SET_by_offset(disp, _gloffset_BindTexture, fn) +static void INLINE SET_BindTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindTexture, fn); +} + #define CALL_ColorPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_ColorPointer, parameters) #define GET_ColorPointer(disp) GET_by_offset(disp, _gloffset_ColorPointer) -#define SET_ColorPointer(disp, fn) SET_by_offset(disp, _gloffset_ColorPointer, fn) +static void INLINE SET_ColorPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorPointer, fn); +} + #define CALL_DisableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DisableClientState, parameters) #define GET_DisableClientState(disp) GET_by_offset(disp, _gloffset_DisableClientState) -#define SET_DisableClientState(disp, fn) SET_by_offset(disp, _gloffset_DisableClientState, fn) +static void INLINE SET_DisableClientState(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_DisableClientState, fn); +} + #define CALL_DrawArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei)), _gloffset_DrawArrays, parameters) #define GET_DrawArrays(disp) GET_by_offset(disp, _gloffset_DrawArrays) -#define SET_DrawArrays(disp, fn) SET_by_offset(disp, _gloffset_DrawArrays, fn) +static void INLINE SET_DrawArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_DrawArrays, fn); +} + #define CALL_DrawElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawElements, parameters) #define GET_DrawElements(disp) GET_by_offset(disp, _gloffset_DrawElements) -#define SET_DrawElements(disp, fn) SET_by_offset(disp, _gloffset_DrawElements, fn) +static void INLINE SET_DrawElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_DrawElements, fn); +} + #define CALL_EdgeFlagPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_EdgeFlagPointer, parameters) #define GET_EdgeFlagPointer(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointer) -#define SET_EdgeFlagPointer(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn) +static void INLINE SET_EdgeFlagPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn); +} + #define CALL_EnableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EnableClientState, parameters) #define GET_EnableClientState(disp) GET_by_offset(disp, _gloffset_EnableClientState) -#define SET_EnableClientState(disp, fn) SET_by_offset(disp, _gloffset_EnableClientState, fn) +static void INLINE SET_EnableClientState(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_EnableClientState, fn); +} + #define CALL_IndexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_IndexPointer, parameters) #define GET_IndexPointer(disp) GET_by_offset(disp, _gloffset_IndexPointer) -#define SET_IndexPointer(disp, fn) SET_by_offset(disp, _gloffset_IndexPointer, fn) +static void INLINE SET_IndexPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_IndexPointer, fn); +} + #define CALL_Indexub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte)), _gloffset_Indexub, parameters) #define GET_Indexub(disp) GET_by_offset(disp, _gloffset_Indexub) -#define SET_Indexub(disp, fn) SET_by_offset(disp, _gloffset_Indexub, fn) +static void INLINE SET_Indexub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte)) { + SET_by_offset(disp, _gloffset_Indexub, fn); +} + #define CALL_Indexubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Indexubv, parameters) #define GET_Indexubv(disp) GET_by_offset(disp, _gloffset_Indexubv) -#define SET_Indexubv(disp, fn) SET_by_offset(disp, _gloffset_Indexubv, fn) +static void INLINE SET_Indexubv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_Indexubv, fn); +} + #define CALL_InterleavedArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_InterleavedArrays, parameters) #define GET_InterleavedArrays(disp) GET_by_offset(disp, _gloffset_InterleavedArrays) -#define SET_InterleavedArrays(disp, fn) SET_by_offset(disp, _gloffset_InterleavedArrays, fn) +static void INLINE SET_InterleavedArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_InterleavedArrays, fn); +} + #define CALL_NormalPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_NormalPointer, parameters) #define GET_NormalPointer(disp) GET_by_offset(disp, _gloffset_NormalPointer) -#define SET_NormalPointer(disp, fn) SET_by_offset(disp, _gloffset_NormalPointer, fn) +static void INLINE SET_NormalPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_NormalPointer, fn); +} + #define CALL_PolygonOffset(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffset, parameters) #define GET_PolygonOffset(disp) GET_by_offset(disp, _gloffset_PolygonOffset) -#define SET_PolygonOffset(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffset, fn) +static void INLINE SET_PolygonOffset(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_PolygonOffset, fn); +} + #define CALL_TexCoordPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_TexCoordPointer, parameters) #define GET_TexCoordPointer(disp) GET_by_offset(disp, _gloffset_TexCoordPointer) -#define SET_TexCoordPointer(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointer, fn) +static void INLINE SET_TexCoordPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexCoordPointer, fn); +} + #define CALL_VertexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexPointer, parameters) #define GET_VertexPointer(disp) GET_by_offset(disp, _gloffset_VertexPointer) -#define SET_VertexPointer(disp, fn) SET_by_offset(disp, _gloffset_VertexPointer, fn) +static void INLINE SET_VertexPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexPointer, fn); +} + #define CALL_AreTexturesResident(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreTexturesResident, parameters) #define GET_AreTexturesResident(disp) GET_by_offset(disp, _gloffset_AreTexturesResident) -#define SET_AreTexturesResident(disp, fn) SET_by_offset(disp, _gloffset_AreTexturesResident, fn) +static void INLINE SET_AreTexturesResident(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLboolean *)) { + SET_by_offset(disp, _gloffset_AreTexturesResident, fn); +} + #define CALL_CopyTexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)), _gloffset_CopyTexImage1D, parameters) #define GET_CopyTexImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexImage1D) -#define SET_CopyTexImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage1D, fn) +static void INLINE SET_CopyTexImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_CopyTexImage1D, fn); +} + #define CALL_CopyTexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)), _gloffset_CopyTexImage2D, parameters) #define GET_CopyTexImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexImage2D) -#define SET_CopyTexImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage2D, fn) +static void INLINE SET_CopyTexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_CopyTexImage2D, fn); +} + #define CALL_CopyTexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei)), _gloffset_CopyTexSubImage1D, parameters) #define GET_CopyTexSubImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage1D) -#define SET_CopyTexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn) +static void INLINE SET_CopyTexSubImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn); +} + #define CALL_CopyTexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage2D, parameters) #define GET_CopyTexSubImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage2D) -#define SET_CopyTexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn) +static void INLINE SET_CopyTexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn); +} + #define CALL_DeleteTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTextures, parameters) #define GET_DeleteTextures(disp) GET_by_offset(disp, _gloffset_DeleteTextures) -#define SET_DeleteTextures(disp, fn) SET_by_offset(disp, _gloffset_DeleteTextures, fn) +static void INLINE SET_DeleteTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteTextures, fn); +} + #define CALL_GenTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTextures, parameters) #define GET_GenTextures(disp) GET_by_offset(disp, _gloffset_GenTextures) -#define SET_GenTextures(disp, fn) SET_by_offset(disp, _gloffset_GenTextures, fn) +static void INLINE SET_GenTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenTextures, fn); +} + #define CALL_GetPointerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid **)), _gloffset_GetPointerv, parameters) #define GET_GetPointerv(disp) GET_by_offset(disp, _gloffset_GetPointerv) -#define SET_GetPointerv(disp, fn) SET_by_offset(disp, _gloffset_GetPointerv, fn) +static void INLINE SET_GetPointerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetPointerv, fn); +} + #define CALL_IsTexture(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTexture, parameters) #define GET_IsTexture(disp) GET_by_offset(disp, _gloffset_IsTexture) -#define SET_IsTexture(disp, fn) SET_by_offset(disp, _gloffset_IsTexture, fn) +static void INLINE SET_IsTexture(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsTexture, fn); +} + #define CALL_PrioritizeTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, const GLclampf *)), _gloffset_PrioritizeTextures, parameters) #define GET_PrioritizeTextures(disp) GET_by_offset(disp, _gloffset_PrioritizeTextures) -#define SET_PrioritizeTextures(disp, fn) SET_by_offset(disp, _gloffset_PrioritizeTextures, fn) +static void INLINE SET_PrioritizeTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *, const GLclampf *)) { + SET_by_offset(disp, _gloffset_PrioritizeTextures, fn); +} + #define CALL_TexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage1D, parameters) #define GET_TexSubImage1D(disp) GET_by_offset(disp, _gloffset_TexSubImage1D) -#define SET_TexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage1D, fn) +static void INLINE SET_TexSubImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexSubImage1D, fn); +} + #define CALL_TexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage2D, parameters) #define GET_TexSubImage2D(disp) GET_by_offset(disp, _gloffset_TexSubImage2D) -#define SET_TexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage2D, fn) +static void INLINE SET_TexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexSubImage2D, fn); +} + #define CALL_PopClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopClientAttrib, parameters) #define GET_PopClientAttrib(disp) GET_by_offset(disp, _gloffset_PopClientAttrib) -#define SET_PopClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopClientAttrib, fn) +static void INLINE SET_PopClientAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopClientAttrib, fn); +} + #define CALL_PushClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushClientAttrib, parameters) #define GET_PushClientAttrib(disp) GET_by_offset(disp, _gloffset_PushClientAttrib) -#define SET_PushClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushClientAttrib, fn) +static void INLINE SET_PushClientAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { + SET_by_offset(disp, _gloffset_PushClientAttrib, fn); +} + #define CALL_BlendColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_BlendColor, parameters) #define GET_BlendColor(disp) GET_by_offset(disp, _gloffset_BlendColor) -#define SET_BlendColor(disp, fn) SET_by_offset(disp, _gloffset_BlendColor, fn) +static void INLINE SET_BlendColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { + SET_by_offset(disp, _gloffset_BlendColor, fn); +} + #define CALL_BlendEquation(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BlendEquation, parameters) #define GET_BlendEquation(disp) GET_by_offset(disp, _gloffset_BlendEquation) -#define SET_BlendEquation(disp, fn) SET_by_offset(disp, _gloffset_BlendEquation, fn) +static void INLINE SET_BlendEquation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquation, fn); +} + #define CALL_DrawRangeElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawRangeElements, parameters) #define GET_DrawRangeElements(disp) GET_by_offset(disp, _gloffset_DrawRangeElements) -#define SET_DrawRangeElements(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElements, fn) +static void INLINE SET_DrawRangeElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_DrawRangeElements, fn); +} + #define CALL_ColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorTable, parameters) #define GET_ColorTable(disp) GET_by_offset(disp, _gloffset_ColorTable) -#define SET_ColorTable(disp, fn) SET_by_offset(disp, _gloffset_ColorTable, fn) +static void INLINE SET_ColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorTable, fn); +} + #define CALL_ColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ColorTableParameterfv, parameters) #define GET_ColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_ColorTableParameterfv) -#define SET_ColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn) +static void INLINE SET_ColorTableParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn); +} + #define CALL_ColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ColorTableParameteriv, parameters) #define GET_ColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_ColorTableParameteriv) -#define SET_ColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn) +static void INLINE SET_ColorTableParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn); +} + #define CALL_CopyColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyColorTable, parameters) #define GET_CopyColorTable(disp) GET_by_offset(disp, _gloffset_CopyColorTable) -#define SET_CopyColorTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorTable, fn) +static void INLINE SET_CopyColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyColorTable, fn); +} + #define CALL_GetColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetColorTable, parameters) #define GET_GetColorTable(disp) GET_by_offset(disp, _gloffset_GetColorTable) -#define SET_GetColorTable(disp, fn) SET_by_offset(disp, _gloffset_GetColorTable, fn) +static void INLINE SET_GetColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetColorTable, fn); +} + #define CALL_GetColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetColorTableParameterfv, parameters) #define GET_GetColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameterfv) -#define SET_GetColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn) +static void INLINE SET_GetColorTableParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn); +} + #define CALL_GetColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetColorTableParameteriv, parameters) #define GET_GetColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameteriv) -#define SET_GetColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn) +static void INLINE SET_GetColorTableParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn); +} + #define CALL_ColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorSubTable, parameters) #define GET_ColorSubTable(disp) GET_by_offset(disp, _gloffset_ColorSubTable) -#define SET_ColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_ColorSubTable, fn) +static void INLINE SET_ColorSubTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorSubTable, fn); +} + #define CALL_CopyColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLint, GLint, GLsizei)), _gloffset_CopyColorSubTable, parameters) #define GET_CopyColorSubTable(disp) GET_by_offset(disp, _gloffset_CopyColorSubTable) -#define SET_CopyColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorSubTable, fn) +static void INLINE SET_CopyColorSubTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyColorSubTable, fn); +} + #define CALL_ConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter1D, parameters) #define GET_ConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter1D) -#define SET_ConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn) +static void INLINE SET_ConvolutionFilter1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn); +} + #define CALL_ConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter2D, parameters) #define GET_ConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter2D) -#define SET_ConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn) +static void INLINE SET_ConvolutionFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn); +} + #define CALL_ConvolutionParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_ConvolutionParameterf, parameters) #define GET_ConvolutionParameterf(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterf) -#define SET_ConvolutionParameterf(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn) +static void INLINE SET_ConvolutionParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn); +} + #define CALL_ConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ConvolutionParameterfv, parameters) #define GET_ConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterfv) -#define SET_ConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn) +static void INLINE SET_ConvolutionParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn); +} + #define CALL_ConvolutionParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_ConvolutionParameteri, parameters) #define GET_ConvolutionParameteri(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteri) -#define SET_ConvolutionParameteri(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn) +static void INLINE SET_ConvolutionParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn); +} + #define CALL_ConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ConvolutionParameteriv, parameters) #define GET_ConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteriv) -#define SET_ConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn) +static void INLINE SET_ConvolutionParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn); +} + #define CALL_CopyConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyConvolutionFilter1D, parameters) #define GET_CopyConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D) -#define SET_CopyConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn) +static void INLINE SET_CopyConvolutionFilter1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn); +} + #define CALL_CopyConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyConvolutionFilter2D, parameters) #define GET_CopyConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D) -#define SET_CopyConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn) +static void INLINE SET_CopyConvolutionFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn); +} + #define CALL_GetConvolutionFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetConvolutionFilter, parameters) #define GET_GetConvolutionFilter(disp) GET_by_offset(disp, _gloffset_GetConvolutionFilter) -#define SET_GetConvolutionFilter(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn) +static void INLINE SET_GetConvolutionFilter(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn); +} + #define CALL_GetConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetConvolutionParameterfv, parameters) #define GET_GetConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameterfv) -#define SET_GetConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn) +static void INLINE SET_GetConvolutionParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn); +} + #define CALL_GetConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetConvolutionParameteriv, parameters) #define GET_GetConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameteriv) -#define SET_GetConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn) +static void INLINE SET_GetConvolutionParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn); +} + #define CALL_GetSeparableFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)), _gloffset_GetSeparableFilter, parameters) #define GET_GetSeparableFilter(disp) GET_by_offset(disp, _gloffset_GetSeparableFilter) -#define SET_GetSeparableFilter(disp, fn) SET_by_offset(disp, _gloffset_GetSeparableFilter, fn) +static void INLINE SET_GetSeparableFilter(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetSeparableFilter, fn); +} + #define CALL_SeparableFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)), _gloffset_SeparableFilter2D, parameters) #define GET_SeparableFilter2D(disp) GET_by_offset(disp, _gloffset_SeparableFilter2D) -#define SET_SeparableFilter2D(disp, fn) SET_by_offset(disp, _gloffset_SeparableFilter2D, fn) +static void INLINE SET_SeparableFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)) { + SET_by_offset(disp, _gloffset_SeparableFilter2D, fn); +} + #define CALL_GetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetHistogram, parameters) #define GET_GetHistogram(disp) GET_by_offset(disp, _gloffset_GetHistogram) -#define SET_GetHistogram(disp, fn) SET_by_offset(disp, _gloffset_GetHistogram, fn) +static void INLINE SET_GetHistogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetHistogram, fn); +} + #define CALL_GetHistogramParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetHistogramParameterfv, parameters) #define GET_GetHistogramParameterfv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameterfv) -#define SET_GetHistogramParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn) +static void INLINE SET_GetHistogramParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn); +} + #define CALL_GetHistogramParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetHistogramParameteriv, parameters) #define GET_GetHistogramParameteriv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameteriv) -#define SET_GetHistogramParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn) +static void INLINE SET_GetHistogramParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn); +} + #define CALL_GetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetMinmax, parameters) #define GET_GetMinmax(disp) GET_by_offset(disp, _gloffset_GetMinmax) -#define SET_GetMinmax(disp, fn) SET_by_offset(disp, _gloffset_GetMinmax, fn) +static void INLINE SET_GetMinmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetMinmax, fn); +} + #define CALL_GetMinmaxParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMinmaxParameterfv, parameters) #define GET_GetMinmaxParameterfv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameterfv) -#define SET_GetMinmaxParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn) +static void INLINE SET_GetMinmaxParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn); +} + #define CALL_GetMinmaxParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMinmaxParameteriv, parameters) #define GET_GetMinmaxParameteriv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameteriv) -#define SET_GetMinmaxParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn) +static void INLINE SET_GetMinmaxParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn); +} + #define CALL_Histogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLboolean)), _gloffset_Histogram, parameters) #define GET_Histogram(disp) GET_by_offset(disp, _gloffset_Histogram) -#define SET_Histogram(disp, fn) SET_by_offset(disp, _gloffset_Histogram, fn) +static void INLINE SET_Histogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, GLboolean)) { + SET_by_offset(disp, _gloffset_Histogram, fn); +} + #define CALL_Minmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLboolean)), _gloffset_Minmax, parameters) #define GET_Minmax(disp) GET_by_offset(disp, _gloffset_Minmax) -#define SET_Minmax(disp, fn) SET_by_offset(disp, _gloffset_Minmax, fn) +static void INLINE SET_Minmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLboolean)) { + SET_by_offset(disp, _gloffset_Minmax, fn); +} + #define CALL_ResetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetHistogram, parameters) #define GET_ResetHistogram(disp) GET_by_offset(disp, _gloffset_ResetHistogram) -#define SET_ResetHistogram(disp, fn) SET_by_offset(disp, _gloffset_ResetHistogram, fn) +static void INLINE SET_ResetHistogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ResetHistogram, fn); +} + #define CALL_ResetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetMinmax, parameters) #define GET_ResetMinmax(disp) GET_by_offset(disp, _gloffset_ResetMinmax) -#define SET_ResetMinmax(disp, fn) SET_by_offset(disp, _gloffset_ResetMinmax, fn) +static void INLINE SET_ResetMinmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ResetMinmax, fn); +} + #define CALL_TexImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage3D, parameters) #define GET_TexImage3D(disp) GET_by_offset(disp, _gloffset_TexImage3D) -#define SET_TexImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexImage3D, fn) +static void INLINE SET_TexImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexImage3D, fn); +} + #define CALL_TexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage3D, parameters) #define GET_TexSubImage3D(disp) GET_by_offset(disp, _gloffset_TexSubImage3D) -#define SET_TexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage3D, fn) +static void INLINE SET_TexSubImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexSubImage3D, fn); +} + #define CALL_CopyTexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage3D, parameters) #define GET_CopyTexSubImage3D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage3D) -#define SET_CopyTexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn) +static void INLINE SET_CopyTexSubImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn); +} + #define CALL_ActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveTextureARB, parameters) #define GET_ActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ActiveTextureARB) -#define SET_ActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ActiveTextureARB, fn) +static void INLINE SET_ActiveTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ActiveTextureARB, fn); +} + #define CALL_ClientActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ClientActiveTextureARB, parameters) #define GET_ClientActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ClientActiveTextureARB) -#define SET_ClientActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn) +static void INLINE SET_ClientActiveTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn); +} + #define CALL_MultiTexCoord1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble)), _gloffset_MultiTexCoord1dARB, parameters) #define GET_MultiTexCoord1dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dARB) -#define SET_MultiTexCoord1dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn) +static void INLINE SET_MultiTexCoord1dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn); +} + #define CALL_MultiTexCoord1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord1dvARB, parameters) #define GET_MultiTexCoord1dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB) -#define SET_MultiTexCoord1dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn) +static void INLINE SET_MultiTexCoord1dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn); +} + #define CALL_MultiTexCoord1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_MultiTexCoord1fARB, parameters) #define GET_MultiTexCoord1fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fARB) -#define SET_MultiTexCoord1fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn) +static void INLINE SET_MultiTexCoord1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn); +} + #define CALL_MultiTexCoord1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord1fvARB, parameters) #define GET_MultiTexCoord1fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB) -#define SET_MultiTexCoord1fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn) +static void INLINE SET_MultiTexCoord1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn); +} + #define CALL_MultiTexCoord1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_MultiTexCoord1iARB, parameters) #define GET_MultiTexCoord1iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1iARB) -#define SET_MultiTexCoord1iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn) +static void INLINE SET_MultiTexCoord1iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn); +} + #define CALL_MultiTexCoord1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord1ivARB, parameters) #define GET_MultiTexCoord1ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB) -#define SET_MultiTexCoord1ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn) +static void INLINE SET_MultiTexCoord1ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn); +} + #define CALL_MultiTexCoord1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort)), _gloffset_MultiTexCoord1sARB, parameters) #define GET_MultiTexCoord1sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1sARB) -#define SET_MultiTexCoord1sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn) +static void INLINE SET_MultiTexCoord1sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn); +} + #define CALL_MultiTexCoord1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord1svARB, parameters) #define GET_MultiTexCoord1svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1svARB) -#define SET_MultiTexCoord1svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn) +static void INLINE SET_MultiTexCoord1svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn); +} + #define CALL_MultiTexCoord2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble)), _gloffset_MultiTexCoord2dARB, parameters) #define GET_MultiTexCoord2dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dARB) -#define SET_MultiTexCoord2dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn) +static void INLINE SET_MultiTexCoord2dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn); +} + #define CALL_MultiTexCoord2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord2dvARB, parameters) #define GET_MultiTexCoord2dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB) -#define SET_MultiTexCoord2dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn) +static void INLINE SET_MultiTexCoord2dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn); +} + #define CALL_MultiTexCoord2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat)), _gloffset_MultiTexCoord2fARB, parameters) #define GET_MultiTexCoord2fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fARB) -#define SET_MultiTexCoord2fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn) +static void INLINE SET_MultiTexCoord2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn); +} + #define CALL_MultiTexCoord2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord2fvARB, parameters) #define GET_MultiTexCoord2fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB) -#define SET_MultiTexCoord2fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn) +static void INLINE SET_MultiTexCoord2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn); +} + #define CALL_MultiTexCoord2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_MultiTexCoord2iARB, parameters) #define GET_MultiTexCoord2iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2iARB) -#define SET_MultiTexCoord2iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn) +static void INLINE SET_MultiTexCoord2iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn); +} + #define CALL_MultiTexCoord2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord2ivARB, parameters) #define GET_MultiTexCoord2ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB) -#define SET_MultiTexCoord2ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn) +static void INLINE SET_MultiTexCoord2ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn); +} + #define CALL_MultiTexCoord2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort)), _gloffset_MultiTexCoord2sARB, parameters) #define GET_MultiTexCoord2sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2sARB) -#define SET_MultiTexCoord2sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn) +static void INLINE SET_MultiTexCoord2sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn); +} + #define CALL_MultiTexCoord2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord2svARB, parameters) #define GET_MultiTexCoord2svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2svARB) -#define SET_MultiTexCoord2svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn) +static void INLINE SET_MultiTexCoord2svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn); +} + #define CALL_MultiTexCoord3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord3dARB, parameters) #define GET_MultiTexCoord3dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dARB) -#define SET_MultiTexCoord3dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn) +static void INLINE SET_MultiTexCoord3dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn); +} + #define CALL_MultiTexCoord3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord3dvARB, parameters) #define GET_MultiTexCoord3dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB) -#define SET_MultiTexCoord3dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn) +static void INLINE SET_MultiTexCoord3dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn); +} + #define CALL_MultiTexCoord3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord3fARB, parameters) #define GET_MultiTexCoord3fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fARB) -#define SET_MultiTexCoord3fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn) +static void INLINE SET_MultiTexCoord3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn); +} + #define CALL_MultiTexCoord3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord3fvARB, parameters) #define GET_MultiTexCoord3fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB) -#define SET_MultiTexCoord3fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn) +static void INLINE SET_MultiTexCoord3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn); +} + #define CALL_MultiTexCoord3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint)), _gloffset_MultiTexCoord3iARB, parameters) #define GET_MultiTexCoord3iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3iARB) -#define SET_MultiTexCoord3iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn) +static void INLINE SET_MultiTexCoord3iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn); +} + #define CALL_MultiTexCoord3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord3ivARB, parameters) #define GET_MultiTexCoord3ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB) -#define SET_MultiTexCoord3ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn) +static void INLINE SET_MultiTexCoord3ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn); +} + #define CALL_MultiTexCoord3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord3sARB, parameters) #define GET_MultiTexCoord3sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3sARB) -#define SET_MultiTexCoord3sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn) +static void INLINE SET_MultiTexCoord3sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn); +} + #define CALL_MultiTexCoord3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord3svARB, parameters) #define GET_MultiTexCoord3svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3svARB) -#define SET_MultiTexCoord3svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn) +static void INLINE SET_MultiTexCoord3svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn); +} + #define CALL_MultiTexCoord4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord4dARB, parameters) #define GET_MultiTexCoord4dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dARB) -#define SET_MultiTexCoord4dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn) +static void INLINE SET_MultiTexCoord4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn); +} + #define CALL_MultiTexCoord4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord4dvARB, parameters) #define GET_MultiTexCoord4dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB) -#define SET_MultiTexCoord4dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn) +static void INLINE SET_MultiTexCoord4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn); +} + #define CALL_MultiTexCoord4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord4fARB, parameters) #define GET_MultiTexCoord4fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fARB) -#define SET_MultiTexCoord4fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn) +static void INLINE SET_MultiTexCoord4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn); +} + #define CALL_MultiTexCoord4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord4fvARB, parameters) #define GET_MultiTexCoord4fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB) -#define SET_MultiTexCoord4fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn) +static void INLINE SET_MultiTexCoord4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn); +} + #define CALL_MultiTexCoord4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_MultiTexCoord4iARB, parameters) #define GET_MultiTexCoord4iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4iARB) -#define SET_MultiTexCoord4iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn) +static void INLINE SET_MultiTexCoord4iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn); +} + #define CALL_MultiTexCoord4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord4ivARB, parameters) #define GET_MultiTexCoord4ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB) -#define SET_MultiTexCoord4ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn) +static void INLINE SET_MultiTexCoord4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn); +} + #define CALL_MultiTexCoord4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord4sARB, parameters) #define GET_MultiTexCoord4sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4sARB) -#define SET_MultiTexCoord4sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn) +static void INLINE SET_MultiTexCoord4sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn); +} + #define CALL_MultiTexCoord4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord4svARB, parameters) #define GET_MultiTexCoord4svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4svARB) -#define SET_MultiTexCoord4svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn) +static void INLINE SET_MultiTexCoord4svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn); +} + #define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_AttachShader, parameters) #define GET_AttachShader(disp) GET_by_offset(disp, _gloffset_AttachShader) -#define SET_AttachShader(disp, fn) SET_by_offset(disp, _gloffset_AttachShader, fn) +static void INLINE SET_AttachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AttachShader, fn); +} + #define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), _gloffset_CreateProgram, parameters) #define GET_CreateProgram(disp) GET_by_offset(disp, _gloffset_CreateProgram) -#define SET_CreateProgram(disp, fn) SET_by_offset(disp, _gloffset_CreateProgram, fn) +static void INLINE SET_CreateProgram(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_CreateProgram, fn); +} + #define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), _gloffset_CreateShader, parameters) #define GET_CreateShader(disp) GET_by_offset(disp, _gloffset_CreateShader) -#define SET_CreateShader(disp, fn) SET_by_offset(disp, _gloffset_CreateShader, fn) +static void INLINE SET_CreateShader(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CreateShader, fn); +} + #define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteProgram, parameters) #define GET_DeleteProgram(disp) GET_by_offset(disp, _gloffset_DeleteProgram) -#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgram, fn) +static void INLINE SET_DeleteProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DeleteProgram, fn); +} + #define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteShader, parameters) #define GET_DeleteShader(disp) GET_by_offset(disp, _gloffset_DeleteShader) -#define SET_DeleteShader(disp, fn) SET_by_offset(disp, _gloffset_DeleteShader, fn) +static void INLINE SET_DeleteShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DeleteShader, fn); +} + #define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_DetachShader, parameters) #define GET_DetachShader(disp) GET_by_offset(disp, _gloffset_DetachShader) -#define SET_DetachShader(disp, fn) SET_by_offset(disp, _gloffset_DetachShader, fn) +static void INLINE SET_DetachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_DetachShader, fn); +} + #define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), _gloffset_GetAttachedShaders, parameters) #define GET_GetAttachedShaders(disp) GET_by_offset(disp, _gloffset_GetAttachedShaders) -#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedShaders, fn) +static void INLINE SET_GetAttachedShaders(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLuint *)) { + SET_by_offset(disp, _gloffset_GetAttachedShaders, fn); +} + #define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetProgramInfoLog, parameters) #define GET_GetProgramInfoLog(disp) GET_by_offset(disp, _gloffset_GetProgramInfoLog) -#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn) +static void INLINE SET_GetProgramInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { + SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn); +} + #define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramiv, parameters) #define GET_GetProgramiv(disp) GET_by_offset(disp, _gloffset_GetProgramiv) -#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, _gloffset_GetProgramiv, fn) +static void INLINE SET_GetProgramiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetProgramiv, fn); +} + #define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetShaderInfoLog, parameters) #define GET_GetShaderInfoLog(disp) GET_by_offset(disp, _gloffset_GetShaderInfoLog) -#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn) +static void INLINE SET_GetShaderInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { + SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn); +} + #define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetShaderiv, parameters) #define GET_GetShaderiv(disp) GET_by_offset(disp, _gloffset_GetShaderiv) -#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, _gloffset_GetShaderiv, fn) +static void INLINE SET_GetShaderiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetShaderiv, fn); +} + #define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgram, parameters) #define GET_IsProgram(disp) GET_by_offset(disp, _gloffset_IsProgram) -#define SET_IsProgram(disp, fn) SET_by_offset(disp, _gloffset_IsProgram, fn) +static void INLINE SET_IsProgram(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsProgram, fn); +} + #define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsShader, parameters) #define GET_IsShader(disp) GET_by_offset(disp, _gloffset_IsShader) -#define SET_IsShader(disp, fn) SET_by_offset(disp, _gloffset_IsShader, fn) +static void INLINE SET_IsShader(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsShader, fn); +} + #define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparate, parameters) #define GET_StencilFuncSeparate(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparate) -#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn) +static void INLINE SET_StencilFuncSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { + SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn); +} + #define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_StencilMaskSeparate, parameters) #define GET_StencilMaskSeparate(disp) GET_by_offset(disp, _gloffset_StencilMaskSeparate) -#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn) +static void INLINE SET_StencilMaskSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn); +} + #define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_StencilOpSeparate, parameters) #define GET_StencilOpSeparate(disp) GET_by_offset(disp, _gloffset_StencilOpSeparate) -#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilOpSeparate, fn) +static void INLINE SET_StencilOpSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_StencilOpSeparate, fn); +} + #define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x3fv, parameters) #define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x3fv) -#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn) +static void INLINE SET_UniformMatrix2x3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn); +} + #define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x4fv, parameters) #define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x4fv) -#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn) +static void INLINE SET_UniformMatrix2x4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn); +} + #define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x2fv, parameters) #define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x2fv) -#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn) +static void INLINE SET_UniformMatrix3x2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn); +} + #define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x4fv, parameters) #define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x4fv) -#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn) +static void INLINE SET_UniformMatrix3x4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn); +} + #define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x2fv, parameters) #define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x2fv) -#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn) +static void INLINE SET_UniformMatrix4x2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn); +} + #define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x3fv, parameters) #define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x3fv) -#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn) +static void INLINE SET_UniformMatrix4x3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn); +} + #define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters) #define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor) -#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn) +static void INLINE SET_ClampColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_ClampColor, fn); +} + #define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLfloat, GLint)), _gloffset_ClearBufferfi, parameters) #define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi) -#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn) +static void INLINE SET_ClearBufferfi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLfloat, GLint)) { + SET_by_offset(disp, _gloffset_ClearBufferfi, fn); +} + #define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters) #define GET_ClearBufferfv(disp) GET_by_offset(disp, _gloffset_ClearBufferfv) -#define SET_ClearBufferfv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfv, fn) +static void INLINE SET_ClearBufferfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ClearBufferfv, fn); +} + #define CALL_ClearBufferiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLint *)), _gloffset_ClearBufferiv, parameters) #define GET_ClearBufferiv(disp) GET_by_offset(disp, _gloffset_ClearBufferiv) -#define SET_ClearBufferiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferiv, fn) +static void INLINE SET_ClearBufferiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLint *)) { + SET_by_offset(disp, _gloffset_ClearBufferiv, fn); +} + #define CALL_ClearBufferuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLuint *)), _gloffset_ClearBufferuiv, parameters) #define GET_ClearBufferuiv(disp) GET_by_offset(disp, _gloffset_ClearBufferuiv) -#define SET_ClearBufferuiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferuiv, fn) +static void INLINE SET_ClearBufferuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLuint *)) { + SET_by_offset(disp, _gloffset_ClearBufferuiv, fn); +} + #define CALL_GetStringi(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_GetStringi, parameters) #define GET_GetStringi(disp) GET_by_offset(disp, _gloffset_GetStringi) -#define SET_GetStringi(disp, fn) SET_by_offset(disp, _gloffset_GetStringi, fn) +static void INLINE SET_GetStringi(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_GetStringi, fn); +} + #define CALL_TexBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBuffer, parameters) #define GET_TexBuffer(disp) GET_by_offset(disp, _gloffset_TexBuffer) -#define SET_TexBuffer(disp, fn) SET_by_offset(disp, _gloffset_TexBuffer, fn) +static void INLINE SET_TexBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_TexBuffer, fn); +} + #define CALL_FramebufferTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture, parameters) #define GET_FramebufferTexture(disp) GET_by_offset(disp, _gloffset_FramebufferTexture) -#define SET_FramebufferTexture(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture, fn) +static void INLINE SET_FramebufferTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture, fn); +} + #define CALL_GetBufferParameteri64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint64 *)), _gloffset_GetBufferParameteri64v, parameters) #define GET_GetBufferParameteri64v(disp) GET_by_offset(disp, _gloffset_GetBufferParameteri64v) -#define SET_GetBufferParameteri64v(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn) +static void INLINE SET_GetBufferParameteri64v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint64 *)) { + SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn); +} + #define CALL_GetInteger64i_v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint64 *)), _gloffset_GetInteger64i_v, parameters) #define GET_GetInteger64i_v(disp) GET_by_offset(disp, _gloffset_GetInteger64i_v) -#define SET_GetInteger64i_v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64i_v, fn) +static void INLINE SET_GetInteger64i_v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLint64 *)) { + SET_by_offset(disp, _gloffset_GetInteger64i_v, fn); +} + #define CALL_VertexAttribDivisor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisor, parameters) #define GET_VertexAttribDivisor(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisor) -#define SET_VertexAttribDivisor(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn) +static void INLINE SET_VertexAttribDivisor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn); +} + #define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadTransposeMatrixdARB, parameters) #define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB) -#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn) +static void INLINE SET_LoadTransposeMatrixdARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn); +} + #define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadTransposeMatrixfARB, parameters) #define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB) -#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn) +static void INLINE SET_LoadTransposeMatrixfARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn); +} + #define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultTransposeMatrixdARB, parameters) #define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB) -#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn) +static void INLINE SET_MultTransposeMatrixdARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn); +} + #define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultTransposeMatrixfARB, parameters) #define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB) -#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn) +static void INLINE SET_MultTransposeMatrixfARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn); +} + #define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleCoverageARB, parameters) #define GET_SampleCoverageARB(disp) GET_by_offset(disp, _gloffset_SampleCoverageARB) -#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, _gloffset_SampleCoverageARB, fn) +static void INLINE SET_SampleCoverageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLboolean)) { + SET_by_offset(disp, _gloffset_SampleCoverageARB, fn); +} + #define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage1DARB, parameters) #define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage1DARB) -#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn) +static void INLINE SET_CompressedTexImage1DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn); +} + #define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage2DARB, parameters) #define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage2DARB) -#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn) +static void INLINE SET_CompressedTexImage2DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn); +} + #define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage3DARB, parameters) #define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage3DARB) -#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn) +static void INLINE SET_CompressedTexImage3DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn); +} + #define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage1DARB, parameters) #define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB) -#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn) +static void INLINE SET_CompressedTexSubImage1DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn); +} + #define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage2DARB, parameters) #define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB) -#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn) +static void INLINE SET_CompressedTexSubImage2DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn); +} + #define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage3DARB, parameters) #define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB) -#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn) +static void INLINE SET_CompressedTexSubImage3DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn); +} + #define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), _gloffset_GetCompressedTexImageARB, parameters) #define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetCompressedTexImageARB) -#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn) +static void INLINE SET_GetCompressedTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn); +} + #define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DisableVertexAttribArrayARB, parameters) #define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB) -#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn) +static void INLINE SET_DisableVertexAttribArrayARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn); +} + #define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_EnableVertexAttribArrayARB, parameters) #define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB) -#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn) +static void INLINE SET_EnableVertexAttribArrayARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn); +} + #define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramEnvParameterdvARB, parameters) #define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB) -#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn) +static void INLINE SET_GetProgramEnvParameterdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn); +} + #define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramEnvParameterfvARB, parameters) #define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB) -#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn) +static void INLINE SET_GetProgramEnvParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn); +} + #define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramLocalParameterdvARB, parameters) #define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB) -#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn) +static void INLINE SET_GetProgramLocalParameterdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn); +} + #define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramLocalParameterfvARB, parameters) #define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB) -#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn) +static void INLINE SET_GetProgramLocalParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn); +} + #define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), _gloffset_GetProgramStringARB, parameters) #define GET_GetProgramStringARB(disp) GET_by_offset(disp, _gloffset_GetProgramStringARB) -#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringARB, fn) +static void INLINE SET_GetProgramStringARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetProgramStringARB, fn); +} + #define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetProgramivARB, parameters) #define GET_GetProgramivARB(disp) GET_by_offset(disp, _gloffset_GetProgramivARB) -#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivARB, fn) +static void INLINE SET_GetProgramivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetProgramivARB, fn); +} + #define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvARB, parameters) #define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvARB) -#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn) +static void INLINE SET_GetVertexAttribdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn); +} + #define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvARB, parameters) #define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvARB) -#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn) +static void INLINE SET_GetVertexAttribfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn); +} + #define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivARB, parameters) #define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivARB) -#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn) +static void INLINE SET_GetVertexAttribivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn); +} + #define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramEnvParameter4dARB, parameters) #define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB) -#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn) +static void INLINE SET_ProgramEnvParameter4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn); +} + #define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramEnvParameter4dvARB, parameters) #define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB) -#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn) +static void INLINE SET_ProgramEnvParameter4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn); +} + #define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramEnvParameter4fARB, parameters) #define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB) -#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn) +static void INLINE SET_ProgramEnvParameter4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn); +} + #define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramEnvParameter4fvARB, parameters) #define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB) -#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn) +static void INLINE SET_ProgramEnvParameter4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn); +} + #define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramLocalParameter4dARB, parameters) #define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB) -#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn) +static void INLINE SET_ProgramLocalParameter4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn); +} + #define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramLocalParameter4dvARB, parameters) #define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB) -#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn) +static void INLINE SET_ProgramLocalParameter4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn); +} + #define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramLocalParameter4fARB, parameters) #define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB) -#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn) +static void INLINE SET_ProgramLocalParameter4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn); +} + #define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramLocalParameter4fvARB, parameters) #define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB) -#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn) +static void INLINE SET_ProgramLocalParameter4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn); +} + #define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), _gloffset_ProgramStringARB, parameters) #define GET_ProgramStringARB(disp) GET_by_offset(disp, _gloffset_ProgramStringARB) -#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramStringARB, fn) +static void INLINE SET_ProgramStringARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ProgramStringARB, fn); +} + #define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dARB, parameters) #define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dARB) -#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn) +static void INLINE SET_VertexAttrib1dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn); +} + #define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvARB, parameters) #define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvARB) -#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn) +static void INLINE SET_VertexAttrib1dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn); +} + #define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fARB, parameters) #define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fARB) -#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn) +static void INLINE SET_VertexAttrib1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn); +} + #define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvARB, parameters) #define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvARB) -#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn) +static void INLINE SET_VertexAttrib1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn); +} + #define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sARB, parameters) #define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sARB) -#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn) +static void INLINE SET_VertexAttrib1sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn); +} + #define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svARB, parameters) #define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svARB) -#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn) +static void INLINE SET_VertexAttrib1svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn); +} + #define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dARB, parameters) #define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dARB) -#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn) +static void INLINE SET_VertexAttrib2dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn); +} + #define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvARB, parameters) #define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvARB) -#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn) +static void INLINE SET_VertexAttrib2dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn); +} + #define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fARB, parameters) #define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fARB) -#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn) +static void INLINE SET_VertexAttrib2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn); +} + #define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvARB, parameters) #define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvARB) -#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn) +static void INLINE SET_VertexAttrib2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn); +} + #define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sARB, parameters) #define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sARB) -#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn) +static void INLINE SET_VertexAttrib2sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn); +} + #define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svARB, parameters) #define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svARB) -#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn) +static void INLINE SET_VertexAttrib2svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn); +} + #define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dARB, parameters) #define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dARB) -#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn) +static void INLINE SET_VertexAttrib3dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn); +} + #define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvARB, parameters) #define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvARB) -#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn) +static void INLINE SET_VertexAttrib3dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn); +} + #define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fARB, parameters) #define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fARB) -#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn) +static void INLINE SET_VertexAttrib3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn); +} + #define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvARB, parameters) #define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvARB) -#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn) +static void INLINE SET_VertexAttrib3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn); +} + #define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sARB, parameters) #define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sARB) -#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn) +static void INLINE SET_VertexAttrib3sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn); +} + #define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svARB, parameters) #define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svARB) -#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn) +static void INLINE SET_VertexAttrib3svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn); +} + #define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4NbvARB, parameters) #define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB) -#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn) +static void INLINE SET_VertexAttrib4NbvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn); +} + #define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4NivARB, parameters) #define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NivARB) -#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn) +static void INLINE SET_VertexAttrib4NivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn); +} + #define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4NsvARB, parameters) #define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB) -#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn) +static void INLINE SET_VertexAttrib4NsvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn); +} + #define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4NubARB, parameters) #define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubARB) -#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn) +static void INLINE SET_VertexAttrib4NubARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn); +} + #define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4NubvARB, parameters) #define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB) -#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn) +static void INLINE SET_VertexAttrib4NubvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn); +} + #define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4NuivARB, parameters) #define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB) -#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn) +static void INLINE SET_VertexAttrib4NuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn); +} + #define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4NusvARB, parameters) #define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB) -#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn) +static void INLINE SET_VertexAttrib4NusvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn); +} + #define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4bvARB, parameters) #define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4bvARB) -#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn) +static void INLINE SET_VertexAttrib4bvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn); +} + #define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dARB, parameters) #define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dARB) -#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn) +static void INLINE SET_VertexAttrib4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn); +} + #define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvARB, parameters) #define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvARB) -#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn) +static void INLINE SET_VertexAttrib4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn); +} + #define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fARB, parameters) #define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fARB) -#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn) +static void INLINE SET_VertexAttrib4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn); +} + #define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvARB, parameters) #define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvARB) -#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn) +static void INLINE SET_VertexAttrib4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn); +} + #define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4ivARB, parameters) #define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ivARB) -#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn) +static void INLINE SET_VertexAttrib4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn); +} + #define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sARB, parameters) #define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sARB) -#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn) +static void INLINE SET_VertexAttrib4sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn); +} + #define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svARB, parameters) #define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svARB) -#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn) +static void INLINE SET_VertexAttrib4svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn); +} + #define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvARB, parameters) #define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB) -#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn) +static void INLINE SET_VertexAttrib4ubvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn); +} + #define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4uivARB, parameters) #define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4uivARB) -#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn) +static void INLINE SET_VertexAttrib4uivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn); +} + #define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4usvARB, parameters) #define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4usvARB) -#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn) +static void INLINE SET_VertexAttrib4usvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn); +} + #define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerARB, parameters) #define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerARB) -#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn) +static void INLINE SET_VertexAttribPointerARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn); +} + #define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindBufferARB, parameters) #define GET_BindBufferARB(disp) GET_by_offset(disp, _gloffset_BindBufferARB) -#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, _gloffset_BindBufferARB, fn) +static void INLINE SET_BindBufferARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindBufferARB, fn); +} + #define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), _gloffset_BufferDataARB, parameters) #define GET_BufferDataARB(disp) GET_by_offset(disp, _gloffset_BufferDataARB) -#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferDataARB, fn) +static void INLINE SET_BufferDataARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)) { + SET_by_offset(disp, _gloffset_BufferDataARB, fn); +} + #define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), _gloffset_BufferSubDataARB, parameters) #define GET_BufferSubDataARB(disp) GET_by_offset(disp, _gloffset_BufferSubDataARB) -#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferSubDataARB, fn) +static void INLINE SET_BufferSubDataARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)) { + SET_by_offset(disp, _gloffset_BufferSubDataARB, fn); +} + #define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteBuffersARB, parameters) #define GET_DeleteBuffersARB(disp) GET_by_offset(disp, _gloffset_DeleteBuffersARB) -#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn) +static void INLINE SET_DeleteBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn); +} + #define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenBuffersARB, parameters) #define GET_GenBuffersARB(disp) GET_by_offset(disp, _gloffset_GenBuffersARB) -#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_GenBuffersARB, fn) +static void INLINE SET_GenBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenBuffersARB, fn); +} + #define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetBufferParameterivARB, parameters) #define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, _gloffset_GetBufferParameterivARB) -#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn) +static void INLINE SET_GetBufferParameterivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn); +} + #define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetBufferPointervARB, parameters) #define GET_GetBufferPointervARB(disp) GET_by_offset(disp, _gloffset_GetBufferPointervARB) -#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn) +static void INLINE SET_GetBufferPointervARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn); +} + #define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), _gloffset_GetBufferSubDataARB, parameters) #define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, _gloffset_GetBufferSubDataARB) -#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn) +static void INLINE SET_GetBufferSubDataARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn); +} + #define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsBufferARB, parameters) #define GET_IsBufferARB(disp) GET_by_offset(disp, _gloffset_IsBufferARB) -#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, _gloffset_IsBufferARB, fn) +static void INLINE SET_IsBufferARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsBufferARB, fn); +} + #define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_MapBufferARB, parameters) #define GET_MapBufferARB(disp) GET_by_offset(disp, _gloffset_MapBufferARB) -#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_MapBufferARB, fn) +static void INLINE SET_MapBufferARB(struct _glapi_table *disp, GLvoid * (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_MapBufferARB, fn); +} + #define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_UnmapBufferARB, parameters) #define GET_UnmapBufferARB(disp) GET_by_offset(disp, _gloffset_UnmapBufferARB) -#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_UnmapBufferARB, fn) +static void INLINE SET_UnmapBufferARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_UnmapBufferARB, fn); +} + #define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BeginQueryARB, parameters) #define GET_BeginQueryARB(disp) GET_by_offset(disp, _gloffset_BeginQueryARB) -#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, _gloffset_BeginQueryARB, fn) +static void INLINE SET_BeginQueryARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BeginQueryARB, fn); +} + #define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteQueriesARB, parameters) #define GET_DeleteQueriesARB(disp) GET_by_offset(disp, _gloffset_DeleteQueriesARB) -#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn) +static void INLINE SET_DeleteQueriesARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn); +} + #define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EndQueryARB, parameters) #define GET_EndQueryARB(disp) GET_by_offset(disp, _gloffset_EndQueryARB) -#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, _gloffset_EndQueryARB, fn) +static void INLINE SET_EndQueryARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_EndQueryARB, fn); +} + #define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenQueriesARB, parameters) #define GET_GenQueriesARB(disp) GET_by_offset(disp, _gloffset_GenQueriesARB) -#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_GenQueriesARB, fn) +static void INLINE SET_GenQueriesARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenQueriesARB, fn); +} + #define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetQueryObjectivARB, parameters) #define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectivARB) -#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn) +static void INLINE SET_GetQueryObjectivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn); +} + #define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetQueryObjectuivARB, parameters) #define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectuivARB) -#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn) +static void INLINE SET_GetQueryObjectuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn); +} + #define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetQueryivARB, parameters) #define GET_GetQueryivARB(disp) GET_by_offset(disp, _gloffset_GetQueryivARB) -#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryivARB, fn) +static void INLINE SET_GetQueryivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetQueryivARB, fn); +} + #define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsQueryARB, parameters) #define GET_IsQueryARB(disp) GET_by_offset(disp, _gloffset_IsQueryARB) -#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, _gloffset_IsQueryARB, fn) +static void INLINE SET_IsQueryARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsQueryARB, fn); +} + #define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_AttachObjectARB, parameters) #define GET_AttachObjectARB(disp) GET_by_offset(disp, _gloffset_AttachObjectARB) -#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_AttachObjectARB, fn) +static void INLINE SET_AttachObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLhandleARB)) { + SET_by_offset(disp, _gloffset_AttachObjectARB, fn); +} + #define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_CompileShaderARB, parameters) #define GET_CompileShaderARB(disp) GET_by_offset(disp, _gloffset_CompileShaderARB) -#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, _gloffset_CompileShaderARB, fn) +static void INLINE SET_CompileShaderARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_CompileShaderARB, fn); +} + #define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), _gloffset_CreateProgramObjectARB, parameters) #define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, _gloffset_CreateProgramObjectARB) -#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn) +static void INLINE SET_CreateProgramObjectARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn); +} + #define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_CreateShaderObjectARB, parameters) #define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, _gloffset_CreateShaderObjectARB) -#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn) +static void INLINE SET_CreateShaderObjectARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn); +} + #define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_DeleteObjectARB, parameters) #define GET_DeleteObjectARB(disp) GET_by_offset(disp, _gloffset_DeleteObjectARB) -#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteObjectARB, fn) +static void INLINE SET_DeleteObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_DeleteObjectARB, fn); +} + #define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_DetachObjectARB, parameters) #define GET_DetachObjectARB(disp) GET_by_offset(disp, _gloffset_DetachObjectARB) -#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DetachObjectARB, fn) +static void INLINE SET_DetachObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLhandleARB)) { + SET_by_offset(disp, _gloffset_DetachObjectARB, fn); +} + #define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveUniformARB, parameters) #define GET_GetActiveUniformARB(disp) GET_by_offset(disp, _gloffset_GetActiveUniformARB) -#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn) +static void INLINE SET_GetActiveUniformARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn); +} + #define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), _gloffset_GetAttachedObjectsARB, parameters) #define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, _gloffset_GetAttachedObjectsARB) -#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn) +static void INLINE SET_GetAttachedObjectsARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)) { + SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn); +} + #define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_GetHandleARB, parameters) #define GET_GetHandleARB(disp) GET_by_offset(disp, _gloffset_GetHandleARB) -#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, _gloffset_GetHandleARB, fn) +static void INLINE SET_GetHandleARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_GetHandleARB, fn); +} + #define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetInfoLogARB, parameters) #define GET_GetInfoLogARB(disp) GET_by_offset(disp, _gloffset_GetInfoLogARB) -#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, _gloffset_GetInfoLogARB, fn) +static void INLINE SET_GetInfoLogARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetInfoLogARB, fn); +} + #define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), _gloffset_GetObjectParameterfvARB, parameters) #define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterfvARB) -#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn) +static void INLINE SET_GetObjectParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn); +} + #define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), _gloffset_GetObjectParameterivARB, parameters) #define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivARB) -#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn) +static void INLINE SET_GetObjectParameterivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn); +} + #define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetShaderSourceARB, parameters) #define GET_GetShaderSourceARB(disp) GET_by_offset(disp, _gloffset_GetShaderSourceARB) -#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn) +static void INLINE SET_GetShaderSourceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn); +} + #define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetUniformLocationARB, parameters) #define GET_GetUniformLocationARB(disp) GET_by_offset(disp, _gloffset_GetUniformLocationARB) -#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn) +static void INLINE SET_GetUniformLocationARB(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLhandleARB, const GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn); +} + #define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), _gloffset_GetUniformfvARB, parameters) #define GET_GetUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetUniformfvARB) -#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformfvARB, fn) +static void INLINE SET_GetUniformfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetUniformfvARB, fn); +} + #define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), _gloffset_GetUniformivARB, parameters) #define GET_GetUniformivARB(disp) GET_by_offset(disp, _gloffset_GetUniformivARB) -#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformivARB, fn) +static void INLINE SET_GetUniformivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLint *)) { + SET_by_offset(disp, _gloffset_GetUniformivARB, fn); +} + #define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_LinkProgramARB, parameters) #define GET_LinkProgramARB(disp) GET_by_offset(disp, _gloffset_LinkProgramARB) -#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, _gloffset_LinkProgramARB, fn) +static void INLINE SET_LinkProgramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_LinkProgramARB, fn); +} + #define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), _gloffset_ShaderSourceARB, parameters) #define GET_ShaderSourceARB(disp) GET_by_offset(disp, _gloffset_ShaderSourceARB) -#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_ShaderSourceARB, fn) +static void INLINE SET_ShaderSourceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)) { + SET_by_offset(disp, _gloffset_ShaderSourceARB, fn); +} + #define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), _gloffset_Uniform1fARB, parameters) #define GET_Uniform1fARB(disp) GET_by_offset(disp, _gloffset_Uniform1fARB) -#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fARB, fn) +static void INLINE SET_Uniform1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform1fARB, fn); +} + #define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform1fvARB, parameters) #define GET_Uniform1fvARB(disp) GET_by_offset(disp, _gloffset_Uniform1fvARB) -#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fvARB, fn) +static void INLINE SET_Uniform1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform1fvARB, fn); +} + #define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Uniform1iARB, parameters) #define GET_Uniform1iARB(disp) GET_by_offset(disp, _gloffset_Uniform1iARB) -#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1iARB, fn) +static void INLINE SET_Uniform1iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform1iARB, fn); +} + #define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform1ivARB, parameters) #define GET_Uniform1ivARB(disp) GET_by_offset(disp, _gloffset_Uniform1ivARB) -#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1ivARB, fn) +static void INLINE SET_Uniform1ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform1ivARB, fn); +} + #define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_Uniform2fARB, parameters) #define GET_Uniform2fARB(disp) GET_by_offset(disp, _gloffset_Uniform2fARB) -#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fARB, fn) +static void INLINE SET_Uniform2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform2fARB, fn); +} + #define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform2fvARB, parameters) #define GET_Uniform2fvARB(disp) GET_by_offset(disp, _gloffset_Uniform2fvARB) -#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fvARB, fn) +static void INLINE SET_Uniform2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform2fvARB, fn); +} + #define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Uniform2iARB, parameters) #define GET_Uniform2iARB(disp) GET_by_offset(disp, _gloffset_Uniform2iARB) -#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2iARB, fn) +static void INLINE SET_Uniform2iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform2iARB, fn); +} + #define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform2ivARB, parameters) #define GET_Uniform2ivARB(disp) GET_by_offset(disp, _gloffset_Uniform2ivARB) -#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2ivARB, fn) +static void INLINE SET_Uniform2ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform2ivARB, fn); +} + #define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform3fARB, parameters) #define GET_Uniform3fARB(disp) GET_by_offset(disp, _gloffset_Uniform3fARB) -#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fARB, fn) +static void INLINE SET_Uniform3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform3fARB, fn); +} + #define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform3fvARB, parameters) #define GET_Uniform3fvARB(disp) GET_by_offset(disp, _gloffset_Uniform3fvARB) -#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fvARB, fn) +static void INLINE SET_Uniform3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform3fvARB, fn); +} + #define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Uniform3iARB, parameters) #define GET_Uniform3iARB(disp) GET_by_offset(disp, _gloffset_Uniform3iARB) -#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3iARB, fn) +static void INLINE SET_Uniform3iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform3iARB, fn); +} + #define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform3ivARB, parameters) #define GET_Uniform3ivARB(disp) GET_by_offset(disp, _gloffset_Uniform3ivARB) -#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3ivARB, fn) +static void INLINE SET_Uniform3ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform3ivARB, fn); +} + #define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform4fARB, parameters) #define GET_Uniform4fARB(disp) GET_by_offset(disp, _gloffset_Uniform4fARB) -#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fARB, fn) +static void INLINE SET_Uniform4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform4fARB, fn); +} + #define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform4fvARB, parameters) #define GET_Uniform4fvARB(disp) GET_by_offset(disp, _gloffset_Uniform4fvARB) -#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fvARB, fn) +static void INLINE SET_Uniform4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform4fvARB, fn); +} + #define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), _gloffset_Uniform4iARB, parameters) #define GET_Uniform4iARB(disp) GET_by_offset(disp, _gloffset_Uniform4iARB) -#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4iARB, fn) +static void INLINE SET_Uniform4iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform4iARB, fn); +} + #define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform4ivARB, parameters) #define GET_Uniform4ivARB(disp) GET_by_offset(disp, _gloffset_Uniform4ivARB) -#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4ivARB, fn) +static void INLINE SET_Uniform4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform4ivARB, fn); +} + #define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2fvARB, parameters) #define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix2fvARB) -#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn) +static void INLINE SET_UniformMatrix2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn); +} + #define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3fvARB, parameters) #define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix3fvARB) -#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn) +static void INLINE SET_UniformMatrix3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn); +} + #define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4fvARB, parameters) #define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix4fvARB) -#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn) +static void INLINE SET_UniformMatrix4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn); +} + #define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_UseProgramObjectARB, parameters) #define GET_UseProgramObjectARB(disp) GET_by_offset(disp, _gloffset_UseProgramObjectARB) -#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn) +static void INLINE SET_UseProgramObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn); +} + #define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_ValidateProgramARB, parameters) #define GET_ValidateProgramARB(disp) GET_by_offset(disp, _gloffset_ValidateProgramARB) -#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, _gloffset_ValidateProgramARB, fn) +static void INLINE SET_ValidateProgramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_ValidateProgramARB, fn); +} + #define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), _gloffset_BindAttribLocationARB, parameters) #define GET_BindAttribLocationARB(disp) GET_by_offset(disp, _gloffset_BindAttribLocationARB) -#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn) +static void INLINE SET_BindAttribLocationARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, const GLcharARB *)) { + SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn); +} + #define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveAttribARB, parameters) #define GET_GetActiveAttribARB(disp) GET_by_offset(disp, _gloffset_GetActiveAttribARB) -#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn) +static void INLINE SET_GetActiveAttribARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn); +} + #define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetAttribLocationARB, parameters) #define GET_GetAttribLocationARB(disp) GET_by_offset(disp, _gloffset_GetAttribLocationARB) -#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn) +static void INLINE SET_GetAttribLocationARB(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLhandleARB, const GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn); +} + #define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), _gloffset_DrawBuffersARB, parameters) #define GET_DrawBuffersARB(disp) GET_by_offset(disp, _gloffset_DrawBuffersARB) -#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffersARB, fn) +static void INLINE SET_DrawBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLenum *)) { + SET_by_offset(disp, _gloffset_DrawBuffersARB, fn); +} + #define CALL_ClampColorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColorARB, parameters) #define GET_ClampColorARB(disp) GET_by_offset(disp, _gloffset_ClampColorARB) -#define SET_ClampColorARB(disp, fn) SET_by_offset(disp, _gloffset_ClampColorARB, fn) +static void INLINE SET_ClampColorARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_ClampColorARB, fn); +} + #define CALL_DrawArraysInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLsizei)), _gloffset_DrawArraysInstancedARB, parameters) #define GET_DrawArraysInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawArraysInstancedARB) -#define SET_DrawArraysInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn) +static void INLINE SET_DrawArraysInstancedARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn); +} + #define CALL_DrawElementsInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)), _gloffset_DrawElementsInstancedARB, parameters) #define GET_DrawElementsInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawElementsInstancedARB) -#define SET_DrawElementsInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn) +static void INLINE SET_DrawElementsInstancedARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)) { + SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn); +} + #define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageMultisample, parameters) #define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample) -#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn) +static void INLINE SET_RenderbufferStorageMultisample(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn); +} + #define CALL_FramebufferTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTextureARB, parameters) #define GET_FramebufferTextureARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureARB) -#define SET_FramebufferTextureARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn) +static void INLINE SET_FramebufferTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn); +} + #define CALL_FramebufferTextureFaceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLenum)), _gloffset_FramebufferTextureFaceARB, parameters) #define GET_FramebufferTextureFaceARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB) -#define SET_FramebufferTextureFaceARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn) +static void INLINE SET_FramebufferTextureFaceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint, GLenum)) { + SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn); +} + #define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters) #define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB) -#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn) +static void INLINE SET_ProgramParameteriARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn); +} + #define CALL_VertexAttribDivisorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisorARB, parameters) #define GET_VertexAttribDivisorARB(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisorARB) -#define SET_VertexAttribDivisorARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn) +static void INLINE SET_VertexAttribDivisorARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn); +} + #define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters) #define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange) -#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn) +static void INLINE SET_FlushMappedBufferRange(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn); +} + #define CALL_MapBufferRange(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr, GLbitfield)), _gloffset_MapBufferRange, parameters) #define GET_MapBufferRange(disp) GET_by_offset(disp, _gloffset_MapBufferRange) -#define SET_MapBufferRange(disp, fn) SET_by_offset(disp, _gloffset_MapBufferRange, fn) +static void INLINE SET_MapBufferRange(struct _glapi_table *disp, GLvoid * (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr, GLbitfield)) { + SET_by_offset(disp, _gloffset_MapBufferRange, fn); +} + #define CALL_TexBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBufferARB, parameters) #define GET_TexBufferARB(disp) GET_by_offset(disp, _gloffset_TexBufferARB) -#define SET_TexBufferARB(disp, fn) SET_by_offset(disp, _gloffset_TexBufferARB, fn) +static void INLINE SET_TexBufferARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_TexBufferARB, fn); +} + #define CALL_BindVertexArray(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArray, parameters) #define GET_BindVertexArray(disp) GET_by_offset(disp, _gloffset_BindVertexArray) -#define SET_BindVertexArray(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArray, fn) +static void INLINE SET_BindVertexArray(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_BindVertexArray, fn); +} + #define CALL_GenVertexArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArrays, parameters) #define GET_GenVertexArrays(disp) GET_by_offset(disp, _gloffset_GenVertexArrays) -#define SET_GenVertexArrays(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArrays, fn) +static void INLINE SET_GenVertexArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenVertexArrays, fn); +} + #define CALL_CopyBufferSubData(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)), _gloffset_CopyBufferSubData, parameters) #define GET_CopyBufferSubData(disp) GET_by_offset(disp, _gloffset_CopyBufferSubData) -#define SET_CopyBufferSubData(disp, fn) SET_by_offset(disp, _gloffset_CopyBufferSubData, fn) +static void INLINE SET_CopyBufferSubData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_CopyBufferSubData, fn); +} + #define CALL_ClientWaitSync(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_ClientWaitSync, parameters) #define GET_ClientWaitSync(disp) GET_by_offset(disp, _gloffset_ClientWaitSync) -#define SET_ClientWaitSync(disp, fn) SET_by_offset(disp, _gloffset_ClientWaitSync, fn) +static void INLINE SET_ClientWaitSync(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLsync, GLbitfield, GLuint64)) { + SET_by_offset(disp, _gloffset_ClientWaitSync, fn); +} + #define CALL_DeleteSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync)), _gloffset_DeleteSync, parameters) #define GET_DeleteSync(disp) GET_by_offset(disp, _gloffset_DeleteSync) -#define SET_DeleteSync(disp, fn) SET_by_offset(disp, _gloffset_DeleteSync, fn) +static void INLINE SET_DeleteSync(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync)) { + SET_by_offset(disp, _gloffset_DeleteSync, fn); +} + #define CALL_FenceSync(disp, parameters) CALL_by_offset(disp, (GLsync (GLAPIENTRYP)(GLenum, GLbitfield)), _gloffset_FenceSync, parameters) #define GET_FenceSync(disp) GET_by_offset(disp, _gloffset_FenceSync) -#define SET_FenceSync(disp, fn) SET_by_offset(disp, _gloffset_FenceSync, fn) +static void INLINE SET_FenceSync(struct _glapi_table *disp, GLsync (GLAPIENTRYP fn)(GLenum, GLbitfield)) { + SET_by_offset(disp, _gloffset_FenceSync, fn); +} + #define CALL_GetInteger64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint64 *)), _gloffset_GetInteger64v, parameters) #define GET_GetInteger64v(disp) GET_by_offset(disp, _gloffset_GetInteger64v) -#define SET_GetInteger64v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64v, fn) +static void INLINE SET_GetInteger64v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint64 *)) { + SET_by_offset(disp, _gloffset_GetInteger64v, fn); +} + #define CALL_GetSynciv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)), _gloffset_GetSynciv, parameters) #define GET_GetSynciv(disp) GET_by_offset(disp, _gloffset_GetSynciv) -#define SET_GetSynciv(disp, fn) SET_by_offset(disp, _gloffset_GetSynciv, fn) +static void INLINE SET_GetSynciv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)) { + SET_by_offset(disp, _gloffset_GetSynciv, fn); +} + #define CALL_IsSync(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsync)), _gloffset_IsSync, parameters) #define GET_IsSync(disp) GET_by_offset(disp, _gloffset_IsSync) -#define SET_IsSync(disp, fn) SET_by_offset(disp, _gloffset_IsSync, fn) +static void INLINE SET_IsSync(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsync)) { + SET_by_offset(disp, _gloffset_IsSync, fn); +} + #define CALL_WaitSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_WaitSync, parameters) #define GET_WaitSync(disp) GET_by_offset(disp, _gloffset_WaitSync) -#define SET_WaitSync(disp, fn) SET_by_offset(disp, _gloffset_WaitSync, fn) +static void INLINE SET_WaitSync(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync, GLbitfield, GLuint64)) { + SET_by_offset(disp, _gloffset_WaitSync, fn); +} + #define CALL_DrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawElementsBaseVertex, parameters) #define GET_DrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawElementsBaseVertex) -#define SET_DrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn) +static void INLINE SET_DrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)) { + SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn); +} + #define CALL_DrawRangeElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawRangeElementsBaseVertex, parameters) #define GET_DrawRangeElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex) -#define SET_DrawRangeElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn) +static void INLINE SET_DrawRangeElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)) { + SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn); +} + #define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters) #define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex) -#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn) +static void INLINE SET_MultiDrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn); +} + #define CALL_BlendEquationSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendEquationSeparateiARB, parameters) #define GET_BlendEquationSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB) -#define SET_BlendEquationSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn) +static void INLINE SET_BlendEquationSeparateiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn); +} + #define CALL_BlendEquationiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BlendEquationiARB, parameters) #define GET_BlendEquationiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationiARB) -#define SET_BlendEquationiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationiARB, fn) +static void INLINE SET_BlendEquationiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquationiARB, fn); +} + #define CALL_BlendFuncSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateiARB, parameters) #define GET_BlendFuncSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB) -#define SET_BlendFuncSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn) +static void INLINE SET_BlendFuncSeparateiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn); +} + #define CALL_BlendFunciARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendFunciARB, parameters) #define GET_BlendFunciARB(disp) GET_by_offset(disp, _gloffset_BlendFunciARB) -#define SET_BlendFunciARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFunciARB, fn) +static void INLINE SET_BlendFunciARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFunciARB, fn); +} + #define CALL_BindSampler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_BindSampler, parameters) #define GET_BindSampler(disp) GET_by_offset(disp, _gloffset_BindSampler) -#define SET_BindSampler(disp, fn) SET_by_offset(disp, _gloffset_BindSampler, fn) +static void INLINE SET_BindSampler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_BindSampler, fn); +} + #define CALL_DeleteSamplers(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteSamplers, parameters) #define GET_DeleteSamplers(disp) GET_by_offset(disp, _gloffset_DeleteSamplers) -#define SET_DeleteSamplers(disp, fn) SET_by_offset(disp, _gloffset_DeleteSamplers, fn) +static void INLINE SET_DeleteSamplers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteSamplers, fn); +} + #define CALL_GenSamplers(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenSamplers, parameters) #define GET_GenSamplers(disp) GET_by_offset(disp, _gloffset_GenSamplers) -#define SET_GenSamplers(disp, fn) SET_by_offset(disp, _gloffset_GenSamplers, fn) +static void INLINE SET_GenSamplers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenSamplers, fn); +} + #define CALL_GetSamplerParameterIiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetSamplerParameterIiv, parameters) #define GET_GetSamplerParameterIiv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameterIiv) -#define SET_GetSamplerParameterIiv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameterIiv, fn) +static void INLINE SET_GetSamplerParameterIiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameterIiv, fn); +} + #define CALL_GetSamplerParameterIuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetSamplerParameterIuiv, parameters) #define GET_GetSamplerParameterIuiv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameterIuiv) -#define SET_GetSamplerParameterIuiv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameterIuiv, fn) +static void INLINE SET_GetSamplerParameterIuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameterIuiv, fn); +} + #define CALL_GetSamplerParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetSamplerParameterfv, parameters) #define GET_GetSamplerParameterfv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameterfv) -#define SET_GetSamplerParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameterfv, fn) +static void INLINE SET_GetSamplerParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameterfv, fn); +} + #define CALL_GetSamplerParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetSamplerParameteriv, parameters) #define GET_GetSamplerParameteriv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameteriv) -#define SET_GetSamplerParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameteriv, fn) +static void INLINE SET_GetSamplerParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameteriv, fn); +} + #define CALL_IsSampler(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsSampler, parameters) #define GET_IsSampler(disp) GET_by_offset(disp, _gloffset_IsSampler) -#define SET_IsSampler(disp, fn) SET_by_offset(disp, _gloffset_IsSampler, fn) +static void INLINE SET_IsSampler(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsSampler, fn); +} + #define CALL_SamplerParameterIiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLint *)), _gloffset_SamplerParameterIiv, parameters) #define GET_SamplerParameterIiv(disp) GET_by_offset(disp, _gloffset_SamplerParameterIiv) -#define SET_SamplerParameterIiv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterIiv, fn) +static void INLINE SET_SamplerParameterIiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_SamplerParameterIiv, fn); +} + #define CALL_SamplerParameterIuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLuint *)), _gloffset_SamplerParameterIuiv, parameters) #define GET_SamplerParameterIuiv(disp) GET_by_offset(disp, _gloffset_SamplerParameterIuiv) -#define SET_SamplerParameterIuiv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterIuiv, fn) +static void INLINE SET_SamplerParameterIuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLuint *)) { + SET_by_offset(disp, _gloffset_SamplerParameterIuiv, fn); +} + #define CALL_SamplerParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat)), _gloffset_SamplerParameterf, parameters) #define GET_SamplerParameterf(disp) GET_by_offset(disp, _gloffset_SamplerParameterf) -#define SET_SamplerParameterf(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterf, fn) +static void INLINE SET_SamplerParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_SamplerParameterf, fn); +} + #define CALL_SamplerParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLfloat *)), _gloffset_SamplerParameterfv, parameters) #define GET_SamplerParameterfv(disp) GET_by_offset(disp, _gloffset_SamplerParameterfv) -#define SET_SamplerParameterfv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterfv, fn) +static void INLINE SET_SamplerParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_SamplerParameterfv, fn); +} + #define CALL_SamplerParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_SamplerParameteri, parameters) #define GET_SamplerParameteri(disp) GET_by_offset(disp, _gloffset_SamplerParameteri) -#define SET_SamplerParameteri(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameteri, fn) +static void INLINE SET_SamplerParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_SamplerParameteri, fn); +} + #define CALL_SamplerParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLint *)), _gloffset_SamplerParameteriv, parameters) #define GET_SamplerParameteriv(disp) GET_by_offset(disp, _gloffset_SamplerParameteriv) -#define SET_SamplerParameteriv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameteriv, fn) +static void INLINE SET_SamplerParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_SamplerParameteriv, fn); +} + #define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters) #define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback) -#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn) +static void INLINE SET_BindTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindTransformFeedback, fn); +} + #define CALL_DeleteTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTransformFeedbacks, parameters) #define GET_DeleteTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks) -#define SET_DeleteTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn) +static void INLINE SET_DeleteTransformFeedbacks(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn); +} + #define CALL_DrawTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DrawTransformFeedback, parameters) #define GET_DrawTransformFeedback(disp) GET_by_offset(disp, _gloffset_DrawTransformFeedback) -#define SET_DrawTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn) +static void INLINE SET_DrawTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn); +} + #define CALL_GenTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTransformFeedbacks, parameters) #define GET_GenTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_GenTransformFeedbacks) -#define SET_GenTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn) +static void INLINE SET_GenTransformFeedbacks(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn); +} + #define CALL_IsTransformFeedback(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTransformFeedback, parameters) #define GET_IsTransformFeedback(disp) GET_by_offset(disp, _gloffset_IsTransformFeedback) -#define SET_IsTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_IsTransformFeedback, fn) +static void INLINE SET_IsTransformFeedback(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsTransformFeedback, fn); +} + #define CALL_PauseTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PauseTransformFeedback, parameters) #define GET_PauseTransformFeedback(disp) GET_by_offset(disp, _gloffset_PauseTransformFeedback) -#define SET_PauseTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn) +static void INLINE SET_PauseTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn); +} + #define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters) #define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback) -#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn) +static void INLINE SET_ResumeTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn); +} + #define CALL_ClearDepthf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf)), _gloffset_ClearDepthf, parameters) #define GET_ClearDepthf(disp) GET_by_offset(disp, _gloffset_ClearDepthf) -#define SET_ClearDepthf(disp, fn) SET_by_offset(disp, _gloffset_ClearDepthf, fn) +static void INLINE SET_ClearDepthf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf)) { + SET_by_offset(disp, _gloffset_ClearDepthf, fn); +} + #define CALL_DepthRangef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf)), _gloffset_DepthRangef, parameters) #define GET_DepthRangef(disp) GET_by_offset(disp, _gloffset_DepthRangef) -#define SET_DepthRangef(disp, fn) SET_by_offset(disp, _gloffset_DepthRangef, fn) +static void INLINE SET_DepthRangef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf)) { + SET_by_offset(disp, _gloffset_DepthRangef, fn); +} + #define CALL_GetShaderPrecisionFormat(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *, GLint *)), _gloffset_GetShaderPrecisionFormat, parameters) #define GET_GetShaderPrecisionFormat(disp) GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat) -#define SET_GetShaderPrecisionFormat(disp, fn) SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn) +static void INLINE SET_GetShaderPrecisionFormat(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *, GLint *)) { + SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn); +} + #define CALL_ReleaseShaderCompiler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ReleaseShaderCompiler, parameters) #define GET_ReleaseShaderCompiler(disp) GET_by_offset(disp, _gloffset_ReleaseShaderCompiler) -#define SET_ReleaseShaderCompiler(disp, fn) SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn) +static void INLINE SET_ReleaseShaderCompiler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn); +} + #define CALL_ShaderBinary(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)), _gloffset_ShaderBinary, parameters) #define GET_ShaderBinary(disp) GET_by_offset(disp, _gloffset_ShaderBinary) -#define SET_ShaderBinary(disp, fn) SET_by_offset(disp, _gloffset_ShaderBinary, fn) +static void INLINE SET_ShaderBinary(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)) { + SET_by_offset(disp, _gloffset_ShaderBinary, fn); +} + #define CALL_GetGraphicsResetStatusARB(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetGraphicsResetStatusARB, parameters) #define GET_GetGraphicsResetStatusARB(disp) GET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB) -#define SET_GetGraphicsResetStatusARB(disp, fn) SET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB, fn) +static void INLINE SET_GetGraphicsResetStatusARB(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB, fn); +} + #define CALL_GetnColorTableARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnColorTableARB, parameters) #define GET_GetnColorTableARB(disp) GET_by_offset(disp, _gloffset_GetnColorTableARB) -#define SET_GetnColorTableARB(disp, fn) SET_by_offset(disp, _gloffset_GetnColorTableARB, fn) +static void INLINE SET_GetnColorTableARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnColorTableARB, fn); +} + #define CALL_GetnCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLvoid *)), _gloffset_GetnCompressedTexImageARB, parameters) #define GET_GetnCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetnCompressedTexImageARB) -#define SET_GetnCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetnCompressedTexImageARB, fn) +static void INLINE SET_GetnCompressedTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnCompressedTexImageARB, fn); +} + #define CALL_GetnConvolutionFilterARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnConvolutionFilterARB, parameters) #define GET_GetnConvolutionFilterARB(disp) GET_by_offset(disp, _gloffset_GetnConvolutionFilterARB) -#define SET_GetnConvolutionFilterARB(disp, fn) SET_by_offset(disp, _gloffset_GetnConvolutionFilterARB, fn) +static void INLINE SET_GetnConvolutionFilterARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnConvolutionFilterARB, fn); +} + #define CALL_GetnHistogramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnHistogramARB, parameters) #define GET_GetnHistogramARB(disp) GET_by_offset(disp, _gloffset_GetnHistogramARB) -#define SET_GetnHistogramARB(disp, fn) SET_by_offset(disp, _gloffset_GetnHistogramARB, fn) +static void INLINE SET_GetnHistogramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnHistogramARB, fn); +} + #define CALL_GetnMapdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLdouble *)), _gloffset_GetnMapdvARB, parameters) #define GET_GetnMapdvARB(disp) GET_by_offset(disp, _gloffset_GetnMapdvARB) -#define SET_GetnMapdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMapdvARB, fn) +static void INLINE SET_GetnMapdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetnMapdvARB, fn); +} + #define CALL_GetnMapfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLfloat *)), _gloffset_GetnMapfvARB, parameters) #define GET_GetnMapfvARB(disp) GET_by_offset(disp, _gloffset_GetnMapfvARB) -#define SET_GetnMapfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMapfvARB, fn) +static void INLINE SET_GetnMapfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetnMapfvARB, fn); +} + #define CALL_GetnMapivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLint *)), _gloffset_GetnMapivARB, parameters) #define GET_GetnMapivARB(disp) GET_by_offset(disp, _gloffset_GetnMapivARB) -#define SET_GetnMapivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMapivARB, fn) +static void INLINE SET_GetnMapivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLint *)) { + SET_by_offset(disp, _gloffset_GetnMapivARB, fn); +} + #define CALL_GetnMinmaxARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnMinmaxARB, parameters) #define GET_GetnMinmaxARB(disp) GET_by_offset(disp, _gloffset_GetnMinmaxARB) -#define SET_GetnMinmaxARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMinmaxARB, fn) +static void INLINE SET_GetnMinmaxARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnMinmaxARB, fn); +} + #define CALL_GetnPixelMapfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLfloat *)), _gloffset_GetnPixelMapfvARB, parameters) #define GET_GetnPixelMapfvARB(disp) GET_by_offset(disp, _gloffset_GetnPixelMapfvARB) -#define SET_GetnPixelMapfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPixelMapfvARB, fn) +static void INLINE SET_GetnPixelMapfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetnPixelMapfvARB, fn); +} + #define CALL_GetnPixelMapuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLuint *)), _gloffset_GetnPixelMapuivARB, parameters) #define GET_GetnPixelMapuivARB(disp) GET_by_offset(disp, _gloffset_GetnPixelMapuivARB) -#define SET_GetnPixelMapuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPixelMapuivARB, fn) +static void INLINE SET_GetnPixelMapuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GetnPixelMapuivARB, fn); +} + #define CALL_GetnPixelMapusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLushort *)), _gloffset_GetnPixelMapusvARB, parameters) #define GET_GetnPixelMapusvARB(disp) GET_by_offset(disp, _gloffset_GetnPixelMapusvARB) -#define SET_GetnPixelMapusvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPixelMapusvARB, fn) +static void INLINE SET_GetnPixelMapusvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLushort *)) { + SET_by_offset(disp, _gloffset_GetnPixelMapusvARB, fn); +} + #define CALL_GetnPolygonStippleARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLubyte *)), _gloffset_GetnPolygonStippleARB, parameters) #define GET_GetnPolygonStippleARB(disp) GET_by_offset(disp, _gloffset_GetnPolygonStippleARB) -#define SET_GetnPolygonStippleARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPolygonStippleARB, fn) +static void INLINE SET_GetnPolygonStippleARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLubyte *)) { + SET_by_offset(disp, _gloffset_GetnPolygonStippleARB, fn); +} + #define CALL_GetnSeparableFilterARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *)), _gloffset_GetnSeparableFilterARB, parameters) #define GET_GetnSeparableFilterARB(disp) GET_by_offset(disp, _gloffset_GetnSeparableFilterARB) -#define SET_GetnSeparableFilterARB(disp, fn) SET_by_offset(disp, _gloffset_GetnSeparableFilterARB, fn) +static void INLINE SET_GetnSeparableFilterARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnSeparableFilterARB, fn); +} + #define CALL_GetnTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnTexImageARB, parameters) #define GET_GetnTexImageARB(disp) GET_by_offset(disp, _gloffset_GetnTexImageARB) -#define SET_GetnTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetnTexImageARB, fn) +static void INLINE SET_GetnTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnTexImageARB, fn); +} + #define CALL_GetnUniformdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLdouble *)), _gloffset_GetnUniformdvARB, parameters) #define GET_GetnUniformdvARB(disp) GET_by_offset(disp, _gloffset_GetnUniformdvARB) -#define SET_GetnUniformdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformdvARB, fn) +static void INLINE SET_GetnUniformdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetnUniformdvARB, fn); +} + #define CALL_GetnUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLfloat *)), _gloffset_GetnUniformfvARB, parameters) #define GET_GetnUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetnUniformfvARB) -#define SET_GetnUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformfvARB, fn) +static void INLINE SET_GetnUniformfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetnUniformfvARB, fn); +} + #define CALL_GetnUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLint *)), _gloffset_GetnUniformivARB, parameters) #define GET_GetnUniformivARB(disp) GET_by_offset(disp, _gloffset_GetnUniformivARB) -#define SET_GetnUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformivARB, fn) +static void INLINE SET_GetnUniformivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLint *)) { + SET_by_offset(disp, _gloffset_GetnUniformivARB, fn); +} + #define CALL_GetnUniformuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLuint *)), _gloffset_GetnUniformuivARB, parameters) #define GET_GetnUniformuivARB(disp) GET_by_offset(disp, _gloffset_GetnUniformuivARB) -#define SET_GetnUniformuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformuivARB, fn) +static void INLINE SET_GetnUniformuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GetnUniformuivARB, fn); +} + #define CALL_ReadnPixelsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_ReadnPixelsARB, parameters) #define GET_ReadnPixelsARB(disp) GET_by_offset(disp, _gloffset_ReadnPixelsARB) -#define SET_ReadnPixelsARB(disp, fn) SET_by_offset(disp, _gloffset_ReadnPixelsARB, fn) +static void INLINE SET_ReadnPixelsARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_ReadnPixelsARB, fn); +} + #define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters) #define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT) -#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn) +static void INLINE SET_PolygonOffsetEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn); +} + #define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelTexGenParameterfvSGIS, parameters) #define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS) -#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn) +static void INLINE SET_GetPixelTexGenParameterfvSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn); +} + #define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetPixelTexGenParameterivSGIS, parameters) #define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS) -#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn) +static void INLINE SET_GetPixelTexGenParameterivSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn); +} + #define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTexGenParameterfSGIS, parameters) #define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS) -#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn) +static void INLINE SET_PixelTexGenParameterfSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn); +} + #define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PixelTexGenParameterfvSGIS, parameters) #define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS) -#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn) +static void INLINE SET_PixelTexGenParameterfvSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn); +} + #define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTexGenParameteriSGIS, parameters) #define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS) -#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn) +static void INLINE SET_PixelTexGenParameteriSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn); +} + #define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PixelTexGenParameterivSGIS, parameters) #define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS) -#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn) +static void INLINE SET_PixelTexGenParameterivSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn); +} + #define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleMaskSGIS, parameters) #define GET_SampleMaskSGIS(disp) GET_by_offset(disp, _gloffset_SampleMaskSGIS) -#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn) +static void INLINE SET_SampleMaskSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLboolean)) { + SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn); +} + #define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_SamplePatternSGIS, parameters) #define GET_SamplePatternSGIS(disp) GET_by_offset(disp, _gloffset_SamplePatternSGIS) -#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn) +static void INLINE SET_SamplePatternSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn); +} + #define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_ColorPointerEXT, parameters) #define GET_ColorPointerEXT(disp) GET_by_offset(disp, _gloffset_ColorPointerEXT) -#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorPointerEXT, fn) +static void INLINE SET_ColorPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorPointerEXT, fn); +} + #define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), _gloffset_EdgeFlagPointerEXT, parameters) #define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT) -#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn) +static void INLINE SET_EdgeFlagPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLsizei, const GLboolean *)) { + SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn); +} + #define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_IndexPointerEXT, parameters) #define GET_IndexPointerEXT(disp) GET_by_offset(disp, _gloffset_IndexPointerEXT) -#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_IndexPointerEXT, fn) +static void INLINE SET_IndexPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_IndexPointerEXT, fn); +} + #define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_NormalPointerEXT, parameters) #define GET_NormalPointerEXT(disp) GET_by_offset(disp, _gloffset_NormalPointerEXT) -#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_NormalPointerEXT, fn) +static void INLINE SET_NormalPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_NormalPointerEXT, fn); +} + #define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_TexCoordPointerEXT, parameters) #define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_TexCoordPointerEXT) -#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn) +static void INLINE SET_TexCoordPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn); +} + #define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_VertexPointerEXT, parameters) #define GET_VertexPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexPointerEXT) -#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexPointerEXT, fn) +static void INLINE SET_VertexPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexPointerEXT, fn); +} + #define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PointParameterfEXT, parameters) #define GET_PointParameterfEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfEXT) -#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfEXT, fn) +static void INLINE SET_PointParameterfEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PointParameterfEXT, fn); +} + #define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PointParameterfvEXT, parameters) #define GET_PointParameterfvEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfvEXT) -#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn) +static void INLINE SET_PointParameterfvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn); +} + #define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), _gloffset_LockArraysEXT, parameters) #define GET_LockArraysEXT(disp) GET_by_offset(disp, _gloffset_LockArraysEXT) -#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_LockArraysEXT, fn) +static void INLINE SET_LockArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_LockArraysEXT, fn); +} + #define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_UnlockArraysEXT, parameters) #define GET_UnlockArraysEXT(disp) GET_by_offset(disp, _gloffset_UnlockArraysEXT) -#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn) +static void INLINE SET_UnlockArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn); +} + #define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_SecondaryColor3bEXT, parameters) #define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bEXT) -#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn) +static void INLINE SET_SecondaryColor3bEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn); +} + #define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_SecondaryColor3bvEXT, parameters) #define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT) -#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn) +static void INLINE SET_SecondaryColor3bvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn); +} + #define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_SecondaryColor3dEXT, parameters) #define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dEXT) -#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn) +static void INLINE SET_SecondaryColor3dEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn); +} + #define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_SecondaryColor3dvEXT, parameters) #define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT) -#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn) +static void INLINE SET_SecondaryColor3dvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn); +} + #define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_SecondaryColor3fEXT, parameters) #define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fEXT) -#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn) +static void INLINE SET_SecondaryColor3fEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn); +} + #define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_SecondaryColor3fvEXT, parameters) #define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT) -#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn) +static void INLINE SET_SecondaryColor3fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn); +} + #define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_SecondaryColor3iEXT, parameters) #define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3iEXT) -#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn) +static void INLINE SET_SecondaryColor3iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn); +} + #define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_SecondaryColor3ivEXT, parameters) #define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT) -#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn) +static void INLINE SET_SecondaryColor3ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn); +} + #define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_SecondaryColor3sEXT, parameters) #define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3sEXT) -#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn) +static void INLINE SET_SecondaryColor3sEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn); +} + #define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_SecondaryColor3svEXT, parameters) #define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3svEXT) -#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn) +static void INLINE SET_SecondaryColor3svEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn); +} + #define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_SecondaryColor3ubEXT, parameters) #define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT) -#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn) +static void INLINE SET_SecondaryColor3ubEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn); +} + #define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_SecondaryColor3ubvEXT, parameters) #define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT) -#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn) +static void INLINE SET_SecondaryColor3ubvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn); +} + #define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_SecondaryColor3uiEXT, parameters) #define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT) -#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn) +static void INLINE SET_SecondaryColor3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn); +} + #define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_SecondaryColor3uivEXT, parameters) #define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT) -#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn) +static void INLINE SET_SecondaryColor3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn); +} + #define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_SecondaryColor3usEXT, parameters) #define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usEXT) -#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn) +static void INLINE SET_SecondaryColor3usEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort)) { + SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn); +} + #define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_SecondaryColor3usvEXT, parameters) #define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT) -#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn) +static void INLINE SET_SecondaryColor3usvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn); +} + #define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_SecondaryColorPointerEXT, parameters) #define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT) -#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn) +static void INLINE SET_SecondaryColorPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn); +} + #define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *, const GLsizei *, GLsizei)), _gloffset_MultiDrawArraysEXT, parameters) #define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawArraysEXT) -#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn) +static void INLINE SET_MultiDrawArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *, const GLsizei *, GLsizei)) { + SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn); +} + #define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), _gloffset_MultiDrawElementsEXT, parameters) #define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsEXT) -#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn) +static void INLINE SET_MultiDrawElementsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)) { + SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn); +} + #define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_FogCoordPointerEXT, parameters) #define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_FogCoordPointerEXT) -#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn) +static void INLINE SET_FogCoordPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn); +} + #define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_FogCoorddEXT, parameters) #define GET_FogCoorddEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddEXT) -#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddEXT, fn) +static void INLINE SET_FogCoorddEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_FogCoorddEXT, fn); +} + #define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_FogCoorddvEXT, parameters) #define GET_FogCoorddvEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddvEXT) -#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn) +static void INLINE SET_FogCoorddvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn); +} + #define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_FogCoordfEXT, parameters) #define GET_FogCoordfEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfEXT) -#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfEXT, fn) +static void INLINE SET_FogCoordfEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_FogCoordfEXT, fn); +} + #define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_FogCoordfvEXT, parameters) #define GET_FogCoordfvEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfvEXT) -#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn) +static void INLINE SET_FogCoordfvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn); +} + #define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_PixelTexGenSGIX, parameters) #define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, _gloffset_PixelTexGenSGIX) -#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn) +static void INLINE SET_PixelTexGenSGIX(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn); +} + #define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateEXT, parameters) #define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT) -#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn) +static void INLINE SET_BlendFuncSeparateEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn); +} + #define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_FlushVertexArrayRangeNV, parameters) #define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV) -#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn) +static void INLINE SET_FlushVertexArrayRangeNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn); +} + #define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_VertexArrayRangeNV, parameters) #define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_VertexArrayRangeNV) -#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn) +static void INLINE SET_VertexArrayRangeNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn); +} + #define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), _gloffset_CombinerInputNV, parameters) #define GET_CombinerInputNV(disp) GET_by_offset(disp, _gloffset_CombinerInputNV) -#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerInputNV, fn) +static void INLINE SET_CombinerInputNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_CombinerInputNV, fn); +} + #define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), _gloffset_CombinerOutputNV, parameters) #define GET_CombinerOutputNV(disp) GET_by_offset(disp, _gloffset_CombinerOutputNV) -#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerOutputNV, fn) +static void INLINE SET_CombinerOutputNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)) { + SET_by_offset(disp, _gloffset_CombinerOutputNV, fn); +} + #define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_CombinerParameterfNV, parameters) #define GET_CombinerParameterfNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfNV) -#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn) +static void INLINE SET_CombinerParameterfNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn); +} + #define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_CombinerParameterfvNV, parameters) #define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfvNV) -#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn) +static void INLINE SET_CombinerParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn); +} + #define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_CombinerParameteriNV, parameters) #define GET_CombinerParameteriNV(disp) GET_by_offset(disp, _gloffset_CombinerParameteriNV) -#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn) +static void INLINE SET_CombinerParameteriNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn); +} + #define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_CombinerParameterivNV, parameters) #define GET_CombinerParameterivNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterivNV) -#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn) +static void INLINE SET_CombinerParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn); +} + #define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_FinalCombinerInputNV, parameters) #define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, _gloffset_FinalCombinerInputNV) -#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn) +static void INLINE SET_FinalCombinerInputNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn); +} + #define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerInputParameterfvNV, parameters) #define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV) -#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn) +static void INLINE SET_GetCombinerInputParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn); +} + #define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerInputParameterivNV, parameters) #define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV) -#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn) +static void INLINE SET_GetCombinerInputParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn); +} + #define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerOutputParameterfvNV, parameters) #define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV) -#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn) +static void INLINE SET_GetCombinerOutputParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn); +} + #define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerOutputParameterivNV, parameters) #define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV) -#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn) +static void INLINE SET_GetCombinerOutputParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn); +} + #define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetFinalCombinerInputParameterfvNV, parameters) #define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV) -#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn) +static void INLINE SET_GetFinalCombinerInputParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn); +} + #define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetFinalCombinerInputParameterivNV, parameters) #define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV) -#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn) +static void INLINE SET_GetFinalCombinerInputParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn); +} + #define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResizeBuffersMESA, parameters) #define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, _gloffset_ResizeBuffersMESA) -#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn) +static void INLINE SET_ResizeBuffersMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn); +} + #define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_WindowPos2dMESA, parameters) #define GET_WindowPos2dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dMESA) -#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn) +static void INLINE SET_WindowPos2dMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn); +} + #define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos2dvMESA, parameters) #define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dvMESA) -#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn) +static void INLINE SET_WindowPos2dvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn); +} + #define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_WindowPos2fMESA, parameters) #define GET_WindowPos2fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fMESA) -#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn) +static void INLINE SET_WindowPos2fMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn); +} + #define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos2fvMESA, parameters) #define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fvMESA) -#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn) +static void INLINE SET_WindowPos2fvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn); +} + #define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_WindowPos2iMESA, parameters) #define GET_WindowPos2iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2iMESA) -#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn) +static void INLINE SET_WindowPos2iMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn); +} + #define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos2ivMESA, parameters) #define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2ivMESA) -#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn) +static void INLINE SET_WindowPos2ivMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn); +} + #define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_WindowPos2sMESA, parameters) #define GET_WindowPos2sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2sMESA) -#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn) +static void INLINE SET_WindowPos2sMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn); +} + #define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos2svMESA, parameters) #define GET_WindowPos2svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2svMESA) -#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn) +static void INLINE SET_WindowPos2svMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn); +} + #define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos3dMESA, parameters) #define GET_WindowPos3dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dMESA) -#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn) +static void INLINE SET_WindowPos3dMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn); +} + #define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos3dvMESA, parameters) #define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dvMESA) -#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn) +static void INLINE SET_WindowPos3dvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn); +} + #define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos3fMESA, parameters) #define GET_WindowPos3fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fMESA) -#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn) +static void INLINE SET_WindowPos3fMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn); +} + #define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos3fvMESA, parameters) #define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fvMESA) -#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn) +static void INLINE SET_WindowPos3fvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn); +} + #define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_WindowPos3iMESA, parameters) #define GET_WindowPos3iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3iMESA) -#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn) +static void INLINE SET_WindowPos3iMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn); +} + #define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos3ivMESA, parameters) #define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3ivMESA) -#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn) +static void INLINE SET_WindowPos3ivMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn); +} + #define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_WindowPos3sMESA, parameters) #define GET_WindowPos3sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3sMESA) -#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn) +static void INLINE SET_WindowPos3sMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn); +} + #define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos3svMESA, parameters) #define GET_WindowPos3svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3svMESA) -#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn) +static void INLINE SET_WindowPos3svMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn); +} + #define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos4dMESA, parameters) #define GET_WindowPos4dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dMESA) -#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn) +static void INLINE SET_WindowPos4dMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn); +} + #define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos4dvMESA, parameters) #define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dvMESA) -#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn) +static void INLINE SET_WindowPos4dvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn); +} + #define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos4fMESA, parameters) #define GET_WindowPos4fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fMESA) -#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn) +static void INLINE SET_WindowPos4fMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn); +} + #define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos4fvMESA, parameters) #define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fvMESA) -#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn) +static void INLINE SET_WindowPos4fvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn); +} + #define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_WindowPos4iMESA, parameters) #define GET_WindowPos4iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4iMESA) -#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn) +static void INLINE SET_WindowPos4iMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn); +} + #define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos4ivMESA, parameters) #define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4ivMESA) -#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn) +static void INLINE SET_WindowPos4ivMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn); +} + #define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_WindowPos4sMESA, parameters) #define GET_WindowPos4sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4sMESA) -#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn) +static void INLINE SET_WindowPos4sMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn); +} + #define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos4svMESA, parameters) #define GET_WindowPos4svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4svMESA) -#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn) +static void INLINE SET_WindowPos4svMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn); +} + #define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), _gloffset_MultiModeDrawArraysIBM, parameters) #define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM) -#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn) +static void INLINE SET_MultiModeDrawArraysIBM(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn); +} + #define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), _gloffset_MultiModeDrawElementsIBM, parameters) #define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM) -#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn) +static void INLINE SET_MultiModeDrawElementsIBM(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn); +} + #define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFencesNV, parameters) #define GET_DeleteFencesNV(disp) GET_by_offset(disp, _gloffset_DeleteFencesNV) -#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteFencesNV, fn) +static void INLINE SET_DeleteFencesNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteFencesNV, fn); +} + #define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_FinishFenceNV, parameters) #define GET_FinishFenceNV(disp) GET_by_offset(disp, _gloffset_FinishFenceNV) -#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, _gloffset_FinishFenceNV, fn) +static void INLINE SET_FinishFenceNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_FinishFenceNV, fn); +} + #define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFencesNV, parameters) #define GET_GenFencesNV(disp) GET_by_offset(disp, _gloffset_GenFencesNV) -#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, _gloffset_GenFencesNV, fn) +static void INLINE SET_GenFencesNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenFencesNV, fn); +} + #define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetFenceivNV, parameters) #define GET_GetFenceivNV(disp) GET_by_offset(disp, _gloffset_GetFenceivNV) -#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFenceivNV, fn) +static void INLINE SET_GetFenceivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetFenceivNV, fn); +} + #define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFenceNV, parameters) #define GET_IsFenceNV(disp) GET_by_offset(disp, _gloffset_IsFenceNV) -#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, _gloffset_IsFenceNV, fn) +static void INLINE SET_IsFenceNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsFenceNV, fn); +} + #define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_SetFenceNV, parameters) #define GET_SetFenceNV(disp) GET_by_offset(disp, _gloffset_SetFenceNV) -#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, _gloffset_SetFenceNV, fn) +static void INLINE SET_SetFenceNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_SetFenceNV, fn); +} + #define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_TestFenceNV, parameters) #define GET_TestFenceNV(disp) GET_by_offset(disp, _gloffset_TestFenceNV) -#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, _gloffset_TestFenceNV, fn) +static void INLINE SET_TestFenceNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_TestFenceNV, fn); +} + #define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreProgramsResidentNV, parameters) #define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, _gloffset_AreProgramsResidentNV) -#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn) +static void INLINE SET_AreProgramsResidentNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLboolean *)) { + SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn); +} + #define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindProgramNV, parameters) #define GET_BindProgramNV(disp) GET_by_offset(disp, _gloffset_BindProgramNV) -#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, _gloffset_BindProgramNV, fn) +static void INLINE SET_BindProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindProgramNV, fn); +} + #define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteProgramsNV, parameters) #define GET_DeleteProgramsNV(disp) GET_by_offset(disp, _gloffset_DeleteProgramsNV) -#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn) +static void INLINE SET_DeleteProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn); +} + #define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ExecuteProgramNV, parameters) #define GET_ExecuteProgramNV(disp) GET_by_offset(disp, _gloffset_ExecuteProgramNV) -#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn) +static void INLINE SET_ExecuteProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn); +} + #define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenProgramsNV, parameters) #define GET_GenProgramsNV(disp) GET_by_offset(disp, _gloffset_GenProgramsNV) -#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_GenProgramsNV, fn) +static void INLINE SET_GenProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenProgramsNV, fn); +} + #define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), _gloffset_GetProgramParameterdvNV, parameters) #define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterdvNV) -#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn) +static void INLINE SET_GetProgramParameterdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn); +} + #define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), _gloffset_GetProgramParameterfvNV, parameters) #define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterfvNV) -#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn) +static void INLINE SET_GetProgramParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn); +} + #define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), _gloffset_GetProgramStringNV, parameters) #define GET_GetProgramStringNV(disp) GET_by_offset(disp, _gloffset_GetProgramStringNV) -#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringNV, fn) +static void INLINE SET_GetProgramStringNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLubyte *)) { + SET_by_offset(disp, _gloffset_GetProgramStringNV, fn); +} + #define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramivNV, parameters) #define GET_GetProgramivNV(disp) GET_by_offset(disp, _gloffset_GetProgramivNV) -#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivNV, fn) +static void INLINE SET_GetProgramivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetProgramivNV, fn); +} + #define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetTrackMatrixivNV, parameters) #define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, _gloffset_GetTrackMatrixivNV) -#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn) +static void INLINE SET_GetTrackMatrixivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn); +} + #define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), _gloffset_GetVertexAttribPointervNV, parameters) #define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV) -#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn) +static void INLINE SET_GetVertexAttribPointervNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn); +} + #define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvNV, parameters) #define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvNV) -#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn) +static void INLINE SET_GetVertexAttribdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn); +} + #define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvNV, parameters) #define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvNV) -#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn) +static void INLINE SET_GetVertexAttribfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn); +} + #define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivNV, parameters) #define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivNV) -#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn) +static void INLINE SET_GetVertexAttribivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn); +} + #define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgramNV, parameters) #define GET_IsProgramNV(disp) GET_by_offset(disp, _gloffset_IsProgramNV) -#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, _gloffset_IsProgramNV, fn) +static void INLINE SET_IsProgramNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsProgramNV, fn); +} + #define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), _gloffset_LoadProgramNV, parameters) #define GET_LoadProgramNV(disp) GET_by_offset(disp, _gloffset_LoadProgramNV) -#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, _gloffset_LoadProgramNV, fn) +static void INLINE SET_LoadProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLubyte *)) { + SET_by_offset(disp, _gloffset_LoadProgramNV, fn); +} + #define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLdouble *)), _gloffset_ProgramParameters4dvNV, parameters) #define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4dvNV) -#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn) +static void INLINE SET_ProgramParameters4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn); +} + #define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramParameters4fvNV, parameters) #define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4fvNV) -#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn) +static void INLINE SET_ProgramParameters4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn); +} + #define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_RequestResidentProgramsNV, parameters) #define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, _gloffset_RequestResidentProgramsNV) -#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn) +static void INLINE SET_RequestResidentProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn); +} + #define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), _gloffset_TrackMatrixNV, parameters) #define GET_TrackMatrixNV(disp) GET_by_offset(disp, _gloffset_TrackMatrixNV) -#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, _gloffset_TrackMatrixNV, fn) +static void INLINE SET_TrackMatrixNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_TrackMatrixNV, fn); +} + #define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dNV, parameters) #define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dNV) -#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn) +static void INLINE SET_VertexAttrib1dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn); +} + #define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvNV, parameters) #define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvNV) -#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn) +static void INLINE SET_VertexAttrib1dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn); +} + #define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fNV, parameters) #define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fNV) -#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn) +static void INLINE SET_VertexAttrib1fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn); +} + #define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvNV, parameters) #define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvNV) -#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn) +static void INLINE SET_VertexAttrib1fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn); +} + #define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sNV, parameters) #define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sNV) -#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn) +static void INLINE SET_VertexAttrib1sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn); +} + #define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svNV, parameters) #define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svNV) -#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn) +static void INLINE SET_VertexAttrib1svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn); +} + #define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dNV, parameters) #define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dNV) -#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn) +static void INLINE SET_VertexAttrib2dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn); +} + #define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvNV, parameters) #define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvNV) -#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn) +static void INLINE SET_VertexAttrib2dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn); +} + #define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fNV, parameters) #define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fNV) -#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn) +static void INLINE SET_VertexAttrib2fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn); +} + #define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvNV, parameters) #define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvNV) -#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn) +static void INLINE SET_VertexAttrib2fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn); +} + #define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sNV, parameters) #define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sNV) -#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn) +static void INLINE SET_VertexAttrib2sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn); +} + #define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svNV, parameters) #define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svNV) -#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn) +static void INLINE SET_VertexAttrib2svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn); +} + #define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dNV, parameters) #define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dNV) -#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn) +static void INLINE SET_VertexAttrib3dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn); +} + #define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvNV, parameters) #define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvNV) -#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn) +static void INLINE SET_VertexAttrib3dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn); +} + #define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fNV, parameters) #define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fNV) -#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn) +static void INLINE SET_VertexAttrib3fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn); +} + #define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvNV, parameters) #define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvNV) -#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn) +static void INLINE SET_VertexAttrib3fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn); +} + #define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sNV, parameters) #define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sNV) -#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn) +static void INLINE SET_VertexAttrib3sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn); +} + #define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svNV, parameters) #define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svNV) -#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn) +static void INLINE SET_VertexAttrib3svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn); +} + #define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dNV, parameters) #define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dNV) -#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn) +static void INLINE SET_VertexAttrib4dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn); +} + #define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvNV, parameters) #define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvNV) -#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn) +static void INLINE SET_VertexAttrib4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn); +} + #define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fNV, parameters) #define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fNV) -#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn) +static void INLINE SET_VertexAttrib4fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn); +} + #define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvNV, parameters) #define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvNV) -#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn) +static void INLINE SET_VertexAttrib4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn); +} + #define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sNV, parameters) #define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sNV) -#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn) +static void INLINE SET_VertexAttrib4sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn); +} + #define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svNV, parameters) #define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svNV) -#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn) +static void INLINE SET_VertexAttrib4svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn); +} + #define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4ubNV, parameters) #define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubNV) -#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn) +static void INLINE SET_VertexAttrib4ubNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn); +} + #define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvNV, parameters) #define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV) -#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn) +static void INLINE SET_VertexAttrib4ubvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn); +} + #define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerNV, parameters) #define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerNV) -#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn) +static void INLINE SET_VertexAttribPointerNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn); +} + #define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs1dvNV, parameters) #define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1dvNV) -#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn) +static void INLINE SET_VertexAttribs1dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn); +} + #define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs1fvNV, parameters) #define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1fvNV) -#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn) +static void INLINE SET_VertexAttribs1fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn); +} + #define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs1svNV, parameters) #define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1svNV) -#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn) +static void INLINE SET_VertexAttribs1svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn); +} + #define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs2dvNV, parameters) #define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2dvNV) -#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn) +static void INLINE SET_VertexAttribs2dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn); +} + #define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs2fvNV, parameters) #define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2fvNV) -#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn) +static void INLINE SET_VertexAttribs2fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn); +} + #define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs2svNV, parameters) #define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2svNV) -#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn) +static void INLINE SET_VertexAttribs2svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn); +} + #define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs3dvNV, parameters) #define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3dvNV) -#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn) +static void INLINE SET_VertexAttribs3dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn); +} + #define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs3fvNV, parameters) #define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3fvNV) -#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn) +static void INLINE SET_VertexAttribs3fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn); +} + #define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs3svNV, parameters) #define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3svNV) -#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn) +static void INLINE SET_VertexAttribs3svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn); +} + #define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs4dvNV, parameters) #define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4dvNV) -#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn) +static void INLINE SET_VertexAttribs4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn); +} + #define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs4fvNV, parameters) #define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4fvNV) -#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn) +static void INLINE SET_VertexAttribs4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn); +} + #define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs4svNV, parameters) #define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4svNV) -#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn) +static void INLINE SET_VertexAttribs4svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn); +} + #define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), _gloffset_VertexAttribs4ubvNV, parameters) #define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV) -#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn) +static void INLINE SET_VertexAttribs4ubvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn); +} + #define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetTexBumpParameterfvATI, parameters) #define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI) -#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn) +static void INLINE SET_GetTexBumpParameterfvATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn); +} + #define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetTexBumpParameterivATI, parameters) #define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI) -#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn) +static void INLINE SET_GetTexBumpParameterivATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn); +} + #define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_TexBumpParameterfvATI, parameters) #define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterfvATI) -#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn) +static void INLINE SET_TexBumpParameterfvATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn); +} + #define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_TexBumpParameterivATI, parameters) #define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterivATI) -#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn) +static void INLINE SET_TexBumpParameterivATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn); +} + #define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp1ATI, parameters) #define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI) -#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn) +static void INLINE SET_AlphaFragmentOp1ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn); +} + #define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp2ATI, parameters) #define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI) -#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn) +static void INLINE SET_AlphaFragmentOp2ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn); +} + #define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp3ATI, parameters) #define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI) -#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn) +static void INLINE SET_AlphaFragmentOp3ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn); +} + #define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_BeginFragmentShaderATI, parameters) #define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BeginFragmentShaderATI) -#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn) +static void INLINE SET_BeginFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn); +} + #define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindFragmentShaderATI, parameters) #define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BindFragmentShaderATI) -#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn) +static void INLINE SET_BindFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn); +} + #define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp1ATI, parameters) #define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI) -#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn) +static void INLINE SET_ColorFragmentOp1ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn); +} + #define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp2ATI, parameters) #define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI) -#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn) +static void INLINE SET_ColorFragmentOp2ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn); +} + #define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp3ATI, parameters) #define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI) -#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn) +static void INLINE SET_ColorFragmentOp3ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn); +} + #define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteFragmentShaderATI, parameters) #define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI) -#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn) +static void INLINE SET_DeleteFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn); +} + #define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndFragmentShaderATI, parameters) #define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_EndFragmentShaderATI) -#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn) +static void INLINE SET_EndFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn); +} + #define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), _gloffset_GenFragmentShadersATI, parameters) #define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, _gloffset_GenFragmentShadersATI) -#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn) +static void INLINE SET_GenFragmentShadersATI(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn); +} + #define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_PassTexCoordATI, parameters) #define GET_PassTexCoordATI(disp) GET_by_offset(disp, _gloffset_PassTexCoordATI) -#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, _gloffset_PassTexCoordATI, fn) +static void INLINE SET_PassTexCoordATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_PassTexCoordATI, fn); +} + #define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_SampleMapATI, parameters) #define GET_SampleMapATI(disp) GET_by_offset(disp, _gloffset_SampleMapATI) -#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, _gloffset_SampleMapATI, fn) +static void INLINE SET_SampleMapATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_SampleMapATI, fn); +} + #define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_SetFragmentShaderConstantATI, parameters) #define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI) -#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn) +static void INLINE SET_SetFragmentShaderConstantATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn); +} + #define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PointParameteriNV, parameters) #define GET_PointParameteriNV(disp) GET_by_offset(disp, _gloffset_PointParameteriNV) -#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameteriNV, fn) +static void INLINE SET_PointParameteriNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PointParameteriNV, fn); +} + #define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PointParameterivNV, parameters) #define GET_PointParameterivNV(disp) GET_by_offset(disp, _gloffset_PointParameterivNV) -#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameterivNV, fn) +static void INLINE SET_PointParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_PointParameterivNV, fn); +} + #define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveStencilFaceEXT, parameters) #define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT) -#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn) +static void INLINE SET_ActiveStencilFaceEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn); +} + #define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArrayAPPLE, parameters) #define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE) -#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn) +static void INLINE SET_BindVertexArrayAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn); +} + #define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteVertexArraysAPPLE, parameters) #define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE) -#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn) +static void INLINE SET_DeleteVertexArraysAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn); +} + #define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArraysAPPLE, parameters) #define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE) -#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn) +static void INLINE SET_GenVertexArraysAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn); +} + #define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsVertexArrayAPPLE, parameters) #define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE) -#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn) +static void INLINE SET_IsVertexArrayAPPLE(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn); +} + #define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), _gloffset_GetProgramNamedParameterdvNV, parameters) #define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV) -#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn) +static void INLINE SET_GetProgramNamedParameterdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn); +} + #define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), _gloffset_GetProgramNamedParameterfvNV, parameters) #define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV) -#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn) +static void INLINE SET_GetProgramNamedParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn); +} + #define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramNamedParameter4dNV, parameters) #define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV) -#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn) +static void INLINE SET_ProgramNamedParameter4dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn); +} + #define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), _gloffset_ProgramNamedParameter4dvNV, parameters) #define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV) -#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn) +static void INLINE SET_ProgramNamedParameter4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn); +} + #define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramNamedParameter4fNV, parameters) #define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV) -#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn) +static void INLINE SET_ProgramNamedParameter4fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn); +} + #define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), _gloffset_ProgramNamedParameter4fvNV, parameters) #define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV) -#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn) +static void INLINE SET_ProgramNamedParameter4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn); +} + #define CALL_PrimitiveRestartIndexNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PrimitiveRestartIndexNV, parameters) #define GET_PrimitiveRestartIndexNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV) -#define SET_PrimitiveRestartIndexNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn) +static void INLINE SET_PrimitiveRestartIndexNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn); +} + #define CALL_PrimitiveRestartNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PrimitiveRestartNV, parameters) #define GET_PrimitiveRestartNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartNV) -#define SET_PrimitiveRestartNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn) +static void INLINE SET_PrimitiveRestartNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn); +} + #define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthBoundsEXT, parameters) #define GET_DepthBoundsEXT(disp) GET_by_offset(disp, _gloffset_DepthBoundsEXT) -#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn) +static void INLINE SET_DepthBoundsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampd, GLclampd)) { + SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn); +} + #define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendEquationSeparateEXT, parameters) #define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT) -#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn) +static void INLINE SET_BlendEquationSeparateEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn); +} + #define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindFramebufferEXT, parameters) #define GET_BindFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BindFramebufferEXT) -#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn) +static void INLINE SET_BindFramebufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn); +} + #define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindRenderbufferEXT, parameters) #define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_BindRenderbufferEXT) -#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn) +static void INLINE SET_BindRenderbufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn); +} + #define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), _gloffset_CheckFramebufferStatusEXT, parameters) #define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT) -#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn) +static void INLINE SET_CheckFramebufferStatusEXT(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn); +} + #define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFramebuffersEXT, parameters) #define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT) -#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn) +static void INLINE SET_DeleteFramebuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn); +} + #define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteRenderbuffersEXT, parameters) #define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT) -#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn) +static void INLINE SET_DeleteRenderbuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn); +} + #define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), _gloffset_FramebufferRenderbufferEXT, parameters) #define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT) -#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn) +static void INLINE SET_FramebufferRenderbufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn); +} + #define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture1DEXT, parameters) #define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT) -#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn) +static void INLINE SET_FramebufferTexture1DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn); +} + #define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture2DEXT, parameters) #define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT) -#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn) +static void INLINE SET_FramebufferTexture2DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn); +} + #define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTexture3DEXT, parameters) #define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT) -#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn) +static void INLINE SET_FramebufferTexture3DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn); +} + #define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFramebuffersEXT, parameters) #define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_GenFramebuffersEXT) -#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn) +static void INLINE SET_GenFramebuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn); +} + #define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenRenderbuffersEXT, parameters) #define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_GenRenderbuffersEXT) -#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn) +static void INLINE SET_GenRenderbuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn); +} + #define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_GenerateMipmapEXT, parameters) #define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, _gloffset_GenerateMipmapEXT) -#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn) +static void INLINE SET_GenerateMipmapEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn); +} + #define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetFramebufferAttachmentParameterivEXT, parameters) #define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT) -#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn) +static void INLINE SET_GetFramebufferAttachmentParameterivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn); +} + #define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetRenderbufferParameterivEXT, parameters) #define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT) -#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn) +static void INLINE SET_GetRenderbufferParameterivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn); +} + #define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFramebufferEXT, parameters) #define GET_IsFramebufferEXT(disp) GET_by_offset(disp, _gloffset_IsFramebufferEXT) -#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn) +static void INLINE SET_IsFramebufferEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn); +} + #define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsRenderbufferEXT, parameters) #define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_IsRenderbufferEXT) -#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn) +static void INLINE SET_IsRenderbufferEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn); +} + #define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageEXT, parameters) #define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageEXT) -#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn) +static void INLINE SET_RenderbufferStorageEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn); +} + #define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), _gloffset_BlitFramebufferEXT, parameters) #define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BlitFramebufferEXT) -#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn) +static void INLINE SET_BlitFramebufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)) { + SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn); +} + #define CALL_BufferParameteriAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_BufferParameteriAPPLE, parameters) #define GET_BufferParameteriAPPLE(disp) GET_by_offset(disp, _gloffset_BufferParameteriAPPLE) -#define SET_BufferParameteriAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn) +static void INLINE SET_BufferParameteriAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn); +} + #define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRangeAPPLE, parameters) #define GET_FlushMappedBufferRangeAPPLE(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE) -#define SET_FlushMappedBufferRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn) +static void INLINE SET_FlushMappedBufferRangeAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn); +} + #define CALL_BindFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, const GLchar *)), _gloffset_BindFragDataLocationEXT, parameters) #define GET_BindFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_BindFragDataLocationEXT) -#define SET_BindFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn) +static void INLINE SET_BindFragDataLocationEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, const GLchar *)) { + SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn); +} + #define CALL_GetFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLuint, const GLchar *)), _gloffset_GetFragDataLocationEXT, parameters) #define GET_GetFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_GetFragDataLocationEXT) -#define SET_GetFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn) +static void INLINE SET_GetFragDataLocationEXT(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLuint, const GLchar *)) { + SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn); +} + #define CALL_GetUniformuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLuint *)), _gloffset_GetUniformuivEXT, parameters) #define GET_GetUniformuivEXT(disp) GET_by_offset(disp, _gloffset_GetUniformuivEXT) -#define SET_GetUniformuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn) +static void INLINE SET_GetUniformuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLuint *)) { + SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn); +} + #define CALL_GetVertexAttribIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribIivEXT, parameters) #define GET_GetVertexAttribIivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT) -#define SET_GetVertexAttribIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn) +static void INLINE SET_GetVertexAttribIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn); +} + #define CALL_GetVertexAttribIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetVertexAttribIuivEXT, parameters) #define GET_GetVertexAttribIuivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT) -#define SET_GetVertexAttribIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn) +static void INLINE SET_GetVertexAttribIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn); +} + #define CALL_Uniform1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint)), _gloffset_Uniform1uiEXT, parameters) #define GET_Uniform1uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uiEXT) -#define SET_Uniform1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn) +static void INLINE SET_Uniform1uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn); +} + #define CALL_Uniform1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform1uivEXT, parameters) #define GET_Uniform1uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uivEXT) -#define SET_Uniform1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn) +static void INLINE SET_Uniform1uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn); +} + #define CALL_Uniform2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint)), _gloffset_Uniform2uiEXT, parameters) #define GET_Uniform2uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uiEXT) -#define SET_Uniform2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn) +static void INLINE SET_Uniform2uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn); +} + #define CALL_Uniform2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform2uivEXT, parameters) #define GET_Uniform2uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uivEXT) -#define SET_Uniform2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn) +static void INLINE SET_Uniform2uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn); +} + #define CALL_Uniform3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint)), _gloffset_Uniform3uiEXT, parameters) #define GET_Uniform3uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uiEXT) -#define SET_Uniform3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn) +static void INLINE SET_Uniform3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn); +} + #define CALL_Uniform3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform3uivEXT, parameters) #define GET_Uniform3uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uivEXT) -#define SET_Uniform3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn) +static void INLINE SET_Uniform3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn); +} + #define CALL_Uniform4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint, GLuint)), _gloffset_Uniform4uiEXT, parameters) #define GET_Uniform4uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uiEXT) -#define SET_Uniform4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn) +static void INLINE SET_Uniform4uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn); +} + #define CALL_Uniform4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform4uivEXT, parameters) #define GET_Uniform4uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uivEXT) -#define SET_Uniform4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn) +static void INLINE SET_Uniform4uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn); +} + #define CALL_VertexAttribI1iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint)), _gloffset_VertexAttribI1iEXT, parameters) #define GET_VertexAttribI1iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1iEXT) -#define SET_VertexAttribI1iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn) +static void INLINE SET_VertexAttribI1iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn); +} + #define CALL_VertexAttribI1ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI1ivEXT, parameters) #define GET_VertexAttribI1ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT) -#define SET_VertexAttribI1ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn) +static void INLINE SET_VertexAttribI1ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn); +} + #define CALL_VertexAttribI1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribI1uiEXT, parameters) #define GET_VertexAttribI1uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT) -#define SET_VertexAttribI1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn) +static void INLINE SET_VertexAttribI1uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn); +} + #define CALL_VertexAttribI1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI1uivEXT, parameters) #define GET_VertexAttribI1uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT) -#define SET_VertexAttribI1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn) +static void INLINE SET_VertexAttribI1uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn); +} + #define CALL_VertexAttribI2iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint)), _gloffset_VertexAttribI2iEXT, parameters) #define GET_VertexAttribI2iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2iEXT) -#define SET_VertexAttribI2iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn) +static void INLINE SET_VertexAttribI2iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn); +} + #define CALL_VertexAttribI2ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI2ivEXT, parameters) #define GET_VertexAttribI2ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT) -#define SET_VertexAttribI2ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn) +static void INLINE SET_VertexAttribI2ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn); +} + #define CALL_VertexAttribI2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_VertexAttribI2uiEXT, parameters) #define GET_VertexAttribI2uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT) -#define SET_VertexAttribI2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn) +static void INLINE SET_VertexAttribI2uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn); +} + #define CALL_VertexAttribI2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI2uivEXT, parameters) #define GET_VertexAttribI2uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT) -#define SET_VertexAttribI2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn) +static void INLINE SET_VertexAttribI2uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn); +} + #define CALL_VertexAttribI3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint)), _gloffset_VertexAttribI3iEXT, parameters) #define GET_VertexAttribI3iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3iEXT) -#define SET_VertexAttribI3iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn) +static void INLINE SET_VertexAttribI3iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn); +} + #define CALL_VertexAttribI3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI3ivEXT, parameters) #define GET_VertexAttribI3ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT) -#define SET_VertexAttribI3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn) +static void INLINE SET_VertexAttribI3ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn); +} + #define CALL_VertexAttribI3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI3uiEXT, parameters) #define GET_VertexAttribI3uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT) -#define SET_VertexAttribI3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn) +static void INLINE SET_VertexAttribI3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn); +} + #define CALL_VertexAttribI3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI3uivEXT, parameters) #define GET_VertexAttribI3uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT) -#define SET_VertexAttribI3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn) +static void INLINE SET_VertexAttribI3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn); +} + #define CALL_VertexAttribI4bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttribI4bvEXT, parameters) #define GET_VertexAttribI4bvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT) -#define SET_VertexAttribI4bvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn) +static void INLINE SET_VertexAttribI4bvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn); +} + #define CALL_VertexAttribI4iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint, GLint)), _gloffset_VertexAttribI4iEXT, parameters) #define GET_VertexAttribI4iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4iEXT) -#define SET_VertexAttribI4iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn) +static void INLINE SET_VertexAttribI4iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn); +} + #define CALL_VertexAttribI4ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI4ivEXT, parameters) #define GET_VertexAttribI4ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT) -#define SET_VertexAttribI4ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn) +static void INLINE SET_VertexAttribI4ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn); +} + #define CALL_VertexAttribI4svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttribI4svEXT, parameters) #define GET_VertexAttribI4svEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4svEXT) -#define SET_VertexAttribI4svEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn) +static void INLINE SET_VertexAttribI4svEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn); +} + #define CALL_VertexAttribI4ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttribI4ubvEXT, parameters) #define GET_VertexAttribI4ubvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT) -#define SET_VertexAttribI4ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn) +static void INLINE SET_VertexAttribI4ubvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn); +} + #define CALL_VertexAttribI4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI4uiEXT, parameters) #define GET_VertexAttribI4uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT) -#define SET_VertexAttribI4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn) +static void INLINE SET_VertexAttribI4uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn); +} + #define CALL_VertexAttribI4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI4uivEXT, parameters) #define GET_VertexAttribI4uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT) -#define SET_VertexAttribI4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn) +static void INLINE SET_VertexAttribI4uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn); +} + #define CALL_VertexAttribI4usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttribI4usvEXT, parameters) #define GET_VertexAttribI4usvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT) -#define SET_VertexAttribI4usvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn) +static void INLINE SET_VertexAttribI4usvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn); +} + #define CALL_VertexAttribIPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribIPointerEXT, parameters) #define GET_VertexAttribIPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT) -#define SET_VertexAttribIPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn) +static void INLINE SET_VertexAttribIPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn); +} + #define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTextureLayerEXT, parameters) #define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT) -#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn) +static void INLINE SET_FramebufferTextureLayerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn); +} + #define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMaskIndexedEXT, parameters) #define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT) -#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn) +static void INLINE SET_ColorMaskIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)) { + SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn); +} + #define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DisableIndexedEXT, parameters) #define GET_DisableIndexedEXT(disp) GET_by_offset(disp, _gloffset_DisableIndexedEXT) -#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn) +static void INLINE SET_DisableIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn); +} + #define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_EnableIndexedEXT, parameters) #define GET_EnableIndexedEXT(disp) GET_by_offset(disp, _gloffset_EnableIndexedEXT) -#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn) +static void INLINE SET_EnableIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn); +} + #define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), _gloffset_GetBooleanIndexedvEXT, parameters) #define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT) -#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn) +static void INLINE SET_GetBooleanIndexedvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLboolean *)) { + SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn); +} + #define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), _gloffset_GetIntegerIndexedvEXT, parameters) #define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT) -#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn) +static void INLINE SET_GetIntegerIndexedvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLint *)) { + SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn); +} + #define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_IsEnabledIndexedEXT, parameters) #define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT) -#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn) +static void INLINE SET_IsEnabledIndexedEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn); +} + #define CALL_ClearColorIiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_ClearColorIiEXT, parameters) #define GET_ClearColorIiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIiEXT) -#define SET_ClearColorIiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn) +static void INLINE SET_ClearColorIiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn); +} + #define CALL_ClearColorIuiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_ClearColorIuiEXT, parameters) #define GET_ClearColorIuiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIuiEXT) -#define SET_ClearColorIuiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn) +static void INLINE SET_ClearColorIuiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn); +} + #define CALL_GetTexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameterIivEXT, parameters) #define GET_GetTexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIivEXT) -#define SET_GetTexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn) +static void INLINE SET_GetTexParameterIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn); +} + #define CALL_GetTexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint *)), _gloffset_GetTexParameterIuivEXT, parameters) #define GET_GetTexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT) -#define SET_GetTexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn) +static void INLINE SET_GetTexParameterIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn); +} + #define CALL_TexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameterIivEXT, parameters) #define GET_TexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIivEXT) -#define SET_TexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn) +static void INLINE SET_TexParameterIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn); +} + #define CALL_TexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLuint *)), _gloffset_TexParameterIuivEXT, parameters) #define GET_TexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIuivEXT) -#define SET_TexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn) +static void INLINE SET_TexParameterIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLuint *)) { + SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn); +} + #define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BeginConditionalRenderNV, parameters) #define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_BeginConditionalRenderNV) -#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn) +static void INLINE SET_BeginConditionalRenderNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn); +} + #define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndConditionalRenderNV, parameters) #define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_EndConditionalRenderNV) -#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn) +static void INLINE SET_EndConditionalRenderNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn); +} + #define CALL_BeginTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BeginTransformFeedbackEXT, parameters) #define GET_BeginTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT) -#define SET_BeginTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn) +static void INLINE SET_BeginTransformFeedbackEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn); +} + #define CALL_BindBufferBaseEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint)), _gloffset_BindBufferBaseEXT, parameters) #define GET_BindBufferBaseEXT(disp) GET_by_offset(disp, _gloffset_BindBufferBaseEXT) -#define SET_BindBufferBaseEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn) +static void INLINE SET_BindBufferBaseEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn); +} + #define CALL_BindBufferOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr)), _gloffset_BindBufferOffsetEXT, parameters) #define GET_BindBufferOffsetEXT(disp) GET_by_offset(disp, _gloffset_BindBufferOffsetEXT) -#define SET_BindBufferOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn) +static void INLINE SET_BindBufferOffsetEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLintptr)) { + SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn); +} + #define CALL_BindBufferRangeEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)), _gloffset_BindBufferRangeEXT, parameters) #define GET_BindBufferRangeEXT(disp) GET_by_offset(disp, _gloffset_BindBufferRangeEXT) -#define SET_BindBufferRangeEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn) +static void INLINE SET_BindBufferRangeEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn); +} + #define CALL_EndTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndTransformFeedbackEXT, parameters) #define GET_EndTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT) -#define SET_EndTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn) +static void INLINE SET_EndTransformFeedbackEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn); +} + #define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)), _gloffset_GetTransformFeedbackVaryingEXT, parameters) #define GET_GetTransformFeedbackVaryingEXT(disp) GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT) -#define SET_GetTransformFeedbackVaryingEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn) +static void INLINE SET_GetTransformFeedbackVaryingEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)) { + SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn); +} + #define CALL_TransformFeedbackVaryingsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const char **, GLenum)), _gloffset_TransformFeedbackVaryingsEXT, parameters) #define GET_TransformFeedbackVaryingsEXT(disp) GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT) -#define SET_TransformFeedbackVaryingsEXT(disp, fn) SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn) +static void INLINE SET_TransformFeedbackVaryingsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const char **, GLenum)) { + SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn); +} + #define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ProvokingVertexEXT, parameters) #define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, _gloffset_ProvokingVertexEXT) -#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn) +static void INLINE SET_ProvokingVertexEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn); +} + #define CALL_GetTexParameterPointervAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetTexParameterPointervAPPLE, parameters) #define GET_GetTexParameterPointervAPPLE(disp) GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE) -#define SET_GetTexParameterPointervAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn) +static void INLINE SET_GetTexParameterPointervAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn); +} + #define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), _gloffset_TextureRangeAPPLE, parameters) #define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, _gloffset_TextureRangeAPPLE) -#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn) +static void INLINE SET_TextureRangeAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn); +} + #define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetObjectParameterivAPPLE, parameters) #define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE) -#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn) +static void INLINE SET_GetObjectParameterivAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn); +} + #define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectPurgeableAPPLE, parameters) #define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE) -#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn) +static void INLINE SET_ObjectPurgeableAPPLE(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn); +} + #define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectUnpurgeableAPPLE, parameters) #define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE) -#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn) +static void INLINE SET_ObjectUnpurgeableAPPLE(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn); +} + #define CALL_ActiveProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ActiveProgramEXT, parameters) #define GET_ActiveProgramEXT(disp) GET_by_offset(disp, _gloffset_ActiveProgramEXT) -#define SET_ActiveProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn) +static void INLINE SET_ActiveProgramEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn); +} + #define CALL_CreateShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum, const GLchar *)), _gloffset_CreateShaderProgramEXT, parameters) #define GET_CreateShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_CreateShaderProgramEXT) -#define SET_CreateShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn) +static void INLINE SET_CreateShaderProgramEXT(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum, const GLchar *)) { + SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn); +} + #define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters) #define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT) -#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn) +static void INLINE SET_UseShaderProgramEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn); +} + #define CALL_TextureBarrierNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_TextureBarrierNV, parameters) #define GET_TextureBarrierNV(disp) GET_by_offset(disp, _gloffset_TextureBarrierNV) -#define SET_TextureBarrierNV(disp, fn) SET_by_offset(disp, _gloffset_TextureBarrierNV, fn) +static void INLINE SET_TextureBarrierNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_TextureBarrierNV, fn); +} + #define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters) #define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI) -#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn) +static void INLINE SET_StencilFuncSeparateATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { + SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn); +} + #define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramEnvParameters4fvEXT, parameters) #define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT) -#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn) +static void INLINE SET_ProgramEnvParameters4fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn); +} + #define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramLocalParameters4fvEXT, parameters) #define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT) -#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn) +static void INLINE SET_ProgramLocalParameters4fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn); +} + #define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), _gloffset_GetQueryObjecti64vEXT, parameters) #define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT) -#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn) +static void INLINE SET_GetQueryObjecti64vEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint64EXT *)) { + SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn); +} + #define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), _gloffset_GetQueryObjectui64vEXT, parameters) #define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT) -#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn) +static void INLINE SET_GetQueryObjectui64vEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint64EXT *)) { + SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn); +} + #define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetRenderbufferStorageOES, parameters) #define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES) -#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn) +static void INLINE SET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn); +} + #define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetTexture2DOES, parameters) #define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES) -#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn) +static void INLINE SET_EGLImageTargetTexture2DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn); +} + #endif /* !defined( _GLAPI_DISPATCH_H_ ) */ -- cgit v1.2.3 From 339544f4bbef9be1b4b3465f28482b9699a99692 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 11 May 2011 15:28:19 -0400 Subject: wayland-drm: Use new generic error event --- .../wayland/wayland-drm/protocol/wayland-drm.xml | 6 +++++ src/egl/wayland/wayland-drm/wayland-drm.c | 27 +++++++++------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml index cd5d191227a..0331f124e80 100644 --- a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml +++ b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml @@ -3,6 +3,12 @@ + + + + + +