summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_metaops.c246
-rw-r--r--src/mesa/drivers/dri/common/dri_metaops.h22
-rw-r--r--src/mesa/drivers/dri/common/extension_helper.h1394
-rw-r--r--src/mesa/drivers/dri/i915/Makefile1
l---------src/mesa/drivers/dri/i915/intel_syncobj.c1
-rw-r--r--src/mesa/drivers/dri/i965/Makefile1
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_state.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_structs.h4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c18
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass1.c1
l---------src/mesa/drivers/dri/i965/intel_syncobj.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c107
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c22
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c5
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h8
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c27
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_draw.c159
-rw-r--r--src/mesa/drivers/dri/intel/intel_syncobj.c132
-rw-r--r--src/mesa/drivers/dri/r200/Makefile11
-rw-r--r--src/mesa/drivers/dri/r200/r200_cmdbuf.c39
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c27
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.h6
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c10
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h1
-rw-r--r--src/mesa/drivers/dri/r200/r200_pixel.c28
-rw-r--r--src/mesa/drivers/dri/r200/r200_sanity.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c29
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c13
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c12
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c15
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c8
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c12
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c14
l---------src/mesa/drivers/dri/r200/radeon_debug.c1
l---------src/mesa/drivers/dri/r200/radeon_debug.h1
-rw-r--r--src/mesa/drivers/dri/r300/Makefile13
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.h3
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_draw.c34
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog_common.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h6
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c18
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c34
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c8
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c2
l---------src/mesa/drivers/dri/r300/radeon_debug.c1
l---------src/mesa/drivers/dri/r300/radeon_debug.h1
-rw-r--r--src/mesa/drivers/dri/r600/Makefile9
-rw-r--r--src/mesa/drivers/dri/r600/r600_cmdbuf.c12
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c13
-rw-r--r--src/mesa/drivers/dri/r600/r600_emit.c28
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c20
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c66
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c72
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.c125
-rw-r--r--src/mesa/drivers/dri/r600/r700_clear.c5
-rw-r--r--src/mesa/drivers/dri/r600/r700_debug.c35
-rw-r--r--src/mesa/drivers/dri/r600/r700_debug.h60
-rw-r--r--src/mesa/drivers/dri/r600/r700_oglprog.c6
-rw-r--r--src/mesa/drivers/dri/r600/r700_render.c27
-rw-r--r--src/mesa/drivers/dri/r600/r700_shaderinst.c14
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c161
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.h3
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.c3
l---------src/mesa/drivers/dri/r600/radeon_debug.c1
l---------src/mesa/drivers/dri/r600/radeon_debug.h1
-rw-r--r--src/mesa/drivers/dri/radeon/Makefile11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_legacy.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c9
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_chipset.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c118
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h47
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c19
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.h7
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_legacy.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_legacy.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_debug.c101
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_debug.h191
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.c26
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c16
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lighting.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lock.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_arrays.c10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c18
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.c24
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_sanity.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c36
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c24
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c12
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c14
-rw-r--r--src/mesa/drivers/dri/s3v/s3v_state.c5
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c13
-rw-r--r--src/mesa/drivers/dri/savage/savagecontext.h1
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c2
112 files changed, 2039 insertions, 1947 deletions
diff --git a/src/mesa/drivers/dri/common/dri_metaops.c b/src/mesa/drivers/dri/common/dri_metaops.c
index cdbea344951..c7bea07dc97 100644
--- a/src/mesa/drivers/dri/common/dri_metaops.c
+++ b/src/mesa/drivers/dri/common/dri_metaops.c
@@ -287,250 +287,6 @@ meta_restore_texcoords(struct dri_metaops *meta)
}
-/**
- * Perform glClear where mask contains only color, depth, and/or stencil.
- *
- * The implementation is based on calling into Mesa to set GL state and
- * performing normal triangle rendering. The intent of this path is to
- * have as generic a path as possible, so that any driver could make use of
- * it.
- */
-
-/**
- * Per-context one-time init of things for intl_clear_tris().
- * Basically set up a private array object for vertex/color arrays.
- */
-static void
-meta_init_clear(struct dri_metaops *meta)
-{
- GLcontext *ctx = meta->ctx;
- struct gl_array_object *arraySave = NULL;
- const GLuint arrayBuffer = ctx->Array.ArrayBufferObj->Name;
- const GLuint elementBuffer = ctx->Array.ElementArrayBufferObj->Name;
-
- /* create new array object */
- meta->clear.arrayObj = _mesa_new_array_object(ctx, ~0);
-
- /* save current array object, bind new one */
- _mesa_reference_array_object(ctx, &arraySave, ctx->Array.ArrayObj);
- ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= _NEW_ARRAY_ALL;
- _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, meta->clear.arrayObj);
-
- /* one-time setup of vertex arrays (pos, color) */
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
- _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
- _mesa_ColorPointer(4, GL_FLOAT, 4 * sizeof(GLfloat), meta->clear.color);
- _mesa_VertexPointer(3, GL_FLOAT, 3 * sizeof(GLfloat), meta->clear.vertices);
- _mesa_Enable(GL_COLOR_ARRAY);
- _mesa_Enable(GL_VERTEX_ARRAY);
-
- /* restore original array object */
- ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= _NEW_ARRAY_ALL;
- _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, arraySave);
- _mesa_reference_array_object(ctx, &arraySave, NULL);
-
- /* restore original buffer objects */
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, arrayBuffer);
- _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, elementBuffer);
-}
-
-
-
-/**
- * Perform glClear where mask contains only color, depth, and/or stencil.
- *
- * The implementation is based on calling into Mesa to set GL state and
- * performing normal triangle rendering. The intent of this path is to
- * have as generic a path as possible, so that any driver could make use of
- * it.
- */
-void
-meta_clear_tris(struct dri_metaops *meta, GLbitfield mask)
-{
- GLcontext *ctx = meta->ctx;
- GLfloat dst_z;
- struct gl_framebuffer *fb = ctx->DrawBuffer;
- int i;
- GLboolean saved_fp_enable = GL_FALSE, saved_vp_enable = GL_FALSE;
- GLuint saved_shader_program = 0;
- unsigned int saved_active_texture;
- struct gl_array_object *arraySave = NULL;
- GLfloat saved_near, saved_far;
-
- if (!meta->clear.arrayObj)
- meta_init_clear(meta);
-
- assert((mask & ~(TRI_CLEAR_COLOR_BITS | BUFFER_BIT_DEPTH |
- BUFFER_BIT_STENCIL)) == 0);
-
- _mesa_PushAttrib(GL_COLOR_BUFFER_BIT |
- GL_DEPTH_BUFFER_BIT |
- GL_ENABLE_BIT |
- GL_POLYGON_BIT |
- GL_STENCIL_BUFFER_BIT |
- GL_TRANSFORM_BIT |
- GL_CURRENT_BIT);
- saved_active_texture = ctx->Texture.CurrentUnit;
-
- /* Disable existing GL state we don't want to apply to a clear. */
- _mesa_Disable(GL_ALPHA_TEST);
- _mesa_Disable(GL_BLEND);
- _mesa_Disable(GL_CULL_FACE);
- _mesa_Disable(GL_FOG);
- _mesa_Disable(GL_POLYGON_SMOOTH);
- _mesa_Disable(GL_POLYGON_STIPPLE);
- _mesa_Disable(GL_POLYGON_OFFSET_FILL);
- _mesa_Disable(GL_LIGHTING);
- _mesa_Disable(GL_CLIP_PLANE0);
- _mesa_Disable(GL_CLIP_PLANE1);
- _mesa_Disable(GL_CLIP_PLANE2);
- _mesa_Disable(GL_CLIP_PLANE3);
- _mesa_Disable(GL_CLIP_PLANE4);
- _mesa_Disable(GL_CLIP_PLANE5);
- _mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- if (ctx->Extensions.ARB_fragment_program && ctx->FragmentProgram.Enabled) {
- saved_fp_enable = GL_TRUE;
- _mesa_Disable(GL_FRAGMENT_PROGRAM_ARB);
- }
- if (ctx->Extensions.ARB_vertex_program && ctx->VertexProgram.Enabled) {
- saved_vp_enable = GL_TRUE;
- _mesa_Disable(GL_VERTEX_PROGRAM_ARB);
- }
- if (ctx->Extensions.ARB_shader_objects && ctx->Shader.CurrentProgram) {
- saved_shader_program = ctx->Shader.CurrentProgram->Name;
- _mesa_UseProgramObjectARB(0);
- }
-
- if (ctx->Texture._EnabledUnits != 0) {
- int i;
-
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
- _mesa_ActiveTextureARB(GL_TEXTURE0 + i);
- _mesa_Disable(GL_TEXTURE_1D);
- _mesa_Disable(GL_TEXTURE_2D);
- _mesa_Disable(GL_TEXTURE_3D);
- if (ctx->Extensions.ARB_texture_cube_map)
- _mesa_Disable(GL_TEXTURE_CUBE_MAP_ARB);
- if (ctx->Extensions.NV_texture_rectangle)
- _mesa_Disable(GL_TEXTURE_RECTANGLE_NV);
- if (ctx->Extensions.MESA_texture_array) {
- _mesa_Disable(GL_TEXTURE_1D_ARRAY_EXT);
- _mesa_Disable(GL_TEXTURE_2D_ARRAY_EXT);
- }
- }
- }
-
- /* save current array object, bind our private one */
- _mesa_reference_array_object(ctx, &arraySave, ctx->Array.ArrayObj);
- ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= _NEW_ARRAY_ALL;
- _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, meta->clear.arrayObj);
-
- meta_set_passthrough_transform(meta);
-
- for (i = 0; i < 4; i++) {
- COPY_4FV(meta->clear.color[i], ctx->Color.ClearColor);
- }
-
- /* convert clear Z from [0,1] to NDC coord in [-1,1] */
- dst_z = -1.0 + 2.0 * ctx->Depth.Clear;
-
- /* The ClearDepth value is unaffected by DepthRange, so do a default
- * mapping.
- */
- saved_near = ctx->Viewport.Near;
- saved_far = ctx->Viewport.Far;
- _mesa_DepthRange(0.0, 1.0);
-
- /* Prepare the vertices, which are the same regardless of which buffer we're
- * drawing to.
- */
- meta->clear.vertices[0][0] = fb->_Xmin;
- meta->clear.vertices[0][1] = fb->_Ymin;
- meta->clear.vertices[0][2] = dst_z;
- meta->clear.vertices[1][0] = fb->_Xmax;
- meta->clear.vertices[1][1] = fb->_Ymin;
- meta->clear.vertices[1][2] = dst_z;
- meta->clear.vertices[2][0] = fb->_Xmax;
- meta->clear.vertices[2][1] = fb->_Ymax;
- meta->clear.vertices[2][2] = dst_z;
- meta->clear.vertices[3][0] = fb->_Xmin;
- meta->clear.vertices[3][1] = fb->_Ymax;
- meta->clear.vertices[3][2] = dst_z;
-
- while (mask != 0) {
- GLuint this_mask = 0;
- GLuint color_bit;
-
- color_bit = _mesa_ffs(mask & TRI_CLEAR_COLOR_BITS);
- if (color_bit != 0)
- this_mask |= (1 << (color_bit - 1));
-
- /* Clear depth/stencil in the same pass as color. */
- this_mask |= (mask & (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL));
-
- /* Select the current color buffer and use the color write mask if
- * we have one, otherwise don't write any color channels.
- */
- if (this_mask & BUFFER_BIT_FRONT_LEFT)
- _mesa_DrawBuffer(GL_FRONT_LEFT);
- else if (this_mask & BUFFER_BIT_BACK_LEFT)
- _mesa_DrawBuffer(GL_BACK_LEFT);
- else if (color_bit != 0)
- _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0 +
- (color_bit - BUFFER_COLOR0 - 1));
- else
- _mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-
- /* Control writing of the depth clear value to depth. */
- if (this_mask & BUFFER_BIT_DEPTH) {
- _mesa_DepthFunc(GL_ALWAYS);
- _mesa_Enable(GL_DEPTH_TEST);
- } else {
- _mesa_Disable(GL_DEPTH_TEST);
- _mesa_DepthMask(GL_FALSE);
- }
-
- /* Control writing of the stencil clear value to stencil. */
- if (this_mask & BUFFER_BIT_STENCIL) {
- _mesa_Enable(GL_STENCIL_TEST);
- _mesa_StencilOpSeparate(GL_FRONT_AND_BACK,
- GL_REPLACE, GL_REPLACE, GL_REPLACE);
- _mesa_StencilFuncSeparate(GL_FRONT_AND_BACK, GL_ALWAYS,
- ctx->Stencil.Clear & 0x7fffffff,
- ctx->Stencil.WriteMask[0]);
- } else {
- _mesa_Disable(GL_STENCIL_TEST);
- }
-
- _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
- mask &= ~this_mask;
- }
-
- meta_restore_transform(meta);
-
- _mesa_ActiveTextureARB(GL_TEXTURE0 + saved_active_texture);
- if (saved_fp_enable)
- _mesa_Enable(GL_FRAGMENT_PROGRAM_ARB);
- if (saved_vp_enable)
- _mesa_Enable(GL_VERTEX_PROGRAM_ARB);
-
- if (saved_shader_program)
- _mesa_UseProgramObjectARB(saved_shader_program);
-
- _mesa_DepthRange(saved_near, saved_far);
- _mesa_PopAttrib();
-
- /* restore current array object */
- ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= _NEW_ARRAY_ALL;
- _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, arraySave);
- _mesa_reference_array_object(ctx, &arraySave, NULL);
-}
-
void meta_init_metaops(GLcontext *ctx, struct dri_metaops *meta)
{
meta->ctx = ctx;
@@ -538,7 +294,5 @@ void meta_init_metaops(GLcontext *ctx, struct dri_metaops *meta)
void meta_destroy_metaops(struct dri_metaops *meta)
{
- if (meta->clear.arrayObj)
- _mesa_delete_array_object(meta->ctx, meta->clear.arrayObj);
}
diff --git a/src/mesa/drivers/dri/common/dri_metaops.h b/src/mesa/drivers/dri/common/dri_metaops.h
index bb4079d5353..2487145326b 100644
--- a/src/mesa/drivers/dri/common/dri_metaops.h
+++ b/src/mesa/drivers/dri/common/dri_metaops.h
@@ -25,25 +25,10 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
+
#ifndef DRI_METAOPS_H
#define DRI_METAOPS_H
-#define TRI_CLEAR_COLOR_BITS (BUFFER_BIT_BACK_LEFT | \
- BUFFER_BIT_FRONT_LEFT | \
- BUFFER_BIT_COLOR0 | \
- BUFFER_BIT_COLOR1 | \
- BUFFER_BIT_COLOR2 | \
- BUFFER_BIT_COLOR3 | \
- BUFFER_BIT_COLOR4 | \
- BUFFER_BIT_COLOR5 | \
- BUFFER_BIT_COLOR6 | \
- BUFFER_BIT_COLOR7)
-
-struct dri_meta_clear {
- struct gl_array_object *arrayObj;
- GLfloat vertices[4][3];
- GLfloat color[4][4];
-};
struct dri_metaops {
GLcontext *ctx;
@@ -69,8 +54,6 @@ struct dri_metaops {
GLint saved_vp_x, saved_vp_y;
GLsizei saved_vp_width, saved_vp_height;
GLenum saved_matrix_mode;
-
- struct dri_meta_clear clear;
};
@@ -91,9 +74,8 @@ void meta_restore_fragment_program(struct dri_metaops *meta);
void meta_set_default_texrect(struct dri_metaops *meta);
void meta_restore_texcoords(struct dri_metaops *meta);
-void meta_clear_tris(struct dri_metaops *meta, GLbitfield mask);
void meta_init_metaops(GLcontext *ctx, struct dri_metaops *meta);
void meta_destroy_metaops(struct dri_metaops *meta);
-#endif
+#endif
diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h
index 08a97bb1110..40a030ce0da 100644
--- a/src/mesa/drivers/dri/common/extension_helper.h
+++ b/src/mesa/drivers/dri/common/extension_helper.h
@@ -33,7 +33,7 @@
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char UniformMatrix3fvARB_names[] =
+static const char UniformMatrix3fvARB_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix3fv\0"
"glUniformMatrix3fvARB\0"
@@ -41,7 +41,7 @@ static const char UniformMatrix3fvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_multisample)
-static const char SampleCoverageARB_names[] =
+static const char SampleCoverageARB_names[] =
"fi\0" /* Parameter signature */
"glSampleCoverage\0"
"glSampleCoverageARB\0"
@@ -49,7 +49,7 @@ static const char SampleCoverageARB_names[] =
#endif
#if defined(need_GL_EXT_convolution)
-static const char ConvolutionFilter1D_names[] =
+static const char ConvolutionFilter1D_names[] =
"iiiiip\0" /* Parameter signature */
"glConvolutionFilter1D\0"
"glConvolutionFilter1DEXT\0"
@@ -57,7 +57,7 @@ static const char ConvolutionFilter1D_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char BeginQueryARB_names[] =
+static const char BeginQueryARB_names[] =
"ii\0" /* Parameter signature */
"glBeginQuery\0"
"glBeginQueryARB\0"
@@ -65,7 +65,7 @@ static const char BeginQueryARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_NV_point_sprite)
-static const char PointParameteriNV_names[] =
+static const char PointParameteriNV_names[] =
"ii\0" /* Parameter signature */
"glPointParameteri\0"
"glPointParameteriNV\0"
@@ -73,14 +73,14 @@ static const char PointParameteriNV_names[] =
#endif
#if defined(need_GL_VERSION_2_0)
-static const char GetProgramiv_names[] =
+static const char GetProgramiv_names[] =
"iip\0" /* Parameter signature */
"glGetProgramiv\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3sARB_names[] =
+static const char MultiTexCoord3sARB_names[] =
"iiii\0" /* Parameter signature */
"glMultiTexCoord3s\0"
"glMultiTexCoord3sARB\0"
@@ -88,7 +88,7 @@ static const char MultiTexCoord3sARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3iEXT_names[] =
+static const char SecondaryColor3iEXT_names[] =
"iii\0" /* Parameter signature */
"glSecondaryColor3i\0"
"glSecondaryColor3iEXT\0"
@@ -96,7 +96,7 @@ static const char SecondaryColor3iEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3fMESA_names[] =
+static const char WindowPos3fMESA_names[] =
"fff\0" /* Parameter signature */
"glWindowPos3f\0"
"glWindowPos3fARB\0"
@@ -105,14 +105,14 @@ static const char WindowPos3fMESA_names[] =
#endif
#if defined(need_GL_SGIS_pixel_texture)
-static const char PixelTexGenParameterfvSGIS_names[] =
+static const char PixelTexGenParameterfvSGIS_names[] =
"ip\0" /* Parameter signature */
"glPixelTexGenParameterfvSGIS\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char ActiveTextureARB_names[] =
+static const char ActiveTextureARB_names[] =
"i\0" /* Parameter signature */
"glActiveTexture\0"
"glActiveTextureARB\0"
@@ -120,7 +120,7 @@ static const char ActiveTextureARB_names[] =
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_blit)
-static const char BlitFramebufferEXT_names[] =
+static const char BlitFramebufferEXT_names[] =
"iiiiiiiiii\0" /* Parameter signature */
"glBlitFramebuffer\0"
"glBlitFramebufferEXT\0"
@@ -128,21 +128,21 @@ static const char BlitFramebufferEXT_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4ubvNV_names[] =
+static const char VertexAttrib4ubvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4ubvNV\0"
"";
#endif
#if defined(need_GL_NV_fragment_program)
-static const char GetProgramNamedParameterdvNV_names[] =
+static const char GetProgramNamedParameterdvNV_names[] =
"iipp\0" /* Parameter signature */
"glGetProgramNamedParameterdvNV\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char Histogram_names[] =
+static const char Histogram_names[] =
"iiii\0" /* Parameter signature */
"glHistogram\0"
"glHistogramEXT\0"
@@ -150,14 +150,14 @@ static const char Histogram_names[] =
#endif
#if defined(need_GL_SGIS_texture4D)
-static const char TexImage4DSGIS_names[] =
+static const char TexImage4DSGIS_names[] =
"iiiiiiiiiip\0" /* Parameter signature */
"glTexImage4DSGIS\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2dvMESA_names[] =
+static const char WindowPos2dvMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos2dv\0"
"glWindowPos2dvARB\0"
@@ -166,14 +166,14 @@ static const char WindowPos2dvMESA_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiColor3fVertex3fvSUN_names[] =
+static const char ReplacementCodeuiColor3fVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glReplacementCodeuiColor3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_EXT_blend_equation_separate) || defined(need_GL_ATI_blend_equation_separate)
-static const char BlendEquationSeparateEXT_names[] =
+static const char BlendEquationSeparateEXT_names[] =
"ii\0" /* Parameter signature */
"glBlendEquationSeparate\0"
"glBlendEquationSeparateEXT\0"
@@ -182,14 +182,14 @@ static const char BlendEquationSeparateEXT_names[] =
#endif
#if defined(need_GL_SGIX_list_priority)
-static const char ListParameterfSGIX_names[] =
+static const char ListParameterfSGIX_names[] =
"iif\0" /* Parameter signature */
"glListParameterfSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3bEXT_names[] =
+static const char SecondaryColor3bEXT_names[] =
"iii\0" /* Parameter signature */
"glSecondaryColor3b\0"
"glSecondaryColor3bEXT\0"
@@ -197,21 +197,21 @@ static const char SecondaryColor3bEXT_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord4fColor4fNormal3fVertex4fvSUN_names[] =
+static const char TexCoord4fColor4fNormal3fVertex4fvSUN_names[] =
"pppp\0" /* Parameter signature */
"glTexCoord4fColor4fNormal3fVertex4fvSUN\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4svNV_names[] =
+static const char VertexAttrib4svNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4svNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char GetBufferSubDataARB_names[] =
+static const char GetBufferSubDataARB_names[] =
"iiip\0" /* Parameter signature */
"glGetBufferSubData\0"
"glGetBufferSubDataARB\0"
@@ -219,7 +219,7 @@ static const char GetBufferSubDataARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char BufferSubDataARB_names[] =
+static const char BufferSubDataARB_names[] =
"iiip\0" /* Parameter signature */
"glBufferSubData\0"
"glBufferSubDataARB\0"
@@ -227,21 +227,21 @@ static const char BufferSubDataARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fColor4ubVertex3fvSUN_names[] =
+static const char TexCoord2fColor4ubVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glTexCoord2fColor4ubVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char AttachShader_names[] =
+static const char AttachShader_names[] =
"ii\0" /* Parameter signature */
"glAttachShader\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib2fARB_names[] =
+static const char VertexAttrib2fARB_names[] =
"iff\0" /* Parameter signature */
"glVertexAttrib2f\0"
"glVertexAttrib2fARB\0"
@@ -249,14 +249,14 @@ static const char VertexAttrib2fARB_names[] =
#endif
#if defined(need_GL_MESA_shader_debug)
-static const char GetDebugLogLengthMESA_names[] =
+static const char GetDebugLogLengthMESA_names[] =
"iii\0" /* Parameter signature */
"glGetDebugLogLengthMESA\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib3fARB_names[] =
+static const char VertexAttrib3fARB_names[] =
"ifff\0" /* Parameter signature */
"glVertexAttrib3f\0"
"glVertexAttrib3fARB\0"
@@ -264,7 +264,7 @@ static const char VertexAttrib3fARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char GetQueryivARB_names[] =
+static const char GetQueryivARB_names[] =
"iip\0" /* Parameter signature */
"glGetQueryiv\0"
"glGetQueryivARB\0"
@@ -272,7 +272,7 @@ static const char GetQueryivARB_names[] =
#endif
#if defined(need_GL_EXT_texture3D)
-static const char TexImage3D_names[] =
+static const char TexImage3D_names[] =
"iiiiiiiiip\0" /* Parameter signature */
"glTexImage3D\0"
"glTexImage3DEXT\0"
@@ -280,14 +280,14 @@ static const char TexImage3D_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiVertex3fvSUN_names[] =
+static const char ReplacementCodeuiVertex3fvSUN_names[] =
"pp\0" /* Parameter signature */
"glReplacementCodeuiVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char GetQueryObjectivARB_names[] =
+static const char GetQueryObjectivARB_names[] =
"iip\0" /* Parameter signature */
"glGetQueryObjectiv\0"
"glGetQueryObjectivARB\0"
@@ -295,14 +295,14 @@ static const char GetQueryObjectivARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiTexCoord2fVertex3fvSUN_names[] =
+static const char ReplacementCodeuiTexCoord2fVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glReplacementCodeuiTexCoord2fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char CompressedTexSubImage2DARB_names[] =
+static const char CompressedTexSubImage2DARB_names[] =
"iiiiiiiip\0" /* Parameter signature */
"glCompressedTexSubImage2D\0"
"glCompressedTexSubImage2DARB\0"
@@ -310,14 +310,14 @@ static const char CompressedTexSubImage2DARB_names[] =
#endif
#if defined(need_GL_NV_register_combiners)
-static const char CombinerOutputNV_names[] =
+static const char CombinerOutputNV_names[] =
"iiiiiiiiii\0" /* Parameter signature */
"glCombinerOutputNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform2fARB_names[] =
+static const char Uniform2fARB_names[] =
"iff\0" /* Parameter signature */
"glUniform2f\0"
"glUniform2fARB\0"
@@ -325,7 +325,7 @@ static const char Uniform2fARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib1svARB_names[] =
+static const char VertexAttrib1svARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib1sv\0"
"glVertexAttrib1svARB\0"
@@ -333,14 +333,14 @@ static const char VertexAttrib1svARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs1dvNV_names[] =
+static const char VertexAttribs1dvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs1dvNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform2ivARB_names[] =
+static const char Uniform2ivARB_names[] =
"iip\0" /* Parameter signature */
"glUniform2iv\0"
"glUniform2ivARB\0"
@@ -348,28 +348,28 @@ static const char Uniform2ivARB_names[] =
#endif
#if defined(need_GL_HP_image_transform)
-static const char GetImageTransformParameterfvHP_names[] =
+static const char GetImageTransformParameterfvHP_names[] =
"iip\0" /* Parameter signature */
"glGetImageTransformParameterfvHP\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightubvARB_names[] =
+static const char WeightubvARB_names[] =
"ip\0" /* Parameter signature */
"glWeightubvARB\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib1fvNV_names[] =
+static const char VertexAttrib1fvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib1fvNV\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char CopyConvolutionFilter1D_names[] =
+static const char CopyConvolutionFilter1D_names[] =
"iiiii\0" /* Parameter signature */
"glCopyConvolutionFilter1D\0"
"glCopyConvolutionFilter1DEXT\0"
@@ -377,21 +377,28 @@ static const char CopyConvolutionFilter1D_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiNormal3fVertex3fSUN_names[] =
+static const char ReplacementCodeuiNormal3fVertex3fSUN_names[] =
"iffffff\0" /* Parameter signature */
"glReplacementCodeuiNormal3fVertex3fSUN\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char DeleteSync_names[] =
+ "i\0" /* Parameter signature */
+ "glDeleteSync\0"
+ "";
+#endif
+
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentMaterialfvSGIX_names[] =
+static const char FragmentMaterialfvSGIX_names[] =
"iip\0" /* Parameter signature */
"glFragmentMaterialfvSGIX\0"
"";
#endif
#if defined(need_GL_EXT_blend_color)
-static const char BlendColor_names[] =
+static const char BlendColor_names[] =
"ffff\0" /* Parameter signature */
"glBlendColor\0"
"glBlendColorEXT\0"
@@ -399,7 +406,7 @@ static const char BlendColor_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char UniformMatrix4fvARB_names[] =
+static const char UniformMatrix4fvARB_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix4fv\0"
"glUniformMatrix4fvARB\0"
@@ -407,7 +414,7 @@ static const char UniformMatrix4fvARB_names[] =
#endif
#if defined(need_GL_ARB_vertex_array_object) || defined(need_GL_APPLE_vertex_array_object)
-static const char DeleteVertexArraysAPPLE_names[] =
+static const char DeleteVertexArraysAPPLE_names[] =
"ip\0" /* Parameter signature */
"glDeleteVertexArrays\0"
"glDeleteVertexArraysAPPLE\0"
@@ -415,28 +422,28 @@ static const char DeleteVertexArraysAPPLE_names[] =
#endif
#if defined(need_GL_SGIX_instruments)
-static const char ReadInstrumentsSGIX_names[] =
+static const char ReadInstrumentsSGIX_names[] =
"i\0" /* Parameter signature */
"glReadInstrumentsSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_1)
-static const char UniformMatrix2x4fv_names[] =
+static const char UniformMatrix2x4fv_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix2x4fv\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color4ubVertex3fvSUN_names[] =
+static const char Color4ubVertex3fvSUN_names[] =
"pp\0" /* Parameter signature */
"glColor4ubVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_texture_array)
-static const char FramebufferTextureLayerEXT_names[] =
+static const char FramebufferTextureLayerEXT_names[] =
"iiiii\0" /* Parameter signature */
"glFramebufferTextureLayer\0"
"glFramebufferTextureLayerEXT\0"
@@ -444,14 +451,14 @@ static const char FramebufferTextureLayerEXT_names[] =
#endif
#if defined(need_GL_SGIX_list_priority)
-static const char GetListParameterfvSGIX_names[] =
+static const char GetListParameterfvSGIX_names[] =
"iip\0" /* Parameter signature */
"glGetListParameterfvSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NusvARB_names[] =
+static const char VertexAttrib4NusvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4Nusv\0"
"glVertexAttrib4NusvARB\0"
@@ -459,35 +466,35 @@ static const char VertexAttrib4NusvARB_names[] =
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4svMESA_names[] =
+static const char WindowPos4svMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos4svMESA\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char CreateProgramObjectARB_names[] =
+static const char CreateProgramObjectARB_names[] =
"\0" /* Parameter signature */
"glCreateProgramObjectARB\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightModelivSGIX_names[] =
+static const char FragmentLightModelivSGIX_names[] =
"ip\0" /* Parameter signature */
"glFragmentLightModelivSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_1)
-static const char UniformMatrix4x3fv_names[] =
+static const char UniformMatrix4x3fv_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix4x3fv\0"
"";
#endif
#if defined(need_GL_EXT_texture_object)
-static const char PrioritizeTextures_names[] =
+static const char PrioritizeTextures_names[] =
"ipp\0" /* Parameter signature */
"glPrioritizeTextures\0"
"glPrioritizeTexturesEXT\0"
@@ -495,28 +502,28 @@ static const char PrioritizeTextures_names[] =
#endif
#if defined(need_GL_SGIX_async)
-static const char AsyncMarkerSGIX_names[] =
+static const char AsyncMarkerSGIX_names[] =
"i\0" /* Parameter signature */
"glAsyncMarkerSGIX\0"
"";
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactorubSUN_names[] =
+static const char GlobalAlphaFactorubSUN_names[] =
"i\0" /* Parameter signature */
"glGlobalAlphaFactorubSUN\0"
"";
#endif
#if defined(need_GL_MESA_shader_debug)
-static const char ClearDebugLogMESA_names[] =
+static const char ClearDebugLogMESA_names[] =
"iii\0" /* Parameter signature */
"glClearDebugLogMESA\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char ResetHistogram_names[] =
+static const char ResetHistogram_names[] =
"i\0" /* Parameter signature */
"glResetHistogram\0"
"glResetHistogramEXT\0"
@@ -524,14 +531,14 @@ static const char ResetHistogram_names[] =
#endif
#if defined(need_GL_NV_fragment_program)
-static const char GetProgramNamedParameterfvNV_names[] =
+static const char GetProgramNamedParameterfvNV_names[] =
"iipp\0" /* Parameter signature */
"glGetProgramNamedParameterfvNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_point_parameters) || defined(need_GL_EXT_point_parameters) || defined(need_GL_SGIS_point_parameters)
-static const char PointParameterfEXT_names[] =
+static const char PointParameterfEXT_names[] =
"if\0" /* Parameter signature */
"glPointParameterf\0"
"glPointParameterfARB\0"
@@ -541,35 +548,35 @@ static const char PointParameterfEXT_names[] =
#endif
#if defined(need_GL_SGIX_polynomial_ffd)
-static const char LoadIdentityDeformationMapSGIX_names[] =
+static const char LoadIdentityDeformationMapSGIX_names[] =
"i\0" /* Parameter signature */
"glLoadIdentityDeformationMapSGIX\0"
"";
#endif
#if defined(need_GL_NV_fence)
-static const char GenFencesNV_names[] =
+static const char GenFencesNV_names[] =
"ip\0" /* Parameter signature */
"glGenFencesNV\0"
"";
#endif
#if defined(need_GL_HP_image_transform)
-static const char ImageTransformParameterfHP_names[] =
+static const char ImageTransformParameterfHP_names[] =
"iif\0" /* Parameter signature */
"glImageTransformParameterfHP\0"
"";
#endif
#if defined(need_GL_ARB_matrix_palette)
-static const char MatrixIndexusvARB_names[] =
+static const char MatrixIndexusvARB_names[] =
"ip\0" /* Parameter signature */
"glMatrixIndexusvARB\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char DisableVertexAttribArrayARB_names[] =
+static const char DisableVertexAttribArrayARB_names[] =
"i\0" /* Parameter signature */
"glDisableVertexAttribArray\0"
"glDisableVertexAttribArrayARB\0"
@@ -577,21 +584,21 @@ static const char DisableVertexAttribArrayARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0)
-static const char StencilMaskSeparate_names[] =
+static const char StencilMaskSeparate_names[] =
"ii\0" /* Parameter signature */
"glStencilMaskSeparate\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char ProgramLocalParameter4dARB_names[] =
+static const char ProgramLocalParameter4dARB_names[] =
"iidddd\0" /* Parameter signature */
"glProgramLocalParameter4dARB\0"
"";
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char CompressedTexImage3DARB_names[] =
+static const char CompressedTexImage3DARB_names[] =
"iiiiiiiip\0" /* Parameter signature */
"glCompressedTexImage3D\0"
"glCompressedTexImage3DARB\0"
@@ -599,7 +606,7 @@ static const char CompressedTexImage3DARB_names[] =
#endif
#if defined(need_GL_EXT_convolution)
-static const char GetConvolutionParameteriv_names[] =
+static const char GetConvolutionParameteriv_names[] =
"iip\0" /* Parameter signature */
"glGetConvolutionParameteriv\0"
"glGetConvolutionParameterivEXT\0"
@@ -607,7 +614,7 @@ static const char GetConvolutionParameteriv_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib1fARB_names[] =
+static const char VertexAttrib1fARB_names[] =
"if\0" /* Parameter signature */
"glVertexAttrib1f\0"
"glVertexAttrib1fARB\0"
@@ -615,14 +622,14 @@ static const char VertexAttrib1fARB_names[] =
#endif
#if defined(need_GL_NV_fence)
-static const char TestFenceNV_names[] =
+static const char TestFenceNV_names[] =
"i\0" /* Parameter signature */
"glTestFenceNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1fvARB_names[] =
+static const char MultiTexCoord1fvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord1fv\0"
"glMultiTexCoord1fvARB\0"
@@ -630,56 +637,56 @@ static const char MultiTexCoord1fvARB_names[] =
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char ColorFragmentOp2ATI_names[] =
+static const char ColorFragmentOp2ATI_names[] =
"iiiiiiiiii\0" /* Parameter signature */
"glColorFragmentOp2ATI\0"
"";
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char SecondaryColorPointerListIBM_names[] =
+static const char SecondaryColorPointerListIBM_names[] =
"iiipi\0" /* Parameter signature */
"glSecondaryColorPointerListIBM\0"
"";
#endif
#if defined(need_GL_SGIS_pixel_texture)
-static const char GetPixelTexGenParameterivSGIS_names[] =
+static const char GetPixelTexGenParameterivSGIS_names[] =
"ip\0" /* Parameter signature */
"glGetPixelTexGenParameterivSGIS\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4fNV_names[] =
+static const char VertexAttrib4fNV_names[] =
"iffff\0" /* Parameter signature */
"glVertexAttrib4fNV\0"
"";
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodeubSUN_names[] =
+static const char ReplacementCodeubSUN_names[] =
"i\0" /* Parameter signature */
"glReplacementCodeubSUN\0"
"";
#endif
#if defined(need_GL_SGIX_async)
-static const char FinishAsyncSGIX_names[] =
+static const char FinishAsyncSGIX_names[] =
"p\0" /* Parameter signature */
"glFinishAsyncSGIX\0"
"";
#endif
#if defined(need_GL_MESA_shader_debug)
-static const char GetDebugLogMESA_names[] =
+static const char GetDebugLogMESA_names[] =
"iiiipp\0" /* Parameter signature */
"glGetDebugLogMESA\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord)
-static const char FogCoorddEXT_names[] =
+static const char FogCoorddEXT_names[] =
"d\0" /* Parameter signature */
"glFogCoordd\0"
"glFogCoorddEXT\0"
@@ -687,14 +694,14 @@ static const char FogCoorddEXT_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color4ubVertex3fSUN_names[] =
+static const char Color4ubVertex3fSUN_names[] =
"iiiifff\0" /* Parameter signature */
"glColor4ubVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord)
-static const char FogCoordfEXT_names[] =
+static const char FogCoordfEXT_names[] =
"f\0" /* Parameter signature */
"glFogCoordf\0"
"glFogCoordfEXT\0"
@@ -702,35 +709,35 @@ static const char FogCoordfEXT_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fVertex3fSUN_names[] =
+static const char TexCoord2fVertex3fSUN_names[] =
"fffff\0" /* Parameter signature */
"glTexCoord2fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactoriSUN_names[] =
+static const char GlobalAlphaFactoriSUN_names[] =
"i\0" /* Parameter signature */
"glGlobalAlphaFactoriSUN\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib2dNV_names[] =
+static const char VertexAttrib2dNV_names[] =
"idd\0" /* Parameter signature */
"glVertexAttrib2dNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char GetProgramInfoLog_names[] =
+static const char GetProgramInfoLog_names[] =
"iipp\0" /* Parameter signature */
"glGetProgramInfoLog\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NbvARB_names[] =
+static const char VertexAttrib4NbvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4Nbv\0"
"glVertexAttrib4NbvARB\0"
@@ -738,7 +745,7 @@ static const char VertexAttrib4NbvARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_shader)
-static const char GetActiveAttribARB_names[] =
+static const char GetActiveAttribARB_names[] =
"iiipppp\0" /* Parameter signature */
"glGetActiveAttrib\0"
"glGetActiveAttribARB\0"
@@ -746,91 +753,91 @@ static const char GetActiveAttribARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4ubNV_names[] =
+static const char VertexAttrib4ubNV_names[] =
"iiiii\0" /* Parameter signature */
"glVertexAttrib4ubNV\0"
"";
#endif
#if defined(need_GL_APPLE_texture_range)
-static const char TextureRangeAPPLE_names[] =
+static const char TextureRangeAPPLE_names[] =
"iip\0" /* Parameter signature */
"glTextureRangeAPPLE\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fColor4fNormal3fVertex3fSUN_names[] =
+static const char TexCoord2fColor4fNormal3fVertex3fSUN_names[] =
"ffffffffffff\0" /* Parameter signature */
"glTexCoord2fColor4fNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char CombinerParameterfvNV_names[] =
+static const char CombinerParameterfvNV_names[] =
"ip\0" /* Parameter signature */
"glCombinerParameterfvNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs3dvNV_names[] =
+static const char VertexAttribs3dvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs3dvNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs4fvNV_names[] =
+static const char VertexAttribs4fvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs4fvNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_array_range)
-static const char VertexArrayRangeNV_names[] =
+static const char VertexArrayRangeNV_names[] =
"ip\0" /* Parameter signature */
"glVertexArrayRangeNV\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightiSGIX_names[] =
+static const char FragmentLightiSGIX_names[] =
"iii\0" /* Parameter signature */
"glFragmentLightiSGIX\0"
"";
#endif
#if defined(need_GL_EXT_polygon_offset)
-static const char PolygonOffsetEXT_names[] =
+static const char PolygonOffsetEXT_names[] =
"ff\0" /* Parameter signature */
"glPolygonOffsetEXT\0"
"";
#endif
#if defined(need_GL_SGIX_async)
-static const char PollAsyncSGIX_names[] =
+static const char PollAsyncSGIX_names[] =
"p\0" /* Parameter signature */
"glPollAsyncSGIX\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char DeleteFragmentShaderATI_names[] =
+static const char DeleteFragmentShaderATI_names[] =
"i\0" /* Parameter signature */
"glDeleteFragmentShaderATI\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fNormal3fVertex3fvSUN_names[] =
+static const char TexCoord2fNormal3fVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glTexCoord2fNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix)
-static const char MultTransposeMatrixdARB_names[] =
+static const char MultTransposeMatrixdARB_names[] =
"p\0" /* Parameter signature */
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
@@ -838,7 +845,7 @@ static const char MultTransposeMatrixdARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2svMESA_names[] =
+static const char WindowPos2svMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
@@ -847,7 +854,7 @@ static const char WindowPos2svMESA_names[] =
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char CompressedTexImage1DARB_names[] =
+static const char CompressedTexImage1DARB_names[] =
"iiiiiip\0" /* Parameter signature */
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
@@ -855,35 +862,35 @@ static const char CompressedTexImage1DARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib2sNV_names[] =
+static const char VertexAttrib2sNV_names[] =
"iii\0" /* Parameter signature */
"glVertexAttrib2sNV\0"
"";
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char NormalPointerListIBM_names[] =
+static const char NormalPointerListIBM_names[] =
"iipi\0" /* Parameter signature */
"glNormalPointerListIBM\0"
"";
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char IndexPointerEXT_names[] =
+static const char IndexPointerEXT_names[] =
"iiip\0" /* Parameter signature */
"glIndexPointerEXT\0"
"";
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char NormalPointerEXT_names[] =
+static const char NormalPointerEXT_names[] =
"iiip\0" /* Parameter signature */
"glNormalPointerEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3dARB_names[] =
+static const char MultiTexCoord3dARB_names[] =
"iddd\0" /* Parameter signature */
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
@@ -891,7 +898,7 @@ static const char MultiTexCoord3dARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2iARB_names[] =
+static const char MultiTexCoord2iARB_names[] =
"iii\0" /* Parameter signature */
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
@@ -899,14 +906,14 @@ static const char MultiTexCoord2iARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN_names[] =
+static const char ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN_names[] =
"iffffffff\0" /* Parameter signature */
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2svARB_names[] =
+static const char MultiTexCoord2svARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
@@ -914,14 +921,14 @@ static const char MultiTexCoord2svARB_names[] =
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodeubvSUN_names[] =
+static const char ReplacementCodeubvSUN_names[] =
"p\0" /* Parameter signature */
"glReplacementCodeubvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform3iARB_names[] =
+static const char Uniform3iARB_names[] =
"iiii\0" /* Parameter signature */
"glUniform3i\0"
"glUniform3iARB\0"
@@ -929,49 +936,49 @@ static const char Uniform3iARB_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char GetFragmentMaterialfvSGIX_names[] =
+static const char GetFragmentMaterialfvSGIX_names[] =
"iip\0" /* Parameter signature */
"glGetFragmentMaterialfvSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char GetShaderInfoLog_names[] =
+static const char GetShaderInfoLog_names[] =
"iipp\0" /* Parameter signature */
"glGetShaderInfoLog\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightivARB_names[] =
+static const char WeightivARB_names[] =
"ip\0" /* Parameter signature */
"glWeightivARB\0"
"";
#endif
#if defined(need_GL_SGIX_instruments)
-static const char PollInstrumentsSGIX_names[] =
+static const char PollInstrumentsSGIX_names[] =
"p\0" /* Parameter signature */
"glPollInstrumentsSGIX\0"
"";
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactordSUN_names[] =
+static const char GlobalAlphaFactordSUN_names[] =
"d\0" /* Parameter signature */
"glGlobalAlphaFactordSUN\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs3fvNV_names[] =
+static const char VertexAttribs3fvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs3fvNV\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char GenerateMipmapEXT_names[] =
+static const char GenerateMipmapEXT_names[] =
"i\0" /* Parameter signature */
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
@@ -979,35 +986,35 @@ static const char GenerateMipmapEXT_names[] =
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char SetFragmentShaderConstantATI_names[] =
+static const char SetFragmentShaderConstantATI_names[] =
"ip\0" /* Parameter signature */
"glSetFragmentShaderConstantATI\0"
"";
#endif
#if defined(need_GL_NV_evaluators)
-static const char GetMapAttribParameterivNV_names[] =
+static const char GetMapAttribParameterivNV_names[] =
"iiip\0" /* Parameter signature */
"glGetMapAttribParameterivNV\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char CreateShaderObjectARB_names[] =
+static const char CreateShaderObjectARB_names[] =
"i\0" /* Parameter signature */
"glCreateShaderObjectARB\0"
"";
#endif
#if defined(need_GL_SGIS_sharpen_texture)
-static const char GetSharpenTexFuncSGIS_names[] =
+static const char GetSharpenTexFuncSGIS_names[] =
"ip\0" /* Parameter signature */
"glGetSharpenTexFuncSGIS\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char BufferDataARB_names[] =
+static const char BufferDataARB_names[] =
"iipi\0" /* Parameter signature */
"glBufferData\0"
"glBufferDataARB\0"
@@ -1015,42 +1022,42 @@ static const char BufferDataARB_names[] =
#endif
#if defined(need_GL_NV_vertex_array_range)
-static const char FlushVertexArrayRangeNV_names[] =
+static const char FlushVertexArrayRangeNV_names[] =
"\0" /* Parameter signature */
"glFlushVertexArrayRangeNV\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char SampleMapATI_names[] =
+static const char SampleMapATI_names[] =
"iii\0" /* Parameter signature */
"glSampleMapATI\0"
"";
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char VertexPointerEXT_names[] =
+static const char VertexPointerEXT_names[] =
"iiiip\0" /* Parameter signature */
"glVertexPointerEXT\0"
"";
#endif
#if defined(need_GL_SGIS_texture_filter4)
-static const char GetTexFilterFuncSGIS_names[] =
+static const char GetTexFilterFuncSGIS_names[] =
"iip\0" /* Parameter signature */
"glGetTexFilterFuncSGIS\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char GetCombinerOutputParameterfvNV_names[] =
+static const char GetCombinerOutputParameterfvNV_names[] =
"iiip\0" /* Parameter signature */
"glGetCombinerOutputParameterfvNV\0"
"";
#endif
#if defined(need_GL_EXT_subtexture)
-static const char TexSubImage1D_names[] =
+static const char TexSubImage1D_names[] =
"iiiiiip\0" /* Parameter signature */
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
@@ -1058,36 +1065,43 @@ static const char TexSubImage1D_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib1sARB_names[] =
+static const char VertexAttrib1sARB_names[] =
"ii\0" /* Parameter signature */
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char FenceSync_names[] =
+ "ii\0" /* Parameter signature */
+ "glFenceSync\0"
+ "";
+#endif
+
#if defined(need_GL_NV_register_combiners)
-static const char FinalCombinerInputNV_names[] =
+static const char FinalCombinerInputNV_names[] =
"iiii\0" /* Parameter signature */
"glFinalCombinerInputNV\0"
"";
#endif
#if defined(need_GL_SGIX_flush_raster)
-static const char FlushRasterSGIX_names[] =
+static const char FlushRasterSGIX_names[] =
"\0" /* Parameter signature */
"glFlushRasterSGIX\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiTexCoord2fVertex3fSUN_names[] =
+static const char ReplacementCodeuiTexCoord2fVertex3fSUN_names[] =
"ifffff\0" /* Parameter signature */
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform1fARB_names[] =
+static const char Uniform1fARB_names[] =
"if\0" /* Parameter signature */
"glUniform1f\0"
"glUniform1fARB\0"
@@ -1095,7 +1109,7 @@ static const char Uniform1fARB_names[] =
#endif
#if defined(need_GL_EXT_texture_object)
-static const char AreTexturesResident_names[] =
+static const char AreTexturesResident_names[] =
"ipp\0" /* Parameter signature */
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
@@ -1103,7 +1117,7 @@ static const char AreTexturesResident_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ATI_separate_stencil)
-static const char StencilOpSeparate_names[] =
+static const char StencilOpSeparate_names[] =
"iiii\0" /* Parameter signature */
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
@@ -1111,7 +1125,7 @@ static const char StencilOpSeparate_names[] =
#endif
#if defined(need_GL_SGI_color_table)
-static const char ColorTableParameteriv_names[] =
+static const char ColorTableParameteriv_names[] =
"iip\0" /* Parameter signature */
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
@@ -1119,14 +1133,14 @@ static const char ColorTableParameteriv_names[] =
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char FogCoordPointerListIBM_names[] =
+static const char FogCoordPointerListIBM_names[] =
"iipi\0" /* Parameter signature */
"glFogCoordPointerListIBM\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3dMESA_names[] =
+static const char WindowPos3dMESA_names[] =
"ddd\0" /* Parameter signature */
"glWindowPos3d\0"
"glWindowPos3dARB\0"
@@ -1135,7 +1149,7 @@ static const char WindowPos3dMESA_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_point_parameters) || defined(need_GL_EXT_point_parameters) || defined(need_GL_SGIS_point_parameters)
-static const char PointParameterfvEXT_names[] =
+static const char PointParameterfvEXT_names[] =
"ip\0" /* Parameter signature */
"glPointParameterfv\0"
"glPointParameterfvARB\0"
@@ -1145,7 +1159,7 @@ static const char PointParameterfvEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2fvMESA_names[] =
+static const char WindowPos2fvMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
@@ -1154,7 +1168,7 @@ static const char WindowPos2fvMESA_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3bvEXT_names[] =
+static const char SecondaryColor3bvEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
@@ -1162,35 +1176,35 @@ static const char SecondaryColor3bvEXT_names[] =
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char VertexPointerListIBM_names[] =
+static const char VertexPointerListIBM_names[] =
"iiipi\0" /* Parameter signature */
"glVertexPointerListIBM\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char GetProgramLocalParameterfvARB_names[] =
+static const char GetProgramLocalParameterfvARB_names[] =
"iip\0" /* Parameter signature */
"glGetProgramLocalParameterfvARB\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentMaterialfSGIX_names[] =
+static const char FragmentMaterialfSGIX_names[] =
"iif\0" /* Parameter signature */
"glFragmentMaterialfSGIX\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fNormal3fVertex3fSUN_names[] =
+static const char TexCoord2fNormal3fVertex3fSUN_names[] =
"ffffffff\0" /* Parameter signature */
"glTexCoord2fNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char RenderbufferStorageEXT_names[] =
+static const char RenderbufferStorageEXT_names[] =
"iiii\0" /* Parameter signature */
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
@@ -1198,28 +1212,28 @@ static const char RenderbufferStorageEXT_names[] =
#endif
#if defined(need_GL_NV_fence)
-static const char IsFenceNV_names[] =
+static const char IsFenceNV_names[] =
"i\0" /* Parameter signature */
"glIsFenceNV\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char AttachObjectARB_names[] =
+static const char AttachObjectARB_names[] =
"ii\0" /* Parameter signature */
"glAttachObjectARB\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char GetFragmentLightivSGIX_names[] =
+static const char GetFragmentLightivSGIX_names[] =
"iip\0" /* Parameter signature */
"glGetFragmentLightivSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char UniformMatrix2fvARB_names[] =
+static const char UniformMatrix2fvARB_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
@@ -1227,7 +1241,7 @@ static const char UniformMatrix2fvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2fARB_names[] =
+static const char MultiTexCoord2fARB_names[] =
"iff\0" /* Parameter signature */
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
@@ -1235,7 +1249,7 @@ static const char MultiTexCoord2fARB_names[] =
#endif
#if defined(need_GL_SGI_color_table) || defined(need_GL_EXT_paletted_texture)
-static const char ColorTable_names[] =
+static const char ColorTable_names[] =
"iiiiip\0" /* Parameter signature */
"glColorTable\0"
"glColorTableSGI\0"
@@ -1244,14 +1258,14 @@ static const char ColorTable_names[] =
#endif
#if defined(need_GL_NV_evaluators)
-static const char MapControlPointsNV_names[] =
+static const char MapControlPointsNV_names[] =
"iiiiiiiip\0" /* Parameter signature */
"glMapControlPointsNV\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char ConvolutionFilter2D_names[] =
+static const char ConvolutionFilter2D_names[] =
"iiiiiip\0" /* Parameter signature */
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
@@ -1259,14 +1273,14 @@ static const char ConvolutionFilter2D_names[] =
#endif
#if defined(need_GL_NV_evaluators)
-static const char MapParameterfvNV_names[] =
+static const char MapParameterfvNV_names[] =
"iip\0" /* Parameter signature */
"glMapParameterfvNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib3dvARB_names[] =
+static const char VertexAttrib3dvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
@@ -1274,14 +1288,14 @@ static const char VertexAttrib3dvARB_names[] =
#endif
#if defined(need_GL_PGI_misc_hints)
-static const char HintPGI_names[] =
+static const char HintPGI_names[] =
"ii\0" /* Parameter signature */
"glHintPGI\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char ConvolutionParameteriv_names[] =
+static const char ConvolutionParameteriv_names[] =
"iip\0" /* Parameter signature */
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
@@ -1289,28 +1303,28 @@ static const char ConvolutionParameteriv_names[] =
#endif
#if defined(need_GL_EXT_cull_vertex)
-static const char CullParameterdvEXT_names[] =
+static const char CullParameterdvEXT_names[] =
"ip\0" /* Parameter signature */
"glCullParameterdvEXT\0"
"";
#endif
#if defined(need_GL_NV_fragment_program)
-static const char ProgramNamedParameter4fNV_names[] =
+static const char ProgramNamedParameter4fNV_names[] =
"iipffff\0" /* Parameter signature */
"glProgramNamedParameter4fNV\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color3fVertex3fSUN_names[] =
+static const char Color3fVertex3fSUN_names[] =
"ffffff\0" /* Parameter signature */
"glColor3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char ProgramEnvParameter4fvARB_names[] =
+static const char ProgramEnvParameter4fvARB_names[] =
"iip\0" /* Parameter signature */
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
@@ -1318,14 +1332,14 @@ static const char ProgramEnvParameter4fvARB_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightModeliSGIX_names[] =
+static const char FragmentLightModeliSGIX_names[] =
"ii\0" /* Parameter signature */
"glFragmentLightModeliSGIX\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char ConvolutionParameterfv_names[] =
+static const char ConvolutionParameterfv_names[] =
"iip\0" /* Parameter signature */
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
@@ -1333,35 +1347,42 @@ static const char ConvolutionParameterfv_names[] =
#endif
#if defined(need_GL_3DFX_tbuffer)
-static const char TbufferMask3DFX_names[] =
+static const char TbufferMask3DFX_names[] =
"i\0" /* Parameter signature */
"glTbufferMask3DFX\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char LoadProgramNV_names[] =
+static const char LoadProgramNV_names[] =
"iiip\0" /* Parameter signature */
"glLoadProgramNV\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char WaitSync_names[] =
+ "iii\0" /* Parameter signature */
+ "glWaitSync\0"
+ "";
+#endif
+
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4fvNV_names[] =
+static const char VertexAttrib4fvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4fvNV\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char GetAttachedObjectsARB_names[] =
+static const char GetAttachedObjectsARB_names[] =
"iipp\0" /* Parameter signature */
"glGetAttachedObjectsARB\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform3fvARB_names[] =
+static const char Uniform3fvARB_names[] =
"iip\0" /* Parameter signature */
"glUniform3fv\0"
"glUniform3fvARB\0"
@@ -1369,7 +1390,7 @@ static const char Uniform3fvARB_names[] =
#endif
#if defined(need_GL_EXT_draw_range_elements)
-static const char DrawRangeElements_names[] =
+static const char DrawRangeElements_names[] =
"iiiiip\0" /* Parameter signature */
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
@@ -1377,14 +1398,14 @@ static const char DrawRangeElements_names[] =
#endif
#if defined(need_GL_SGIX_sprite)
-static const char SpriteParameterfvSGIX_names[] =
+static const char SpriteParameterfvSGIX_names[] =
"ip\0" /* Parameter signature */
"glSpriteParameterfvSGIX\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char CheckFramebufferStatusEXT_names[] =
+static const char CheckFramebufferStatusEXT_names[] =
"i\0" /* Parameter signature */
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
@@ -1392,21 +1413,21 @@ static const char CheckFramebufferStatusEXT_names[] =
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactoruiSUN_names[] =
+static const char GlobalAlphaFactoruiSUN_names[] =
"i\0" /* Parameter signature */
"glGlobalAlphaFactoruiSUN\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char GetHandleARB_names[] =
+static const char GetHandleARB_names[] =
"i\0" /* Parameter signature */
"glGetHandleARB\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char GetVertexAttribivARB_names[] =
+static const char GetVertexAttribivARB_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
@@ -1414,21 +1435,21 @@ static const char GetVertexAttribivARB_names[] =
#endif
#if defined(need_GL_NV_register_combiners)
-static const char GetCombinerInputParameterfvNV_names[] =
+static const char GetCombinerInputParameterfvNV_names[] =
"iiiip\0" /* Parameter signature */
"glGetCombinerInputParameterfvNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char CreateProgram_names[] =
+static const char CreateProgram_names[] =
"\0" /* Parameter signature */
"glCreateProgram\0"
"";
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix)
-static const char LoadTransposeMatrixdARB_names[] =
+static const char LoadTransposeMatrixdARB_names[] =
"p\0" /* Parameter signature */
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
@@ -1436,7 +1457,7 @@ static const char LoadTransposeMatrixdARB_names[] =
#endif
#if defined(need_GL_EXT_histogram)
-static const char GetMinmax_names[] =
+static const char GetMinmax_names[] =
"iiiip\0" /* Parameter signature */
"glGetMinmax\0"
"glGetMinmaxEXT\0"
@@ -1444,14 +1465,14 @@ static const char GetMinmax_names[] =
#endif
#if defined(need_GL_VERSION_2_0)
-static const char StencilFuncSeparate_names[] =
+static const char StencilFuncSeparate_names[] =
"iiii\0" /* Parameter signature */
"glStencilFuncSeparate\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3sEXT_names[] =
+static const char SecondaryColor3sEXT_names[] =
"iii\0" /* Parameter signature */
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
@@ -1459,28 +1480,28 @@ static const char SecondaryColor3sEXT_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color3fVertex3fvSUN_names[] =
+static const char Color3fVertex3fvSUN_names[] =
"pp\0" /* Parameter signature */
"glColor3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactorbSUN_names[] =
+static const char GlobalAlphaFactorbSUN_names[] =
"i\0" /* Parameter signature */
"glGlobalAlphaFactorbSUN\0"
"";
#endif
#if defined(need_GL_HP_image_transform)
-static const char ImageTransformParameterfvHP_names[] =
+static const char ImageTransformParameterfvHP_names[] =
"iip\0" /* Parameter signature */
"glImageTransformParameterfvHP\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4ivARB_names[] =
+static const char VertexAttrib4ivARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
@@ -1488,28 +1509,28 @@ static const char VertexAttrib4ivARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib3fNV_names[] =
+static const char VertexAttrib3fNV_names[] =
"ifff\0" /* Parameter signature */
"glVertexAttrib3fNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs2dvNV_names[] =
+static const char VertexAttribs2dvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs2dvNV\0"
"";
#endif
#if defined(need_GL_EXT_timer_query)
-static const char GetQueryObjectui64vEXT_names[] =
+static const char GetQueryObjectui64vEXT_names[] =
"iip\0" /* Parameter signature */
"glGetQueryObjectui64vEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3fvARB_names[] =
+static const char MultiTexCoord3fvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
@@ -1517,7 +1538,7 @@ static const char MultiTexCoord3fvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3dEXT_names[] =
+static const char SecondaryColor3dEXT_names[] =
"ddd\0" /* Parameter signature */
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
@@ -1525,42 +1546,42 @@ static const char SecondaryColor3dEXT_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetProgramParameterfvNV_names[] =
+static const char GetProgramParameterfvNV_names[] =
"iiip\0" /* Parameter signature */
"glGetProgramParameterfvNV\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char TangentPointerEXT_names[] =
+static const char TangentPointerEXT_names[] =
"iip\0" /* Parameter signature */
"glTangentPointerEXT\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color4fNormal3fVertex3fvSUN_names[] =
+static const char Color4fNormal3fVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glColor4fNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_SGIX_instruments)
-static const char GetInstrumentsSGIX_names[] =
+static const char GetInstrumentsSGIX_names[] =
"\0" /* Parameter signature */
"glGetInstrumentsSGIX\0"
"";
#endif
#if defined(need_GL_NV_evaluators)
-static const char EvalMapsNV_names[] =
+static const char EvalMapsNV_names[] =
"ii\0" /* Parameter signature */
"glEvalMapsNV\0"
"";
#endif
#if defined(need_GL_EXT_subtexture)
-static const char TexSubImage2D_names[] =
+static const char TexSubImage2D_names[] =
"iiiiiiiip\0" /* Parameter signature */
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
@@ -1568,28 +1589,28 @@ static const char TexSubImage2D_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightivSGIX_names[] =
+static const char FragmentLightivSGIX_names[] =
"iip\0" /* Parameter signature */
"glFragmentLightivSGIX\0"
"";
#endif
#if defined(need_GL_APPLE_texture_range)
-static const char GetTexParameterPointervAPPLE_names[] =
+static const char GetTexParameterPointervAPPLE_names[] =
"iip\0" /* Parameter signature */
"glGetTexParameterPointervAPPLE\0"
"";
#endif
#if defined(need_GL_EXT_pixel_transform)
-static const char PixelTransformParameterfvEXT_names[] =
+static const char PixelTransformParameterfvEXT_names[] =
"iip\0" /* Parameter signature */
"glPixelTransformParameterfvEXT\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4bvARB_names[] =
+static const char VertexAttrib4bvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
@@ -1597,14 +1618,14 @@ static const char VertexAttrib4bvARB_names[] =
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char AlphaFragmentOp2ATI_names[] =
+static const char AlphaFragmentOp2ATI_names[] =
"iiiiiiiii\0" /* Parameter signature */
"glAlphaFragmentOp2ATI\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4sARB_names[] =
+static const char MultiTexCoord4sARB_names[] =
"iiiii\0" /* Parameter signature */
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
@@ -1612,28 +1633,28 @@ static const char MultiTexCoord4sARB_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char GetFragmentMaterialivSGIX_names[] =
+static const char GetFragmentMaterialivSGIX_names[] =
"iip\0" /* Parameter signature */
"glGetFragmentMaterialivSGIX\0"
"";
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4dMESA_names[] =
+static const char WindowPos4dMESA_names[] =
"dddd\0" /* Parameter signature */
"glWindowPos4dMESA\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightPointerARB_names[] =
+static const char WeightPointerARB_names[] =
"iiip\0" /* Parameter signature */
"glWeightPointerARB\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2dMESA_names[] =
+static const char WindowPos2dMESA_names[] =
"dd\0" /* Parameter signature */
"glWindowPos2d\0"
"glWindowPos2dARB\0"
@@ -1642,7 +1663,7 @@ static const char WindowPos2dMESA_names[] =
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char FramebufferTexture3DEXT_names[] =
+static const char FramebufferTexture3DEXT_names[] =
"iiiiii\0" /* Parameter signature */
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
@@ -1650,7 +1671,7 @@ static const char FramebufferTexture3DEXT_names[] =
#endif
#if defined(need_GL_EXT_blend_minmax)
-static const char BlendEquation_names[] =
+static const char BlendEquation_names[] =
"i\0" /* Parameter signature */
"glBlendEquation\0"
"glBlendEquationEXT\0"
@@ -1658,14 +1679,14 @@ static const char BlendEquation_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib3dNV_names[] =
+static const char VertexAttrib3dNV_names[] =
"iddd\0" /* Parameter signature */
"glVertexAttrib3dNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib3dARB_names[] =
+static const char VertexAttrib3dARB_names[] =
"iddd\0" /* Parameter signature */
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
@@ -1673,14 +1694,14 @@ static const char VertexAttrib3dARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_names[] =
+static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_names[] =
"ppppp\0" /* Parameter signature */
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4fARB_names[] =
+static const char VertexAttrib4fARB_names[] =
"iffff\0" /* Parameter signature */
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
@@ -1688,14 +1709,14 @@ static const char VertexAttrib4fARB_names[] =
#endif
#if defined(need_GL_EXT_index_func)
-static const char IndexFuncEXT_names[] =
+static const char IndexFuncEXT_names[] =
"if\0" /* Parameter signature */
"glIndexFuncEXT\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char FramebufferTexture2DEXT_names[] =
+static const char FramebufferTexture2DEXT_names[] =
"iiiii\0" /* Parameter signature */
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
@@ -1703,7 +1724,7 @@ static const char FramebufferTexture2DEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2dvARB_names[] =
+static const char MultiTexCoord2dvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
@@ -1711,21 +1732,21 @@ static const char MultiTexCoord2dvARB_names[] =
#endif
#if defined(need_GL_EXT_cull_vertex)
-static const char CullParameterfvEXT_names[] =
+static const char CullParameterfvEXT_names[] =
"ip\0" /* Parameter signature */
"glCullParameterfvEXT\0"
"";
#endif
#if defined(need_GL_NV_fragment_program)
-static const char ProgramNamedParameter4fvNV_names[] =
+static const char ProgramNamedParameter4fvNV_names[] =
"iipp\0" /* Parameter signature */
"glProgramNamedParameter4fvNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColorPointerEXT_names[] =
+static const char SecondaryColorPointerEXT_names[] =
"iiip\0" /* Parameter signature */
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
@@ -1733,7 +1754,7 @@ static const char SecondaryColorPointerEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4fvARB_names[] =
+static const char VertexAttrib4fvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
@@ -1741,14 +1762,14 @@ static const char VertexAttrib4fvARB_names[] =
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char ColorPointerListIBM_names[] =
+static const char ColorPointerListIBM_names[] =
"iiipi\0" /* Parameter signature */
"glColorPointerListIBM\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char GetActiveUniformARB_names[] =
+static const char GetActiveUniformARB_names[] =
"iiipppp\0" /* Parameter signature */
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
@@ -1756,14 +1777,14 @@ static const char GetActiveUniformARB_names[] =
#endif
#if defined(need_GL_HP_image_transform)
-static const char ImageTransformParameteriHP_names[] =
+static const char ImageTransformParameteriHP_names[] =
"iii\0" /* Parameter signature */
"glImageTransformParameteriHP\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1svARB_names[] =
+static const char MultiTexCoord1svARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
@@ -1771,7 +1792,7 @@ static const char MultiTexCoord1svARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char EndQueryARB_names[] =
+static const char EndQueryARB_names[] =
"i\0" /* Parameter signature */
"glEndQuery\0"
"glEndQueryARB\0"
@@ -1779,42 +1800,42 @@ static const char EndQueryARB_names[] =
#endif
#if defined(need_GL_NV_fence)
-static const char DeleteFencesNV_names[] =
+static const char DeleteFencesNV_names[] =
"ip\0" /* Parameter signature */
"glDeleteFencesNV\0"
"";
#endif
#if defined(need_GL_SGIX_polynomial_ffd)
-static const char DeformationMap3dSGIX_names[] =
+static const char DeformationMap3dSGIX_names[] =
"iddiiddiiddiip\0" /* Parameter signature */
"glDeformationMap3dSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char IsShader_names[] =
+static const char IsShader_names[] =
"i\0" /* Parameter signature */
"glIsShader\0"
"";
#endif
#if defined(need_GL_HP_image_transform)
-static const char GetImageTransformParameterivHP_names[] =
+static const char GetImageTransformParameterivHP_names[] =
"iip\0" /* Parameter signature */
"glGetImageTransformParameterivHP\0"
"";
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4ivMESA_names[] =
+static const char WindowPos4ivMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos4ivMESA\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3svARB_names[] =
+static const char MultiTexCoord3svARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
@@ -1822,7 +1843,7 @@ static const char MultiTexCoord3svARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4iARB_names[] =
+static const char MultiTexCoord4iARB_names[] =
"iiiii\0" /* Parameter signature */
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
@@ -1830,21 +1851,21 @@ static const char MultiTexCoord4iARB_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3ivEXT_names[] =
+static const char Binormal3ivEXT_names[] =
"p\0" /* Parameter signature */
"glBinormal3ivEXT\0"
"";
#endif
#if defined(need_GL_MESA_resize_buffers)
-static const char ResizeBuffersMESA_names[] =
+static const char ResizeBuffersMESA_names[] =
"\0" /* Parameter signature */
"glResizeBuffersMESA\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char GetUniformivARB_names[] =
+static const char GetUniformivARB_names[] =
"iip\0" /* Parameter signature */
"glGetUniformiv\0"
"glGetUniformivARB\0"
@@ -1852,28 +1873,28 @@ static const char GetUniformivARB_names[] =
#endif
#if defined(need_GL_SGIS_pixel_texture)
-static const char PixelTexGenParameteriSGIS_names[] =
+static const char PixelTexGenParameteriSGIS_names[] =
"ii\0" /* Parameter signature */
"glPixelTexGenParameteriSGIS\0"
"";
#endif
#if defined(need_GL_INTEL_parallel_arrays)
-static const char VertexPointervINTEL_names[] =
+static const char VertexPointervINTEL_names[] =
"iip\0" /* Parameter signature */
"glVertexPointervINTEL\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiColor4fNormal3fVertex3fvSUN_names[] =
+static const char ReplacementCodeuiColor4fNormal3fVertex3fvSUN_names[] =
"pppp\0" /* Parameter signature */
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3uiEXT_names[] =
+static const char SecondaryColor3uiEXT_names[] =
"iii\0" /* Parameter signature */
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
@@ -1881,14 +1902,14 @@ static const char SecondaryColor3uiEXT_names[] =
#endif
#if defined(need_GL_SGIX_instruments)
-static const char StartInstrumentsSGIX_names[] =
+static const char StartInstrumentsSGIX_names[] =
"\0" /* Parameter signature */
"glStartInstrumentsSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3usvEXT_names[] =
+static const char SecondaryColor3usvEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
@@ -1896,49 +1917,49 @@ static const char SecondaryColor3usvEXT_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib2fvNV_names[] =
+static const char VertexAttrib2fvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib2fvNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char ProgramLocalParameter4dvARB_names[] =
+static const char ProgramLocalParameter4dvARB_names[] =
"iip\0" /* Parameter signature */
"glProgramLocalParameter4dvARB\0"
"";
#endif
#if defined(need_GL_ARB_matrix_palette)
-static const char MatrixIndexuivARB_names[] =
+static const char MatrixIndexuivARB_names[] =
"ip\0" /* Parameter signature */
"glMatrixIndexuivARB\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object)
-static const char RenderbufferStorageMultisample_names[] =
+static const char RenderbufferStorageMultisample_names[] =
"iiiii\0" /* Parameter signature */
"glRenderbufferStorageMultisample\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3sEXT_names[] =
+static const char Tangent3sEXT_names[] =
"iii\0" /* Parameter signature */
"glTangent3sEXT\0"
"";
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactorfSUN_names[] =
+static const char GlobalAlphaFactorfSUN_names[] =
"f\0" /* Parameter signature */
"glGlobalAlphaFactorfSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3iARB_names[] =
+static const char MultiTexCoord3iARB_names[] =
"iiii\0" /* Parameter signature */
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
@@ -1946,35 +1967,35 @@ static const char MultiTexCoord3iARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0)
-static const char IsProgram_names[] =
+static const char IsProgram_names[] =
"i\0" /* Parameter signature */
"glIsProgram\0"
"";
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char TexCoordPointerListIBM_names[] =
+static const char TexCoordPointerListIBM_names[] =
"iiipi\0" /* Parameter signature */
"glTexCoordPointerListIBM\0"
"";
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactorusSUN_names[] =
+static const char GlobalAlphaFactorusSUN_names[] =
"i\0" /* Parameter signature */
"glGlobalAlphaFactorusSUN\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib2dvNV_names[] =
+static const char VertexAttrib2dvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib2dvNV\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char FramebufferRenderbufferEXT_names[] =
+static const char FramebufferRenderbufferEXT_names[] =
"iiii\0" /* Parameter signature */
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
@@ -1982,14 +2003,14 @@ static const char FramebufferRenderbufferEXT_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib1dvNV_names[] =
+static const char VertexAttrib1dvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib1dvNV\0"
"";
#endif
#if defined(need_GL_EXT_texture_object)
-static const char GenTextures_names[] =
+static const char GenTextures_names[] =
"ip\0" /* Parameter signature */
"glGenTextures\0"
"glGenTexturesEXT\0"
@@ -1997,14 +2018,14 @@ static const char GenTextures_names[] =
#endif
#if defined(need_GL_NV_fence)
-static const char SetFenceNV_names[] =
+static const char SetFenceNV_names[] =
"ii\0" /* Parameter signature */
"glSetFenceNV\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char FramebufferTexture1DEXT_names[] =
+static const char FramebufferTexture1DEXT_names[] =
"iiiii\0" /* Parameter signature */
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
@@ -2012,49 +2033,49 @@ static const char FramebufferTexture1DEXT_names[] =
#endif
#if defined(need_GL_NV_register_combiners)
-static const char GetCombinerOutputParameterivNV_names[] =
+static const char GetCombinerOutputParameterivNV_names[] =
"iiip\0" /* Parameter signature */
"glGetCombinerOutputParameterivNV\0"
"";
#endif
#if defined(need_GL_SGIS_pixel_texture)
-static const char PixelTexGenParameterivSGIS_names[] =
+static const char PixelTexGenParameterivSGIS_names[] =
"ip\0" /* Parameter signature */
"glPixelTexGenParameterivSGIS\0"
"";
#endif
#if defined(need_GL_EXT_texture_perturb_normal)
-static const char TextureNormalEXT_names[] =
+static const char TextureNormalEXT_names[] =
"i\0" /* Parameter signature */
"glTextureNormalEXT\0"
"";
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char IndexPointerListIBM_names[] =
+static const char IndexPointerListIBM_names[] =
"iipi\0" /* Parameter signature */
"glIndexPointerListIBM\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightfvARB_names[] =
+static const char WeightfvARB_names[] =
"ip\0" /* Parameter signature */
"glWeightfvARB\0"
"";
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4fMESA_names[] =
+static const char WindowPos4fMESA_names[] =
"ffff\0" /* Parameter signature */
"glWindowPos4fMESA\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3dvMESA_names[] =
+static const char WindowPos3dvMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
@@ -2063,14 +2084,14 @@ static const char WindowPos3dvMESA_names[] =
#endif
#if defined(need_GL_EXT_timer_query)
-static const char GetQueryObjecti64vEXT_names[] =
+static const char GetQueryObjecti64vEXT_names[] =
"iip\0" /* Parameter signature */
"glGetQueryObjecti64vEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1dARB_names[] =
+static const char MultiTexCoord1dARB_names[] =
"id\0" /* Parameter signature */
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
@@ -2078,7 +2099,7 @@ static const char MultiTexCoord1dARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_NV_point_sprite)
-static const char PointParameterivNV_names[] =
+static const char PointParameterivNV_names[] =
"ip\0" /* Parameter signature */
"glPointParameteriv\0"
"glPointParameterivNV\0"
@@ -2086,7 +2107,7 @@ static const char PointParameterivNV_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform2fvARB_names[] =
+static const char Uniform2fvARB_names[] =
"iip\0" /* Parameter signature */
"glUniform2fv\0"
"glUniform2fvARB\0"
@@ -2094,14 +2115,14 @@ static const char Uniform2fvARB_names[] =
#endif
#if defined(need_GL_APPLE_flush_buffer_range)
-static const char BufferParameteriAPPLE_names[] =
+static const char BufferParameteriAPPLE_names[] =
"iii\0" /* Parameter signature */
"glBufferParameteriAPPLE\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3dvARB_names[] =
+static const char MultiTexCoord3dvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
@@ -2109,49 +2130,49 @@ static const char MultiTexCoord3dvARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN_names[] =
+static const char ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN_names[] =
"pppp\0" /* Parameter signature */
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char DeleteObjectARB_names[] =
+static const char DeleteObjectARB_names[] =
"i\0" /* Parameter signature */
"glDeleteObjectARB\0"
"";
#endif
#if defined(need_GL_ARB_matrix_palette)
-static const char MatrixIndexPointerARB_names[] =
+static const char MatrixIndexPointerARB_names[] =
"iiip\0" /* Parameter signature */
"glMatrixIndexPointerARB\0"
"";
#endif
#if defined(need_GL_NV_fragment_program)
-static const char ProgramNamedParameter4dvNV_names[] =
+static const char ProgramNamedParameter4dvNV_names[] =
"iipp\0" /* Parameter signature */
"glProgramNamedParameter4dvNV\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3fvEXT_names[] =
+static const char Tangent3fvEXT_names[] =
"p\0" /* Parameter signature */
"glTangent3fvEXT\0"
"";
#endif
#if defined(need_GL_ARB_vertex_array_object)
-static const char GenVertexArrays_names[] =
+static const char GenVertexArrays_names[] =
"ip\0" /* Parameter signature */
"glGenVertexArrays\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char BindFramebufferEXT_names[] =
+static const char BindFramebufferEXT_names[] =
"ii\0" /* Parameter signature */
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
@@ -2159,14 +2180,14 @@ static const char BindFramebufferEXT_names[] =
#endif
#if defined(need_GL_SGIX_reference_plane)
-static const char ReferencePlaneSGIX_names[] =
+static const char ReferencePlaneSGIX_names[] =
"p\0" /* Parameter signature */
"glReferencePlaneSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char ValidateProgramARB_names[] =
+static const char ValidateProgramARB_names[] =
"i\0" /* Parameter signature */
"glValidateProgram\0"
"glValidateProgramARB\0"
@@ -2174,21 +2195,21 @@ static const char ValidateProgramARB_names[] =
#endif
#if defined(need_GL_EXT_compiled_vertex_array)
-static const char UnlockArraysEXT_names[] =
+static const char UnlockArraysEXT_names[] =
"\0" /* Parameter signature */
"glUnlockArraysEXT\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fColor3fVertex3fSUN_names[] =
+static const char TexCoord2fColor3fVertex3fSUN_names[] =
"ffffffff\0" /* Parameter signature */
"glTexCoord2fColor3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3fvMESA_names[] =
+static const char WindowPos3fvMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
@@ -2197,14 +2218,14 @@ static const char WindowPos3fvMESA_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib1svNV_names[] =
+static const char VertexAttrib1svNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib1svNV\0"
"";
#endif
#if defined(need_GL_EXT_copy_texture)
-static const char CopyTexSubImage3D_names[] =
+static const char CopyTexSubImage3D_names[] =
"iiiiiiiii\0" /* Parameter signature */
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
@@ -2212,22 +2233,29 @@ static const char CopyTexSubImage3D_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib2dARB_names[] =
+static const char VertexAttrib2dARB_names[] =
"idd\0" /* Parameter signature */
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char GetInteger64v_names[] =
+ "ip\0" /* Parameter signature */
+ "glGetInteger64v\0"
+ "";
+#endif
+
#if defined(need_GL_SGIS_texture_color_mask)
-static const char TextureColorMaskSGIS_names[] =
+static const char TextureColorMaskSGIS_names[] =
"iiii\0" /* Parameter signature */
"glTextureColorMaskSGIS\0"
"";
#endif
#if defined(need_GL_SGI_color_table) || defined(need_GL_EXT_paletted_texture)
-static const char GetColorTable_names[] =
+static const char GetColorTable_names[] =
"iiip\0" /* Parameter signature */
"glGetColorTable\0"
"glGetColorTableSGI\0"
@@ -2236,7 +2264,7 @@ static const char GetColorTable_names[] =
#endif
#if defined(need_GL_SGI_color_table)
-static const char CopyColorTable_names[] =
+static const char CopyColorTable_names[] =
"iiiii\0" /* Parameter signature */
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
@@ -2244,7 +2272,7 @@ static const char CopyColorTable_names[] =
#endif
#if defined(need_GL_EXT_histogram)
-static const char GetHistogramParameterfv_names[] =
+static const char GetHistogramParameterfv_names[] =
"iip\0" /* Parameter signature */
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
@@ -2252,21 +2280,21 @@ static const char GetHistogramParameterfv_names[] =
#endif
#if defined(need_GL_INTEL_parallel_arrays)
-static const char ColorPointervINTEL_names[] =
+static const char ColorPointervINTEL_names[] =
"iip\0" /* Parameter signature */
"glColorPointervINTEL\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char AlphaFragmentOp1ATI_names[] =
+static const char AlphaFragmentOp1ATI_names[] =
"iiiiii\0" /* Parameter signature */
"glAlphaFragmentOp1ATI\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3ivARB_names[] =
+static const char MultiTexCoord3ivARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
@@ -2274,7 +2302,7 @@ static const char MultiTexCoord3ivARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2sARB_names[] =
+static const char MultiTexCoord2sARB_names[] =
"iii\0" /* Parameter signature */
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
@@ -2282,7 +2310,7 @@ static const char MultiTexCoord2sARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib1dvARB_names[] =
+static const char VertexAttrib1dvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
@@ -2290,7 +2318,7 @@ static const char VertexAttrib1dvARB_names[] =
#endif
#if defined(need_GL_EXT_texture_object)
-static const char DeleteTextures_names[] =
+static const char DeleteTextures_names[] =
"ip\0" /* Parameter signature */
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
@@ -2298,49 +2326,49 @@ static const char DeleteTextures_names[] =
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char TexCoordPointerEXT_names[] =
+static const char TexCoordPointerEXT_names[] =
"iiiip\0" /* Parameter signature */
"glTexCoordPointerEXT\0"
"";
#endif
#if defined(need_GL_SGIS_texture4D)
-static const char TexSubImage4DSGIS_names[] =
+static const char TexSubImage4DSGIS_names[] =
"iiiiiiiiiiiip\0" /* Parameter signature */
"glTexSubImage4DSGIS\0"
"";
#endif
#if defined(need_GL_NV_register_combiners2)
-static const char CombinerStageParameterfvNV_names[] =
+static const char CombinerStageParameterfvNV_names[] =
"iip\0" /* Parameter signature */
"glCombinerStageParameterfvNV\0"
"";
#endif
#if defined(need_GL_SGIX_instruments)
-static const char StopInstrumentsSGIX_names[] =
+static const char StopInstrumentsSGIX_names[] =
"i\0" /* Parameter signature */
"glStopInstrumentsSGIX\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord4fColor4fNormal3fVertex4fSUN_names[] =
+static const char TexCoord4fColor4fNormal3fVertex4fSUN_names[] =
"fffffffffffffff\0" /* Parameter signature */
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"";
#endif
#if defined(need_GL_SGIX_polynomial_ffd)
-static const char DeformSGIX_names[] =
+static const char DeformSGIX_names[] =
"i\0" /* Parameter signature */
"glDeformSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char GetVertexAttribfvARB_names[] =
+static const char GetVertexAttribfvARB_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
@@ -2348,7 +2376,7 @@ static const char GetVertexAttribfvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3ivEXT_names[] =
+static const char SecondaryColor3ivEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
@@ -2356,49 +2384,49 @@ static const char SecondaryColor3ivEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_1)
-static const char UniformMatrix4x2fv_names[] =
+static const char UniformMatrix4x2fv_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix4x2fv\0"
"";
#endif
#if defined(need_GL_SGIS_detail_texture)
-static const char GetDetailTexFuncSGIS_names[] =
+static const char GetDetailTexFuncSGIS_names[] =
"ip\0" /* Parameter signature */
"glGetDetailTexFuncSGIS\0"
"";
#endif
#if defined(need_GL_NV_register_combiners2)
-static const char GetCombinerStageParameterfvNV_names[] =
+static const char GetCombinerStageParameterfvNV_names[] =
"iip\0" /* Parameter signature */
"glGetCombinerStageParameterfvNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_array_object)
-static const char BindVertexArray_names[] =
+static const char BindVertexArray_names[] =
"i\0" /* Parameter signature */
"glBindVertexArray\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color4ubVertex2fvSUN_names[] =
+static const char Color4ubVertex2fvSUN_names[] =
"pp\0" /* Parameter signature */
"glColor4ubVertex2fvSUN\0"
"";
#endif
#if defined(need_GL_SGIS_texture_filter4)
-static const char TexFilterFuncSGIS_names[] =
+static const char TexFilterFuncSGIS_names[] =
"iiip\0" /* Parameter signature */
"glTexFilterFuncSGIS\0"
"";
#endif
#if defined(need_GL_SGIS_multisample) || defined(need_GL_EXT_multisample)
-static const char SampleMaskSGIS_names[] =
+static const char SampleMaskSGIS_names[] =
"fi\0" /* Parameter signature */
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
@@ -2406,7 +2434,7 @@ static const char SampleMaskSGIS_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_shader)
-static const char GetAttribLocationARB_names[] =
+static const char GetAttribLocationARB_names[] =
"ip\0" /* Parameter signature */
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
@@ -2414,7 +2442,7 @@ static const char GetAttribLocationARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4ubvARB_names[] =
+static const char VertexAttrib4ubvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
@@ -2422,21 +2450,21 @@ static const char VertexAttrib4ubvARB_names[] =
#endif
#if defined(need_GL_SGIS_detail_texture)
-static const char DetailTexFuncSGIS_names[] =
+static const char DetailTexFuncSGIS_names[] =
"iip\0" /* Parameter signature */
"glDetailTexFuncSGIS\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Normal3fVertex3fSUN_names[] =
+static const char Normal3fVertex3fSUN_names[] =
"ffffff\0" /* Parameter signature */
"glNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_EXT_copy_texture)
-static const char CopyTexImage2D_names[] =
+static const char CopyTexImage2D_names[] =
"iiiiiiii\0" /* Parameter signature */
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
@@ -2444,7 +2472,7 @@ static const char CopyTexImage2D_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char GetBufferPointervARB_names[] =
+static const char GetBufferPointervARB_names[] =
"iip\0" /* Parameter signature */
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
@@ -2452,7 +2480,7 @@ static const char GetBufferPointervARB_names[] =
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char ProgramEnvParameter4fARB_names[] =
+static const char ProgramEnvParameter4fARB_names[] =
"iiffff\0" /* Parameter signature */
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
@@ -2460,7 +2488,7 @@ static const char ProgramEnvParameter4fARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform3ivARB_names[] =
+static const char Uniform3ivARB_names[] =
"iip\0" /* Parameter signature */
"glUniform3iv\0"
"glUniform3ivARB\0"
@@ -2468,21 +2496,21 @@ static const char Uniform3ivARB_names[] =
#endif
#if defined(need_GL_NV_fence)
-static const char GetFenceivNV_names[] =
+static const char GetFenceivNV_names[] =
"iip\0" /* Parameter signature */
"glGetFenceivNV\0"
"";
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4dvMESA_names[] =
+static const char WindowPos4dvMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos4dvMESA\0"
"";
#endif
#if defined(need_GL_EXT_color_subtable)
-static const char ColorSubTable_names[] =
+static const char ColorSubTable_names[] =
"iiiiip\0" /* Parameter signature */
"glColorSubTable\0"
"glColorSubTableEXT\0"
@@ -2490,7 +2518,7 @@ static const char ColorSubTable_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4ivARB_names[] =
+static const char MultiTexCoord4ivARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
@@ -2498,21 +2526,21 @@ static const char MultiTexCoord4ivARB_names[] =
#endif
#if defined(need_GL_EXT_gpu_program_parameters)
-static const char ProgramLocalParameters4fvEXT_names[] =
+static const char ProgramLocalParameters4fvEXT_names[] =
"iiip\0" /* Parameter signature */
"glProgramLocalParameters4fvEXT\0"
"";
#endif
#if defined(need_GL_NV_evaluators)
-static const char GetMapAttribParameterfvNV_names[] =
+static const char GetMapAttribParameterfvNV_names[] =
"iiip\0" /* Parameter signature */
"glGetMapAttribParameterfvNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4sARB_names[] =
+static const char VertexAttrib4sARB_names[] =
"iiiii\0" /* Parameter signature */
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
@@ -2520,7 +2548,7 @@ static const char VertexAttrib4sARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char GetQueryObjectuivARB_names[] =
+static const char GetQueryObjectuivARB_names[] =
"iip\0" /* Parameter signature */
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
@@ -2528,14 +2556,14 @@ static const char GetQueryObjectuivARB_names[] =
#endif
#if defined(need_GL_NV_evaluators)
-static const char MapParameterivNV_names[] =
+static const char MapParameterivNV_names[] =
"iip\0" /* Parameter signature */
"glMapParameterivNV\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char GenRenderbuffersEXT_names[] =
+static const char GenRenderbuffersEXT_names[] =
"ip\0" /* Parameter signature */
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
@@ -2543,7 +2571,7 @@ static const char GenRenderbuffersEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib2dvARB_names[] =
+static const char VertexAttrib2dvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
@@ -2551,28 +2579,28 @@ static const char VertexAttrib2dvARB_names[] =
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char EdgeFlagPointerEXT_names[] =
+static const char EdgeFlagPointerEXT_names[] =
"iip\0" /* Parameter signature */
"glEdgeFlagPointerEXT\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs2svNV_names[] =
+static const char VertexAttribs2svNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs2svNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightbvARB_names[] =
+static const char WeightbvARB_names[] =
"ip\0" /* Parameter signature */
"glWeightbvARB\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib2fvARB_names[] =
+static const char VertexAttrib2fvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
@@ -2580,7 +2608,7 @@ static const char VertexAttrib2fvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char GetBufferParameterivARB_names[] =
+static const char GetBufferParameterivARB_names[] =
"iip\0" /* Parameter signature */
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
@@ -2588,28 +2616,28 @@ static const char GetBufferParameterivARB_names[] =
#endif
#if defined(need_GL_SGIX_list_priority)
-static const char ListParameteriSGIX_names[] =
+static const char ListParameteriSGIX_names[] =
"iii\0" /* Parameter signature */
"glListParameteriSGIX\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiColor4fNormal3fVertex3fSUN_names[] =
+static const char ReplacementCodeuiColor4fNormal3fVertex3fSUN_names[] =
"iffffffffff\0" /* Parameter signature */
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_SGIX_instruments)
-static const char InstrumentsBufferSGIX_names[] =
+static const char InstrumentsBufferSGIX_names[] =
"ip\0" /* Parameter signature */
"glInstrumentsBufferSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NivARB_names[] =
+static const char VertexAttrib4NivARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
@@ -2617,35 +2645,35 @@ static const char VertexAttrib4NivARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0)
-static const char GetAttachedShaders_names[] =
+static const char GetAttachedShaders_names[] =
"iipp\0" /* Parameter signature */
"glGetAttachedShaders\0"
"";
#endif
#if defined(need_GL_APPLE_vertex_array_object)
-static const char GenVertexArraysAPPLE_names[] =
+static const char GenVertexArraysAPPLE_names[] =
"ip\0" /* Parameter signature */
"glGenVertexArraysAPPLE\0"
"";
#endif
#if defined(need_GL_EXT_gpu_program_parameters)
-static const char ProgramEnvParameters4fvEXT_names[] =
+static const char ProgramEnvParameters4fvEXT_names[] =
"iiip\0" /* Parameter signature */
"glProgramEnvParameters4fvEXT\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fColor4fNormal3fVertex3fvSUN_names[] =
+static const char TexCoord2fColor4fNormal3fVertex3fvSUN_names[] =
"pppp\0" /* Parameter signature */
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2iMESA_names[] =
+static const char WindowPos2iMESA_names[] =
"ii\0" /* Parameter signature */
"glWindowPos2i\0"
"glWindowPos2iARB\0"
@@ -2654,7 +2682,7 @@ static const char WindowPos2iMESA_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3fvEXT_names[] =
+static const char SecondaryColor3fvEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
@@ -2662,7 +2690,7 @@ static const char SecondaryColor3fvEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char CompressedTexSubImage1DARB_names[] =
+static const char CompressedTexSubImage1DARB_names[] =
"iiiiiip\0" /* Parameter signature */
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
@@ -2670,28 +2698,28 @@ static const char CompressedTexSubImage1DARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetVertexAttribivNV_names[] =
+static const char GetVertexAttribivNV_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribivNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char GetProgramStringARB_names[] =
+static const char GetProgramStringARB_names[] =
"iip\0" /* Parameter signature */
"glGetProgramStringARB\0"
"";
#endif
#if defined(need_GL_ATI_envmap_bumpmap)
-static const char TexBumpParameterfvATI_names[] =
+static const char TexBumpParameterfvATI_names[] =
"ip\0" /* Parameter signature */
"glTexBumpParameterfvATI\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char CompileShaderARB_names[] =
+static const char CompileShaderARB_names[] =
"i\0" /* Parameter signature */
"glCompileShader\0"
"glCompileShaderARB\0"
@@ -2699,14 +2727,14 @@ static const char CompileShaderARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0)
-static const char DeleteShader_names[] =
+static const char DeleteShader_names[] =
"i\0" /* Parameter signature */
"glDeleteShader\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform3fARB_names[] =
+static const char Uniform3fARB_names[] =
"ifff\0" /* Parameter signature */
"glUniform3f\0"
"glUniform3fARB\0"
@@ -2714,28 +2742,28 @@ static const char Uniform3fARB_names[] =
#endif
#if defined(need_GL_SGIX_list_priority)
-static const char ListParameterfvSGIX_names[] =
+static const char ListParameterfvSGIX_names[] =
"iip\0" /* Parameter signature */
"glListParameterfvSGIX\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3dvEXT_names[] =
+static const char Tangent3dvEXT_names[] =
"p\0" /* Parameter signature */
"glTangent3dvEXT\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetVertexAttribfvNV_names[] =
+static const char GetVertexAttribfvNV_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribfvNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3sMESA_names[] =
+static const char WindowPos3sMESA_names[] =
"iii\0" /* Parameter signature */
"glWindowPos3s\0"
"glWindowPos3sARB\0"
@@ -2744,35 +2772,35 @@ static const char WindowPos3sMESA_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib2svNV_names[] =
+static const char VertexAttrib2svNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib2svNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs1fvNV_names[] =
+static const char VertexAttribs1fvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs1fvNV\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fVertex3fvSUN_names[] =
+static const char TexCoord2fVertex3fvSUN_names[] =
"pp\0" /* Parameter signature */
"glTexCoord2fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4sMESA_names[] =
+static const char WindowPos4sMESA_names[] =
"iiii\0" /* Parameter signature */
"glWindowPos4sMESA\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NuivARB_names[] =
+static const char VertexAttrib4NuivARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
@@ -2780,7 +2808,7 @@ static const char VertexAttrib4NuivARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char ClientActiveTextureARB_names[] =
+static const char ClientActiveTextureARB_names[] =
"i\0" /* Parameter signature */
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
@@ -2788,21 +2816,21 @@ static const char ClientActiveTextureARB_names[] =
#endif
#if defined(need_GL_SGIX_pixel_texture)
-static const char PixelTexGenSGIX_names[] =
+static const char PixelTexGenSGIX_names[] =
"i\0" /* Parameter signature */
"glPixelTexGenSGIX\0"
"";
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodeusvSUN_names[] =
+static const char ReplacementCodeusvSUN_names[] =
"p\0" /* Parameter signature */
"glReplacementCodeusvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform4fARB_names[] =
+static const char Uniform4fARB_names[] =
"iffff\0" /* Parameter signature */
"glUniform4f\0"
"glUniform4fARB\0"
@@ -2810,14 +2838,14 @@ static const char Uniform4fARB_names[] =
#endif
#if defined(need_GL_ARB_map_buffer_range)
-static const char FlushMappedBufferRange_names[] =
+static const char FlushMappedBufferRange_names[] =
"iii\0" /* Parameter signature */
"glFlushMappedBufferRange\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char IsProgramNV_names[] =
+static const char IsProgramNV_names[] =
"i\0" /* Parameter signature */
"glIsProgramARB\0"
"glIsProgramNV\0"
@@ -2825,21 +2853,21 @@ static const char IsProgramNV_names[] =
#endif
#if defined(need_GL_APPLE_flush_buffer_range)
-static const char FlushMappedBufferRangeAPPLE_names[] =
+static const char FlushMappedBufferRangeAPPLE_names[] =
"iii\0" /* Parameter signature */
"glFlushMappedBufferRangeAPPLE\0"
"";
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodePointerSUN_names[] =
+static const char ReplacementCodePointerSUN_names[] =
"iip\0" /* Parameter signature */
"glReplacementCodePointerSUN\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char ProgramEnvParameter4dARB_names[] =
+static const char ProgramEnvParameter4dARB_names[] =
"iidddd\0" /* Parameter signature */
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
@@ -2847,7 +2875,7 @@ static const char ProgramEnvParameter4dARB_names[] =
#endif
#if defined(need_GL_SGI_color_table)
-static const char ColorTableParameterfv_names[] =
+static const char ColorTableParameterfv_names[] =
"iip\0" /* Parameter signature */
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
@@ -2855,21 +2883,21 @@ static const char ColorTableParameterfv_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightModelfSGIX_names[] =
+static const char FragmentLightModelfSGIX_names[] =
"if\0" /* Parameter signature */
"glFragmentLightModelfSGIX\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3bvEXT_names[] =
+static const char Binormal3bvEXT_names[] =
"p\0" /* Parameter signature */
"glBinormal3bvEXT\0"
"";
#endif
#if defined(need_GL_EXT_texture_object)
-static const char IsTexture_names[] =
+static const char IsTexture_names[] =
"i\0" /* Parameter signature */
"glIsTexture\0"
"glIsTextureEXT\0"
@@ -2877,14 +2905,14 @@ static const char IsTexture_names[] =
#endif
#if defined(need_GL_EXT_vertex_weighting)
-static const char VertexWeightfvEXT_names[] =
+static const char VertexWeightfvEXT_names[] =
"p\0" /* Parameter signature */
"glVertexWeightfvEXT\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib1dARB_names[] =
+static const char VertexAttrib1dARB_names[] =
"id\0" /* Parameter signature */
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
@@ -2892,14 +2920,14 @@ static const char VertexAttrib1dARB_names[] =
#endif
#if defined(need_GL_HP_image_transform)
-static const char ImageTransformParameterivHP_names[] =
+static const char ImageTransformParameterivHP_names[] =
"iip\0" /* Parameter signature */
"glImageTransformParameterivHP\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char DeleteQueriesARB_names[] =
+static const char DeleteQueriesARB_names[] =
"ip\0" /* Parameter signature */
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
@@ -2907,28 +2935,28 @@ static const char DeleteQueriesARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color4ubVertex2fSUN_names[] =
+static const char Color4ubVertex2fSUN_names[] =
"iiiiff\0" /* Parameter signature */
"glColor4ubVertex2fSUN\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentColorMaterialSGIX_names[] =
+static const char FragmentColorMaterialSGIX_names[] =
"ii\0" /* Parameter signature */
"glFragmentColorMaterialSGIX\0"
"";
#endif
#if defined(need_GL_ARB_matrix_palette)
-static const char CurrentPaletteMatrixARB_names[] =
+static const char CurrentPaletteMatrixARB_names[] =
"i\0" /* Parameter signature */
"glCurrentPaletteMatrixARB\0"
"";
#endif
#if defined(need_GL_SGIS_multisample) || defined(need_GL_EXT_multisample)
-static const char SamplePatternSGIS_names[] =
+static const char SamplePatternSGIS_names[] =
"i\0" /* Parameter signature */
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
@@ -2936,7 +2964,7 @@ static const char SamplePatternSGIS_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char IsQueryARB_names[] =
+static const char IsQueryARB_names[] =
"i\0" /* Parameter signature */
"glIsQuery\0"
"glIsQueryARB\0"
@@ -2944,14 +2972,14 @@ static const char IsQueryARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiColor4ubVertex3fSUN_names[] =
+static const char ReplacementCodeuiColor4ubVertex3fSUN_names[] =
"iiiiifff\0" /* Parameter signature */
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4usvARB_names[] =
+static const char VertexAttrib4usvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
@@ -2959,7 +2987,7 @@ static const char VertexAttrib4usvARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char LinkProgramARB_names[] =
+static const char LinkProgramARB_names[] =
"i\0" /* Parameter signature */
"glLinkProgram\0"
"glLinkProgramARB\0"
@@ -2967,14 +2995,14 @@ static const char LinkProgramARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib2fNV_names[] =
+static const char VertexAttrib2fNV_names[] =
"iff\0" /* Parameter signature */
"glVertexAttrib2fNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char ShaderSourceARB_names[] =
+static const char ShaderSourceARB_names[] =
"iipp\0" /* Parameter signature */
"glShaderSource\0"
"glShaderSourceARB\0"
@@ -2982,14 +3010,14 @@ static const char ShaderSourceARB_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentMaterialiSGIX_names[] =
+static const char FragmentMaterialiSGIX_names[] =
"iii\0" /* Parameter signature */
"glFragmentMaterialiSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib3svARB_names[] =
+static const char VertexAttrib3svARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
@@ -2997,7 +3025,7 @@ static const char VertexAttrib3svARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char CompressedTexSubImage3DARB_names[] =
+static const char CompressedTexSubImage3DARB_names[] =
"iiiiiiiiiip\0" /* Parameter signature */
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
@@ -3005,7 +3033,7 @@ static const char CompressedTexSubImage3DARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2ivMESA_names[] =
+static const char WindowPos2ivMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
@@ -3014,7 +3042,7 @@ static const char WindowPos2ivMESA_names[] =
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char IsFramebufferEXT_names[] =
+static const char IsFramebufferEXT_names[] =
"i\0" /* Parameter signature */
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
@@ -3022,7 +3050,7 @@ static const char IsFramebufferEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform4ivARB_names[] =
+static const char Uniform4ivARB_names[] =
"iip\0" /* Parameter signature */
"glUniform4iv\0"
"glUniform4ivARB\0"
@@ -3030,7 +3058,7 @@ static const char Uniform4ivARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char GetVertexAttribdvARB_names[] =
+static const char GetVertexAttribdvARB_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
@@ -3038,14 +3066,14 @@ static const char GetVertexAttribdvARB_names[] =
#endif
#if defined(need_GL_ATI_envmap_bumpmap)
-static const char TexBumpParameterivATI_names[] =
+static const char TexBumpParameterivATI_names[] =
"ip\0" /* Parameter signature */
"glTexBumpParameterivATI\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char GetSeparableFilter_names[] =
+static const char GetSeparableFilter_names[] =
"iiippp\0" /* Parameter signature */
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
@@ -3053,49 +3081,49 @@ static const char GetSeparableFilter_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3dEXT_names[] =
+static const char Binormal3dEXT_names[] =
"ddd\0" /* Parameter signature */
"glBinormal3dEXT\0"
"";
#endif
#if defined(need_GL_SGIX_sprite)
-static const char SpriteParameteriSGIX_names[] =
+static const char SpriteParameteriSGIX_names[] =
"ii\0" /* Parameter signature */
"glSpriteParameteriSGIX\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char RequestResidentProgramsNV_names[] =
+static const char RequestResidentProgramsNV_names[] =
"ip\0" /* Parameter signature */
"glRequestResidentProgramsNV\0"
"";
#endif
#if defined(need_GL_SGIX_tag_sample_buffer)
-static const char TagSampleBufferSGIX_names[] =
+static const char TagSampleBufferSGIX_names[] =
"\0" /* Parameter signature */
"glTagSampleBufferSGIX\0"
"";
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodeusSUN_names[] =
+static const char ReplacementCodeusSUN_names[] =
"i\0" /* Parameter signature */
"glReplacementCodeusSUN\0"
"";
#endif
#if defined(need_GL_SGIX_list_priority)
-static const char ListParameterivSGIX_names[] =
+static const char ListParameterivSGIX_names[] =
"iip\0" /* Parameter signature */
"glListParameterivSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_multi_draw_arrays)
-static const char MultiDrawElementsEXT_names[] =
+static const char MultiDrawElementsEXT_names[] =
"ipipi\0" /* Parameter signature */
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
@@ -3103,7 +3131,7 @@ static const char MultiDrawElementsEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform1ivARB_names[] =
+static const char Uniform1ivARB_names[] =
"iip\0" /* Parameter signature */
"glUniform1iv\0"
"glUniform1ivARB\0"
@@ -3111,7 +3139,7 @@ static const char Uniform1ivARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2sMESA_names[] =
+static const char WindowPos2sMESA_names[] =
"ii\0" /* Parameter signature */
"glWindowPos2s\0"
"glWindowPos2sARB\0"
@@ -3120,14 +3148,14 @@ static const char WindowPos2sMESA_names[] =
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightusvARB_names[] =
+static const char WeightusvARB_names[] =
"ip\0" /* Parameter signature */
"glWeightusvARB\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord)
-static const char FogCoordPointerEXT_names[] =
+static const char FogCoordPointerEXT_names[] =
"iip\0" /* Parameter signature */
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
@@ -3135,14 +3163,14 @@ static const char FogCoordPointerEXT_names[] =
#endif
#if defined(need_GL_EXT_index_material)
-static const char IndexMaterialEXT_names[] =
+static const char IndexMaterialEXT_names[] =
"ii\0" /* Parameter signature */
"glIndexMaterialEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3ubvEXT_names[] =
+static const char SecondaryColor3ubvEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
@@ -3150,7 +3178,7 @@ static const char SecondaryColor3ubvEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4dvARB_names[] =
+static const char VertexAttrib4dvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
@@ -3158,7 +3186,7 @@ static const char VertexAttrib4dvARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_shader)
-static const char BindAttribLocationARB_names[] =
+static const char BindAttribLocationARB_names[] =
"iip\0" /* Parameter signature */
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
@@ -3166,7 +3194,7 @@ static const char BindAttribLocationARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2dARB_names[] =
+static const char MultiTexCoord2dARB_names[] =
"idd\0" /* Parameter signature */
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
@@ -3174,35 +3202,35 @@ static const char MultiTexCoord2dARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char ExecuteProgramNV_names[] =
+static const char ExecuteProgramNV_names[] =
"iip\0" /* Parameter signature */
"glExecuteProgramNV\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char LightEnviSGIX_names[] =
+static const char LightEnviSGIX_names[] =
"ii\0" /* Parameter signature */
"glLightEnviSGIX\0"
"";
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodeuiSUN_names[] =
+static const char ReplacementCodeuiSUN_names[] =
"i\0" /* Parameter signature */
"glReplacementCodeuiSUN\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribPointerNV_names[] =
+static const char VertexAttribPointerNV_names[] =
"iiiip\0" /* Parameter signature */
"glVertexAttribPointerNV\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char GetFramebufferAttachmentParameterivEXT_names[] =
+static const char GetFramebufferAttachmentParameterivEXT_names[] =
"iiip\0" /* Parameter signature */
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
@@ -3210,14 +3238,14 @@ static const char GetFramebufferAttachmentParameterivEXT_names[] =
#endif
#if defined(need_GL_EXT_pixel_transform)
-static const char PixelTransformParameterfEXT_names[] =
+static const char PixelTransformParameterfEXT_names[] =
"iif\0" /* Parameter signature */
"glPixelTransformParameterfEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4dvARB_names[] =
+static const char MultiTexCoord4dvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
@@ -3225,21 +3253,21 @@ static const char MultiTexCoord4dvARB_names[] =
#endif
#if defined(need_GL_EXT_pixel_transform)
-static const char PixelTransformParameteriEXT_names[] =
+static const char PixelTransformParameteriEXT_names[] =
"iii\0" /* Parameter signature */
"glPixelTransformParameteriEXT\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fColor4ubVertex3fSUN_names[] =
+static const char TexCoord2fColor4ubVertex3fSUN_names[] =
"ffiiiifff\0" /* Parameter signature */
"glTexCoord2fColor4ubVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform1iARB_names[] =
+static const char Uniform1iARB_names[] =
"ii\0" /* Parameter signature */
"glUniform1i\0"
"glUniform1iARB\0"
@@ -3247,7 +3275,7 @@ static const char Uniform1iARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttribPointerARB_names[] =
+static const char VertexAttribPointerARB_names[] =
"iiiiip\0" /* Parameter signature */
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
@@ -3255,14 +3283,14 @@ static const char VertexAttribPointerARB_names[] =
#endif
#if defined(need_GL_SGIS_sharpen_texture)
-static const char SharpenTexFuncSGIS_names[] =
+static const char SharpenTexFuncSGIS_names[] =
"iip\0" /* Parameter signature */
"glSharpenTexFuncSGIS\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4fvARB_names[] =
+static const char MultiTexCoord4fvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
@@ -3270,56 +3298,56 @@ static const char MultiTexCoord4fvARB_names[] =
#endif
#if defined(need_GL_VERSION_2_1)
-static const char UniformMatrix2x3fv_names[] =
+static const char UniformMatrix2x3fv_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix2x3fv\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char TrackMatrixNV_names[] =
+static const char TrackMatrixNV_names[] =
"iiii\0" /* Parameter signature */
"glTrackMatrixNV\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char CombinerParameteriNV_names[] =
+static const char CombinerParameteriNV_names[] =
"ii\0" /* Parameter signature */
"glCombinerParameteriNV\0"
"";
#endif
#if defined(need_GL_SGIX_async)
-static const char DeleteAsyncMarkersSGIX_names[] =
+static const char DeleteAsyncMarkersSGIX_names[] =
"ii\0" /* Parameter signature */
"glDeleteAsyncMarkersSGIX\0"
"";
#endif
#if defined(need_GL_SGIX_async)
-static const char IsAsyncMarkerSGIX_names[] =
+static const char IsAsyncMarkerSGIX_names[] =
"i\0" /* Parameter signature */
"glIsAsyncMarkerSGIX\0"
"";
#endif
#if defined(need_GL_SGIX_framezoom)
-static const char FrameZoomSGIX_names[] =
+static const char FrameZoomSGIX_names[] =
"i\0" /* Parameter signature */
"glFrameZoomSGIX\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Normal3fVertex3fvSUN_names[] =
+static const char Normal3fVertex3fvSUN_names[] =
"pp\0" /* Parameter signature */
"glNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NsvARB_names[] =
+static const char VertexAttrib4NsvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
@@ -3327,15 +3355,22 @@ static const char VertexAttrib4NsvARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib3fvARB_names[] =
+static const char VertexAttrib3fvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char GetSynciv_names[] =
+ "iiipp\0" /* Parameter signature */
+ "glGetSynciv\0"
+ "";
+#endif
+
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char DeleteFramebuffersEXT_names[] =
+static const char DeleteFramebuffersEXT_names[] =
"ip\0" /* Parameter signature */
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
@@ -3343,14 +3378,14 @@ static const char DeleteFramebuffersEXT_names[] =
#endif
#if defined(need_GL_SUN_global_alpha)
-static const char GlobalAlphaFactorsSUN_names[] =
+static const char GlobalAlphaFactorsSUN_names[] =
"i\0" /* Parameter signature */
"glGlobalAlphaFactorsSUN\0"
"";
#endif
#if defined(need_GL_EXT_texture3D)
-static const char TexSubImage3D_names[] =
+static const char TexSubImage3D_names[] =
"iiiiiiiiiip\0" /* Parameter signature */
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
@@ -3358,14 +3393,14 @@ static const char TexSubImage3D_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3fEXT_names[] =
+static const char Tangent3fEXT_names[] =
"fff\0" /* Parameter signature */
"glTangent3fEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3uivEXT_names[] =
+static const char SecondaryColor3uivEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
@@ -3373,35 +3408,35 @@ static const char SecondaryColor3uivEXT_names[] =
#endif
#if defined(need_GL_ARB_matrix_palette)
-static const char MatrixIndexubvARB_names[] =
+static const char MatrixIndexubvARB_names[] =
"ip\0" /* Parameter signature */
"glMatrixIndexubvARB\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char Color4fNormal3fVertex3fSUN_names[] =
+static const char Color4fNormal3fVertex3fSUN_names[] =
"ffffffffff\0" /* Parameter signature */
"glColor4fNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_SGIS_pixel_texture)
-static const char PixelTexGenParameterfSGIS_names[] =
+static const char PixelTexGenParameterfSGIS_names[] =
"if\0" /* Parameter signature */
"glPixelTexGenParameterfSGIS\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char CreateShader_names[] =
+static const char CreateShader_names[] =
"i\0" /* Parameter signature */
"glCreateShader\0"
"";
#endif
#if defined(need_GL_SGI_color_table) || defined(need_GL_EXT_paletted_texture)
-static const char GetColorTableParameterfv_names[] =
+static const char GetColorTableParameterfv_names[] =
"iip\0" /* Parameter signature */
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
@@ -3410,14 +3445,14 @@ static const char GetColorTableParameterfv_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightModelfvSGIX_names[] =
+static const char FragmentLightModelfvSGIX_names[] =
"ip\0" /* Parameter signature */
"glFragmentLightModelfvSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord3fARB_names[] =
+static const char MultiTexCoord3fARB_names[] =
"ifff\0" /* Parameter signature */
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
@@ -3425,14 +3460,14 @@ static const char MultiTexCoord3fARB_names[] =
#endif
#if defined(need_GL_SGIS_pixel_texture)
-static const char GetPixelTexGenParameterfvSGIS_names[] =
+static const char GetPixelTexGenParameterfvSGIS_names[] =
"ip\0" /* Parameter signature */
"glGetPixelTexGenParameterfvSGIS\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char GenFramebuffersEXT_names[] =
+static const char GenFramebuffersEXT_names[] =
"ip\0" /* Parameter signature */
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
@@ -3440,14 +3475,14 @@ static const char GenFramebuffersEXT_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetProgramParameterdvNV_names[] =
+static const char GetProgramParameterdvNV_names[] =
"iiip\0" /* Parameter signature */
"glGetProgramParameterdvNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_array_object) || defined(need_GL_APPLE_vertex_array_object)
-static const char IsVertexArrayAPPLE_names[] =
+static const char IsVertexArrayAPPLE_names[] =
"i\0" /* Parameter signature */
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
@@ -3455,21 +3490,21 @@ static const char IsVertexArrayAPPLE_names[] =
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightfvSGIX_names[] =
+static const char FragmentLightfvSGIX_names[] =
"iip\0" /* Parameter signature */
"glFragmentLightfvSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char DetachShader_names[] =
+static const char DetachShader_names[] =
"ii\0" /* Parameter signature */
"glDetachShader\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NubARB_names[] =
+static const char VertexAttrib4NubARB_names[] =
"iiiii\0" /* Parameter signature */
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
@@ -3477,28 +3512,28 @@ static const char VertexAttrib4NubARB_names[] =
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char GetProgramEnvParameterfvARB_names[] =
+static const char GetProgramEnvParameterfvARB_names[] =
"iip\0" /* Parameter signature */
"glGetProgramEnvParameterfvARB\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetTrackMatrixivNV_names[] =
+static const char GetTrackMatrixivNV_names[] =
"iiip\0" /* Parameter signature */
"glGetTrackMatrixivNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib3svNV_names[] =
+static const char VertexAttrib3svNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib3svNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform4fvARB_names[] =
+static const char Uniform4fvARB_names[] =
"iip\0" /* Parameter signature */
"glUniform4fv\0"
"glUniform4fvARB\0"
@@ -3506,7 +3541,7 @@ static const char Uniform4fvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix)
-static const char MultTransposeMatrixfARB_names[] =
+static const char MultTransposeMatrixfARB_names[] =
"p\0" /* Parameter signature */
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
@@ -3514,14 +3549,14 @@ static const char MultTransposeMatrixfARB_names[] =
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char ColorFragmentOp1ATI_names[] =
+static const char ColorFragmentOp1ATI_names[] =
"iiiiiii\0" /* Parameter signature */
"glColorFragmentOp1ATI\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char GetUniformfvARB_names[] =
+static const char GetUniformfvARB_names[] =
"iip\0" /* Parameter signature */
"glGetUniformfv\0"
"glGetUniformfvARB\0"
@@ -3529,28 +3564,28 @@ static const char GetUniformfvARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_names[] =
+static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_names[] =
"iffffffffffff\0" /* Parameter signature */
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char DetachObjectARB_names[] =
+static const char DetachObjectARB_names[] =
"ii\0" /* Parameter signature */
"glDetachObjectARB\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char VertexBlendARB_names[] =
+static const char VertexBlendARB_names[] =
"i\0" /* Parameter signature */
"glVertexBlendARB\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3iMESA_names[] =
+static const char WindowPos3iMESA_names[] =
"iii\0" /* Parameter signature */
"glWindowPos3i\0"
"glWindowPos3iARB\0"
@@ -3559,7 +3594,7 @@ static const char WindowPos3iMESA_names[] =
#endif
#if defined(need_GL_EXT_convolution)
-static const char SeparableFilter2D_names[] =
+static const char SeparableFilter2D_names[] =
"iiiiiipp\0" /* Parameter signature */
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
@@ -3567,14 +3602,14 @@ static const char SeparableFilter2D_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiColor4ubVertex3fvSUN_names[] =
+static const char ReplacementCodeuiColor4ubVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char CompressedTexImage2DARB_names[] =
+static const char CompressedTexImage2DARB_names[] =
"iiiiiiip\0" /* Parameter signature */
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
@@ -3582,7 +3617,7 @@ static const char CompressedTexImage2DARB_names[] =
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char ArrayElement_names[] =
+static const char ArrayElement_names[] =
"i\0" /* Parameter signature */
"glArrayElement\0"
"glArrayElementEXT\0"
@@ -3590,35 +3625,35 @@ static const char ArrayElement_names[] =
#endif
#if defined(need_GL_EXT_depth_bounds_test)
-static const char DepthBoundsEXT_names[] =
+static const char DepthBoundsEXT_names[] =
"dd\0" /* Parameter signature */
"glDepthBoundsEXT\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char ProgramParameters4fvNV_names[] =
+static const char ProgramParameters4fvNV_names[] =
"iiip\0" /* Parameter signature */
"glProgramParameters4fvNV\0"
"";
#endif
#if defined(need_GL_SGIX_polynomial_ffd)
-static const char DeformationMap3fSGIX_names[] =
+static const char DeformationMap3fSGIX_names[] =
"iffiiffiiffiip\0" /* Parameter signature */
"glDeformationMap3fSGIX\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetProgramivNV_names[] =
+static const char GetProgramivNV_names[] =
"iip\0" /* Parameter signature */
"glGetProgramivNV\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char GetMinmaxParameteriv_names[] =
+static const char GetMinmaxParameteriv_names[] =
"iip\0" /* Parameter signature */
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
@@ -3626,7 +3661,7 @@ static const char GetMinmaxParameteriv_names[] =
#endif
#if defined(need_GL_EXT_copy_texture)
-static const char CopyTexImage1D_names[] =
+static const char CopyTexImage1D_names[] =
"iiiiiii\0" /* Parameter signature */
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
@@ -3634,42 +3669,42 @@ static const char CopyTexImage1D_names[] =
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char AlphaFragmentOp3ATI_names[] =
+static const char AlphaFragmentOp3ATI_names[] =
"iiiiiiiiiiii\0" /* Parameter signature */
"glAlphaFragmentOp3ATI\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetVertexAttribdvNV_names[] =
+static const char GetVertexAttribdvNV_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribdvNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib3fvNV_names[] =
+static const char VertexAttrib3fvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib3fvNV\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char GetFinalCombinerInputParameterivNV_names[] =
+static const char GetFinalCombinerInputParameterivNV_names[] =
"iip\0" /* Parameter signature */
"glGetFinalCombinerInputParameterivNV\0"
"";
#endif
#if defined(need_GL_NV_evaluators)
-static const char GetMapParameterivNV_names[] =
+static const char GetMapParameterivNV_names[] =
"iip\0" /* Parameter signature */
"glGetMapParameterivNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform4iARB_names[] =
+static const char Uniform4iARB_names[] =
"iiiii\0" /* Parameter signature */
"glUniform4i\0"
"glUniform4iARB\0"
@@ -3677,7 +3712,7 @@ static const char Uniform4iARB_names[] =
#endif
#if defined(need_GL_EXT_convolution)
-static const char ConvolutionParameteri_names[] =
+static const char ConvolutionParameteri_names[] =
"iii\0" /* Parameter signature */
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
@@ -3685,14 +3720,14 @@ static const char ConvolutionParameteri_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3sEXT_names[] =
+static const char Binormal3sEXT_names[] =
"iii\0" /* Parameter signature */
"glBinormal3sEXT\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char ConvolutionParameterf_names[] =
+static const char ConvolutionParameterf_names[] =
"iif\0" /* Parameter signature */
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
@@ -3700,7 +3735,7 @@ static const char ConvolutionParameterf_names[] =
#endif
#if defined(need_GL_SGI_color_table) || defined(need_GL_EXT_paletted_texture)
-static const char GetColorTableParameteriv_names[] =
+static const char GetColorTableParameteriv_names[] =
"iip\0" /* Parameter signature */
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
@@ -3709,7 +3744,7 @@ static const char GetColorTableParameteriv_names[] =
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char ProgramEnvParameter4dvARB_names[] =
+static const char ProgramEnvParameter4dvARB_names[] =
"iip\0" /* Parameter signature */
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
@@ -3717,14 +3752,14 @@ static const char ProgramEnvParameter4dvARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs2fvNV_names[] =
+static const char VertexAttribs2fvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs2fvNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char UseProgramObjectARB_names[] =
+static const char UseProgramObjectARB_names[] =
"i\0" /* Parameter signature */
"glUseProgram\0"
"glUseProgramObjectARB\0"
@@ -3732,42 +3767,42 @@ static const char UseProgramObjectARB_names[] =
#endif
#if defined(need_GL_NV_evaluators)
-static const char GetMapParameterfvNV_names[] =
+static const char GetMapParameterfvNV_names[] =
"iip\0" /* Parameter signature */
"glGetMapParameterfvNV\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char PassTexCoordATI_names[] =
+static const char PassTexCoordATI_names[] =
"iii\0" /* Parameter signature */
"glPassTexCoordATI\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char DeleteProgram_names[] =
+static const char DeleteProgram_names[] =
"i\0" /* Parameter signature */
"glDeleteProgram\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3ivEXT_names[] =
+static const char Tangent3ivEXT_names[] =
"p\0" /* Parameter signature */
"glTangent3ivEXT\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3dEXT_names[] =
+static const char Tangent3dEXT_names[] =
"ddd\0" /* Parameter signature */
"glTangent3dEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3dvEXT_names[] =
+static const char SecondaryColor3dvEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
@@ -3775,7 +3810,7 @@ static const char SecondaryColor3dvEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_multi_draw_arrays)
-static const char MultiDrawArraysEXT_names[] =
+static const char MultiDrawArraysEXT_names[] =
"ippi\0" /* Parameter signature */
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
@@ -3783,7 +3818,7 @@ static const char MultiDrawArraysEXT_names[] =
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char BindRenderbufferEXT_names[] =
+static const char BindRenderbufferEXT_names[] =
"ii\0" /* Parameter signature */
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
@@ -3791,7 +3826,7 @@ static const char BindRenderbufferEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4dARB_names[] =
+static const char MultiTexCoord4dARB_names[] =
"idddd\0" /* Parameter signature */
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
@@ -3799,7 +3834,7 @@ static const char MultiTexCoord4dARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3usEXT_names[] =
+static const char SecondaryColor3usEXT_names[] =
"iii\0" /* Parameter signature */
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
@@ -3807,14 +3842,14 @@ static const char SecondaryColor3usEXT_names[] =
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char ProgramLocalParameter4fvARB_names[] =
+static const char ProgramLocalParameter4fvARB_names[] =
"iip\0" /* Parameter signature */
"glProgramLocalParameter4fvARB\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char DeleteProgramsNV_names[] =
+static const char DeleteProgramsNV_names[] =
"ip\0" /* Parameter signature */
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
@@ -3822,7 +3857,7 @@ static const char DeleteProgramsNV_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1sARB_names[] =
+static const char MultiTexCoord1sARB_names[] =
"ii\0" /* Parameter signature */
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
@@ -3830,14 +3865,14 @@ static const char MultiTexCoord1sARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiColor3fVertex3fSUN_names[] =
+static const char ReplacementCodeuiColor3fVertex3fSUN_names[] =
"iffffff\0" /* Parameter signature */
"glReplacementCodeuiColor3fVertex3fSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char GetVertexAttribPointervNV_names[] =
+static const char GetVertexAttribPointervNV_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
@@ -3846,7 +3881,7 @@ static const char GetVertexAttribPointervNV_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1dvARB_names[] =
+static const char MultiTexCoord1dvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
@@ -3854,7 +3889,7 @@ static const char MultiTexCoord1dvARB_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform2iARB_names[] =
+static const char Uniform2iARB_names[] =
"iii\0" /* Parameter signature */
"glUniform2i\0"
"glUniform2iARB\0"
@@ -3862,21 +3897,21 @@ static const char Uniform2iARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char GetProgramStringNV_names[] =
+static const char GetProgramStringNV_names[] =
"iip\0" /* Parameter signature */
"glGetProgramStringNV\0"
"";
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char ColorPointerEXT_names[] =
+static const char ColorPointerEXT_names[] =
"iiiip\0" /* Parameter signature */
"glColorPointerEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char MapBufferARB_names[] =
+static const char MapBufferARB_names[] =
"ii\0" /* Parameter signature */
"glMapBuffer\0"
"glMapBufferARB\0"
@@ -3884,35 +3919,35 @@ static const char MapBufferARB_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3svEXT_names[] =
+static const char Binormal3svEXT_names[] =
"p\0" /* Parameter signature */
"glBinormal3svEXT\0"
"";
#endif
#if defined(need_GL_EXT_light_texture)
-static const char ApplyTextureEXT_names[] =
+static const char ApplyTextureEXT_names[] =
"i\0" /* Parameter signature */
"glApplyTextureEXT\0"
"";
#endif
#if defined(need_GL_EXT_light_texture)
-static const char TextureMaterialEXT_names[] =
+static const char TextureMaterialEXT_names[] =
"ii\0" /* Parameter signature */
"glTextureMaterialEXT\0"
"";
#endif
#if defined(need_GL_EXT_light_texture)
-static const char TextureLightEXT_names[] =
+static const char TextureLightEXT_names[] =
"i\0" /* Parameter signature */
"glTextureLightEXT\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char ResetMinmax_names[] =
+static const char ResetMinmax_names[] =
"i\0" /* Parameter signature */
"glResetMinmax\0"
"glResetMinmaxEXT\0"
@@ -3920,21 +3955,21 @@ static const char ResetMinmax_names[] =
#endif
#if defined(need_GL_SGIX_sprite)
-static const char SpriteParameterfSGIX_names[] =
+static const char SpriteParameterfSGIX_names[] =
"if\0" /* Parameter signature */
"glSpriteParameterfSGIX\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4sNV_names[] =
+static const char VertexAttrib4sNV_names[] =
"iiiii\0" /* Parameter signature */
"glVertexAttrib4sNV\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char GetConvolutionParameterfv_names[] =
+static const char GetConvolutionParameterfv_names[] =
"iip\0" /* Parameter signature */
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
@@ -3942,21 +3977,21 @@ static const char GetConvolutionParameterfv_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs4dvNV_names[] =
+static const char VertexAttribs4dvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs4dvNV\0"
"";
#endif
#if defined(need_GL_IBM_multimode_draw_arrays)
-static const char MultiModeDrawArraysIBM_names[] =
+static const char MultiModeDrawArraysIBM_names[] =
"pppii\0" /* Parameter signature */
"glMultiModeDrawArraysIBM\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4dARB_names[] =
+static const char VertexAttrib4dARB_names[] =
"idddd\0" /* Parameter signature */
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
@@ -3964,35 +3999,35 @@ static const char VertexAttrib4dARB_names[] =
#endif
#if defined(need_GL_ATI_envmap_bumpmap)
-static const char GetTexBumpParameterfvATI_names[] =
+static const char GetTexBumpParameterfvATI_names[] =
"ip\0" /* Parameter signature */
"glGetTexBumpParameterfvATI\0"
"";
#endif
#if defined(need_GL_NV_fragment_program)
-static const char ProgramNamedParameter4dNV_names[] =
+static const char ProgramNamedParameter4dNV_names[] =
"iipdddd\0" /* Parameter signature */
"glProgramNamedParameter4dNV\0"
"";
#endif
#if defined(need_GL_EXT_vertex_weighting)
-static const char VertexWeightfEXT_names[] =
+static const char VertexWeightfEXT_names[] =
"f\0" /* Parameter signature */
"glVertexWeightfEXT\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3fEXT_names[] =
+static const char Binormal3fEXT_names[] =
"fff\0" /* Parameter signature */
"glBinormal3fEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord)
-static const char FogCoordfvEXT_names[] =
+static const char FogCoordfvEXT_names[] =
"p\0" /* Parameter signature */
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
@@ -4000,7 +4035,7 @@ static const char FogCoordfvEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1ivARB_names[] =
+static const char MultiTexCoord1ivARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
@@ -4008,7 +4043,7 @@ static const char MultiTexCoord1ivARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3ubEXT_names[] =
+static const char SecondaryColor3ubEXT_names[] =
"iii\0" /* Parameter signature */
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
@@ -4016,7 +4051,7 @@ static const char SecondaryColor3ubEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2ivARB_names[] =
+static const char MultiTexCoord2ivARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
@@ -4024,14 +4059,14 @@ static const char MultiTexCoord2ivARB_names[] =
#endif
#if defined(need_GL_SGIS_fog_function)
-static const char FogFuncSGIS_names[] =
+static const char FogFuncSGIS_names[] =
"ip\0" /* Parameter signature */
"glFogFuncSGIS\0"
"";
#endif
#if defined(need_GL_EXT_copy_texture)
-static const char CopyTexSubImage2D_names[] =
+static const char CopyTexSubImage2D_names[] =
"iiiiiiii\0" /* Parameter signature */
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
@@ -4039,35 +4074,35 @@ static const char CopyTexSubImage2D_names[] =
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char GetObjectParameterivARB_names[] =
+static const char GetObjectParameterivARB_names[] =
"iip\0" /* Parameter signature */
"glGetObjectParameterivARB\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord4fVertex4fSUN_names[] =
+static const char TexCoord4fVertex4fSUN_names[] =
"ffffffff\0" /* Parameter signature */
"glTexCoord4fVertex4fSUN\0"
"";
#endif
#if defined(need_GL_APPLE_vertex_array_object)
-static const char BindVertexArrayAPPLE_names[] =
+static const char BindVertexArrayAPPLE_names[] =
"i\0" /* Parameter signature */
"glBindVertexArrayAPPLE\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char GetProgramLocalParameterdvARB_names[] =
+static const char GetProgramLocalParameterdvARB_names[] =
"iip\0" /* Parameter signature */
"glGetProgramLocalParameterdvARB\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char GetHistogramParameteriv_names[] =
+static const char GetHistogramParameteriv_names[] =
"iip\0" /* Parameter signature */
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
@@ -4075,7 +4110,7 @@ static const char GetHistogramParameteriv_names[] =
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1iARB_names[] =
+static const char MultiTexCoord1iARB_names[] =
"ii\0" /* Parameter signature */
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
@@ -4083,7 +4118,7 @@ static const char MultiTexCoord1iARB_names[] =
#endif
#if defined(need_GL_EXT_convolution)
-static const char GetConvolutionFilter_names[] =
+static const char GetConvolutionFilter_names[] =
"iiip\0" /* Parameter signature */
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
@@ -4091,14 +4126,14 @@ static const char GetConvolutionFilter_names[] =
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char GetProgramivARB_names[] =
+static const char GetProgramivARB_names[] =
"iip\0" /* Parameter signature */
"glGetProgramivARB\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_blend_func_separate) || defined(need_GL_INGR_blend_func_separate)
-static const char BlendFuncSeparateEXT_names[] =
+static const char BlendFuncSeparateEXT_names[] =
"iiii\0" /* Parameter signature */
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
@@ -4107,49 +4142,49 @@ static const char BlendFuncSeparateEXT_names[] =
#endif
#if defined(need_GL_ARB_map_buffer_range)
-static const char MapBufferRange_names[] =
+static const char MapBufferRange_names[] =
"iiii\0" /* Parameter signature */
"glMapBufferRange\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char ProgramParameters4dvNV_names[] =
+static const char ProgramParameters4dvNV_names[] =
"iiip\0" /* Parameter signature */
"glProgramParameters4dvNV\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord2fColor3fVertex3fvSUN_names[] =
+static const char TexCoord2fColor3fVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glTexCoord2fColor3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3dvEXT_names[] =
+static const char Binormal3dvEXT_names[] =
"p\0" /* Parameter signature */
"glBinormal3dvEXT\0"
"";
#endif
#if defined(need_GL_NV_fence)
-static const char FinishFenceNV_names[] =
+static const char FinishFenceNV_names[] =
"i\0" /* Parameter signature */
"glFinishFenceNV\0"
"";
#endif
#if defined(need_GL_SGIS_fog_function)
-static const char GetFogFuncSGIS_names[] =
+static const char GetFogFuncSGIS_names[] =
"p\0" /* Parameter signature */
"glGetFogFuncSGIS\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char GetUniformLocationARB_names[] =
+static const char GetUniformLocationARB_names[] =
"ip\0" /* Parameter signature */
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
@@ -4157,7 +4192,7 @@ static const char GetUniformLocationARB_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3fEXT_names[] =
+static const char SecondaryColor3fEXT_names[] =
"fff\0" /* Parameter signature */
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
@@ -4165,14 +4200,14 @@ static const char SecondaryColor3fEXT_names[] =
#endif
#if defined(need_GL_NV_register_combiners)
-static const char CombinerInputNV_names[] =
+static const char CombinerInputNV_names[] =
"iiiiii\0" /* Parameter signature */
"glCombinerInputNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib3sARB_names[] =
+static const char VertexAttrib3sARB_names[] =
"iiii\0" /* Parameter signature */
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
@@ -4180,49 +4215,49 @@ static const char VertexAttrib3sARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiNormal3fVertex3fvSUN_names[] =
+static const char ReplacementCodeuiNormal3fVertex3fvSUN_names[] =
"ppp\0" /* Parameter signature */
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char ProgramStringARB_names[] =
+static const char ProgramStringARB_names[] =
"iiip\0" /* Parameter signature */
"glProgramStringARB\0"
"";
#endif
#if defined(need_GL_SUN_vertex)
-static const char TexCoord4fVertex4fvSUN_names[] =
+static const char TexCoord4fVertex4fvSUN_names[] =
"pp\0" /* Parameter signature */
"glTexCoord4fVertex4fvSUN\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib3sNV_names[] =
+static const char VertexAttrib3sNV_names[] =
"iiii\0" /* Parameter signature */
"glVertexAttrib3sNV\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib1fNV_names[] =
+static const char VertexAttrib1fNV_names[] =
"if\0" /* Parameter signature */
"glVertexAttrib1fNV\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentLightfSGIX_names[] =
+static const char FragmentLightfSGIX_names[] =
"iif\0" /* Parameter signature */
"glFragmentLightfSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_texture_compression)
-static const char GetCompressedTexImageARB_names[] =
+static const char GetCompressedTexImageARB_names[] =
"iip\0" /* Parameter signature */
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
@@ -4230,14 +4265,14 @@ static const char GetCompressedTexImageARB_names[] =
#endif
#if defined(need_GL_EXT_vertex_weighting)
-static const char VertexWeightPointerEXT_names[] =
+static const char VertexWeightPointerEXT_names[] =
"iiip\0" /* Parameter signature */
"glVertexWeightPointerEXT\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char GetHistogram_names[] =
+static const char GetHistogram_names[] =
"iiiip\0" /* Parameter signature */
"glGetHistogram\0"
"glGetHistogramEXT\0"
@@ -4245,21 +4280,21 @@ static const char GetHistogram_names[] =
#endif
#if defined(need_GL_EXT_stencil_two_side)
-static const char ActiveStencilFaceEXT_names[] =
+static const char ActiveStencilFaceEXT_names[] =
"i\0" /* Parameter signature */
"glActiveStencilFaceEXT\0"
"";
#endif
#if defined(need_GL_ATI_separate_stencil)
-static const char StencilFuncSeparateATI_names[] =
+static const char StencilFuncSeparateATI_names[] =
"iiii\0" /* Parameter signature */
"glStencilFuncSeparateATI\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char GetShaderSourceARB_names[] =
+static const char GetShaderSourceARB_names[] =
"iipp\0" /* Parameter signature */
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
@@ -4267,28 +4302,28 @@ static const char GetShaderSourceARB_names[] =
#endif
#if defined(need_GL_SGIX_igloo_interface)
-static const char IglooInterfaceSGIX_names[] =
+static const char IglooInterfaceSGIX_names[] =
"ip\0" /* Parameter signature */
"glIglooInterfaceSGIX\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4dNV_names[] =
+static const char VertexAttrib4dNV_names[] =
"idddd\0" /* Parameter signature */
"glVertexAttrib4dNV\0"
"";
#endif
#if defined(need_GL_IBM_multimode_draw_arrays)
-static const char MultiModeDrawElementsIBM_names[] =
+static const char MultiModeDrawElementsIBM_names[] =
"ppipii\0" /* Parameter signature */
"glMultiModeDrawElementsIBM\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4svARB_names[] =
+static const char MultiTexCoord4svARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
@@ -4296,7 +4331,7 @@ static const char MultiTexCoord4svARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_occlusion_query)
-static const char GenQueriesARB_names[] =
+static const char GenQueriesARB_names[] =
"ip\0" /* Parameter signature */
"glGenQueries\0"
"glGenQueriesARB\0"
@@ -4304,35 +4339,42 @@ static const char GenQueriesARB_names[] =
#endif
#if defined(need_GL_SUN_vertex)
-static const char ReplacementCodeuiVertex3fSUN_names[] =
+static const char ReplacementCodeuiVertex3fSUN_names[] =
"ifff\0" /* Parameter signature */
"glReplacementCodeuiVertex3fSUN\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3iEXT_names[] =
+static const char Tangent3iEXT_names[] =
"iii\0" /* Parameter signature */
"glTangent3iEXT\0"
"";
#endif
#if defined(need_GL_SUN_mesh_array)
-static const char DrawMeshArraysSUN_names[] =
+static const char DrawMeshArraysSUN_names[] =
"iiii\0" /* Parameter signature */
"glDrawMeshArraysSUN\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char IsSync_names[] =
+ "i\0" /* Parameter signature */
+ "glIsSync\0"
+ "";
+#endif
+
#if defined(need_GL_NV_evaluators)
-static const char GetMapControlPointsNV_names[] =
+static const char GetMapControlPointsNV_names[] =
"iiiiiip\0" /* Parameter signature */
"glGetMapControlPointsNV\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_draw_buffers) || defined(need_GL_ATI_draw_buffers)
-static const char DrawBuffersARB_names[] =
+static const char DrawBuffersARB_names[] =
"ip\0" /* Parameter signature */
"glDrawBuffers\0"
"glDrawBuffersARB\0"
@@ -4341,28 +4383,28 @@ static const char DrawBuffersARB_names[] =
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char ProgramLocalParameter4fARB_names[] =
+static const char ProgramLocalParameter4fARB_names[] =
"iiffff\0" /* Parameter signature */
"glProgramLocalParameter4fARB\0"
"";
#endif
#if defined(need_GL_SGIX_sprite)
-static const char SpriteParameterivSGIX_names[] =
+static const char SpriteParameterivSGIX_names[] =
"ip\0" /* Parameter signature */
"glSpriteParameterivSGIX\0"
"";
#endif
#if defined(need_GL_EXT_provoking_vertex)
-static const char ProvokingVertexEXT_names[] =
+static const char ProvokingVertexEXT_names[] =
"i\0" /* Parameter signature */
"glProvokingVertexEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord1fARB_names[] =
+static const char MultiTexCoord1fARB_names[] =
"if\0" /* Parameter signature */
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
@@ -4370,21 +4412,21 @@ static const char MultiTexCoord1fARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs4ubvNV_names[] =
+static const char VertexAttribs4ubvNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs4ubvNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightsvARB_names[] =
+static const char WeightsvARB_names[] =
"ip\0" /* Parameter signature */
"glWeightsvARB\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects)
-static const char Uniform1fvARB_names[] =
+static const char Uniform1fvARB_names[] =
"iip\0" /* Parameter signature */
"glUniform1fv\0"
"glUniform1fvARB\0"
@@ -4392,7 +4434,7 @@ static const char Uniform1fvARB_names[] =
#endif
#if defined(need_GL_EXT_copy_texture)
-static const char CopyTexSubImage1D_names[] =
+static const char CopyTexSubImage1D_names[] =
"iiiiii\0" /* Parameter signature */
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
@@ -4400,7 +4442,7 @@ static const char CopyTexSubImage1D_names[] =
#endif
#if defined(need_GL_EXT_texture_object)
-static const char BindTexture_names[] =
+static const char BindTexture_names[] =
"ii\0" /* Parameter signature */
"glBindTexture\0"
"glBindTextureEXT\0"
@@ -4408,14 +4450,14 @@ static const char BindTexture_names[] =
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char BeginFragmentShaderATI_names[] =
+static const char BeginFragmentShaderATI_names[] =
"\0" /* Parameter signature */
"glBeginFragmentShaderATI\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord4fARB_names[] =
+static const char MultiTexCoord4fARB_names[] =
"iffff\0" /* Parameter signature */
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
@@ -4423,21 +4465,21 @@ static const char MultiTexCoord4fARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs3svNV_names[] =
+static const char VertexAttribs3svNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs3svNV\0"
"";
#endif
#if defined(need_GL_SUN_triangle_list)
-static const char ReplacementCodeuivSUN_names[] =
+static const char ReplacementCodeuivSUN_names[] =
"p\0" /* Parameter signature */
"glReplacementCodeuivSUN\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char EnableVertexAttribArrayARB_names[] =
+static const char EnableVertexAttribArrayARB_names[] =
"i\0" /* Parameter signature */
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
@@ -4445,14 +4487,14 @@ static const char EnableVertexAttribArrayARB_names[] =
#endif
#if defined(need_GL_INTEL_parallel_arrays)
-static const char NormalPointervINTEL_names[] =
+static const char NormalPointervINTEL_names[] =
"ip\0" /* Parameter signature */
"glNormalPointervINTEL\0"
"";
#endif
#if defined(need_GL_EXT_convolution)
-static const char CopyConvolutionFilter2D_names[] =
+static const char CopyConvolutionFilter2D_names[] =
"iiiiii\0" /* Parameter signature */
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
@@ -4460,7 +4502,7 @@ static const char CopyConvolutionFilter2D_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3ivMESA_names[] =
+static const char WindowPos3ivMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
@@ -4469,14 +4511,14 @@ static const char WindowPos3ivMESA_names[] =
#endif
#if defined(need_GL_ARB_copy_buffer)
-static const char CopyBufferSubData_names[] =
+static const char CopyBufferSubData_names[] =
"iiiii\0" /* Parameter signature */
"glCopyBufferSubData\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char IsBufferARB_names[] =
+static const char IsBufferARB_names[] =
"i\0" /* Parameter signature */
"glIsBuffer\0"
"glIsBufferARB\0"
@@ -4484,14 +4526,14 @@ static const char IsBufferARB_names[] =
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4iMESA_names[] =
+static const char WindowPos4iMESA_names[] =
"iiii\0" /* Parameter signature */
"glWindowPos4iMESA\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4uivARB_names[] =
+static const char VertexAttrib4uivARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
@@ -4499,35 +4541,35 @@ static const char VertexAttrib4uivARB_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3bvEXT_names[] =
+static const char Tangent3bvEXT_names[] =
"p\0" /* Parameter signature */
"glTangent3bvEXT\0"
"";
#endif
#if defined(need_GL_VERSION_2_1)
-static const char UniformMatrix3x4fv_names[] =
+static const char UniformMatrix3x4fv_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix3x4fv\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3fvEXT_names[] =
+static const char Binormal3fvEXT_names[] =
"p\0" /* Parameter signature */
"glBinormal3fvEXT\0"
"";
#endif
#if defined(need_GL_INTEL_parallel_arrays)
-static const char TexCoordPointervINTEL_names[] =
+static const char TexCoordPointervINTEL_names[] =
"iip\0" /* Parameter signature */
"glTexCoordPointervINTEL\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char DeleteBuffersARB_names[] =
+static const char DeleteBuffersARB_names[] =
"ip\0" /* Parameter signature */
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
@@ -4535,21 +4577,21 @@ static const char DeleteBuffersARB_names[] =
#endif
#if defined(need_GL_MESA_window_pos)
-static const char WindowPos4fvMESA_names[] =
+static const char WindowPos4fvMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos4fvMESA\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib1sNV_names[] =
+static const char VertexAttrib1sNV_names[] =
"ii\0" /* Parameter signature */
"glVertexAttrib1sNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_secondary_color)
-static const char SecondaryColor3svEXT_names[] =
+static const char SecondaryColor3svEXT_names[] =
"p\0" /* Parameter signature */
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
@@ -4557,7 +4599,7 @@ static const char SecondaryColor3svEXT_names[] =
#endif
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_transpose_matrix)
-static const char LoadTransposeMatrixfARB_names[] =
+static const char LoadTransposeMatrixfARB_names[] =
"p\0" /* Parameter signature */
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
@@ -4565,7 +4607,7 @@ static const char LoadTransposeMatrixfARB_names[] =
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char GetPointerv_names[] =
+static const char GetPointerv_names[] =
"ip\0" /* Parameter signature */
"glGetPointerv\0"
"glGetPointervEXT\0"
@@ -4573,21 +4615,21 @@ static const char GetPointerv_names[] =
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3bEXT_names[] =
+static const char Tangent3bEXT_names[] =
"iii\0" /* Parameter signature */
"glTangent3bEXT\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char CombinerParameterfNV_names[] =
+static const char CombinerParameterfNV_names[] =
"if\0" /* Parameter signature */
"glCombinerParameterfNV\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char BindProgramNV_names[] =
+static const char BindProgramNV_names[] =
"ii\0" /* Parameter signature */
"glBindProgramARB\0"
"glBindProgramNV\0"
@@ -4595,7 +4637,7 @@ static const char BindProgramNV_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4svARB_names[] =
+static const char VertexAttrib4svARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
@@ -4603,28 +4645,35 @@ static const char VertexAttrib4svARB_names[] =
#endif
#if defined(need_GL_MESA_shader_debug)
-static const char CreateDebugObjectMESA_names[] =
+static const char CreateDebugObjectMESA_names[] =
"\0" /* Parameter signature */
"glCreateDebugObjectMESA\0"
"";
#endif
#if defined(need_GL_VERSION_2_0)
-static const char GetShaderiv_names[] =
+static const char GetShaderiv_names[] =
"iip\0" /* Parameter signature */
"glGetShaderiv\0"
"";
#endif
+#if defined(need_GL_ARB_sync)
+static const char ClientWaitSync_names[] =
+ "iii\0" /* Parameter signature */
+ "glClientWaitSync\0"
+ "";
+#endif
+
#if defined(need_GL_ATI_fragment_shader)
-static const char BindFragmentShaderATI_names[] =
+static const char BindFragmentShaderATI_names[] =
"i\0" /* Parameter signature */
"glBindFragmentShaderATI\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char UnmapBufferARB_names[] =
+static const char UnmapBufferARB_names[] =
"i\0" /* Parameter signature */
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
@@ -4632,7 +4681,7 @@ static const char UnmapBufferARB_names[] =
#endif
#if defined(need_GL_EXT_histogram)
-static const char Minmax_names[] =
+static const char Minmax_names[] =
"iii\0" /* Parameter signature */
"glMinmax\0"
"glMinmaxEXT\0"
@@ -4640,7 +4689,7 @@ static const char Minmax_names[] =
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord)
-static const char FogCoorddvEXT_names[] =
+static const char FogCoorddvEXT_names[] =
"p\0" /* Parameter signature */
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
@@ -4648,35 +4697,35 @@ static const char FogCoorddvEXT_names[] =
#endif
#if defined(need_GL_SUNX_constant_data)
-static const char FinishTextureSUNX_names[] =
+static const char FinishTextureSUNX_names[] =
"\0" /* Parameter signature */
"glFinishTextureSUNX\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char GetFragmentLightfvSGIX_names[] =
+static const char GetFragmentLightfvSGIX_names[] =
"iip\0" /* Parameter signature */
"glGetFragmentLightfvSGIX\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char GetFinalCombinerInputParameterfvNV_names[] =
+static const char GetFinalCombinerInputParameterfvNV_names[] =
"iip\0" /* Parameter signature */
"glGetFinalCombinerInputParameterfvNV\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char ColorFragmentOp3ATI_names[] =
+static const char ColorFragmentOp3ATI_names[] =
"iiiiiiiiiiiii\0" /* Parameter signature */
"glColorFragmentOp3ATI\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib2svARB_names[] =
+static const char VertexAttrib2svARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
@@ -4684,14 +4733,14 @@ static const char VertexAttrib2svARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char AreProgramsResidentNV_names[] =
+static const char AreProgramsResidentNV_names[] =
"ipp\0" /* Parameter signature */
"glAreProgramsResidentNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos3svMESA_names[] =
+static const char WindowPos3svMESA_names[] =
"p\0" /* Parameter signature */
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
@@ -4700,7 +4749,7 @@ static const char WindowPos3svMESA_names[] =
#endif
#if defined(need_GL_EXT_color_subtable)
-static const char CopyColorSubTable_names[] =
+static const char CopyColorSubTable_names[] =
"iiiii\0" /* Parameter signature */
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
@@ -4708,14 +4757,14 @@ static const char CopyColorSubTable_names[] =
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightdvARB_names[] =
+static const char WeightdvARB_names[] =
"ip\0" /* Parameter signature */
"glWeightdvARB\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char DeleteRenderbuffersEXT_names[] =
+static const char DeleteRenderbuffersEXT_names[] =
"ip\0" /* Parameter signature */
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
@@ -4723,7 +4772,7 @@ static const char DeleteRenderbuffersEXT_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib4NubvARB_names[] =
+static const char VertexAttrib4NubvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
@@ -4731,63 +4780,63 @@ static const char VertexAttrib4NubvARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib3dvNV_names[] =
+static const char VertexAttrib3dvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib3dvNV\0"
"";
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char GetObjectParameterfvARB_names[] =
+static const char GetObjectParameterfvARB_names[] =
"iip\0" /* Parameter signature */
"glGetObjectParameterfvARB\0"
"";
#endif
#if defined(need_GL_ARB_vertex_program)
-static const char GetProgramEnvParameterdvARB_names[] =
+static const char GetProgramEnvParameterdvARB_names[] =
"iip\0" /* Parameter signature */
"glGetProgramEnvParameterdvARB\0"
"";
#endif
#if defined(need_GL_EXT_compiled_vertex_array)
-static const char LockArraysEXT_names[] =
+static const char LockArraysEXT_names[] =
"ii\0" /* Parameter signature */
"glLockArraysEXT\0"
"";
#endif
#if defined(need_GL_EXT_pixel_transform)
-static const char PixelTransformParameterivEXT_names[] =
+static const char PixelTransformParameterivEXT_names[] =
"iip\0" /* Parameter signature */
"glPixelTransformParameterivEXT\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char BinormalPointerEXT_names[] =
+static const char BinormalPointerEXT_names[] =
"iip\0" /* Parameter signature */
"glBinormalPointerEXT\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib1dNV_names[] =
+static const char VertexAttrib1dNV_names[] =
"id\0" /* Parameter signature */
"glVertexAttrib1dNV\0"
"";
#endif
#if defined(need_GL_NV_register_combiners)
-static const char GetCombinerInputParameterivNV_names[] =
+static const char GetCombinerInputParameterivNV_names[] =
"iiiip\0" /* Parameter signature */
"glGetCombinerInputParameterivNV\0"
"";
#endif
#if defined(need_GL_VERSION_1_3)
-static const char MultiTexCoord2fvARB_names[] =
+static const char MultiTexCoord2fvARB_names[] =
"ip\0" /* Parameter signature */
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
@@ -4795,7 +4844,7 @@ static const char MultiTexCoord2fvARB_names[] =
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char GetRenderbufferParameterivEXT_names[] =
+static const char GetRenderbufferParameterivEXT_names[] =
"iip\0" /* Parameter signature */
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
@@ -4803,21 +4852,21 @@ static const char GetRenderbufferParameterivEXT_names[] =
#endif
#if defined(need_GL_NV_register_combiners)
-static const char CombinerParameterivNV_names[] =
+static const char CombinerParameterivNV_names[] =
"ip\0" /* Parameter signature */
"glCombinerParameterivNV\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char GenFragmentShadersATI_names[] =
+static const char GenFragmentShadersATI_names[] =
"i\0" /* Parameter signature */
"glGenFragmentShadersATI\0"
"";
#endif
#if defined(need_GL_EXT_vertex_array)
-static const char DrawArrays_names[] =
+static const char DrawArrays_names[] =
"iii\0" /* Parameter signature */
"glDrawArrays\0"
"glDrawArraysEXT\0"
@@ -4825,14 +4874,14 @@ static const char DrawArrays_names[] =
#endif
#if defined(need_GL_ARB_vertex_blend)
-static const char WeightuivARB_names[] =
+static const char WeightuivARB_names[] =
"ip\0" /* Parameter signature */
"glWeightuivARB\0"
"";
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib2sARB_names[] =
+static const char VertexAttrib2sARB_names[] =
"iii\0" /* Parameter signature */
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
@@ -4840,28 +4889,28 @@ static const char VertexAttrib2sARB_names[] =
#endif
#if defined(need_GL_SGIX_async)
-static const char GenAsyncMarkersSGIX_names[] =
+static const char GenAsyncMarkersSGIX_names[] =
"i\0" /* Parameter signature */
"glGenAsyncMarkersSGIX\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Tangent3svEXT_names[] =
+static const char Tangent3svEXT_names[] =
"p\0" /* Parameter signature */
"glTangent3svEXT\0"
"";
#endif
#if defined(need_GL_SGIX_list_priority)
-static const char GetListParameterivSGIX_names[] =
+static const char GetListParameterivSGIX_names[] =
"iip\0" /* Parameter signature */
"glGetListParameterivSGIX\0"
"";
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char BindBufferARB_names[] =
+static const char BindBufferARB_names[] =
"ii\0" /* Parameter signature */
"glBindBuffer\0"
"glBindBufferARB\0"
@@ -4869,35 +4918,35 @@ static const char BindBufferARB_names[] =
#endif
#if defined(need_GL_ARB_shader_objects)
-static const char GetInfoLogARB_names[] =
+static const char GetInfoLogARB_names[] =
"iipp\0" /* Parameter signature */
"glGetInfoLogARB\0"
"";
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs4svNV_names[] =
+static const char VertexAttribs4svNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs4svNV\0"
"";
#endif
#if defined(need_GL_IBM_vertex_array_lists)
-static const char EdgeFlagPointerListIBM_names[] =
+static const char EdgeFlagPointerListIBM_names[] =
"ipi\0" /* Parameter signature */
"glEdgeFlagPointerListIBM\0"
"";
#endif
#if defined(need_GL_VERSION_2_1)
-static const char UniformMatrix3x2fv_names[] =
+static const char UniformMatrix3x2fv_names[] =
"iiip\0" /* Parameter signature */
"glUniformMatrix3x2fv\0"
"";
#endif
#if defined(need_GL_EXT_histogram)
-static const char GetMinmaxParameterfv_names[] =
+static const char GetMinmaxParameterfv_names[] =
"iip\0" /* Parameter signature */
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
@@ -4905,7 +4954,7 @@ static const char GetMinmaxParameterfv_names[] =
#endif
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
-static const char VertexAttrib1fvARB_names[] =
+static const char VertexAttrib1fvARB_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
@@ -4913,7 +4962,7 @@ static const char VertexAttrib1fvARB_names[] =
#endif
#if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object)
-static const char GenBuffersARB_names[] =
+static const char GenBuffersARB_names[] =
"ip\0" /* Parameter signature */
"glGenBuffers\0"
"glGenBuffersARB\0"
@@ -4921,35 +4970,35 @@ static const char GenBuffersARB_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttribs1svNV_names[] =
+static const char VertexAttribs1svNV_names[] =
"iip\0" /* Parameter signature */
"glVertexAttribs1svNV\0"
"";
#endif
#if defined(need_GL_ATI_envmap_bumpmap)
-static const char GetTexBumpParameterivATI_names[] =
+static const char GetTexBumpParameterivATI_names[] =
"ip\0" /* Parameter signature */
"glGetTexBumpParameterivATI\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3bEXT_names[] =
+static const char Binormal3bEXT_names[] =
"iii\0" /* Parameter signature */
"glBinormal3bEXT\0"
"";
#endif
#if defined(need_GL_SGIX_fragment_lighting)
-static const char FragmentMaterialivSGIX_names[] =
+static const char FragmentMaterialivSGIX_names[] =
"iip\0" /* Parameter signature */
"glFragmentMaterialivSGIX\0"
"";
#endif
#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object)
-static const char IsRenderbufferEXT_names[] =
+static const char IsRenderbufferEXT_names[] =
"i\0" /* Parameter signature */
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
@@ -4957,7 +5006,7 @@ static const char IsRenderbufferEXT_names[] =
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
-static const char GenProgramsNV_names[] =
+static const char GenProgramsNV_names[] =
"ip\0" /* Parameter signature */
"glGenProgramsARB\0"
"glGenProgramsNV\0"
@@ -4965,28 +5014,28 @@ static const char GenProgramsNV_names[] =
#endif
#if defined(need_GL_NV_vertex_program)
-static const char VertexAttrib4dvNV_names[] =
+static const char VertexAttrib4dvNV_names[] =
"ip\0" /* Parameter signature */
"glVertexAttrib4dvNV\0"
"";
#endif
#if defined(need_GL_ATI_fragment_shader)
-static const char EndFragmentShaderATI_names[] =
+static const char EndFragmentShaderATI_names[] =
"\0" /* Parameter signature */
"glEndFragmentShaderATI\0"
"";
#endif
#if defined(need_GL_EXT_coordinate_frame)
-static const char Binormal3iEXT_names[] =
+static const char Binormal3iEXT_names[] =
"iii\0" /* Parameter signature */
"glBinormal3iEXT\0"
"";
#endif
#if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos)
-static const char WindowPos2fMESA_names[] =
+static const char WindowPos2fMESA_names[] =
"ff\0" /* Parameter signature */
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -5160,6 +5209,19 @@ static const struct dri_extension_function GL_ARB_shader_objects_functions[] = {
};
#endif
+#if defined(need_GL_ARB_sync)
+static const struct dri_extension_function GL_ARB_sync_functions[] = {
+ { DeleteSync_names, DeleteSync_remap_index, -1 },
+ { FenceSync_names, FenceSync_remap_index, -1 },
+ { WaitSync_names, WaitSync_remap_index, -1 },
+ { GetInteger64v_names, GetInteger64v_remap_index, -1 },
+ { GetSynciv_names, GetSynciv_remap_index, -1 },
+ { IsSync_names, IsSync_remap_index, -1 },
+ { ClientWaitSync_names, ClientWaitSync_remap_index, -1 },
+ { NULL, 0, 0 }
+};
+#endif
+
#if defined(need_GL_ARB_texture_compression)
static const struct dri_extension_function GL_ARB_texture_compression_functions[] = {
{ CompressedTexSubImage2DARB_names, CompressedTexSubImage2DARB_remap_index, -1 },
diff --git a/src/mesa/drivers/dri/i915/Makefile b/src/mesa/drivers/dri/i915/Makefile
index beaf9a4b129..9d049dea8fe 100644
--- a/src/mesa/drivers/dri/i915/Makefile
+++ b/src/mesa/drivers/dri/i915/Makefile
@@ -51,6 +51,7 @@ DRIVER_SOURCES = \
intel_screen.c \
intel_span.c \
intel_state.c \
+ intel_syncobj.c \
intel_tris.c \
intel_fbo.c
diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c
new file mode 120000
index 00000000000..0b2e56ab246
--- /dev/null
+++ b/src/mesa/drivers/dri/i915/intel_syncobj.c
@@ -0,0 +1 @@
+../intel/intel_syncobj.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile
index 128afb56866..6e9a9a29a39 100644
--- a/src/mesa/drivers/dri/i965/Makefile
+++ b/src/mesa/drivers/dri/i965/Makefile
@@ -26,6 +26,7 @@ DRIVER_SOURCES = \
intel_pixel_read.c \
intel_state.c \
intel_swapbuffers.c \
+ intel_syncobj.c \
intel_tex.c \
intel_tex_copy.c \
intel_tex_format.c \
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index e76e9fdcc86..3c5b8483197 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -167,8 +167,6 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
brw_draw_init( brw );
- vbo_use_buffer_objects(ctx);
-
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/i965/brw_gs_state.c b/src/mesa/drivers/dri/i965/brw_gs_state.c
index a761c03153c..ed9d2ffe605 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_state.c
@@ -93,7 +93,10 @@ gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
gs.thread4.nr_urb_entries = key->nr_urb_entries;
gs.thread4.urb_entry_allocation_size = key->urb_size - 1;
- gs.thread4.max_threads = 0; /* Hardware requirement */
+ if (key->nr_urb_entries >= 8)
+ gs.thread4.max_threads = 1;
+ else
+ gs.thread4.max_threads = 0;
if (BRW_IS_IGDNG(brw))
gs.thread4.rendering_enable = 1;
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 85a7706404f..ea718575484 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -172,6 +172,7 @@ static void prepare_psp_urb_cbs(struct brw_context *brw)
brw_add_validated_bo(brw, brw->vs.state_bo);
brw_add_validated_bo(brw, brw->gs.state_bo);
brw_add_validated_bo(brw, brw->clip.state_bo);
+ brw_add_validated_bo(brw, brw->sf.state_bo);
brw_add_validated_bo(brw, brw->wm.state_bo);
brw_add_validated_bo(brw, brw->cc.state_bo);
}
diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h
index a6de09207b7..66d4127271a 100644
--- a/src/mesa/drivers/dri/i965/brw_structs.h
+++ b/src/mesa/drivers/dri/i965/brw_structs.h
@@ -442,8 +442,8 @@ struct brw_urb_fence
{
GLuint sf_fence:10;
GLuint vf_fence:10;
- GLuint cs_fence:10;
- GLuint pad:2;
+ GLuint cs_fence:11;
+ GLuint pad:1;
} bits1;
};
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 108e19cdbcf..584fdbdfc37 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -1208,7 +1208,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
MIN2(c->nr_outputs + 1 + len_vertext_header, (BRW_MAX_MRF-1)), /* msg len */
0, /* response len */
eot, /* eot */
- 1, /* writes complete */
+ eot, /* writes complete */
0, /* urb destination offset */
BRW_URB_SWIZZLE_INTERLEAVE);
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index 268f7965c00..981864323ec 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -908,6 +908,20 @@ static void emit_kil( struct brw_wm_compile *c,
}
}
+/* KIL_NV kills the pixels that are currently executing, not based on a test
+ * of the arguments.
+ */
+static void emit_kil_nv( struct brw_wm_compile *c )
+{
+ struct brw_compile *p = &c->func;
+ struct brw_reg r0uw = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_NOT(p, c->emit_mask_reg, brw_mask_reg(1)); //IMASK
+ brw_AND(p, r0uw, c->emit_mask_reg, r0uw);
+ brw_pop_insn_state(p);
+}
static void fire_fb_write( struct brw_wm_compile *c,
GLuint base_reg,
@@ -1387,6 +1401,10 @@ void brw_wm_emit( struct brw_wm_compile *c )
emit_kil(c, args[0]);
break;
+ case OPCODE_KIL_NV:
+ emit_kil_nv(c);
+ break;
+
default:
_mesa_printf("Unsupported opcode %i (%s) in fragment shader\n",
inst->opcode, inst->opcode < MAX_OPCODE ?
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass1.c b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
index 3436a247170..9c68bfd78b2 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass1.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
@@ -270,6 +270,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
case OPCODE_DST:
case WM_FRONTFACING:
+ case OPCODE_KIL_NV:
default:
break;
}
diff --git a/src/mesa/drivers/dri/i965/intel_syncobj.c b/src/mesa/drivers/dri/i965/intel_syncobj.c
new file mode 120000
index 00000000000..0b2e56ab246
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/intel_syncobj.c
@@ -0,0 +1 @@
+../intel/intel_syncobj.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 3cf0ea0991d..c55c5c426e0 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -130,9 +130,10 @@ intel_bufferobj_free(GLcontext * ctx, struct gl_buffer_object *obj)
* Allocate space for and store data in a buffer object. Any data that was
* previously stored in the buffer object is lost. If data is NULL,
* memory will be allocated, but no copy will occur.
- * Called via glBufferDataARB().
+ * Called via ctx->Driver.BufferData().
+ * \return GL_TRUE for success, GL_FALSE if out of memory
*/
-static void
+static GLboolean
intel_bufferobj_data(GLcontext * ctx,
GLenum target,
GLsizeiptrARB size,
@@ -167,15 +168,19 @@ intel_bufferobj_data(GLcontext * ctx,
if (intel_obj->sys_buffer != NULL) {
if (data != NULL)
memcpy(intel_obj->sys_buffer, data, size);
- return;
+ return GL_TRUE;
}
}
#endif
intel_bufferobj_alloc_buffer(intel, intel_obj);
+ if (!intel_obj->buffer)
+ return GL_FALSE;
if (data != NULL)
dri_bo_subdata(intel_obj->buffer, 0, size, data);
}
+
+ return GL_TRUE;
}
@@ -267,6 +272,9 @@ intel_bufferobj_map(GLcontext * ctx,
}
obj->Pointer = intel_obj->buffer->virtual;
+ obj->Length = obj->Size;
+ obj->Offset = 0;
+
return obj->Pointer;
}
@@ -288,7 +296,7 @@ intel_bufferobj_map(GLcontext * ctx,
*/
static void *
intel_bufferobj_map_range(GLcontext * ctx,
- GLenum target, GLsizei offset, GLsizeiptr length,
+ GLenum target, GLintptr offset, GLsizeiptr length,
GLbitfield access, struct gl_buffer_object *obj)
{
struct intel_context *intel = intel_context(ctx);
@@ -296,6 +304,13 @@ intel_bufferobj_map_range(GLcontext * ctx,
assert(intel_obj);
+ /* _mesa_MapBufferRange (GL entrypoint) sets these, but the vbo module also
+ * internally uses our functions directly.
+ */
+ obj->Offset = offset;
+ obj->Length = length;
+ obj->AccessFlags = access;
+
if (intel_obj->sys_buffer) {
obj->Pointer = intel_obj->sys_buffer + offset;
return obj->Pointer;
@@ -308,16 +323,9 @@ intel_bufferobj_map_range(GLcontext * ctx,
* the batchbuffer so that GEM knows about the buffer access for later
* syncing.
*/
- if ((access & GL_MAP_WRITE_BIT) && !(access & GL_MAP_UNSYNCHRONIZED_BIT))
+ if (!(access & GL_MAP_UNSYNCHRONIZED_BIT))
intelFlush(ctx);
- /* _mesa_MapBufferRange (GL entrypoint) sets these, but the vbo module also
- * internally uses our functions directly.
- */
- obj->Offset = offset;
- obj->Length = length;
- obj->AccessFlags = access;
-
if (intel_obj->buffer == NULL) {
obj->Pointer = NULL;
return NULL;
@@ -341,19 +349,24 @@ intel_bufferobj_map_range(GLcontext * ctx,
*/
if ((access & GL_MAP_INVALIDATE_RANGE_BIT) &&
drm_intel_bo_busy(intel_obj->buffer)) {
- intel_obj->range_map_bo = drm_intel_bo_alloc(intel->bufmgr,
- "range map",
- length, 64);
- if (!(access & GL_MAP_READ_BIT) &&
- intel->intelScreen->kernel_exec_fencing) {
- drm_intel_gem_bo_map_gtt(intel_obj->range_map_bo);
- intel_obj->mapped_gtt = GL_TRUE;
+ if (access & GL_MAP_FLUSH_EXPLICIT_BIT) {
+ intel_obj->range_map_buffer = _mesa_malloc(length);
+ obj->Pointer = intel_obj->range_map_buffer;
} else {
- drm_intel_bo_map(intel_obj->range_map_bo,
- (access & GL_MAP_WRITE_BIT) != 0);
- intel_obj->mapped_gtt = GL_FALSE;
+ intel_obj->range_map_bo = drm_intel_bo_alloc(intel->bufmgr,
+ "range map",
+ length, 64);
+ if (!(access & GL_MAP_READ_BIT) &&
+ intel->intelScreen->kernel_exec_fencing) {
+ drm_intel_gem_bo_map_gtt(intel_obj->range_map_bo);
+ intel_obj->mapped_gtt = GL_TRUE;
+ } else {
+ drm_intel_bo_map(intel_obj->range_map_bo,
+ (access & GL_MAP_WRITE_BIT) != 0);
+ intel_obj->mapped_gtt = GL_FALSE;
+ }
+ obj->Pointer = intel_obj->range_map_bo->virtual;
}
- obj->Pointer = intel_obj->range_map_bo->virtual;
return obj->Pointer;
}
@@ -370,6 +383,38 @@ intel_bufferobj_map_range(GLcontext * ctx,
return obj->Pointer;
}
+/* Ideally we'd use a BO to avoid taking up cache space for the temporary
+ * data, but FlushMappedBufferRange may be followed by further writes to
+ * the pointer, so we would have to re-map after emitting our blit, which
+ * would defeat the point.
+ */
+static void
+intel_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
+ GLintptr offset, GLsizeiptr length,
+ struct gl_buffer_object *obj)
+{
+ struct intel_context *intel = intel_context(ctx);
+ struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
+ drm_intel_bo *temp_bo;
+
+ /* Unless we're in the range map using a temporary system buffer,
+ * there's no work to do.
+ */
+ if (intel_obj->range_map_buffer == NULL)
+ return;
+
+ temp_bo = drm_intel_bo_alloc(intel->bufmgr, "range map flush", length, 64);
+
+ drm_intel_bo_subdata(temp_bo, 0, length, intel_obj->range_map_buffer);
+
+ intel_emit_linear_blit(intel,
+ intel_obj->buffer, obj->Offset + offset,
+ temp_bo, 0,
+ length);
+
+ drm_intel_bo_unreference(temp_bo);
+}
+
/**
* Called via glUnmapBuffer().
@@ -385,6 +430,15 @@ intel_bufferobj_unmap(GLcontext * ctx,
assert(obj->Pointer);
if (intel_obj->sys_buffer != NULL) {
/* always keep the mapping around. */
+ } else if (intel_obj->range_map_buffer != NULL) {
+ /* Since we've emitted some blits to buffers that will (likely) be used
+ * in rendering operations in other cache domains in this batch, emit a
+ * flush. Once again, we wish for a domain tracker in libdrm to cover
+ * usage inside of a batchbuffer.
+ */
+ intel_batchbuffer_emit_mi_flush(intel->batch);
+ free(intel_obj->range_map_buffer);
+ intel_obj->range_map_buffer = NULL;
} else if (intel_obj->range_map_bo != NULL) {
if (intel_obj->mapped_gtt) {
drm_intel_gem_bo_unmap_gtt(intel_obj->range_map_bo);
@@ -392,10 +446,6 @@ intel_bufferobj_unmap(GLcontext * ctx,
drm_intel_bo_unmap(intel_obj->range_map_bo);
}
- /* We ignore the FLUSH_EXPLICIT bit and the calls associated with it.
- * It would be a small win to support that, but for now we just copy
- * the whole mapped range into place.
- */
intel_emit_linear_blit(intel,
intel_obj->buffer, obj->Offset,
intel_obj->range_map_bo, 0,
@@ -418,6 +468,8 @@ intel_bufferobj_unmap(GLcontext * ctx,
}
}
obj->Pointer = NULL;
+ obj->Offset = 0;
+ obj->Length = 0;
return GL_TRUE;
}
@@ -523,6 +575,7 @@ intelInitBufferObjectFuncs(struct dd_function_table *functions)
functions->GetBufferSubData = intel_bufferobj_get_subdata;
functions->MapBuffer = intel_bufferobj_map;
functions->MapBufferRange = intel_bufferobj_map_range;
+ functions->FlushMappedBufferRange = intel_bufferobj_flush_mapped_range;
functions->UnmapBuffer = intel_bufferobj_unmap;
functions->CopyBufferSubData = intel_bufferobj_copy_subdata;
}
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.h b/src/mesa/drivers/dri/intel/intel_buffer_objects.h
index 06a8ab9824c..bf3e08a3201 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.h
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.h
@@ -50,6 +50,7 @@ struct intel_buffer_object
buffer object? */
drm_intel_bo *range_map_bo;
+ void *range_map_buffer;
unsigned int range_map_offset;
GLsizei range_map_size;
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index 630d2adab87..bce23724b38 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -27,25 +27,9 @@
**************************************************************************/
#include "main/glheader.h"
-#include "main/enums.h"
-#include "main/image.h"
#include "main/mtypes.h"
-#include "main/arrayobj.h"
-#include "main/attrib.h"
-#include "main/blend.h"
-#include "main/bufferobj.h"
-#include "main/buffers.h"
-#include "main/depth.h"
-#include "main/enable.h"
-#include "main/macros.h"
-#include "main/matrix.h"
-#include "main/polygon.h"
-#include "main/texstate.h"
-#include "main/shaders.h"
-#include "main/stencil.h"
-#include "main/varray.h"
-#include "glapi/dispatch.h"
#include "swrast/swrast.h"
+#include "drivers/common/meta.h"
#include "intel_context.h"
#include "intel_blit.h"
@@ -140,7 +124,7 @@ intelClear(GLcontext *ctx, GLbitfield mask)
* buffer with it.
*/
if (mask & (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL)) {
- int color_bit = _mesa_ffs(mask & TRI_CLEAR_COLOR_BITS);
+ int color_bit = _mesa_ffs(mask & BUFFER_BITS_COLOR);
if (color_bit != 0) {
tri_mask |= blit_mask & (1 << (color_bit - 1));
blit_mask &= ~(1 << (color_bit - 1));
@@ -186,7 +170,7 @@ intelClear(GLcontext *ctx, GLbitfield mask)
}
DBG("\n");
}
- meta_clear_tris(&intel->meta, tri_mask);
+ _mesa_meta_clear(&intel->ctx, tri_mask);
}
if (swrast_mask) {
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 46f1a7f7205..89f99f7ffdb 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -598,6 +598,7 @@ intelInitDriverFunctions(struct dd_function_table *functions)
intelInitBufferFuncs(functions);
intelInitPixelFuncs(functions);
intelInitBufferObjectFuncs(functions);
+ intel_init_syncobj_functions(functions);
}
@@ -640,6 +641,10 @@ intelInitContext(struct intel_context *intel,
intel->maxBatchSize = BATCH_SZ;
intel->bufmgr = intelScreen->bufmgr;
+
+ if (0) /* for debug */
+ drm_intel_bufmgr_set_debug(intel->bufmgr, 1);
+
intel->ttm = intelScreen->ttm;
if (intel->ttm) {
int bo_reuse_mode;
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 0d9db5eb1da..03e7cf39d68 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -80,6 +80,12 @@ extern void intelFallback(struct intel_context *intel, GLuint bit,
#define INTEL_MAX_FIXUP 64
+struct intel_sync_object {
+ struct gl_sync_object Base;
+
+ /** Batch associated with this sync object */
+ drm_intel_bo *bo;
+};
/**
* intel_context is derived from Mesa's context class: GLcontext.
@@ -470,6 +476,8 @@ extern void intelFlush(GLcontext * ctx);
extern void intelInitDriverFunctions(struct dd_function_table *functions);
+void intel_init_syncobj_functions(struct dd_function_table *functions);
+
/* ================================================================
* intel_state.c:
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 7aee70f0a8f..2e61c556d85 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -36,6 +36,7 @@
#define need_GL_ARB_occlusion_query
#define need_GL_ARB_point_parameters
#define need_GL_ARB_shader_objects
+#define need_GL_ARB_sync
#define need_GL_ARB_vertex_array_object
#define need_GL_ARB_vertex_program
#define need_GL_ARB_vertex_shader
@@ -77,6 +78,7 @@ static const struct dri_extension card_extensions[] = {
{ "GL_ARB_multitexture", NULL },
{ "GL_ARB_point_parameters", GL_ARB_point_parameters_functions },
{ "GL_ARB_point_sprite", NULL },
+ { "GL_ARB_sync", GL_ARB_sync_functions },
{ "GL_ARB_texture_border_clamp", NULL },
{ "GL_ARB_texture_cube_map", NULL },
{ "GL_ARB_texture_env_add", NULL },
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 540e7620a9d..b543a0bbc3e 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -93,19 +93,12 @@ static const GLubyte *map_pbo( GLcontext *ctx,
return ADD_POINTERS(buf, bitmap);
}
-static GLboolean test_bit( const GLubyte *src,
- GLuint bit )
+static GLboolean test_bit( const GLubyte *src, GLuint bit )
{
return (src[bit/8] & (1<<(bit % 8))) ? 1 : 0;
}
-static GLboolean test_msb_bit(const GLubyte *src, GLuint bit)
-{
- return (src[bit/8] & (1<<(7 - (bit % 8)))) ? 1 : 0;
-}
-
-static void set_bit( GLubyte *dest,
- GLuint bit )
+static void set_bit( GLubyte *dest, GLuint bit )
{
dest[bit/8] |= 1 << (bit % 8);
}
@@ -365,9 +358,7 @@ intel_texture_bitmap(GLcontext * ctx,
GLuint texname;
GLfloat vertices[4][4];
GLint old_active_texture;
- GLubyte *unpacked_bitmap;
GLubyte *a8_bitmap;
- int x, y;
GLfloat dst_z;
/* We need a fragment program for the KIL effect */
@@ -427,22 +418,16 @@ intel_texture_bitmap(GLcontext * ctx,
return GL_FALSE;
}
- /* Convert the A1 bitmap to an A8 format suitable for glTexImage */
if (unpack->BufferObj->Name) {
bitmap = map_pbo(ctx, width, height, unpack, bitmap);
if (bitmap == NULL)
return GL_TRUE; /* even though this is an error, we're done */
}
- unpacked_bitmap = _mesa_unpack_bitmap(width, height, bitmap,
- unpack);
+
+ /* Convert the A1 bitmap to an A8 format suitable for glTexImage */
a8_bitmap = _mesa_calloc(width * height);
- for (y = 0; y < height; y++) {
- for (x = 0; x < width; x++) {
- if (test_msb_bit(unpacked_bitmap, ALIGN(width, 8) * y + x))
- a8_bitmap[y * width + x] = 0xff;
- }
- }
- _mesa_free(unpacked_bitmap);
+ _mesa_expand_bitmap(width, height, unpack, bitmap, a8_bitmap, width, 0xff);
+
if (unpack->BufferObj->Name) {
/* done with PBO so unmap it now */
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index ca796b36559..07ca8f7ddb5 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -26,18 +26,13 @@
**************************************************************************/
#include "main/glheader.h"
-#include "main/enums.h"
#include "main/image.h"
#include "main/state.h"
#include "main/mtypes.h"
-#include "main/macros.h"
#include "drivers/common/meta.h"
-#include "intel_screen.h"
#include "intel_context.h"
-#include "intel_batchbuffer.h"
#include "intel_buffers.h"
-#include "intel_blit.h"
#include "intel_regions.h"
#include "intel_pixel.h"
@@ -244,5 +239,6 @@ intelCopyPixels(GLcontext * ctx,
if (do_blit_copypixels(ctx, srcx, srcy, width, height, destx, desty, type))
return;
+ /* this will use swrast if needed */
_mesa_meta_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, type);
}
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
index a6b6824164a..8c113881d6b 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
@@ -29,8 +29,6 @@
#include "main/enums.h"
#include "main/image.h"
#include "main/mtypes.h"
-#include "main/macros.h"
-#include "main/bufferobj.h"
#include "main/teximage.h"
#include "main/texenv.h"
#include "main/texobj.h"
@@ -41,163 +39,21 @@
#include "main/enable.h"
#include "main/buffers.h"
#include "main/fbobject.h"
-#include "main/renderbuffer.h"
#include "main/depth.h"
#include "main/hash.h"
#include "main/blend.h"
-#include "main/viewport.h"
-#include "glapi/dispatch.h"
-#include "swrast/swrast.h"
+#include "drivers/common/meta.h"
-#include "intel_screen.h"
#include "intel_context.h"
#include "intel_batchbuffer.h"
#include "intel_blit.h"
#include "intel_buffers.h"
#include "intel_regions.h"
#include "intel_pixel.h"
-#include "intel_buffer_objects.h"
#include "intel_fbo.h"
-static GLboolean
-intel_texture_drawpixels(GLcontext * ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- GLenum format,
- GLenum type,
- const struct gl_pixelstore_attrib *unpack,
- const GLvoid *pixels)
-{
- struct intel_context *intel = intel_context(ctx);
- GLuint texname;
- GLfloat vertices[4][4];
- GLfloat z;
- GLint old_active_texture;
- GLenum internalFormat;
-
- /* We're going to mess with texturing with no regard to existing texture
- * state, so if there is some set up we have to bail.
- */
- if (ctx->Texture._EnabledUnits != 0) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "glDrawPixels() fallback: texturing enabled\n");
- return GL_FALSE;
- }
-
- /* Can't do textured DrawPixels with a fragment program, unless we were
- * to generate a new program that sampled our texture and put the results
- * in the fragment color before the user's program started.
- */
- if (ctx->FragmentProgram.Enabled) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "glDrawPixels() fallback: fragment program enabled\n");
- return GL_FALSE;
- }
-
- /* We don't have a way to generate fragments with stencil values which
- * will set the resulting stencil value.
- */
- if (format == GL_STENCIL_INDEX || format == GL_DEPTH_STENCIL)
- return GL_FALSE;
-
- /* Check that we can load in a texture this big. */
- if (width > (1 << (ctx->Const.MaxTextureLevels - 1)) ||
- height > (1 << (ctx->Const.MaxTextureLevels - 1))) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "glDrawPixels() fallback: bitmap too large (%dx%d)\n",
- width, height);
- return GL_FALSE;
- }
-
- /* To do DEPTH_COMPONENT, we would need to change our setup to not draw to
- * the color buffer, and sample the texture values into the fragment depth
- * in a program.
- */
- if (format == GL_DEPTH_COMPONENT) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr,
- "glDrawPixels() fallback: format == GL_DEPTH_COMPONENT\n");
- return GL_FALSE;
- }
-
- if (!ctx->Extensions.ARB_texture_non_power_of_two &&
- (!is_power_of_two(width) || !is_power_of_two(height))) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr,
- "glDrawPixels() fallback: NPOT texture\n");
- return GL_FALSE;
- }
-
- _mesa_PushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT |
- GL_CURRENT_BIT | GL_VIEWPORT_BIT);
- _mesa_PushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
-
- /* XXX: pixel store stuff */
- _mesa_Disable(GL_POLYGON_STIPPLE);
-
- old_active_texture = ctx->Texture.CurrentUnit;
- _mesa_ActiveTextureARB(GL_TEXTURE0_ARB);
- _mesa_Enable(GL_TEXTURE_2D);
- _mesa_GenTextures(1, &texname);
- _mesa_BindTexture(GL_TEXTURE_2D, texname);
- _mesa_TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- _mesa_TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- _mesa_TexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- if (type == GL_ALPHA)
- internalFormat = GL_ALPHA;
- else
- internalFormat = GL_RGBA;
- _mesa_TexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height, 0, format,
- type, pixels);
-
- meta_set_passthrough_transform(&intel->meta);
-
- /* convert rasterpos Z from [0,1] to NDC coord in [-1,1] */
- z = -1.0 + 2.0 * ctx->Current.RasterPos[2];
-
- /* RasterPos[2] already takes into account the DepthRange mapping. */
- _mesa_DepthRange(0.0, 1.0);
-
- /* Create the vertex buffer based on the current raster pos. The x and y
- * we're handed are ctx->Current.RasterPos[0,1] rounded to integers.
- * We also apply the depth. However, the W component is already multiplied
- * into ctx->Current.RasterPos[0,1,2] and we can ignore it at this point.
- */
- vertices[0][0] = x;
- vertices[0][1] = y;
- vertices[0][2] = z;
- vertices[0][3] = 1.0;
- vertices[1][0] = x + width * ctx->Pixel.ZoomX;
- vertices[1][1] = y;
- vertices[1][2] = z;
- vertices[1][3] = 1.0;
- vertices[2][0] = x + width * ctx->Pixel.ZoomX;
- vertices[2][1] = y + height * ctx->Pixel.ZoomY;
- vertices[2][2] = z;
- vertices[2][3] = 1.0;
- vertices[3][0] = x;
- vertices[3][1] = y + height * ctx->Pixel.ZoomY;
- vertices[3][2] = z;
- vertices[3][3] = 1.0;
-
- _mesa_VertexPointer(4, GL_FLOAT, 4 * sizeof(GLfloat), &vertices);
- _mesa_Enable(GL_VERTEX_ARRAY);
- meta_set_default_texrect(&intel->meta);
-
- _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
- meta_restore_texcoords(&intel->meta);
- meta_restore_transform(&intel->meta);
-
- _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + old_active_texture);
- _mesa_PopClientAttrib();
- _mesa_PopAttrib();
-
- _mesa_DeleteTextures(1, &texname);
-
- return GL_TRUE;
-}
+/** XXX compare perf of this vs. _mesa_meta_draw_pixels(STENCIL) */
static GLboolean
intel_stencil_drawpixels(GLcontext * ctx,
GLint x, GLint y,
@@ -404,17 +260,10 @@ intelDrawPixels(GLcontext * ctx,
const struct gl_pixelstore_attrib *unpack,
const GLvoid * pixels)
{
- if (intel_texture_drawpixels(ctx, x, y, width, height, format, type,
- unpack, pixels))
- return;
-
if (intel_stencil_drawpixels(ctx, x, y, width, height, format, type,
unpack, pixels))
return;
- if (INTEL_DEBUG & DEBUG_PIXEL)
- _mesa_printf("%s: fallback to swrast\n", __FUNCTION__);
-
- _swrast_DrawPixels(ctx, x, y, width, height, format, type,
- unpack, pixels);
+ _mesa_meta_draw_pixels(ctx, x, y, width, height, format, type,
+ unpack, pixels);
}
diff --git a/src/mesa/drivers/dri/intel/intel_syncobj.c b/src/mesa/drivers/dri/intel/intel_syncobj.c
new file mode 100644
index 00000000000..1286fe929bc
--- /dev/null
+++ b/src/mesa/drivers/dri/intel/intel_syncobj.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright © 2008 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.
+ *
+ * Authors:
+ * Eric Anholt <[email protected]>
+ *
+ */
+
+/** @file intel_syncobj.c
+ *
+ * Support for ARB_sync
+ *
+ * ARB_sync is implemented by flushing the current batchbuffer and keeping a
+ * reference on it. We can then check for completion or wait for compeltion
+ * using the normal buffer object mechanisms. This does mean that if an
+ * application is using many sync objects, it will emit small batchbuffers
+ * which may end up being a significant overhead. In other tests of removing
+ * gratuitous batchbuffer syncs in Mesa, it hasn't appeared to be a significant
+ * performance bottleneck, though.
+ */
+
+#include "main/simple_list.h"
+#include "main/imports.h"
+
+#include "intel_context.h"
+#include "intel_batchbuffer.h"
+#include "intel_reg.h"
+
+static struct gl_sync_object *
+intel_new_sync_object(GLcontext *ctx, GLuint id)
+{
+ struct intel_sync_object *sync;
+
+ sync = _mesa_calloc(sizeof(struct intel_sync_object));
+
+ return &sync->Base;
+}
+
+static void
+intel_delete_sync_object(GLcontext *ctx, struct gl_sync_object *s)
+{
+ struct intel_sync_object *sync = (struct intel_sync_object *)s;
+
+ drm_intel_bo_unreference(sync->bo);
+ _mesa_free(sync);
+}
+
+static void
+intel_fence_sync(GLcontext *ctx, struct gl_sync_object *s,
+ GLenum condition, GLbitfield flags)
+{
+ struct intel_context *intel = intel_context(ctx);
+ struct intel_sync_object *sync = (struct intel_sync_object *)s;
+
+ assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE);
+ intel_batchbuffer_emit_mi_flush(intel->batch);
+
+ sync->bo = intel->batch->buf;
+ drm_intel_bo_reference(sync->bo);
+
+ intelFlush(ctx);
+}
+
+/* We ignore the user-supplied timeout. This is weaselly -- we're allowed to
+ * round to an implementation-dependent accuracy, and right now our
+ * implementation "rounds" to the wait-forever value.
+ *
+ * The fix would be a new kernel function to do the GTT transition with a
+ * timeout.
+ */
+static void intel_client_wait_sync(GLcontext *ctx, struct gl_sync_object *s,
+ GLbitfield flags, GLuint64 timeout)
+{
+ struct intel_sync_object *sync = (struct intel_sync_object *)s;
+
+ if (sync->bo) {
+ drm_intel_bo_wait_rendering(sync->bo);
+ s->StatusFlag = 1;
+ drm_intel_bo_unreference(sync->bo);
+ sync->bo = NULL;
+ }
+}
+
+/* We have nothing to do for WaitSync. Our GL command stream is sequential,
+ * so given that the sync object has already flushed the batchbuffer,
+ * any batchbuffers coming after this waitsync will naturally not occur until
+ * the previous one is done.
+ */
+static void intel_server_wait_sync(GLcontext *ctx, struct gl_sync_object *s,
+ GLbitfield flags, GLuint64 timeout)
+{
+}
+
+static void intel_check_sync(GLcontext *ctx, struct gl_sync_object *s)
+{
+ struct intel_sync_object *sync = (struct intel_sync_object *)s;
+
+ if (sync->bo && drm_intel_bo_busy(sync->bo)) {
+ drm_intel_bo_unreference(sync->bo);
+ sync->bo = NULL;
+ s->StatusFlag = 1;
+ }
+}
+
+void intel_init_syncobj_functions(struct dd_function_table *functions)
+{
+ functions->NewSyncObject = intel_new_sync_object;
+ functions->DeleteSyncObject = intel_delete_sync_object;
+ functions->FenceSync = intel_fence_sync;
+ functions->CheckSync = intel_check_sync;
+ functions->ClientWaitSync = intel_client_wait_sync;
+ functions->ServerWaitSync = intel_server_wait_sync;
+}
diff --git a/src/mesa/drivers/dri/r200/Makefile b/src/mesa/drivers/dri/r200/Makefile
index 25ecbef6091..42635bf9d90 100644
--- a/src/mesa/drivers/dri/r200/Makefile
+++ b/src/mesa/drivers/dri/r200/Makefile
@@ -18,17 +18,18 @@ CS_SOURCES = radeon_cs_space_drm.c
endif
RADEON_COMMON_SOURCES = \
- radeon_texture.c \
+ radeon_bo_legacy.c \
radeon_common_context.c \
radeon_common.c \
+ radeon_cs_legacy.c \
radeon_dma.c \
+ radeon_debug.c \
+ radeon_fbo.c \
radeon_lock.c \
- radeon_bo_legacy.c \
- radeon_cs_legacy.c \
radeon_mipmap_tree.c \
+ radeon_queryobj.c \
radeon_span.c \
- radeon_fbo.c \
- radeon_queryobj.c
+ radeon_texture.c
DRIVER_SOURCES = r200_context.c \
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index 1fe68c2b4c8..1d1bea6f5f7 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -126,9 +126,9 @@ void r200EmitVbufPrim( r200ContextPtr rmesa,
radeonEmitState(&rmesa->radeon);
- if (R200_DEBUG & (DEBUG_IOCTL|DEBUG_PRIMS))
- fprintf(stderr, "%s cmd_used/4: %d prim %x nr %d\n", __FUNCTION__,
- rmesa->store.cmd_used/4, primitive, vertex_nr);
+ radeon_print(RADEON_RENDER|RADEON_SWRENDER,RADEON_VERBOSE,
+ "%s cmd_used/4: %d prim %x nr %d\n", __FUNCTION__,
+ rmesa->store.cmd_used/4, primitive, vertex_nr);
BEGIN_BATCH(3);
OUT_BATCH_PACKET3_CLIP(R200_CP_CMD_3D_DRAW_VBUF_2, 0);
@@ -175,8 +175,7 @@ void r200FlushElts(GLcontext *ctx)
r200ContextPtr rmesa = R200_CONTEXT(ctx);
int nr, elt_used = rmesa->tcl.elt_used;
- if (R200_DEBUG & (DEBUG_IOCTL|DEBUG_PRIMS))
- fprintf(stderr, "%s %x %d\n", __FUNCTION__, rmesa->tcl.hw_primitive, elt_used);
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %x %d\n", __FUNCTION__, rmesa->tcl.hw_primitive, elt_used);
assert( rmesa->radeon.dma.flush == r200FlushElts );
rmesa->radeon.dma.flush = NULL;
@@ -193,8 +192,8 @@ void r200FlushElts(GLcontext *ctx)
if (R200_ELT_BUF_SZ > elt_used)
radeonReturnDmaRegion(&rmesa->radeon, R200_ELT_BUF_SZ - elt_used);
- if (R200_DEBUG & DEBUG_SYNC) {
- fprintf(stderr, "%s: Syncing\n", __FUNCTION__);
+ if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)) {
+ radeon_print(RADEON_SYNC, RADEON_NORMAL, "%s: Syncing\n", __FUNCTION__);
radeonFinish( rmesa->radeon.glCtx );
}
}
@@ -206,8 +205,7 @@ GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
{
GLushort *retval;
- if (R200_DEBUG & DEBUG_IOCTL)
- fprintf(stderr, "%s %d prim %x\n", __FUNCTION__, min_nr, primitive);
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %d prim %x\n", __FUNCTION__, min_nr, primitive);
assert((primitive & R200_VF_PRIM_WALK_IND));
@@ -220,10 +218,6 @@ GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
radeon_bo_map(rmesa->radeon.tcl.elt_dma_bo, 1);
retval = rmesa->radeon.tcl.elt_dma_bo->ptr + rmesa->radeon.tcl.elt_dma_offset;
- if (R200_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: header prim %x \n",
- __FUNCTION__, primitive);
-
assert(!rmesa->radeon.dma.flush);
rmesa->radeon.glCtx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
rmesa->radeon.dma.flush = r200FlushElts;
@@ -231,7 +225,17 @@ GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
return retval;
}
+void r200EmitMaxVtxIndex(r200ContextPtr rmesa, int count)
+{
+ BATCH_LOCALS(&rmesa->radeon);
+ if (rmesa->radeon.radeonScreen->kernel_mm) {
+ BEGIN_BATCH_NO_AUTOSTATE(2);
+ OUT_BATCH(CP_PACKET0(R200_SE_VF_MAX_VTX_INDX, 0));
+ OUT_BATCH(count);
+ END_BATCH();
+ }
+}
void r200EmitVertexAOS( r200ContextPtr rmesa,
GLuint vertex_size,
@@ -240,8 +244,7 @@ void r200EmitVertexAOS( r200ContextPtr rmesa,
{
BATCH_LOCALS(&rmesa->radeon);
- if (R200_DEBUG & (DEBUG_PRIMS|DEBUG_IOCTL))
- fprintf(stderr, "%s: vertex_size 0x%x offset 0x%x \n",
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s: vertex_size 0x%x offset 0x%x \n",
__FUNCTION__, vertex_size, offset);
@@ -260,9 +263,9 @@ void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset)
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __FUNCTION__, nr,
- offset);
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE,
+ "%s: nr=%d, ofs=0x%08x\n",
+ __FUNCTION__, nr, offset);
BEGIN_BATCH(sz+2+ (nr*2));
OUT_BATCH_PACKET3(R200_CP_CMD_3D_LOAD_VBPNTR, sz - 1);
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 0898617a3db..3ddb5bf7d60 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -221,26 +221,6 @@ static void r200InitDriverFuncs( struct dd_function_table *functions )
functions->GetString = r200GetString;
}
-static const struct dri_debug_control debug_control[] =
-{
- { "fall", DEBUG_FALLBACKS },
- { "tex", DEBUG_TEXTURE },
- { "ioctl", DEBUG_IOCTL },
- { "prim", DEBUG_PRIMS },
- { "vert", DEBUG_VERTS },
- { "state", DEBUG_STATE },
- { "code", DEBUG_CODEGEN },
- { "vfmt", DEBUG_VFMT },
- { "vtxf", DEBUG_VFMT },
- { "verb", DEBUG_VERBOSE },
- { "dri", DEBUG_DRI },
- { "dma", DEBUG_DMA },
- { "san", DEBUG_SANITY },
- { "sync", DEBUG_SYNC },
- { "pix", DEBUG_PIXEL },
- { "mem", DEBUG_MEMORY },
- { NULL, 0 }
-};
static void r200_get_lock(radeonContextPtr radeon)
{
@@ -498,13 +478,6 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
rmesa->prefer_gart_client_texturing =
(getenv("R200_GART_CLIENT_TEXTURES") != 0);
-#if DO_DEBUG
- R200_DEBUG = driParseDebugString( getenv( "R200_DEBUG" ),
- debug_control );
- R200_DEBUG |= driParseDebugString( getenv( "RADEON_DEBUG" ),
- debug_control );
-#endif
-
tcl_mode = driQueryOptioni(&rmesa->radeon.optionCache, "tcl_mode");
if (driQueryOptionb(&rmesa->radeon.optionCache, "no_rast")) {
fprintf(stderr, "disabling 3D acceleration\n");
diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h
index c5dccf0a75a..246f98c6dc5 100644
--- a/src/mesa/drivers/dri/r200/r200_context.h
+++ b/src/mesa/drivers/dri/r200/r200_context.h
@@ -479,6 +479,11 @@ struct r200_texture_state {
#define R200_QUERYOBJ_DATA_0 1
#define R200_QUERYOBJ_CMDSIZE 2
+#define STP_CMD_0 0
+#define STP_DATA_0 1
+#define STP_CMD_1 2
+#define STP_STATE_SIZE 35
+
struct r200_hw_state {
/* Hardware state, stored as cmdbuf commands:
* -- Need to doublebuffer for
@@ -521,6 +526,7 @@ struct r200_hw_state {
struct radeon_state_atom atf;
struct radeon_state_atom spr;
struct radeon_state_atom ptp;
+ struct radeon_state_atom stp;
};
struct r200_state {
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index 4dbda39eb95..b238adb9721 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -190,7 +190,7 @@ static void r200Clear( GLcontext *ctx, GLbitfield mask )
GLuint color_mask = 0;
GLuint orig_mask = mask;
- if ( R200_DEBUG & DEBUG_IOCTL ) {
+ if ( R200_DEBUG & RADEON_IOCTL ) {
if (rmesa->radeon.sarea)
fprintf( stderr, "r200Clear %x %d\n", mask, rmesa->radeon.sarea->pfCurrentPage);
else
@@ -229,7 +229,7 @@ static void r200Clear( GLcontext *ctx, GLbitfield mask )
}
if ( mask ) {
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "%s: swrast clear, mask: %x\n", __FUNCTION__, mask);
_swrast_Clear( ctx, mask );
}
@@ -274,7 +274,7 @@ void *r200AllocateMemoryMESA(__DRIscreen *screen, GLsizei size,
drm_radeon_mem_alloc_t alloc;
int ret;
- if (R200_DEBUG & DEBUG_IOCTL)
+ if (R200_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s sz %d %f/%f/%f\n", __FUNCTION__, size, readfreq,
writefreq, priority);
@@ -314,7 +314,7 @@ void r200FreeMemoryMESA(__DRIscreen *screen, GLvoid *pointer)
drm_radeon_mem_free_t memfree;
int ret;
- if (R200_DEBUG & DEBUG_IOCTL)
+ if (R200_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s %p\n", __FUNCTION__, pointer);
if (!ctx || !(rmesa = R200_CONTEXT(ctx)) || !rmesa->radeon.radeonScreen->gartTextures.map) {
@@ -370,7 +370,7 @@ GLboolean r200IsGartMemory( r200ContextPtr rmesa, const GLvoid *pointer,
offset >= 0 &&
offset + size < rmesa->radeon.radeonScreen->gartTextures.size);
- if (R200_DEBUG & DEBUG_IOCTL)
+ if (R200_DEBUG & RADEON_IOCTL)
fprintf(stderr, "r200IsGartMemory( %p ) : %d\n", pointer, valid );
return valid;
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index 9f06d23b384..8d51aefa042 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -44,6 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drm.h"
#include "radeon_drm.h"
+extern void r200EmitMaxVtxIndex(r200ContextPtr rmesa, int count);
extern void r200EmitVertexAOS( r200ContextPtr rmesa,
GLuint vertex_size,
struct radeon_bo *bo,
diff --git a/src/mesa/drivers/dri/r200/r200_pixel.c b/src/mesa/drivers/dri/r200/r200_pixel.c
index 7201ddad2d2..95773871e02 100644
--- a/src/mesa/drivers/dri/r200/r200_pixel.c
+++ b/src/mesa/drivers/dri/r200/r200_pixel.c
@@ -53,14 +53,14 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint cpp = rmesa->radeon.radeonScreen->cpp;
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);
if ( (pitch & 63) ||
ctx->_ImageTransferState ||
packing->SwapBytes ||
packing->LsbFirst) {
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s: failed 1\n", __FUNCTION__);
return GL_FALSE;
}
@@ -68,12 +68,12 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
if ( type == GL_UNSIGNED_INT_8_8_8_8_REV &&
cpp == 4 &&
format == GL_BGRA ) {
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s: passed 2\n", __FUNCTION__);
return GL_TRUE;
}
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s: failed\n", __FUNCTION__);
return GL_FALSE;
@@ -159,14 +159,14 @@ r200TryReadPixels( GLcontext *ctx,
GLuint cpp = rmesa->radeon.radeonScreen->cpp;
GLint size = width * height * cpp;
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);
/* Only accelerate reading to GART buffers.
*/
if ( !r200IsGartMemory(rmesa, pixels,
pitch * height * rmesa->radeon.radeonScreen->cpp ) ) {
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s: dest not GART\n", __FUNCTION__);
}
@@ -174,7 +174,7 @@ r200TryReadPixels( GLcontext *ctx,
* blitter:
*/
if (!pack->Invert) {
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s: MESA_PACK_INVERT not set\n", __FUNCTION__);
return GL_FALSE;
}
@@ -207,7 +207,7 @@ r200TryReadPixels( GLcontext *ctx,
if (!clip_pixelrect(ctx, ctx->ReadBuffer, &x, &y, &width, &height,
&size)) {
UNLOCK_HARDWARE( &rmesa->radeon );
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s totally clipped -- nothing to do\n",
__FUNCTION__);
return GL_TRUE;
@@ -232,7 +232,7 @@ r200TryReadPixels( GLcontext *ctx,
y += dPriv->y;
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "readpixel blit src_pitch %d dst_pitch %d\n",
src_pitch, dst_pitch);
@@ -275,7 +275,7 @@ r200ReadPixels( GLcontext *ctx,
const struct gl_pixelstore_attrib *pack,
GLvoid *pixels )
{
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);
if (!r200TryReadPixels( ctx, x, y, width, height, format, type, pack,
@@ -293,7 +293,7 @@ static void do_draw_pix( GLcontext *ctx,
const void *pixels,
GLuint planemask)
{
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);
#if 0
@@ -388,7 +388,7 @@ r200TryDrawPixels( GLcontext *ctx,
GLuint cpp = rmesa->radeon.radeonScreen->cpp;
GLint size = height * pitch * cpp;
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);
/* check that we're drawing to exactly one color buffer */
@@ -414,7 +414,7 @@ r200TryDrawPixels( GLcontext *ctx,
/* Can't do conversions on GART reads/draws.
*/
if ( !r200IsGartMemory( rmesa, pixels, size ) ) {
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s: not GART memory\n", __FUNCTION__);
return GL_FALSE;
}
@@ -457,7 +457,7 @@ r200DrawPixels( GLcontext *ctx,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels )
{
- if (R200_DEBUG & DEBUG_PIXEL)
+ if (R200_DEBUG & RADEON_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);
if (!r200TryDrawPixels( ctx, x, y, width, height, format, type,
diff --git a/src/mesa/drivers/dri/r200/r200_sanity.c b/src/mesa/drivers/dri/r200/r200_sanity.c
index 36530c224e9..1241a926ba1 100644
--- a/src/mesa/drivers/dri/r200/r200_sanity.c
+++ b/src/mesa/drivers/dri/r200/r200_sanity.c
@@ -48,11 +48,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define MORE_VERBOSE 1
#if MORE_VERBOSE
-#define VERBOSE (R200_DEBUG & DEBUG_VERBOSE)
+#define VERBOSE (R200_DEBUG & RADEON_VERBOSE)
#define NORMAL (1)
#else
#define VERBOSE 0
-#define NORMAL (R200_DEBUG & DEBUG_VERBOSE)
+#define NORMAL (R200_DEBUG & RADEON_VERBOSE)
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index ab1ba1f283a..76852e315c1 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1028,7 +1028,7 @@ void r200UpdateMaterial( GLcontext *ctx )
if (ctx->Light.ColorMaterialEnabled)
mask &= ~ctx->Light.ColorMaterialBitmask;
- if (R200_DEBUG & DEBUG_STATE)
+ if (R200_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
if (mask & MAT_BIT_FRONT_EMISSION) {
@@ -1790,7 +1790,7 @@ static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint p, flag;
- if ( R200_DEBUG & DEBUG_STATE )
+ if ( R200_DEBUG & RADEON_STATE )
fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr( cap ),
state ? "GL_TRUE" : "GL_FALSE" );
@@ -2174,7 +2174,7 @@ void r200LightingSpaceChange( GLcontext *ctx )
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean tmp;
- if (R200_DEBUG & DEBUG_STATE)
+ if (R200_DEBUG & RADEON_STATE)
fprintf(stderr, "%s %d BEFORE %x\n", __FUNCTION__, ctx->_NeedEyeCoords,
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0]);
@@ -2190,7 +2190,7 @@ void r200LightingSpaceChange( GLcontext *ctx )
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_RESCALE_NORMALS;
}
- if (R200_DEBUG & DEBUG_STATE)
+ if (R200_DEBUG & RADEON_STATE)
fprintf(stderr, "%s %d AFTER %x\n", __FUNCTION__, ctx->_NeedEyeCoords,
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0]);
}
@@ -2233,7 +2233,7 @@ static void update_texturematrix( GLcontext *ctx )
GLuint compsel = rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL];
int unit;
- if (R200_DEBUG & DEBUG_STATE)
+ if (R200_DEBUG & RADEON_STATE)
fprintf(stderr, "%s before COMPSEL: %x\n", __FUNCTION__,
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL]);
@@ -2291,7 +2291,7 @@ static GLboolean r200ValidateBuffers(GLcontext *ctx)
struct radeon_dma_bo *dma_bo;
int i, ret;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
radeon_cs_space_reset_bos(rmesa->radeon.cmdbuf.cs);
@@ -2466,6 +2466,21 @@ static void r200WrapRunPipeline( GLcontext *ctx )
}
+static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask )
+{
+ r200ContextPtr r200 = R200_CONTEXT(ctx);
+ GLint i;
+
+ radeon_firevertices(&r200->radeon);
+
+ R200_STATECHANGE(r200, stp);
+
+ /* Must flip pattern upside down.
+ */
+ for ( i = 31 ; i >= 0; i--) {
+ r200->hw.stp.cmd[3 + i] = ((GLuint *) mask)[i];
+ }
+}
/* Initialize the driver's state functions.
*/
void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 )
@@ -2503,7 +2518,7 @@ void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 )
functions->PolygonMode = r200PolygonMode;
functions->PolygonOffset = r200PolygonOffset;
if (dri2)
- functions->PolygonStipple = radeonPolygonStipple;
+ functions->PolygonStipple = r200PolygonStipple;
else
functions->PolygonStipple = radeonPolygonStipplePreKMS;
functions->PointParameterfv = r200PointParameter;
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 4c484d067ee..7697306d889 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -271,7 +271,7 @@ CHECK( pix_zero, !ctx->ATIFragmentShader._Enabled, 0 )
CHECK( afs_pass1, (ctx->ATIFragmentShader._Enabled && (ctx->ATIFragmentShader.Current->NumPasses > 1)), 0 )
CHECK( afs, ctx->ATIFragmentShader._Enabled, 0 )
CHECK( tex_cube, rmesa->state.texture.unit[atom->idx].unitneeded & TEXTURE_CUBE_BIT, 3 + 3*5 - CUBE_STATE_SIZE )
-CHECK( tex_cube_cs, rmesa->state.texture.unit[atom->idx].unitneeded & TEXTURE_CUBE_BIT, 2 + 2*5 - CUBE_STATE_SIZE )
+CHECK( tex_cube_cs, rmesa->state.texture.unit[atom->idx].unitneeded & TEXTURE_CUBE_BIT, 2 + 4*5 - CUBE_STATE_SIZE )
TCL_CHECK( tcl_fog, ctx->Fog.Enabled, 0 )
TCL_CHECK( tcl_fog_add4, ctx->Fog.Enabled, 4 )
TCL_CHECK( tcl, GL_TRUE, 0 )
@@ -764,7 +764,7 @@ static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
for (j = 1; j <= 5; j++) {
OUT_BATCH(CP_PACKET0(R200_PP_CUBIC_OFFSET_F1_0 + (24*i) + (4 * (j-1)), 0));
OUT_BATCH_RELOC(lvl->faces[j].offset, t->mt->bo, lvl->faces[j].offset,
- RADEON_GEM_DOMAIN_VRAM, 0, 0);
+ RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
}
}
END_BATCH();
@@ -885,6 +885,10 @@ void r200InitState( r200ContextPtr rmesa )
}
}
}
+ /* polygon stipple is done with irq for non-kms */
+ if (rmesa->radeon.radeonScreen->kernel_mm) {
+ ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
+ }
for (i = 0; i < 6; i++)
if (rmesa->radeon.radeonScreen->kernel_mm)
@@ -1117,6 +1121,11 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.sci.cmd[SCI_CMD_2] = CP_PACKET0(R200_RE_WIDTH_HEIGHT, 0);
if (rmesa->radeon.radeonScreen->kernel_mm) {
+
+ rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
+ rmesa->hw.stp.cmd[STP_DATA_0] = 0;
+ rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
+
rmesa->hw.mtl[0].emit = mtl_emit;
rmesa->hw.mtl[1].emit = mtl_emit;
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 0e7d24e7e96..240fb450780 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -203,7 +203,7 @@ static void r200SetVertexFormat( GLcontext *ctx )
static void r200_predict_emit_size( r200ContextPtr rmesa )
{
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
const int vertex_array_size = 7;
const int prim_size = 3;
@@ -225,7 +225,7 @@ static void r200_predict_emit_size( r200ContextPtr rmesa )
static void r200RenderStart( GLcontext *ctx )
{
r200SetVertexFormat( ctx );
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
}
@@ -290,7 +290,7 @@ void r200ChooseVertexState( GLcontext *ctx )
void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
@@ -377,7 +377,7 @@ static void* r200_alloc_verts( r200ContextPtr rmesa, GLuint n, GLuint size)
const char *r200verts = (char *)rmesa->radeon.swtcl.verts;
#define VERT(x) (radeonVertex *)(r200verts + ((x) * vertsize * sizeof(int)))
#define VERTEX radeonVertex
-#define DO_DEBUG_VERTS (1 && (R200_DEBUG & DEBUG_VERTS))
+#define DO_DEBUG_VERTS (1 && (R200_DEBUG & RADEON_VERTS))
#undef TAG
#define TAG(x) r200_##x
@@ -688,7 +688,7 @@ void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
TCL_FALLBACK( ctx, R200_TCL_FALLBACK_RASTER, GL_TRUE );
_swsetup_Wakeup( ctx );
rmesa->radeon.swtcl.RenderIndex = ~0;
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "R200 begin rasterization fallback: 0x%x %s\n",
bit, getFallbackString(bit));
}
@@ -720,7 +720,7 @@ void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
r200ChooseVertexState( ctx );
r200ChooseRenderState( ctx );
}
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "R200 end rasterization fallback: 0x%x %s\n",
bit, getFallbackString(bit));
}
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 0f35d4d5b1f..c702910ef21 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -161,6 +161,7 @@ static GLushort *r200AllocElts( r200ContextPtr rmesa, GLuint nr )
r200EmitAOS( rmesa,
rmesa->radeon.tcl.aos_count, 0 );
+ r200EmitMaxVtxIndex(rmesa, rmesa->radeon.tcl.aos[0].count);
return r200AllocEltsOpenEnded( rmesa, rmesa->tcl.hw_primitive, nr );
}
}
@@ -416,8 +417,9 @@ static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev )
}
}
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s space %u, aos %d\n", __func__, space_required, AOS_BUFSZ(nr_aos) );
+ radeon_print(RADEON_RENDER,RADEON_VERBOSE,
+ "%s space %u, aos %d\n",
+ __func__, space_required, AOS_BUFSZ(nr_aos) );
/* flush the buffer in case we need more than is left. */
if (rcommonEnsureCmdBufSpace(&rmesa->radeon, space_required + state_size, __FUNCTION__))
return space_required + radeonCountStateEmitSize( &rmesa->radeon );
@@ -453,8 +455,7 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx,
if (rmesa->radeon.TclFallback)
return GL_TRUE; /* fallback to software t&l */
- if (R200_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ radeon_print(RADEON_RENDER, RADEON_NORMAL, "%s\n", __FUNCTION__);
if (VB->Count == 0)
return GL_FALSE;
@@ -650,7 +651,7 @@ static void transition_to_hwtnl( GLcontext *ctx )
rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] &= ~(R200_VTX_XY_FMT|R200_VTX_Z_FMT);
rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] |= R200_VTX_W0_FMT;
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "R200 end tcl fallback\n");
}
@@ -692,7 +693,7 @@ void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
if (mode) {
rmesa->radeon.TclFallback |= bit;
if (oldfallback == 0) {
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "R200 begin tcl fallback %s\n",
getFallbackString( bit ));
transition_to_swtnl( ctx );
@@ -701,7 +702,7 @@ void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
else {
rmesa->radeon.TclFallback &= ~bit;
if (oldfallback == bit) {
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "R200 end tcl fallback %s\n",
getFallbackString( bit ));
transition_to_hwtnl( ctx );
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 9f791579158..36d9e37d875 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -287,7 +287,7 @@ static void r200TexEnv( GLcontext *ctx, GLenum target,
GLuint unit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
- if ( R200_DEBUG & DEBUG_STATE ) {
+ if ( R200_DEBUG & RADEON_STATE ) {
fprintf( stderr, "%s( %s )\n",
__FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );
}
@@ -359,7 +359,7 @@ static void r200TexParameter( GLcontext *ctx, GLenum target,
{
radeonTexObj* t = radeon_tex_obj(texObj);
- if ( R200_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
+ if ( R200_DEBUG & (RADEON_STATE|RADEON_TEXTURE) ) {
fprintf( stderr, "%s( %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr( pname ) );
}
@@ -409,7 +409,7 @@ static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
+ if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) {
fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__,
(void *)texObj,
_mesa_lookup_enum_by_nr(texObj->Target));
@@ -470,7 +470,7 @@ static struct gl_texture_object *r200NewTextureObject(GLcontext * ctx,
radeonTexObj* t = CALLOC_STRUCT(radeon_tex_obj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
+ if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) {
fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__,
t, _mesa_lookup_enum_by_nr(target));
}
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 4e53672aee2..c94834752ed 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -321,7 +321,7 @@ static GLboolean r200UpdateTextureEnv( GLcontext *ctx, int unit, int slot, GLuin
assert( (texUnit->_ReallyEnabled == 0)
|| (texUnit->_Current != NULL) );
- if ( R200_DEBUG & DEBUG_TEXTURE ) {
+ if ( R200_DEBUG & RADEON_TEXTURE ) {
fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, (void *)ctx, unit );
}
@@ -1084,6 +1084,8 @@ static void disable_tex_obj_state( r200ContextPtr rmesa,
R200_STATECHANGE( rmesa, vtx );
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] &= ~(7 << (unit * 3));
+ R200_STATECHANGE( rmesa, ctx );
+ rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~(R200_TEX_0_ENABLE << unit);
if (rmesa->radeon.TclFallback & (R200_TCL_FALLBACK_TEXGEN_0<<unit)) {
TCL_FALLBACK( rmesa->radeon.glCtx, (R200_TCL_FALLBACK_TEXGEN_0<<unit), GL_FALSE);
}
@@ -1276,7 +1278,7 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
}
if (mixed_fallback) {
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback mixed texgen, 0x%x (0x%x 0x%x 0x%x 0x%x)\n",
texUnit->TexGenEnabled, texUnit->GenS.Mode, texUnit->GenT.Mode,
texUnit->GenR.Mode, texUnit->GenQ.Mode);
@@ -1302,7 +1304,7 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
texUnit->GenR.ObjectPlane,
texUnit->GenQ.ObjectPlane );
if (needtgenable & (S_BIT | T_BIT)) {
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback mixed texgen / obj plane, 0x%x\n",
texUnit->TexGenEnabled);
return GL_FALSE;
@@ -1330,7 +1332,7 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
texUnit->GenR.EyePlane,
texUnit->GenQ.EyePlane );
if (needtgenable & (S_BIT | T_BIT)) {
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback mixed texgen / eye plane, 0x%x\n",
texUnit->TexGenEnabled);
return GL_FALSE;
@@ -1380,7 +1382,7 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
default:
/* Unsupported mode, fallback:
*/
- if (R200_DEBUG & DEBUG_FALLBACKS)
+ if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback unsupported texgen, %d\n",
texUnit->GenS.Mode);
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index 620f29b5c6e..11405d7caee 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -423,7 +423,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte
~(VERT_BIT_POS | VERT_BIT_NORMAL | VERT_BIT_COLOR0 | VERT_BIT_COLOR1 |
VERT_BIT_FOG | VERT_BIT_TEX0 | VERT_BIT_TEX1 | VERT_BIT_TEX2 |
VERT_BIT_TEX3 | VERT_BIT_TEX4 | VERT_BIT_TEX5)) != 0) {
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "can't handle vert prog inputs 0x%x\n",
mesa_vp->Base.InputsRead);
}
@@ -436,7 +436,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte
(1 << VERT_RESULT_FOGC) | (1 << VERT_RESULT_TEX0) | (1 << VERT_RESULT_TEX1) |
(1 << VERT_RESULT_TEX2) | (1 << VERT_RESULT_TEX3) | (1 << VERT_RESULT_TEX4) |
(1 << VERT_RESULT_TEX5) | (1 << VERT_RESULT_PSIZ))) != 0) {
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "can't handle vert prog outputs 0x%x\n",
mesa_vp->Base.OutputsWritten);
}
@@ -551,7 +551,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte
if (mesa_vp->Base.InputsRead & (1 << i)) {
array_count++;
if (array_count > 12) {
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "more than 12 attribs used in vert prog\n");
}
return GL_FALSE;
@@ -571,13 +571,13 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte
}
if (!(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) {
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "can't handle vert prog without position output\n");
}
return GL_FALSE;
}
if (free_inputs & 1) {
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "can't handle vert prog without position input\n");
}
return GL_FALSE;
@@ -1070,7 +1070,7 @@ else {
mesa_vp->Base.NumTemporaries + u_temp_used;
}
if ((mesa_vp->Base.NumTemporaries + u_temp_used) > R200_VSF_MAX_TEMPS) {
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "Ran out of temps, num temps %d, us %d\n", mesa_vp->Base.NumTemporaries, u_temp_used);
}
return GL_FALSE;
@@ -1078,7 +1078,7 @@ else {
u_temp_i = R200_VSF_MAX_TEMPS - 1;
if(o_inst - vp->instr >= R200_VSF_MAX_INST) {
mesa_vp->Base.NumNativeInstructions = 129;
- if (R200_DEBUG & DEBUG_FALLBACKS) {
+ if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "more than 128 native instructions\n");
}
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/r200/radeon_debug.c b/src/mesa/drivers/dri/r200/radeon_debug.c
new file mode 120000
index 00000000000..c98c2e074c5
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/radeon_debug.c
@@ -0,0 +1 @@
+../radeon/radeon_debug.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/radeon_debug.h b/src/mesa/drivers/dri/r200/radeon_debug.h
new file mode 120000
index 00000000000..bd8aa28e89e
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/radeon_debug.h
@@ -0,0 +1 @@
+../radeon/radeon_debug.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/Makefile b/src/mesa/drivers/dri/r300/Makefile
index 5d1e2c0adc7..06c31ce7f2e 100644
--- a/src/mesa/drivers/dri/r300/Makefile
+++ b/src/mesa/drivers/dri/r300/Makefile
@@ -27,18 +27,19 @@ COMMON_SOURCES = \
../common/dri_util.c
RADEON_COMMON_SOURCES = \
- radeon_texture.c \
+ radeon_bo_legacy.c \
+ radeon_buffer_objects.c \
radeon_common_context.c \
radeon_common.c \
+ radeon_cs_legacy.c \
radeon_dma.c \
+ radeon_debug.c \
+ radeon_fbo.c \
radeon_lock.c \
- radeon_bo_legacy.c \
- radeon_cs_legacy.c \
radeon_mipmap_tree.c \
radeon_span.c \
- radeon_fbo.c \
- radeon_buffer_objects.c \
- radeon_queryobj.c
+ radeon_queryobj.c \
+ radeon_texture.c
DRIVER_SOURCES = \
radeon_screen.c \
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.h b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
index de0c88ed516..75069e841e3 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -222,4 +222,5 @@ struct r300_vertex_program_code {
void r300_vertex_program_dump(struct r300_vertex_program_code * vs);
-#endif /* RADEON_CODE_H */ \ No newline at end of file
+#endif /* RADEON_CODE_H */
+
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 451f1fd0fab..0fe32a5443a 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -274,7 +274,7 @@ static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
return;
}
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr,"rrb is %p %d %dx%d\n", rrb, offset, rrb->base.Width, rrb->base.Height);
cbpitch = (rrb->pitch / rrb->cpp);
if (rrb->cpp == 4)
@@ -494,7 +494,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
r300->radeon.hw.max_state_size = 2 + 2; /* reserve extra space for WAIT_IDLE and tex cache flush */
mtu = r300->radeon.glCtx->Const.MaxTextureUnits;
- if (RADEON_DEBUG & DEBUG_TEXTURE) {
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
fprintf(stderr, "Using %d maximum texture units..\n", mtu);
}
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 2ea1b826de9..6fcf209af66 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -84,6 +84,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_EXT_framebuffer_object
#define need_GL_EXT_fog_coord
#define need_GL_EXT_gpu_program_parameters
+#define need_GL_EXT_provoking_vertex
#define need_GL_EXT_secondary_color
#define need_GL_EXT_stencil_two_side
#define need_GL_ATI_separate_stencil
@@ -116,6 +117,7 @@ const struct dri_extension card_extensions[] = {
{"GL_EXT_packed_depth_stencil", NULL},
{"GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
{"GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions},
+ {"GL_EXT_provoking_vertex", GL_EXT_provoking_vertex_functions },
{"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
{"GL_EXT_shadow_funcs", NULL},
{"GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions},
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index 2e475b1adfa..e9968f9ffef 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -91,6 +91,10 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
}
src_ptr = ADD_POINTERS(mesa_ind_buf->obj->Pointer, mesa_ind_buf->ptr);
+ radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT,
+ "%s: Fixing index buffer format. type %d\n",
+ __func__, mesa_ind_buf->type);
+
if (mesa_ind_buf->type == GL_UNSIGNED_BYTE) {
GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1);
GLubyte *in = (GLubyte *)src_ptr;
@@ -146,6 +150,7 @@ static void r300SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
r300->ind_buf.bo = NULL;
return;
}
+ radeon_print(RADEON_RENDER, RADEON_TRACE, "%s\n", __func__);
#if MESA_BIG_ENDIAN
if (mesa_ind_buf->type == GL_UNSIGNED_INT) {
@@ -239,10 +244,11 @@ static void r300ConvertAttrib(GLcontext *ctx, int count, const struct gl_client_
radeonAllocDmaRegion(&r300->radeon, &attr->bo, &attr->bo_offset, sizeof(GLfloat) * input->Size * count, 32);
dst_ptr = (GLfloat *)ADD_POINTERS(attr->bo->ptr, attr->bo_offset);
- if (RADEON_DEBUG & DEBUG_FALLBACKS) {
- fprintf(stderr, "%s: Converting vertex attributes, attribute data format %x,", __FUNCTION__, input->Type);
- fprintf(stderr, "stride %d, components %d\n", stride, input->Size);
- }
+ radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT,
+ "%s: Converting vertex attributes, attribute data format %x,"
+ "stride %d, components %d\n"
+ , __FUNCTION__, input->Type
+ , stride, input->Size);
assert(src_ptr != NULL);
@@ -293,6 +299,8 @@ static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *i
mapped_named_bo = GL_TRUE;
}
+ radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT, "%s. Vertex alignment doesn't match hw requirements.\n", __func__);
+
{
GLvoid *src_ptr = ADD_POINTERS(input->BufferObj->Pointer, input->Ptr);
GLvoid *dst_ptr = ADD_POINTERS(attr->bo->ptr, attr->bo_offset);
@@ -320,6 +328,7 @@ static void r300TranslateAttrib(GLcontext *ctx, GLuint attr, int count, const st
GLenum type;
GLuint stride;
+ radeon_print(RADEON_RENDER, RADEON_TRACE, "%s\n", __func__);
stride = (input->StrideB == 0) ? getTypeSize(input->Type) * input->Size : input->StrideB;
if (input->Type == GL_DOUBLE || input->Type == GL_UNSIGNED_INT || input->Type == GL_INT ||
@@ -442,6 +451,7 @@ static void r300SetVertexFormat(GLcontext *ctx, const struct gl_client_array *ar
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_vertex_buffer *vbuf = &r300->vbuf;
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s\n", __func__);
{
int i, tmp;
@@ -474,6 +484,9 @@ static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *in
GLuint stride;
int ret;
int i, index;
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE,
+ "%s: count %d num_attribs %d\n",
+ __func__, count, vbuf->num_attribs);
for (index = 0; index < vbuf->num_attribs; index++) {
struct radeon_aos *aos = &r300->radeon.tcl.aos[index];
@@ -550,6 +563,7 @@ static void r300FreeData(GLcontext *ctx)
* to prevent double unref in radeonReleaseArrays
* called during context destroy
*/
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s\n", __func__);
r300ContextPtr r300 = R300_CONTEXT(ctx);
{
int i;
@@ -592,8 +606,7 @@ static GLuint r300PredictTryDrawPrimsSize(GLcontext *ctx, GLuint nr_prims)
else
dwords += state_size;
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: total prediction size is %d.\n", __FUNCTION__, dwords);
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s: total prediction size is %d.\n", __FUNCTION__, dwords);
return dwords;
}
@@ -608,8 +621,7 @@ static GLboolean r300TryDrawPrims(GLcontext *ctx,
struct r300_context *r300 = R300_CONTEXT(ctx);
GLuint i;
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: %u (%d-%d) cs begin at %d\n",
+ radeon_print(RADEON_RENDER, RADEON_NORMAL, "%s: %u (%d-%d) cs begin at %d\n",
__FUNCTION__, nr_prims, min_index, max_index, r300->radeon.cmdbuf.cs->cdw );
if (ctx->NewState)
@@ -654,8 +666,7 @@ static GLboolean r300TryDrawPrims(GLcontext *ctx,
r300FreeData(ctx);
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: %u (%d-%d) cs ending at %d\n",
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s: %u (%d-%d) cs ending at %d\n",
__FUNCTION__, nr_prims, min_index, max_index, r300->radeon.cmdbuf.cs->cdw );
if (emit_end < r300->radeon.cmdbuf.cs->cdw)
@@ -684,6 +695,9 @@ static void r300DrawPrims(GLcontext *ctx,
}
if (min_index) {
+ radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT,
+ "%s: Rebasing primitives. %p nr_prims %d min_index %u max_index %u\n",
+ __func__, prim, nr_prims, min_index, max_index);
vbo_rebase_prims( ctx, arrays, prim, nr_prims, ib, min_index, max_index, r300DrawPrims );
return;
}
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index 588b9c08250..7f8a0174595 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -203,7 +203,7 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
struct r300_fragment_program_compiler compiler;
rc_init(&compiler.Base);
- compiler.Base.Debug = (RADEON_DEBUG & DEBUG_PIXEL) ? GL_TRUE : GL_FALSE;
+ compiler.Base.Debug = (RADEON_DEBUG & RADEON_PIXEL) ? GL_TRUE : GL_FALSE;
compiler.code = &fp->code;
compiler.state = fp->state;
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index 3303078e39a..5cb04e2bb6d 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -138,7 +138,7 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags,
GLuint cbpitch = 0;
r300ContextPtr rmesa = r300;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s: buffer %p (%i,%i %ix%i)\n",
__FUNCTION__, rrb, dPriv->x, dPriv->y,
dPriv->w, dPriv->h);
@@ -705,7 +705,7 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask)
int i, ret;
struct gl_framebuffer *fb = ctx->DrawBuffer;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "r300Clear\n");
if (!r300->radeon.radeonScreen->driScreen->dri2.enabled) {
@@ -767,7 +767,7 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask)
}
if (swrast_mask) {
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "%s: swrast clear, mask: %x\n",
__FUNCTION__, swrast_mask);
_swrast_Clear(ctx, swrast_mask);
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 39b4b61a105..98512d778e3 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -1022,15 +1022,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
R300_GA_COLOR_CONTROL_RGB0_SHADING_GOURAUD | R300_GA_COLOR_CONTROL_ALPHA0_SHADING_GOURAUD | \
R300_GA_COLOR_CONTROL_RGB1_SHADING_GOURAUD | R300_GA_COLOR_CONTROL_ALPHA1_SHADING_GOURAUD | \
R300_GA_COLOR_CONTROL_RGB2_SHADING_GOURAUD | R300_GA_COLOR_CONTROL_ALPHA2_SHADING_GOURAUD | \
- R300_GA_COLOR_CONTROL_RGB3_SHADING_GOURAUD | R300_GA_COLOR_CONTROL_ALPHA3_SHADING_GOURAUD | \
- R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST )
+ R300_GA_COLOR_CONTROL_RGB3_SHADING_GOURAUD | R300_GA_COLOR_CONTROL_ALPHA3_SHADING_GOURAUD)
/** TODO: might be candidate for removal, the GOURAUD stuff also looks buggy to me */
# define R300_RE_SHADE_MODEL_FLAT ( \
R300_GA_COLOR_CONTROL_RGB0_SHADING_FLAT | R300_GA_COLOR_CONTROL_ALPHA0_SHADING_FLAT | \
R300_GA_COLOR_CONTROL_RGB1_SHADING_FLAT | R300_GA_COLOR_CONTROL_ALPHA1_SHADING_GOURAUD | \
R300_GA_COLOR_CONTROL_RGB2_SHADING_FLAT | R300_GA_COLOR_CONTROL_ALPHA2_SHADING_FLAT | \
- R300_GA_COLOR_CONTROL_RGB3_SHADING_FLAT | R300_GA_COLOR_CONTROL_ALPHA3_SHADING_GOURAUD | \
- R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST )
+ R300_GA_COLOR_CONTROL_RGB3_SHADING_FLAT | R300_GA_COLOR_CONTROL_ALPHA3_SHADING_GOURAUD)
/* Specifies red & green components of fill color -- S312 format -- Backwards comp. */
#define R300_GA_SOLID_RG 0x427c
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 446cf40131e..b5ddfdc9f82 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -221,7 +221,7 @@ static void r300EmitAOS(r300ContextPtr rmesa, GLuint nr, GLuint offset)
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __FUNCTION__, nr,
offset);
@@ -447,7 +447,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
if (mode) {
if ((fallback_warn & bit) == 0) {
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
_mesa_fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(bit));
fallback_warn |= bit;
}
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 4fe9175b61d..d4c3ecee669 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1279,7 +1279,7 @@ static void r300SetupTextures(GLcontext * ctx)
r300->hw.txe.cmd[R300_TXE_ENABLE] = 0x0;
mtu = r300->radeon.glCtx->Const.MaxTextureUnits;
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "mtu=%d\n", mtu);
if (mtu > R300_MAX_TEXTURE_UNITS) {
@@ -1304,7 +1304,7 @@ static void r300SetupTextures(GLcontext * ctx)
t->pp_txformat & 0xff);
}
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr,
"Activating texture unit %d\n", i);
@@ -1390,7 +1390,7 @@ static void r300SetupTextures(GLcontext * ctx)
r300->vtbl.SetupFragmentShaderTextures(ctx, tmu_mappings);
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "TX_ENABLE: %08x last_hw_tmu=%d\n",
r300->hw.txe.cmd[R300_TXE_ENABLE], last_hw_tmu);
}
@@ -1660,7 +1660,7 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count,
static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s( %s = %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(cap),
state ? "GL_TRUE" : "GL_FALSE");
@@ -1737,7 +1737,7 @@ static void r300ResetHwState(r300ContextPtr r300)
has_tcl = r300->options.hw_tcl_enabled;
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
radeon_firevertices(&r300->radeon);
@@ -2253,6 +2253,14 @@ static void r300InvalidateState(GLcontext * ctx, GLuint new_state)
R300_STATECHANGE(r300, zb);
}
+ if (new_state & (_NEW_LIGHT)) {
+ R300_STATECHANGE(r300, shade2);
+ if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION)
+ r300->hw.shade2.cmd[1] |= R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST;
+ else
+ r300->hw.shade2.cmd[1] &= ~R300_GA_COLOR_CONTROL_PROVOKING_VERTEX_LAST;
+ }
+
r300->radeon.NewGLState |= new_state;
}
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index b3793e28d58..ee2c71e1a7f 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -80,10 +80,11 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
GLuint fp_reads = rmesa->selected_fp->InputsRead;
struct vertex_attribute *attrs = rmesa->vbuf.attribs;
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__);
rmesa->swtcl.coloroffset = rmesa->swtcl.specoffset = 0;
rmesa->radeon.swtcl.vertex_attr_count = 0;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
/* We always want non Ndc coords format */
@@ -229,6 +230,7 @@ static void r300PrepareVertices(GLcontext *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
GLuint InputsRead, OutputsWritten;
+ radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__);
r300ChooseSwtclVertexFormat(ctx, &InputsRead, &OutputsWritten);
r300SetupVAP(ctx, InputsRead, OutputsWritten);
@@ -262,6 +264,10 @@ static void r300_predict_emit_size( r300ContextPtr rmesa )
rmesa->radeon.swtcl.emit_prediction += rmesa->radeon.cmdbuf.cs->cdw
+ vertex_size + scissor_size + prim_size + cache_flush_size * 2 + pre_emit_state;
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE,
+ "%s, size %d\n",
+ __func__, rmesa->radeon.cmdbuf.cs->cdw
+ + vertex_size + scissor_size + prim_size + cache_flush_size * 2 + pre_emit_state);
}
}
@@ -498,8 +504,7 @@ static void r300ChooseRenderState( GLcontext *ctx )
r300ContextPtr rmesa = R300_CONTEXT(ctx);
GLuint index = 0;
GLuint flags = ctx->_TriangleCaps;
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __func__);
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__);
if (flags & DD_TRI_UNFILLED) index |= R300_UNFILLED_BIT;
@@ -526,8 +531,7 @@ static void r300ChooseRenderState( GLcontext *ctx )
void r300RenderStart(GLcontext *ctx)
{
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __func__);
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__);
r300ContextPtr rmesa = R300_CONTEXT( ctx );
r300ChooseRenderState(ctx);
@@ -554,8 +558,7 @@ void r300RenderFinish(GLcontext *ctx)
static void r300RasterPrimitive( GLcontext *ctx, GLuint hwprim )
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __func__);
+ radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__);
if (rmesa->radeon.swtcl.hw_primitive != hwprim) {
R300_NEWPRIM( rmesa );
@@ -568,8 +571,7 @@ void r300RenderPrimitive(GLcontext *ctx, GLenum prim)
r300ContextPtr rmesa = R300_CONTEXT(ctx);
rmesa->radeon.swtcl.render_primitive = prim;
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __func__);
+ radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__);
if ((prim == GL_TRIANGLES) && (ctx->_TriangleCaps & DD_TRI_UNFILLED))
return;
@@ -579,7 +581,7 @@ void r300RenderPrimitive(GLcontext *ctx, GLenum prim)
void r300ResetLineStipple(GLcontext *ctx)
{
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
}
@@ -588,8 +590,7 @@ void r300InitSwtcl(GLcontext *ctx)
TNLcontext *tnl = TNL_CONTEXT(ctx);
r300ContextPtr rmesa = R300_CONTEXT(ctx);
static int firsttime = 1;
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __func__);
+ radeon_print(RADEON_SWRENDER, RADEON_NORMAL, "%s\n", __func__);
if (firsttime) {
init_rast_tab();
@@ -628,8 +629,8 @@ static void r300EmitVertexAOS(r300ContextPtr rmesa, GLuint vertex_size, struct r
{
BATCH_LOCALS(&rmesa->radeon);
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s: vertex_size %d, offset 0x%x \n",
+ radeon_print(RADEON_SWRENDER, RADEON_TRACE,
+ "%s: vertex_size %d, offset 0x%x \n",
__FUNCTION__, vertex_size, offset);
BEGIN_BATCH(7);
@@ -644,7 +645,7 @@ static void r300EmitVbufPrim(r300ContextPtr rmesa, GLuint primitive, GLuint vert
{
BATCH_LOCALS(&rmesa->radeon);
int type, num_verts;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
type = r300PrimitiveType(rmesa, primitive);
@@ -658,8 +659,7 @@ static void r300EmitVbufPrim(r300ContextPtr rmesa, GLuint primitive, GLuint vert
void r300_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
{
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __func__);
+ radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__);
r300ContextPtr rmesa = R300_CONTEXT(ctx);
r300EmitCacheFlush(rmesa);
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 0af5bb4f469..433e5a87d48 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -137,7 +137,7 @@ static void r300SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa
| R300_TX_MIN_FILTER_ANISO
| R300_TX_MIN_FILTER_MIP_LINEAR
| aniso_filter(anisotropy);
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr, "Using maximum anisotropy of %f\n", anisotropy);
return;
}
@@ -197,7 +197,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
{
radeonTexObj* t = radeon_tex_obj(texObj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
+ if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) {
fprintf(stderr, "%s( %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(pname));
}
@@ -260,7 +260,7 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
r300ContextPtr rmesa = R300_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
+ if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) {
fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__,
(void *)texObj,
_mesa_lookup_enum_by_nr(texObj->Target));
@@ -302,7 +302,7 @@ static struct gl_texture_object *r300NewTextureObject(GLcontext * ctx,
radeonTexObj* t = CALLOC_STRUCT(radeon_tex_obj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
+ if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) {
fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__,
t, _mesa_lookup_enum_by_nr(target));
}
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index b7d5429dc57..d5e2cf9b14d 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -216,7 +216,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
_mesa_memcpy(&vp->key, wanted_key, sizeof(vp->key));
rc_init(&compiler.Base);
- compiler.Base.Debug = (RADEON_DEBUG & DEBUG_VERTS) ? GL_TRUE : GL_FALSE;
+ compiler.Base.Debug = (RADEON_DEBUG & RADEON_VERTS) ? GL_TRUE : GL_FALSE;
compiler.code = &vp->code;
compiler.RequiredOutputs = compute_required_outputs(vp->Base, vp->key.FpReads);
diff --git a/src/mesa/drivers/dri/r300/radeon_debug.c b/src/mesa/drivers/dri/r300/radeon_debug.c
new file mode 120000
index 00000000000..c98c2e074c5
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/radeon_debug.c
@@ -0,0 +1 @@
+../radeon/radeon_debug.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/radeon_debug.h b/src/mesa/drivers/dri/r300/radeon_debug.h
new file mode 120000
index 00000000000..bd8aa28e89e
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/radeon_debug.h
@@ -0,0 +1 @@
+../radeon/radeon_debug.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/Makefile b/src/mesa/drivers/dri/r600/Makefile
index 3c3100ab914..d925a2dfe39 100644
--- a/src/mesa/drivers/dri/r600/Makefile
+++ b/src/mesa/drivers/dri/r600/Makefile
@@ -27,16 +27,17 @@ COMMON_SOURCES = \
../common/dri_util.c
RADEON_COMMON_SOURCES = \
- radeon_texture.c \
+ radeon_bo_legacy.c \
radeon_common_context.c \
radeon_common.c \
+ radeon_cs_legacy.c \
radeon_dma.c \
+ radeon_debug.c \
+ radeon_fbo.c \
radeon_lock.c \
- radeon_bo_legacy.c \
- radeon_cs_legacy.c \
radeon_mipmap_tree.c \
radeon_span.c \
- radeon_fbo.c \
+ radeon_texture.c \
radeon_queryobj.c
DRIVER_SOURCES = \
diff --git a/src/mesa/drivers/dri/r600/r600_cmdbuf.c b/src/mesa/drivers/dri/r600/r600_cmdbuf.c
index 65930ff589f..3cfe03a45f7 100644
--- a/src/mesa/drivers/dri/r600/r600_cmdbuf.c
+++ b/src/mesa/drivers/dri/r600/r600_cmdbuf.c
@@ -192,9 +192,9 @@ static int r600_cs_begin(struct radeon_cs *cs,
if (cs->cdw + ndw > cs->ndw) {
uint32_t tmp, *ptr;
- int num = (ndw > 0x3FF) ? ndw : 0x3FF;
+ int num = (ndw > 0x400) ? ndw : 0x400;
- tmp = (cs->cdw + 1 + num) & (~num);
+ tmp = (cs->cdw + num + 0x3FF) & (~0x3FF);
ptr = (uint32_t*)realloc(cs->packets, 4 * tmp);
if (ptr == NULL) {
return -ENOMEM;
@@ -229,6 +229,14 @@ static int r600_cs_end(struct radeon_cs *cs,
return -EPIPE;
}
+ if (cs->cdw > cs->ndw) {
+ fprintf(stderr, "CS section overflow at (%s,%s,%d) cdw %d ndw %d\n",
+ cs->section_file, cs->section_func, cs->section_line,cs->cdw,cs->ndw);
+ fprintf(stderr, "CS section end at (%s,%s,%d)\n",
+ file, func, line);
+ assert(0);
+ }
+
return 0;
}
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index 6a066f35105..07a7bcf11f1 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -56,6 +56,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drivers/common/driverfuncs.h"
+#include "radeon_debug.h"
#include "r600_context.h"
#include "radeon_common_context.h"
#include "radeon_span.h"
@@ -84,6 +85,7 @@ int hw_tcl_on = 1;
#define need_GL_EXT_framebuffer_object
#define need_GL_EXT_fog_coord
#define need_GL_EXT_gpu_program_parameters
+#define need_GL_EXT_provoking_vertex
#define need_GL_EXT_secondary_color
#define need_GL_EXT_stencil_two_side
#define need_GL_ATI_separate_stencil
@@ -116,6 +118,7 @@ const struct dri_extension card_extensions[] = {
{"GL_EXT_packed_depth_stencil", NULL},
{"GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
{"GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions},
+ {"GL_EXT_provoking_vertex", GL_EXT_provoking_vertex_functions },
{"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
{"GL_EXT_shadow_funcs", NULL},
{"GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions},
@@ -127,6 +130,7 @@ const struct dri_extension card_extensions[] = {
{"GL_EXT_texture_lod_bias", NULL},
{"GL_EXT_texture_mirror_clamp", NULL},
{"GL_EXT_texture_rectangle", NULL},
+ {"GL_EXT_texture_sRGB", NULL},
{"GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions},
{"GL_ATI_texture_env_combine3", NULL},
{"GL_ATI_texture_mirror_once", NULL},
@@ -225,8 +229,10 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
/* Allocate the R600 context */
r600 = (context_t*) CALLOC(sizeof(*r600));
- if (!r600)
+ if (!r600) {
+ radeon_error("Failed to allocate memory for context.\n");
return GL_FALSE;
+ }
if (!(screen->chip_flags & RADEON_CHIPSET_TCL))
hw_tcl_on = future_hw_tcl_on = 0;
@@ -255,6 +261,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
if (!radeonInitContext(&r600->radeon, &functions,
glVisual, driContextPriv,
sharedContextPrivate)) {
+ radeon_error("Initializing context failed.\n");
FREE(r600);
return GL_FALSE;
}
@@ -347,6 +354,8 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
+ radeon_init_debug();
+
driInitExtensions(ctx, card_extensions, GL_TRUE);
if (r600->radeon.radeonScreen->kernel_mm)
driInitExtensions(ctx, mm_extensions, GL_FALSE);
@@ -375,7 +384,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
TNL_CONTEXT(ctx)->Driver.RunPipeline = r600RunPipeline;
if (driQueryOptionb(&r600->radeon.optionCache, "no_rast")) {
- fprintf(stderr, "disabling 3D acceleration\n");
+ radeon_warning("disabling 3D acceleration\n");
#if R200_MERGED
FALLBACK(&r600->radeon, RADEON_FALLBACK_DISABLE, 1);
#endif
diff --git a/src/mesa/drivers/dri/r600/r600_emit.c b/src/mesa/drivers/dri/r600/r600_emit.c
index f8c56e7774b..5c250c2418a 100644
--- a/src/mesa/drivers/dri/r600/r600_emit.c
+++ b/src/mesa/drivers/dri/r600/r600_emit.c
@@ -60,28 +60,30 @@ GLboolean r600EmitShader(GLcontext * ctx,
radeonContextPtr radeonctx = RADEON_CONTEXT(ctx);
struct radeon_bo * pbo;
uint32_t *out;
-
shader_again_alloc:
pbo = radeon_bo_open(radeonctx->radeonScreen->bom,
- 0,
- sizeinDWORD * 4,
- 256,
- RADEON_GEM_DOMAIN_GTT,
- 0);
+ 0,
+ sizeinDWORD * 4,
+ 256,
+ RADEON_GEM_DOMAIN_GTT,
+ 0);
+
+ radeon_print(RADEON_SHADER, RADEON_NORMAL, "%s %p size %d: %s\n", __func__, pbo, sizeinDWORD, szShaderUsage);
if (!pbo) {
+ radeon_print(RADEON_MEMORY | RADEON_CS, RADEON_IMPORTANT, "No memory for buffer object. Flushing command buffer.\n");
rcommonFlushCmdBuf(radeonctx, __FUNCTION__);
goto shader_again_alloc;
}
radeon_cs_space_add_persistent_bo(radeonctx->cmdbuf.cs,
- pbo,
- RADEON_GEM_DOMAIN_GTT, 0);
+ pbo,
+ RADEON_GEM_DOMAIN_GTT, 0);
- if (radeon_cs_space_check_with_bo(radeonctx->cmdbuf.cs,
- pbo,
- RADEON_GEM_DOMAIN_GTT, 0)) {
- fprintf(stderr,"failure to revalidate BOs - badness\n");
+ if (radeon_cs_space_check_with_bo(radeonctx->cmdbuf.cs,
+ pbo,
+ RADEON_GEM_DOMAIN_GTT, 0)) {
+ radeon_error("failure to revalidate BOs - badness\n");
return GL_FALSE;
}
@@ -103,6 +105,8 @@ GLboolean r600DeleteShader(GLcontext * ctx,
{
struct radeon_bo * pbo = (struct radeon_bo *)shaderbo;
+ radeon_print(RADEON_SHADER, RADEON_NORMAL, "%s: %p\n", __func__, pbo);
+
if (pbo) {
if (pbo->ptr)
radeon_bo_unmap(pbo);
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index a06a1fa9214..d105b90cd18 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -67,7 +67,7 @@ static unsigned int translate_wrap_mode(GLenum wrapmode)
case GL_MIRROR_CLAMP_TO_EDGE_EXT: return SQ_TEX_MIRROR_ONCE_LAST_TEXEL;
case GL_MIRROR_CLAMP_TO_BORDER_EXT: return SQ_TEX_MIRROR_ONCE_BORDER;
default:
- _mesa_problem(NULL, "bad wrap mode in %s", __FUNCTION__);
+ radeon_error("bad wrap mode in %s", __FUNCTION__);
return 0;
}
}
@@ -208,8 +208,7 @@ static void r600SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa
| R300_TX_MIN_FILTER_ANISO
| R300_TX_MIN_FILTER_MIP_LINEAR
| aniso_filter(anisotropy);*/
- if (RADEON_DEBUG & DEBUG_TEXTURE)
- fprintf(stderr, "Using maximum anisotropy of %f\n", anisotropy);
+ radeon_print(RADEON_TEXTURE, RADEON_NORMAL, "Using maximum anisotropy of %f\n", anisotropy);
return;
}
@@ -288,10 +287,9 @@ static void r600TexParameter(GLcontext * ctx, GLenum target,
{
radeonTexObj* t = radeon_tex_obj(texObj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
- fprintf(stderr, "%s( %s )\n", __FUNCTION__,
+ radeon_print(RADEON_STATE | RADEON_TEXTURE, RADEON_VERBOSE,
+ "%s( %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(pname));
- }
switch (pname) {
case GL_TEXTURE_MIN_FILTER:
@@ -351,11 +349,10 @@ static void r600DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
context_t* rmesa = R700_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
- fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__,
+ radeon_print(RADEON_STATE | RADEON_TEXTURE, RADEON_NORMAL,
+ "%s( %p (target = %s) )\n", __FUNCTION__,
(void *)texObj,
_mesa_lookup_enum_by_nr(texObj->Target));
- }
if (rmesa) {
int i;
@@ -393,10 +390,9 @@ static struct gl_texture_object *r600NewTextureObject(GLcontext * ctx,
radeonTexObj* t = CALLOC_STRUCT(radeon_tex_obj);
- if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_TEXTURE)) {
- fprintf(stderr, "%s( %p (target = %s) )\n", __FUNCTION__,
+ radeon_print(RADEON_STATE | RADEON_TEXTURE, RADEON_NORMAL,
+ "%s( %p (target = %s) )\n", __FUNCTION__,
t, _mesa_lookup_enum_by_nr(target));
- }
_mesa_initialize_texture_object(&t->base, name, target);
t->base.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index 9f1bf45246f..fff6e743860 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -49,6 +49,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r700_state.h"
#include "radeon_mipmap_tree.h"
#include "r600_tex.h"
+#include "r700_fragprog.h"
+#include "r700_vertprog.h"
void r600UpdateTextureState(GLcontext * ctx);
@@ -529,6 +531,49 @@ static GLboolean r600GetTexFormat(struct gl_texture_object *tObj, GLuint mesa_fo
return GL_FALSE;
}
break;
+ /* EXT_texture_sRGB */
+ case MESA_FORMAT_SRGBA8:
+ SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ SETbit(t->SQ_TEX_RESOURCE4, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit);
+ break;
+ case MESA_FORMAT_SLA8:
+ SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ SETbit(t->SQ_TEX_RESOURCE4, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit);
+ break;
+ case MESA_FORMAT_SL8: /* X, X, X, ONE */
+ SETfield(t->SQ_TEX_RESOURCE1, FMT_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ SETbit(t->SQ_TEX_RESOURCE4, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit);
+ break;
default:
/* Not supported format */
return GL_FALSE;
@@ -567,7 +612,7 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
if (!t->image_override) {
if (!r600GetTexFormat(texObj, firstImage->TexFormat->MesaFormat)) {
- _mesa_problem(NULL, "unexpected texture format in %s",
+ radeon_error("unexpected texture format in %s\n",
__FUNCTION__);
return;
}
@@ -593,7 +638,7 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
SETfield(t->SQ_TEX_RESOURCE1, 0, TEX_DEPTH_shift, TEX_DEPTH_mask);
break;
default:
- _mesa_problem(NULL, "unexpected texture target type in %s", __FUNCTION__);
+ radeon_error("unexpected texture target type in %s\n", __FUNCTION__);
return;
}
@@ -647,6 +692,7 @@ GLboolean r600ValidateBuffers(GLcontext * ctx)
{
context_t *rmesa = R700_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
+ struct radeon_bo *pbo;
int i;
int ret;
@@ -675,9 +721,7 @@ GLboolean r600ValidateBuffers(GLcontext * ctx)
continue;
if (!r600_validate_texture(ctx, ctx->Texture.Unit[i]._Current)) {
- _mesa_warning(ctx,
- "failed to validate texture for unit %d.\n",
- i);
+ radeon_warning("failed to validate texture for unit %d.\n", i);
}
t = radeon_tex_obj(ctx->Texture.Unit[i]._Current);
if (t->image_override && t->bo)
@@ -690,6 +734,18 @@ GLboolean r600ValidateBuffers(GLcontext * ctx)
RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
}
+ pbo = (struct radeon_bo *)r700GetActiveFpShaderBo(ctx);
+ if (pbo) {
+ radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, pbo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ }
+
+ pbo = (struct radeon_bo *)r700GetActiveVpShaderBo(ctx);
+ if (pbo) {
+ radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, pbo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ }
+
ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs, first_elem(&rmesa->radeon.dma.reserved)->bo, RADEON_GEM_DOMAIN_GTT, 0);
if (ret)
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 834c23593b4..2d8480daaf7 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -33,8 +33,8 @@
#include "main/mtypes.h"
#include "main/imports.h"
+#include "radeon_debug.h"
#include "r600_context.h"
-#include "r700_debug.h"
#include "r700_assembler.h"
@@ -366,8 +366,8 @@ unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm)
case SQ_OP2_INST_COS:
return 1;
- default: r700_error(TODO_ASM_NEEDIMPINST,
- "Need instruction operand number. \n");;
+ default: radeon_error(
+ "Need instruction operand number for %x.\n", pAsm->D.dst.opcode);
};
return 3;
@@ -531,7 +531,7 @@ int check_current_clause(r700_AssemblerBase* pAsm,
case CF_EMPTY_CLAUSE:
break;
default:
- r700_error(ERROR_ASM_VTX_CLAUSE,
+ radeon_error(
"Unknown CF_CLAUSE_TYPE (%d) in check_current_clause. \n", (int) new_clause_type);
return GL_FALSE;
}
@@ -565,7 +565,7 @@ int check_current_clause(r700_AssemblerBase* pAsm,
}
else
{
- r700_error(ERROR_ASM_ALLOCEXPORTCF,
+ radeon_error(
"Error allocating new EXPORT CF instruction in check_current_clause. \n");
return GL_FALSE;
}
@@ -578,7 +578,7 @@ int check_current_clause(r700_AssemblerBase* pAsm,
pAsm->cf_current_clause_type = CF_OTHER_CLAUSE;
break;
default:
- r700_error(ERROR_ASM_UNKOWNCLAUSE,
+ radeon_error(
"Unknown CF_CLAUSE_TYPE (%d) in check_current_clause. \n", (int) new_clause_type);
return GL_FALSE;
}
@@ -611,7 +611,7 @@ GLboolean add_vfetch_instruction(r700_AssemblerBase* pAsm,
}
else
{
- r700_error(ERROR_ASM_ALLOCVTXCF, "Could not allocate a new VFetch CF instruction.");
+ radeon_error("Could not allocate a new VFetch CF instruction.\n");
return GL_FALSE;
}
@@ -661,7 +661,7 @@ GLboolean add_tex_instruction(r700_AssemblerBase* pAsm,
}
else
{
- r700_error(ERROR_ASM_ALLOCTEXCF, "Could not allocate a new TEX CF instruction.");
+ radeon_error("Could not allocate a new TEX CF instruction.\n");
return GL_FALSE;
}
@@ -1047,7 +1047,7 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm,
}
break;
default:
- r700_error(ERROR_ASM_SRCARGUMENT, "Invalid source argument type");
+ radeon_error("Invalid source argument type\n");
return GL_FALSE;
}
}
@@ -1094,7 +1094,7 @@ GLboolean assemble_dst(r700_AssemblerBase *pAsm)
}
break;
default:
- r700_error(ERROR_ASM_DSTARGUMENT, "Invalid destination output argument type");
+ radeon_error("Invalid destination output argument type\n");
return GL_FALSE;
}
@@ -1134,7 +1134,7 @@ GLboolean tex_dst(r700_AssemblerBase *pAsm)
}
else
{
- r700_error(ERROR_ASM_DSTARGUMENT, "Invalid destination output argument type");
+ radeon_error("Invalid destination output argument type\n");
return GL_FALSE;
}
@@ -1188,7 +1188,7 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
}
else
{
- r700_error(ERROR_ASM_BADTEXSRC, "Invalid source texcoord for TEX instruction");
+ radeon_error("Invalid source texcoord for TEX instruction\n");
return GL_FALSE;
}
@@ -1269,7 +1269,7 @@ GLboolean assemble_tex_instruction(r700_AssemblerBase *pAsm, GLboolean normalize
}
else
{
- r700_error(ERROR_ASM_TEXDSTBADTYPE, "Only temp destination registers supported for TEX dest regs.");
+ radeon_error("Only temp destination registers supported for TEX dest regs.\n");
return GL_FALSE;
}
@@ -1362,7 +1362,7 @@ GLboolean assemble_alu_src(R700ALUInstruction* alu_instruction_ptr,
}
else
{
- r700_error(ERROR_ASM_ALUSRCBADTYPE, "Source (%d) register type (%d) not one of TEMP, INPUT, or CONSTANT.",
+ radeon_error("Source (%d) register type (%d) not one of TEMP, INPUT, or CONSTANT.\n",
source_index, pSource->rtype);
return GL_FALSE;
}
@@ -1397,7 +1397,7 @@ GLboolean assemble_alu_src(R700ALUInstruction* alu_instruction_ptr,
src_chan = SQ_CHAN_X;
break;
default:
- r700_error(ERROR_ASM_ALUSRCSELECT, "Unknown source select value (%d) in assemble_alu_src().");
+ radeon_error("Unknown source select value (%d) in assemble_alu_src().\n", channel_swizzle);
return GL_FALSE;
break;
}
@@ -1432,7 +1432,7 @@ GLboolean assemble_alu_src(R700ALUInstruction* alu_instruction_ptr,
alu_instruction_ptr->m_Word1_OP3.f.src2_neg = src_neg;
break;
default:
- r700_error(ERROR_ASM_ALUSRCNUMBER, "Only three sources allowed in ALU opcodes.");
+ radeon_error("Only three sources allowed in ALU opcodes.\n");
return GL_FALSE;
break;
}
@@ -1467,7 +1467,7 @@ GLboolean add_alu_instruction(r700_AssemblerBase* pAsm,
}
else
{
- r700_error(ERROR_ASM_ALLOCALUCF, "Could not allocate a new ALU CF instruction.");
+ radeon_error("Could not allocate a new ALU CF instruction.\n");
return GL_FALSE;
}
@@ -1635,7 +1635,7 @@ GLboolean reserve_cfile(r700_AssemblerBase* pAsm,
}
else
{
- r700_error(ERROR_ASM_CONSTCHANNEL, "All cfile read ports are used, cannot reference C$sel, channel $chan.");
+ radeon_error("All cfile read ports are used, cannot reference C$sel, channel $chan.\n");
return GL_FALSE;
}
return GL_TRUE;
@@ -1649,7 +1649,7 @@ GLboolean reserve_gpr(r700_AssemblerBase* pAsm, GLuint sel, GLuint chan, GLuint
}
else if(pAsm->hw_gpr[cycle][chan] != (int)sel)
{
- r700_error(ERROR_ASM_BADGPRRESERVE, "Another scalar operation has already used GPR read port for given channel");
+ radeon_error("Another scalar operation has already used GPR read port for given channel\n");
return GL_FALSE;
}
@@ -1689,7 +1689,7 @@ GLboolean cycle_for_scalar_bank_swizzle(const int swiz, const int sel, GLuint* p
}
break;
default:
- r700_error(ERROR_ASM_BADSCALARBZ, "Bad Scalar bank swizzle value");
+ radeon_error("Bad Scalar bank swizzle value\n");
break;
}
@@ -1737,7 +1737,7 @@ GLboolean cycle_for_vector_bank_swizzle(const int swiz, const int sel, GLuint* p
}
break;
default:
- r700_error(ERROR_ASM_BADVECTORBZ, "Bad Vec bank swizzle value");
+ radeon_error("Bad Vec bank swizzle value\n");
return GL_FALSE;
break;
}
@@ -2056,7 +2056,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
}
else
{
- r700_error(ERROR_ASM_ALUDSTBADTYPE, "Only temp destination registers supported for ALU dest regs.");
+ radeon_error("Only temp destination registers supported for ALU dest regs.\n");
return GL_FALSE;
}
@@ -2207,13 +2207,13 @@ GLboolean next_ins(r700_AssemblerBase *pAsm)
if (pILInst->TexSrcTarget == TEXTURE_RECT_INDEX) {
if( GL_FALSE == assemble_tex_instruction(pAsm, GL_FALSE) )
{
- r700_error(ERROR_ASM_TEXINSTRUCTION, "Error assembling TEX instruction");
+ radeon_error("Error assembling TEX instruction\n");
return GL_FALSE;
}
} else {
if( GL_FALSE == assemble_tex_instruction(pAsm, GL_TRUE) )
{
- r700_error(ERROR_ASM_TEXINSTRUCTION, "Error assembling TEX instruction");
+ radeon_error("Error assembling TEX instruction\n");
return GL_FALSE;
}
}
@@ -2222,7 +2222,7 @@ GLboolean next_ins(r700_AssemblerBase *pAsm)
{ //ALU
if( GL_FALSE == assemble_alu_instruction(pAsm) )
{
- r700_error(ERROR_ASM_TEXINSTRUCTION, "Error assembling ALU instruction");
+ radeon_error("Error assembling ALU instruction\n");
return GL_FALSE;
}
}
@@ -2367,7 +2367,7 @@ GLboolean assemble_ADD(r700_AssemblerBase *pAsm)
GLboolean assemble_BAD(char *opcode_str)
{
- r700_error(TODO_ASM_NEEDIMPINST, "Not yet implemented instruction (%s)", opcode_str);
+ radeon_error("Not yet implemented instruction (%s)\n", opcode_str);
return GL_FALSE;
}
@@ -3381,7 +3381,7 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
if (GL_TRUE == src_const)
{
- r700_error(TODO_ASM_CONSTTEXADDR, "TODO: Texture coordinates from a constant register not supported.");
+ radeon_error("TODO: Texture coordinates from a constant register not supported.\n");
return GL_FALSE;
}
@@ -3391,7 +3391,7 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
break;
case OPCODE_TXB:
- r700_error(TODO_ASM_TXB, "do not support TXB yet");
+ radeon_error("do not support TXB yet\n");
return GL_FALSE;
break;
case OPCODE_TXP:
@@ -3399,7 +3399,7 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
break;
default:
- r700_error(ERROR_ASM_BADTEXINST, "Internal error: bad texture op (not TEX)");
+ radeon_error("Internal error: bad texture op (not TEX)\n");
return GL_FALSE;
break;
}
@@ -3581,12 +3581,12 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
break;
case OPCODE_ARL:
- r700_error(TODO_ASM_NEEDIMPINST, "Not yet implemented instruction OPCODE_ARL ");
+ radeon_error("Not yet implemented instruction OPCODE_ARL \n");
//if ( GL_FALSE == assemble_BAD("ARL") )
return GL_FALSE;
break;
case OPCODE_ARR:
- r700_error(TODO_ASM_NEEDIMPINST, "Not yet implemented instruction OPCODE_ARR ");
+ radeon_error("Not yet implemented instruction OPCODE_ARR \n");
//if ( GL_FALSE == assemble_BAD("ARR") )
return GL_FALSE;
break;
@@ -3617,7 +3617,7 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_EXP:
- r700_error(TODO_ASM_NEEDIMPINST, "Not yet implemented instruction OPCODE_EXP ");
+ radeon_error("Not yet implemented instruction OPCODE_EXP \n");
//if ( GL_FALSE == assemble_BAD("EXP") )
return GL_FALSE;
break; // approx of EX2
@@ -3653,7 +3653,7 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_LOG:
- r700_error(TODO_ASM_NEEDIMPINST, "Not yet implemented instruction OPCODE_LOG ");
+ radeon_error("Not yet implemented instruction OPCODE_LOG \n");
//if ( GL_FALSE == assemble_BAD("LOG") )
return GL_FALSE;
break; // approx of LG2
@@ -3752,7 +3752,7 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_ELSE :
- r700_error(TODO_ASM_NEEDIMPINST, "Not yet implemented instruction OPCODE_ELSE ");
+ radeon_error("Not yet implemented instruction OPCODE_ELSE \n");
//if ( GL_FALSE == assemble_BAD("ELSE") )
return GL_FALSE;
break;
@@ -3774,7 +3774,7 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_TRUE;
default:
- r700_error(ERROR_ASM_UNKNOWNILINST, "internal: unknown instruction");
+ radeon_error("internal: unknown instruction\n");
return GL_FALSE;
}
}
@@ -3818,7 +3818,7 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
break;
default:
- r700_error(ERROR_ASM_BADEXPORTTYPE, "Unknown export type: %d", type);
+ radeon_error("Unknown export type: %d\n", type);
return GL_FALSE;
break;
}
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 16f1a3df366..37bff56f5a9 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -49,6 +49,8 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
unsigned int i;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
+
for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) {
radeonTexObj *t = r700->textures[i];
if (t) {
@@ -93,6 +95,7 @@ static void r700SendTexSamplerState(GLcontext *ctx, struct radeon_state_atom *at
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
unsigned int i;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) {
radeonTexObj *t = r700->textures[i];
@@ -115,6 +118,7 @@ static void r700SendTexBorderColorState(GLcontext *ctx, struct radeon_state_atom
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
unsigned int i;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) {
radeonTexObj *t = r700->textures[i];
@@ -141,6 +145,7 @@ static void r700SetupVTXConstants(GLcontext * ctx,
context_t *context = R700_CONTEXT(ctx);
struct radeon_aos * paos = (struct radeon_aos *)pAos;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
unsigned int uSQ_VTX_CONSTANT_WORD0_0;
unsigned int uSQ_VTX_CONSTANT_WORD1_0;
@@ -205,6 +210,7 @@ void r700SetupStreams(GLcontext *ctx)
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *vb = &tnl->vb;
unsigned int i, j = 0;
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
R600_STATECHANGE(context, vtx);
@@ -229,6 +235,7 @@ static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom)
= (struct r700_vertex_program *)ctx->VertexProgram._Current;
unsigned int i, j = 0;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
if (context->radeon.tcl.aos_count == 0)
return;
@@ -258,12 +265,100 @@ static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom)
}
}
+static void r700SetRenderTarget(context_t *context, int id)
+{
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+
+ struct radeon_renderbuffer *rrb;
+ unsigned int nPitchInPixel;
+
+ rrb = radeon_get_colorbuffer(&context->radeon);
+ if (!rrb || !rrb->bo) {
+ return;
+ }
+
+ R600_STATECHANGE(context, cb_target);
+
+ /* color buffer */
+ r700->render_target[id].CB_COLOR0_BASE.u32All = context->radeon.state.color.draw_offset;
+
+ nPitchInPixel = rrb->pitch/rrb->cpp;
+ SETfield(r700->render_target[id].CB_COLOR0_SIZE.u32All, (nPitchInPixel/8)-1,
+ PITCH_TILE_MAX_shift, PITCH_TILE_MAX_mask);
+ SETfield(r700->render_target[id].CB_COLOR0_SIZE.u32All, ( (nPitchInPixel * context->radeon.radeonScreen->driScreen->fbHeight)/64 )-1,
+ SLICE_TILE_MAX_shift, SLICE_TILE_MAX_mask);
+ r700->render_target[id].CB_COLOR0_BASE.u32All = 0;
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ENDIAN_NONE, ENDIAN_shift, ENDIAN_mask);
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_LINEAR_GENERAL,
+ CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
+ if(4 == rrb->cpp)
+ {
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, COLOR_8_8_8_8,
+ CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask);
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, SWAP_ALT, COMP_SWAP_shift, COMP_SWAP_mask);
+ }
+ else
+ {
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, COLOR_5_6_5,
+ CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask);
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, SWAP_ALT_REV,
+ COMP_SWAP_shift, COMP_SWAP_mask);
+ }
+ SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit);
+ SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_CLAMP_bit);
+ SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+
+ r700->render_target[id].enabled = GL_TRUE;
+}
+
+static void r700SetDepthTarget(context_t *context)
+{
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+
+ struct radeon_renderbuffer *rrb;
+ unsigned int nPitchInPixel;
+
+ rrb = radeon_get_depthbuffer(&context->radeon);
+ if (!rrb)
+ return;
+
+ R600_STATECHANGE(context, db_target);
+
+ /* depth buf */
+ r700->DB_DEPTH_SIZE.u32All = 0;
+ r700->DB_DEPTH_BASE.u32All = 0;
+ r700->DB_DEPTH_INFO.u32All = 0;
+ r700->DB_DEPTH_VIEW.u32All = 0;
+
+ nPitchInPixel = rrb->pitch/rrb->cpp;
+
+ SETfield(r700->DB_DEPTH_SIZE.u32All, (nPitchInPixel/8)-1,
+ PITCH_TILE_MAX_shift, PITCH_TILE_MAX_mask);
+ SETfield(r700->DB_DEPTH_SIZE.u32All, ( (nPitchInPixel * context->radeon.radeonScreen->driScreen->fbHeight)/64 )-1,
+ SLICE_TILE_MAX_shift, SLICE_TILE_MAX_mask); /* size in pixel / 64 - 1 */
+
+ if(4 == rrb->cpp)
+ {
+ SETfield(r700->DB_DEPTH_INFO.u32All, DEPTH_8_24,
+ DB_DEPTH_INFO__FORMAT_shift, DB_DEPTH_INFO__FORMAT_mask);
+ }
+ else
+ {
+ SETfield(r700->DB_DEPTH_INFO.u32All, DEPTH_16,
+ DB_DEPTH_INFO__FORMAT_shift, DB_DEPTH_INFO__FORMAT_mask);
+ }
+ SETfield(r700->DB_DEPTH_INFO.u32All, ARRAY_2D_TILED_THIN1,
+ DB_DEPTH_INFO__ARRAY_MODE_shift, DB_DEPTH_INFO__ARRAY_MODE_mask);
+ /* r700->DB_PREFETCH_LIMIT.bits.DEPTH_HEIGHT_TILE_MAX = (context->currentDraw->h >> 3) - 1; */ /* z buffer sie may much bigger than what need, so use actual used h. */
+}
+
static void r700SendDepthTargetState(GLcontext *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
struct radeon_renderbuffer *rrb;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
rrb = radeon_get_depthbuffer(&context->radeon);
if (!rrb || !rrb->bo) {
@@ -271,6 +366,8 @@ static void r700SendDepthTargetState(GLcontext *ctx, struct radeon_state_atom *a
return;
}
+ r700SetDepthTarget(context);
+
BEGIN_BATCH_NO_AUTOSTATE(8 + 2);
R600_OUT_BATCH_REGSEQ(DB_DEPTH_SIZE, 2);
R600_OUT_BATCH(r700->DB_DEPTH_SIZE.u32All);
@@ -303,6 +400,7 @@ static void r700SendRenderTargetState(GLcontext *ctx, struct radeon_state_atom *
struct radeon_renderbuffer *rrb;
BATCH_LOCALS(&context->radeon);
int id = 0;
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
rrb = radeon_get_colorbuffer(&context->radeon);
if (!rrb || !rrb->bo) {
@@ -310,6 +408,8 @@ static void r700SendRenderTargetState(GLcontext *ctx, struct radeon_state_atom *
return;
}
+ r700SetRenderTarget(context, 0);
+
if (id > R700_MAX_RENDER_TARGETS)
return;
@@ -352,6 +452,7 @@ static void r700SendPSState(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
struct radeon_bo * pbo;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
pbo = (struct radeon_bo *)r700GetActiveFpShaderBo(GL_CONTEXT(context));
@@ -385,6 +486,7 @@ static void r700SendVSState(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
struct radeon_bo * pbo;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
pbo = (struct radeon_bo *)r700GetActiveVpShaderBo(GL_CONTEXT(context));
@@ -416,6 +518,7 @@ static void r700SendFSState(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
struct radeon_bo * pbo;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
/* XXX fixme
* R6xx chips require a FS be emitted, even if it's not used.
@@ -457,6 +560,7 @@ static void r700SendViewportState(GLcontext *ctx, struct radeon_state_atom *atom
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
int id = 0;
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
if (id > R700_MAX_VIEWPORTS)
return;
@@ -489,6 +593,7 @@ static void r700SendSQConfig(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(34);
R600_OUT_BATCH_REGSEQ(SQ_CONFIG, 6);
@@ -526,6 +631,7 @@ static void r700SendUCPState(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
int i;
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
for (i = 0; i < R700_MAX_UCP; i++) {
if (r700->ucp[i].enabled) {
@@ -547,6 +653,7 @@ static void r700SendSPIState(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
unsigned int ui;
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(59 + R700_MAX_SHADER_EXPORTS);
@@ -620,6 +727,7 @@ static void r700SendVGTState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(41);
@@ -665,6 +773,7 @@ static void r700SendSXState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(9);
R600_OUT_BATCH_REGVAL(SX_MISC, r700->SX_MISC.u32All);
@@ -679,6 +788,7 @@ static void r700SendDBState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(23);
R600_OUT_BATCH_REGVAL(DB_HTILE_DATA_BASE, r700->DB_HTILE_DATA_BASE.u32All);
@@ -720,6 +830,7 @@ static void r700SendCBState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) {
BEGIN_BATCH_NO_AUTOSTATE(11);
@@ -766,6 +877,7 @@ static void r700SendCBBlendState(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
unsigned int ui;
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) {
BEGIN_BATCH_NO_AUTOSTATE(3);
@@ -796,6 +908,7 @@ static void r700SendCBBlendColorState(GLcontext *ctx, struct radeon_state_atom *
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(6);
R600_OUT_BATCH_REGSEQ(CB_BLEND_RED, 4);
@@ -850,6 +963,7 @@ static void r700SendCLState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(12);
R600_OUT_BATCH_REGVAL(PA_CL_CLIP_CNTL, r700->PA_CL_CLIP_CNTL.u32All);
@@ -881,6 +995,7 @@ static void r700SendScissorState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(22);
R600_OUT_BATCH_REGSEQ(PA_SC_SCREEN_SCISSOR_TL, 2);
@@ -913,6 +1028,7 @@ static void r700SendSCState(GLcontext *ctx, struct radeon_state_atom *atom)
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(15);
R600_OUT_BATCH_REGVAL(R7xx_PA_SC_EDGERULE, r700->PA_SC_EDGERULE.u32All);
@@ -969,6 +1085,7 @@ static void r700SendVSConsts(GLcontext *ctx, struct radeon_state_atom *atom)
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
int i;
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
if (r700->vs.num_consts == 0)
return;
@@ -999,6 +1116,7 @@ static int check_cb(GLcontext *ctx, struct radeon_state_atom *atom)
if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770)
count += 11;
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count;
}
@@ -1019,6 +1137,7 @@ static int check_blnd(GLcontext *ctx, struct radeon_state_atom *atom)
count += 3;
}
}
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count;
}
@@ -1034,6 +1153,7 @@ static int check_ucp(GLcontext *ctx, struct radeon_state_atom *atom)
if (r700->ucp[i].enabled)
count += 6;
}
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count;
}
@@ -1045,6 +1165,7 @@ static int check_vtx(GLcontext *ctx, struct radeon_state_atom *atom)
if (count)
count += 6;
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count;
}
@@ -1059,6 +1180,7 @@ static int check_tx(GLcontext *ctx, struct radeon_state_atom *atom)
if (t)
count++;
}
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count * 31;
}
@@ -1070,6 +1192,7 @@ static int check_ps_consts(GLcontext *ctx, struct radeon_state_atom *atom)
if (count)
count += 2;
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count;
}
@@ -1082,6 +1205,7 @@ static int check_vs_consts(GLcontext *ctx, struct radeon_state_atom *atom)
if (count)
count += 2;
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count);
return count;
}
@@ -1101,6 +1225,7 @@ do { \
void r600InitAtoms(context_t *context)
{
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s %p\n", __func__, context);
context->radeon.hw.max_state_size = 10 + 5 + 14; /* start 3d, idle, cb/db flush */
/* Setup the atom linked list */
diff --git a/src/mesa/drivers/dri/r600/r700_clear.c b/src/mesa/drivers/dri/r600/r700_clear.c
index 6d4ea90ccc6..c6546ab00c2 100644
--- a/src/mesa/drivers/dri/r600/r700_clear.c
+++ b/src/mesa/drivers/dri/r600/r700_clear.c
@@ -55,6 +55,8 @@ void r700Clear(GLcontext * ctx, GLbitfield mask)
int i;
struct gl_framebuffer *fb = ctx->DrawBuffer;
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %x\n", __func__, mask);
+
if( GL_TRUE == r700ClearFast(context, mask) )
{
return;
@@ -106,8 +108,7 @@ void r700Clear(GLcontext * ctx, GLbitfield mask)
}
if (swrast_mask) {
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s: swrast clear, mask: %x\n",
+ radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT, "%s: swrast clear, mask: %x\n",
__FUNCTION__, swrast_mask);
_swrast_Clear(ctx, swrast_mask);
}
diff --git a/src/mesa/drivers/dri/r600/r700_debug.c b/src/mesa/drivers/dri/r600/r700_debug.c
index dabd0d2c259..cd1ba9eca3f 100644
--- a/src/mesa/drivers/dri/r600/r700_debug.c
+++ b/src/mesa/drivers/dri/r600/r700_debug.c
@@ -25,31 +25,8 @@
*/
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "main/glheader.h"
-
#include "r700_debug.h"
-#include "r600_context.h"
-
-void NormalizeLogErrorCode(int nError)
-{
- //TODO
-}
-
-void r700_error(int nLocalError, char* fmt, ...)
-{
- va_list args;
-
- NormalizeLogErrorCode(nLocalError);
-
- va_start(args, fmt);
- fprintf(stderr, fmt, args);
- va_end(args);
-}
+#include "radeon_debug.h"
void DumpHwBinary(int type, void *addr, int size)
{
@@ -61,21 +38,21 @@ void DumpHwBinary(int type, void *addr, int size)
switch (type)
{
case DUMP_PIXEL_SHADER:
- DEBUGF("Pixel Shader\n");
+ radeon_print(RADEON_SHADER, RADEON_TRACE, "Pixel Shader\n");
break;
case DUMP_VERTEX_SHADER:
- DEBUGF("Vertex Shader\n");
+ radeon_print(RADEON_SHADER, RADEON_TRACE, "Vertex Shader\n");
break;
case DUMP_FETCH_SHADER:
- DEBUGF("Fetch Shader\n");
+ radeon_print(RADEON_SHADER, RADEON_TRACE, "Fetch Shader\n");
break;
}
for (i = 0; i < size; i++)
{
- DEBUGP("0x%08x,\t", *pHw);
+ radeon_print(RADEON_SHADER, RADEON_TRACE, "0x%08x,\t", *pHw);
if (i%4 == 3)
- DEBUGP("0x%08x\n", *pHw);
+ radeon_print(RADEON_SHADER, RADEON_TRACE, "0x%08x\n", *pHw);
pHw++;
}
diff --git a/src/mesa/drivers/dri/r600/r700_debug.h b/src/mesa/drivers/dri/r600/r700_debug.h
index e810e6da083..c0921bf6100 100644
--- a/src/mesa/drivers/dri/r600/r700_debug.h
+++ b/src/mesa/drivers/dri/r600/r700_debug.h
@@ -27,67 +27,13 @@
#ifndef _R700_DEBUG_H_
#define _R700_DEBUG_H_
-
-enum R700_ERROR
-{
- ERROR_ASM_VTX_CLAUSE = 0x1000,
- ERROR_ASM_UNKOWNCLAUSE = 0x1001,
- ERROR_ASM_ALLOCEXPORTCF = 0x1002,
- ERROR_ASM_ALLOCVTXCF = 0x1003,
- ERROR_ASM_ALLOCTEXCF = 0x1004,
- ERROR_ASM_ALLOCALUCF = 0x1005,
- ERROR_ASM_UNKNOWNILINST = 0x1006,
- ERROR_ASM_SRCARGUMENT = 0x1007,
- ERROR_ASM_DSTARGUMENT = 0x1008,
- ERROR_ASM_TEXINSTRUCTION = 0x1009,
- ERROR_ASM_ALUINSTRUCTION = 0x100A,
- ERROR_ASM_INSTDSTTRACK = 0x100B,
- ERROR_ASM_TEXDSTBADTYPE = 0x100C,
- ERROR_ASM_ALUSRCBADTYPE = 0x100D,
- ERROR_ASM_ALUSRCSELECT = 0x100E,
- ERROR_ASM_ALUSRCNUMBER = 0x100F,
- ERROR_ASM_ALUDSTBADTYPE = 0x1010,
- ERROR_ASM_CONSTCHANNEL = 0x1011,
- ERROR_ASM_BADSCALARBZ = 0x1012,
- ERROR_ASM_BADGPRRESERVE = 0x1013,
- ERROR_ASM_BADVECTORBZ = 0x1014,
- ERROR_ASM_BADTEXINST = 0x1015,
- ERROR_ASM_BADTEXSRC = 0x1016,
- ERROR_ASM_BADEXPORTTYPE = 0x1017,
-
-
- TODO_ASM_CONSTTEXADDR = 0x8000,
- TODO_ASM_NEEDIMPINST = 0x8001,
- TODO_ASM_TXB = 0x8002,
- TODO_ASM_TXP = 0x8003
-};
-
enum R700_DUMP_TYPE
{
- DUMP_VERTEX_SHADER = 0x1,
- DUMP_PIXEL_SHADER = 0x2,
- DUMP_FETCH_SHADER = 0x4,
+ DUMP_VERTEX_SHADER = 0x1,
+ DUMP_PIXEL_SHADER = 0x2,
+ DUMP_FETCH_SHADER = 0x4,
};
-#define DEBUGF printf
-#define DEBUGP printf
-
-void NormalizeLogErrorCode(int nError);
-/*NormalizeLogErrorCode(nLocalError); */
-void r700_error(int nLocalError, char *fmt, ...);
extern void DumpHwBinary(int, void *, int);
-#ifdef STANDALONE_COMPILER
-#ifdef __cplusplus
-extern "C"
-{
-#endif //__cplusplus
-
-void LogString(char* szStr);
-
-#ifdef __cplusplus
-}
-#endif //__cplusplus
-#endif /*STANDALONE_COMPILER*/
-
#endif /*_R700_DEBUG_H_*/
diff --git a/src/mesa/drivers/dri/r600/r700_oglprog.c b/src/mesa/drivers/dri/r600/r700_oglprog.c
index c49b90c1cc9..3c8c1fd7a34 100644
--- a/src/mesa/drivers/dri/r600/r700_oglprog.c
+++ b/src/mesa/drivers/dri/r600/r700_oglprog.c
@@ -49,6 +49,9 @@ static struct gl_program *r700NewProgram(GLcontext * ctx,
struct r700_vertex_program *vp;
struct r700_fragment_program *fp;
+ radeon_print(RADEON_SHADER, RADEON_VERBOSE,
+ "%s %u, %u\n", __func__, target, id);
+
switch (target)
{
case GL_VERTEX_STATE_PROGRAM_NV:
@@ -89,6 +92,9 @@ static void r700DeleteProgram(GLcontext * ctx, struct gl_program *prog)
struct r700_vertex_program * vp;
struct r700_fragment_program * fp;
+ radeon_print(RADEON_SHADER, RADEON_VERBOSE,
+ "%s %p\n", __func__, prog);
+
switch (prog->Target)
{
case GL_VERTEX_STATE_PROGRAM_NV:
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c
index 0b3ceb01bac..3566bf3ca78 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -69,6 +69,7 @@ GLboolean r700SyncSurf(context_t *context,
void r700WaitForIdle(context_t *context)
{
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_RENDER | RADEON_STATE, RADEON_TRACE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(3);
R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CONFIG_REG, 1));
@@ -82,6 +83,7 @@ void r700WaitForIdle(context_t *context)
void r700WaitForIdleClean(context_t *context)
{
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_RENDER | RADEON_STATE, RADEON_TRACE, "%s\n", __func__);
BEGIN_BATCH_NO_AUTOSTATE(5);
R600_OUT_BATCH(CP_PACKET3(R600_IT_EVENT_WRITE, 0));
@@ -98,6 +100,7 @@ void r700WaitForIdleClean(context_t *context)
void r700Start3D(context_t *context)
{
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_RENDER | RADEON_STATE, RADEON_TRACE, "%s\n", __func__);
if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770)
{
BEGIN_BATCH_NO_AUTOSTATE(2);
@@ -124,6 +127,7 @@ GLboolean r700SyncSurf(context_t *context,
uint32_t sync_type)
{
BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_RENDER | RADEON_STATE, RADEON_TRACE, "%s\n", __func__);
uint32_t cp_coher_size;
if (!pbo)
@@ -253,10 +257,16 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim
uint32_t vgt_index_type = 0;
uint32_t vgt_primitive_type = 0;
uint32_t vgt_num_indices = 0;
+ TNLcontext *tnl = TNL_CONTEXT(ctx);
+ struct vertex_buffer *vb = &tnl->vb;
type = r700PrimitiveType(prim);
num_indices = r700NumVerts(end - start, prim);
+ radeon_print(RADEON_RENDER, RADEON_TRACE,
+ "%s type %x num_indices %d\n",
+ __func__, type, num_indices);
+
if (type < 0 || num_indices <= 0)
return;
@@ -292,7 +302,10 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim
R600_OUT_BATCH(vgt_draw_initiator);
for (i = start; i < (start + num_indices); i++) {
- R600_OUT_BATCH(i);
+ if(vb->Elts)
+ R600_OUT_BATCH(vb->Elts[i]);
+ else
+ R600_OUT_BATCH(i);
}
END_BATCH();
COMMIT_BATCH();
@@ -327,8 +340,8 @@ static GLuint r700PredictRenderSize(GLcontext* ctx)
else
dwords += state_size;
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: total prediction size is %d.\n", __FUNCTION__, dwords);
+ radeon_print(RADEON_RENDER, RADEON_VERBOSE,
+ "%s: total prediction size is %d.\n", __FUNCTION__, dwords);
return dwords;
}
@@ -342,8 +355,7 @@ static GLboolean r700RunRender(GLcontext * ctx,
struct vertex_buffer *vb = &tnl->vb;
struct radeon_renderbuffer *rrb;
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: cs begin at %d\n",
+ radeon_print(RADEON_RENDER, RADEON_NORMAL, "%s: cs begin at %d\n",
__func__, context->radeon.cmdbuf.cs->cdw);
/* always emit CB base to prevent
@@ -365,6 +377,7 @@ static GLboolean r700RunRender(GLcontext * ctx,
radeonEmitState(radeon);
+ radeon_debug_add_indent();
/* richard test code */
for (i = 0; i < vb->PrimitiveCount; i++) {
GLuint prim = _tnl_translate_prim(&vb->Primitive[i]);
@@ -372,6 +385,7 @@ static GLboolean r700RunRender(GLcontext * ctx,
GLuint end = vb->Primitive[i].start + vb->Primitive[i].count;
r700RunRenderPrimitive(ctx, start, end, prim);
}
+ radeon_debug_remove_indent();
/* Flush render op cached for last several quads. */
r700WaitForIdleClean(context);
@@ -388,8 +402,7 @@ static GLboolean r700RunRender(GLcontext * ctx,
radeonReleaseArrays(ctx, ~0);
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s: cs end at %d\n",
+ radeon_print(RADEON_RENDER, RADEON_TRACE, "%s: cs end at %d\n",
__func__, context->radeon.cmdbuf.cs->cdw);
if ( emit_end < context->radeon.cmdbuf.cs->cdw )
diff --git a/src/mesa/drivers/dri/r600/r700_shaderinst.c b/src/mesa/drivers/dri/r600/r700_shaderinst.c
index c1bffee91f0..f120d9f941f 100644
--- a/src/mesa/drivers/dri/r600/r700_shaderinst.c
+++ b/src/mesa/drivers/dri/r600/r700_shaderinst.c
@@ -27,7 +27,7 @@
#include "main/mtypes.h"
-#include "r700_debug.h"
+#include "radeon_debug.h"
#include "r700_shaderinst.h"
void Init_R700ControlFlowGenericClause(R700ControlFlowGenericClause* pInst)
@@ -208,16 +208,16 @@ unsigned int GetCFMaxInstructions(ShaderInstType instType)
GLboolean LinkVertexInstruction(R700ControlFlowGenericClause *pCFGeneric,
R700VertexInstruction *pVTXInstruction)
{
- if (pCFGeneric->m_pLinkedTEXInstruction != 0)
- {
- r700_error(ERROR_ASM_VTX_CLAUSE, "This instruction is already linked to a texture instruction");
- return GL_FALSE;
+ if (pCFGeneric->m_pLinkedTEXInstruction != 0)
+ {
+ radeon_error("This instruction is already linked to a texture instruction.\n");
+ return GL_FALSE;
}
pCFGeneric->m_pLinkedVTXInstruction = pVTXInstruction;
- pVTXInstruction->m_pLinkedGenericClause = pCFGeneric;
+ pVTXInstruction->m_pLinkedGenericClause = pCFGeneric;
- return GL_TRUE;
+ return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 91cb492ce6a..93b4ebfdb96 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -60,13 +60,6 @@ static void r700SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state);
static void r700UpdatePolygonMode(GLcontext * ctx);
static void r700SetPolygonOffsetState(GLcontext * ctx, GLboolean state);
static void r700SetStencilState(GLcontext * ctx, GLboolean state);
-static void r700SetRenderTarget(context_t *context, int id);
-static void r700SetDepthTarget(context_t *context);
-
-void r700SetDefaultStates(context_t *context) //--------------------
-{
-
-}
void r700UpdateShaders (GLcontext * ctx) //----------------------------------
{
@@ -133,21 +126,6 @@ void r700UpdateViewportOffset(GLcontext * ctx) //------------------
radeonUpdateScissor(ctx);
}
-/**
- * Tell the card where to render (offset, pitch).
- * Effected by glDrawBuffer, etc
- */
-void r700UpdateDrawBuffer(GLcontext * ctx) /* TODO */ //---------------------
-{
- context_t *context = R700_CONTEXT(ctx);
-
- R600_STATECHANGE(context, cb_target);
- R600_STATECHANGE(context, db_target);
-
- r700SetRenderTarget(context, 0);
- r700SetDepthTarget(context);
-}
-
void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state) //--------------------
{
struct r700_fragment_program *fp =
@@ -179,21 +157,29 @@ static void r700InvalidateState(GLcontext * ctx, GLuint new_state) //-----------
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
_swrast_InvalidateState(ctx, new_state);
- _swsetup_InvalidateState(ctx, new_state);
- _vbo_InvalidateState(ctx, new_state);
- _tnl_InvalidateState(ctx, new_state);
- _ae_invalidate_state(ctx, new_state);
-
- if (new_state & (_NEW_BUFFERS | _NEW_COLOR | _NEW_PIXEL))
- {
- _mesa_update_framebuffer(ctx);
- /* this updates the DrawBuffer's Width/Height if it's a FBO */
- _mesa_update_draw_buffer_bounds(ctx);
+ _swsetup_InvalidateState(ctx, new_state);
+ _vbo_InvalidateState(ctx, new_state);
+ _tnl_InvalidateState(ctx, new_state);
+ _ae_invalidate_state(ctx, new_state);
+
+ if (new_state & _NEW_BUFFERS) {
+ _mesa_update_framebuffer(ctx);
+ /* this updates the DrawBuffer's Width/Height if it's a FBO */
+ _mesa_update_draw_buffer_bounds(ctx);
+
+ R600_STATECHANGE(context, cb_target);
+ R600_STATECHANGE(context, db_target);
+ }
- r700UpdateDrawBuffer(ctx);
- }
+ if (new_state & (_NEW_LIGHT)) {
+ R600_STATECHANGE(context, su);
+ if (ctx->Light.ProvokingVertex == GL_LAST_VERTEX_CONVENTION)
+ SETbit(r700->PA_SU_SC_MODE_CNTL.u32All, PROVOKING_VTX_LAST_bit);
+ else
+ CLEARbit(r700->PA_SU_SC_MODE_CNTL.u32All, PROVOKING_VTX_LAST_bit);
+ }
- r700UpdateStateParameters(ctx, new_state);
+ r700UpdateStateParameters(ctx, new_state);
R600_STATECHANGE(context, cl);
R600_STATECHANGE(context, spi);
@@ -1373,107 +1359,6 @@ void r700SetScissor(context_t *context) //---------------
r700->viewport[id].enabled = GL_TRUE;
}
-static void r700SetRenderTarget(context_t *context, int id)
-{
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
-
- struct radeon_renderbuffer *rrb;
- unsigned int nPitchInPixel;
-
- rrb = radeon_get_colorbuffer(&context->radeon);
- if (!rrb || !rrb->bo) {
- return;
- }
-
- R600_STATECHANGE(context, cb_target);
- R600_STATECHANGE(context, cb);
-
- /* screen/window/view */
- SETfield(r700->CB_TARGET_MASK.u32All, 0xF, (4 * id), TARGET0_ENABLE_mask);
-
- /* color buffer */
- r700->render_target[id].CB_COLOR0_BASE.u32All = context->radeon.state.color.draw_offset;
-
- nPitchInPixel = rrb->pitch/rrb->cpp;
- SETfield(r700->render_target[id].CB_COLOR0_SIZE.u32All, (nPitchInPixel/8)-1,
- PITCH_TILE_MAX_shift, PITCH_TILE_MAX_mask);
- SETfield(r700->render_target[id].CB_COLOR0_SIZE.u32All, ( (nPitchInPixel * context->radeon.radeonScreen->driScreen->fbHeight)/64 )-1,
- SLICE_TILE_MAX_shift, SLICE_TILE_MAX_mask);
- r700->render_target[id].CB_COLOR0_BASE.u32All = 0;
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ENDIAN_NONE, ENDIAN_shift, ENDIAN_mask);
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_LINEAR_GENERAL,
- CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
- if(4 == rrb->cpp)
- {
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, COLOR_8_8_8_8,
- CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask);
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, SWAP_ALT, COMP_SWAP_shift, COMP_SWAP_mask);
- }
- else
- {
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, COLOR_5_6_5,
- CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask);
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, SWAP_ALT_REV,
- COMP_SWAP_shift, COMP_SWAP_mask);
- }
- SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit);
- SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_CLAMP_bit);
- SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
-
- r700->render_target[id].enabled = GL_TRUE;
-}
-
-static void r700SetDepthTarget(context_t *context)
-{
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
-
- struct radeon_renderbuffer *rrb;
- unsigned int nPitchInPixel;
-
- rrb = radeon_get_depthbuffer(&context->radeon);
- if (!rrb)
- return;
-
- R600_STATECHANGE(context, db_target);
-
- /* depth buf */
- r700->DB_DEPTH_SIZE.u32All = 0;
- r700->DB_DEPTH_BASE.u32All = 0;
- r700->DB_DEPTH_INFO.u32All = 0;
- r700->DB_DEPTH_VIEW.u32All = 0;
-
- nPitchInPixel = rrb->pitch/rrb->cpp;
-
- SETfield(r700->DB_DEPTH_SIZE.u32All, (nPitchInPixel/8)-1,
- PITCH_TILE_MAX_shift, PITCH_TILE_MAX_mask);
- SETfield(r700->DB_DEPTH_SIZE.u32All, ( (nPitchInPixel * context->radeon.radeonScreen->driScreen->fbHeight)/64 )-1,
- SLICE_TILE_MAX_shift, SLICE_TILE_MAX_mask); /* size in pixel / 64 - 1 */
-
- if(4 == rrb->cpp)
- {
- switch (GL_CONTEXT(context)->Visual.depthBits)
- {
- case 16:
- case 24:
- SETfield(r700->DB_DEPTH_INFO.u32All, DEPTH_8_24,
- DB_DEPTH_INFO__FORMAT_shift, DB_DEPTH_INFO__FORMAT_mask);
- break;
- default:
- fprintf(stderr, "Error: Unsupported depth %d... exiting\n",
- GL_CONTEXT(context)->Visual.depthBits);
- _mesa_exit(-1);
- }
- }
- else
- {
- SETfield(r700->DB_DEPTH_INFO.u32All, DEPTH_16,
- DB_DEPTH_INFO__FORMAT_shift, DB_DEPTH_INFO__FORMAT_mask);
- }
- SETfield(r700->DB_DEPTH_INFO.u32All, ARRAY_2D_TILED_THIN1,
- DB_DEPTH_INFO__ARRAY_MODE_shift, DB_DEPTH_INFO__ARRAY_MODE_mask);
- /* r700->DB_PREFETCH_LIMIT.bits.DEPTH_HEIGHT_TILE_MAX = (context->currentDraw->h >> 3) - 1; */ /* z buffer sie may much bigger than what need, so use actual used h. */
-}
-
static void r700InitSQConfig(GLcontext * ctx)
{
context_t *context = R700_CONTEXT(ctx);
@@ -1676,6 +1561,7 @@ void r700InitState(GLcontext * ctx) //-------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+ int id = 0;
radeon_firevertices(&context->radeon);
@@ -1869,6 +1755,9 @@ void r700InitState(GLcontext * ctx) //-------------------
/* Set up color compare mask */
r700->CB_CLRCMP_MSK.u32All = 0xFFFFFFFF;
+ /* screen/window/view */
+ SETfield(r700->CB_TARGET_MASK.u32All, 0xF, (4 * id), TARGET0_ENABLE_mask);
+
context->radeon.hw.all_dirty = GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r700_state.h b/src/mesa/drivers/dri/r600/r700_state.h
index 30eb54e8b0a..0f53d5b4c59 100644
--- a/src/mesa/drivers/dri/r600/r700_state.h
+++ b/src/mesa/drivers/dri/r600/r700_state.h
@@ -37,13 +37,10 @@ extern void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state);
extern void r700UpdateShaders (GLcontext * ctx);
extern void r700UpdateViewportOffset(GLcontext * ctx);
-extern void r700UpdateDrawBuffer (GLcontext * ctx);
extern void r700InitState (GLcontext * ctx);
extern void r700InitStateFuncs (struct dd_function_table *functions);
-extern void r700SetDefaultStates(context_t * context);
-
extern void r700SetScissor(context_t *context);
#endif /* _R600_SCREEN_H */
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c
index 86a67ab766f..d107f99e7ba 100644
--- a/src/mesa/drivers/dri/r600/r700_vertprog.c
+++ b/src/mesa/drivers/dri/r600/r700_vertprog.c
@@ -38,6 +38,7 @@
#include "shader/prog_parameter.h"
#include "shader/prog_statevars.h"
+#include "radeon_debug.h"
#include "r600_context.h"
#include "r600_cmdbuf.h"
@@ -174,7 +175,7 @@ void Map_Vertex_Program(struct r700_vertex_program *vp,
// Create VFETCH instructions for inputs
if (GL_TRUE != Process_Vertex_Program_Vfetch_Instructions(vp, mesa_vp) )
{
- r700_error(ERROR_ASM_VTX_CLAUSE, "Calling Process_Vertex_Program_Vfetch_Instructions return error. \n");
+ radeon_error("Calling Process_Vertex_Program_Vfetch_Instructions return error. \n");
return; //error
}
diff --git a/src/mesa/drivers/dri/r600/radeon_debug.c b/src/mesa/drivers/dri/r600/radeon_debug.c
new file mode 120000
index 00000000000..c98c2e074c5
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/radeon_debug.c
@@ -0,0 +1 @@
+../radeon/radeon_debug.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/radeon_debug.h b/src/mesa/drivers/dri/r600/radeon_debug.h
new file mode 120000
index 00000000000..bd8aa28e89e
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/radeon_debug.h
@@ -0,0 +1 @@
+../radeon/radeon_debug.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/radeon/Makefile b/src/mesa/drivers/dri/radeon/Makefile
index 8fe9d98a0b2..1f286776b5f 100644
--- a/src/mesa/drivers/dri/radeon/Makefile
+++ b/src/mesa/drivers/dri/radeon/Makefile
@@ -15,17 +15,18 @@ CS_SOURCES = radeon_cs_space_drm.c
endif
RADEON_COMMON_SOURCES = \
- radeon_texture.c \
+ radeon_bo_legacy.c \
radeon_common_context.c \
radeon_common.c \
+ radeon_cs_legacy.c \
radeon_dma.c \
+ radeon_debug.c \
+ radeon_fbo.c \
radeon_lock.c \
- radeon_bo_legacy.c \
- radeon_cs_legacy.c \
radeon_mipmap_tree.c \
+ radeon_queryobj.c \
radeon_span.c \
- radeon_fbo.c \
- radeon_queryobj.c
+ radeon_texture.c
DRIVER_SOURCES = \
radeon_context.c \
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
index a10c6b73abc..3e7547d2f9d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
@@ -640,7 +640,7 @@ static int bo_vram_validate(struct radeon_bo *bo,
&tex,
sizeof(drm_radeon_texture_t));
if (ret) {
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "DRM_RADEON_TEXTURE: again!\n");
usleep(1);
}
@@ -677,7 +677,7 @@ static int bo_vram_validate(struct radeon_bo *bo,
&tex,
sizeof(drm_radeon_texture_t));
if (ret) {
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "DRM_RADEON_TEXTURE: again!\n");
usleep(1);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index e8ae51e6eab..a24b6dac265 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -78,9 +78,10 @@ radeonDeleteBufferObject(GLcontext * ctx,
* Allocate space for and store data in a buffer object. Any data that was
* previously stored in the buffer object is lost. If data is NULL,
* memory will be allocated, but no copy will occur.
- * Called via glBufferDataARB().
+ * Called via ctx->Driver.BufferData().
+ * \return GL_TRUE for success, GL_FALSE if out of memory
*/
-static void
+static GLboolean
radeonBufferData(GLcontext * ctx,
GLenum target,
GLsizeiptrARB size,
@@ -107,6 +108,9 @@ radeonBufferData(GLcontext * ctx,
RADEON_GEM_DOMAIN_GTT,
0);
+ if (!radeon_obj->bo)
+ return GL_FALSE;
+
if (data != NULL) {
radeon_bo_map(radeon_obj->bo, GL_TRUE);
@@ -115,6 +119,7 @@ radeonBufferData(GLcontext * ctx,
radeon_bo_unmap(radeon_obj->bo);
}
}
+ return GL_TRUE;
}
/**
diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h
index 0da1c0f9ee3..46a9cd5ff84 100644
--- a/src/mesa/drivers/dri/radeon/radeon_chipset.h
+++ b/src/mesa/drivers/dri/radeon/radeon_chipset.h
@@ -344,6 +344,7 @@
#define PCI_CHIP_RV770_9440 0x9440
#define PCI_CHIP_RV770_9441 0x9441
#define PCI_CHIP_RV770_9442 0x9442
+#define PCI_CHIP_RV770_9443 0x9443
#define PCI_CHIP_RV770_9444 0x9444
#define PCI_CHIP_RV770_9446 0x9446
#define PCI_CHIP_RV770_944A 0x944A
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index ee0cbf65ca1..e53eb0904d2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -45,44 +45,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/glheader.h"
#include "main/imports.h"
#include "main/context.h"
-#include "main/arrayobj.h"
-#include "main/api_arrayelt.h"
#include "main/enums.h"
-#include "main/colormac.h"
-#include "main/light.h"
#include "main/framebuffer.h"
-#include "main/simple_list.h"
#include "main/renderbuffer.h"
-#include "swrast/swrast.h"
-#include "vbo/vbo.h"
-#include "tnl/tnl.h"
-#include "tnl/t_pipeline.h"
-#include "swrast_setup/swrast_setup.h"
-
-#include "main/blend.h"
-#include "main/bufferobj.h"
-#include "main/buffers.h"
-#include "main/depth.h"
-#include "main/polygon.h"
-#include "main/shaders.h"
-#include "main/texstate.h"
-#include "main/varray.h"
-#include "glapi/dispatch.h"
-#include "swrast/swrast.h"
-#include "main/stencil.h"
-#include "main/matrix.h"
-#include "main/attrib.h"
-#include "main/enable.h"
-#include "main/viewport.h"
-
-#include "dri_util.h"
+#include "drivers/common/meta.h"
+
#include "vblank.h"
#include "radeon_common.h"
#include "radeon_bocs_wrapper.h"
#include "radeon_lock.h"
#include "radeon_drm.h"
-#include "radeon_mipmap_tree.h"
#include "radeon_queryobj.h"
/**
@@ -91,7 +64,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 1 most output
* 2 also print state alues
*/
-#define DEBUG_CMDBUF 0
+#define RADEON_CMDBUF 0
/* =============================================================
* Scissoring
@@ -312,31 +285,6 @@ void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask )
UNLOCK_HARDWARE( radeon );
}
-void radeonPolygonStipple( GLcontext *ctx, const GLubyte *mask )
-{
- radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- GLint i;
- BATCH_LOCALS(radeon);
-
- radeon_firevertices(radeon);
-
- BEGIN_BATCH_NO_AUTOSTATE(35);
-
- OUT_BATCH(CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0));
- OUT_BATCH(0x00000000);
-
- OUT_BATCH(CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31));
-
- /* Must flip pattern upside down.
- */
- for ( i = 31 ; i >= 0; i--) {
- OUT_BATCH(((GLuint *) mask)[i]);
- }
-
- END_BATCH();
-}
-
-
/* ================================================================
* SwapBuffers with client-side throttling
@@ -521,7 +469,7 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
rfb = dPriv->driverPrivate;
- if ( RADEON_DEBUG & DEBUG_IOCTL ) {
+ if ( RADEON_DEBUG & RADEON_IOCTL ) {
fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, (void *) rmesa->glCtx );
}
@@ -615,7 +563,7 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv )
LOCK_HARDWARE(radeon);
- if ( RADEON_DEBUG & DEBUG_IOCTL ) {
+ if ( RADEON_DEBUG & RADEON_IOCTL ) {
fprintf(stderr, "%s: pfCurrentPage: %d %d\n", __FUNCTION__,
radeon->sarea->pfCurrentPage, radeon->sarea->pfState);
}
@@ -875,7 +823,7 @@ void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
*/
void radeonDrawBuffer( GLcontext *ctx, GLenum mode )
{
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s %s\n", __FUNCTION__,
_mesa_lookup_enum_by_nr( mode ));
@@ -981,7 +929,7 @@ static void radeon_print_state_atom_prekmm(radeonContextPtr radeon, struct radeo
fprintf(stderr, " emit %s %d/%d\n", state->name, dwords, state->cmd_size);
- if (DEBUG_CMDBUF > 1 && RADEON_DEBUG & DEBUG_VERBOSE) {
+ if (radeon_is_debug_enabled(RADEON_STATE, RADEON_TRACE)) {
if (dwords > state->cmd_size)
dwords = state->cmd_size;
@@ -1006,7 +954,7 @@ static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state
int i, j, reg, count;
int dwords;
uint32_t packet0;
- if (! (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_STATE) )
+ if (!radeon_is_debug_enabled(RADEON_STATE, RADEON_VERBOSE) )
return;
if (!radeon->radeonScreen->kernel_mm) {
@@ -1018,7 +966,7 @@ static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state
fprintf(stderr, " emit %s %d/%d\n", state->name, dwords, state->cmd_size);
- if (DEBUG_CMDBUF > 1 && RADEON_DEBUG & DEBUG_VERBOSE) {
+ if (radeon_is_debug_enabled(RADEON_STATE, RADEON_TRACE)) {
if (dwords > state->cmd_size)
dwords = state->cmd_size;
for (i = 0; i < dwords;) {
@@ -1046,17 +994,15 @@ GLuint radeonCountStateEmitSize(radeonContextPtr radeon)
struct radeon_state_atom *atom;
GLuint dwords = 0;
/* check if we are going to emit full state */
- if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_VERBOSE)
- fprintf(stderr, "%s\n", __func__);
if (radeon->cmdbuf.cs->cdw && !radeon->hw.all_dirty) {
if (!radeon->hw.is_dirty)
- return dwords;
+ goto out;
foreach(atom, &radeon->hw.atomlist) {
if (atom->dirty) {
const GLuint atom_size = atom->check(radeon->glCtx, atom);
dwords += atom_size;
- if (DEBUG_CMDBUF && atom_size) {
+ if (RADEON_CMDBUF && atom_size) {
radeon_print_state_atom(radeon, atom);
}
}
@@ -1065,12 +1011,14 @@ GLuint radeonCountStateEmitSize(radeonContextPtr radeon)
foreach(atom, &radeon->hw.atomlist) {
const GLuint atom_size = atom->check(radeon->glCtx, atom);
dwords += atom_size;
- if (DEBUG_CMDBUF && atom_size) {
+ if (RADEON_CMDBUF && atom_size) {
radeon_print_state_atom(radeon, atom);
}
}
}
+out:
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s %u\n", __func__, dwords);
return dwords;
}
@@ -1092,10 +1040,7 @@ static INLINE void radeon_emit_atom(radeonContextPtr radeon, struct radeon_state
END_BATCH();
}
} else {
- if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_STATE) {
- fprintf(stderr, " skip state %s\n",
- atom->name);
- }
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, " skip state %s\n", atom->name);
}
atom->dirty = GL_FALSE;
@@ -1135,8 +1080,7 @@ static GLboolean radeon_revalidate_bos(GLcontext *ctx)
void radeonEmitState(radeonContextPtr radeon)
{
- if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS))
- fprintf(stderr, "%s\n", __FUNCTION__);
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s\n", __FUNCTION__);
if (radeon->vtbl.pre_emit_state)
radeon->vtbl.pre_emit_state(radeon);
@@ -1146,13 +1090,13 @@ void radeonEmitState(radeonContextPtr radeon)
return;
if (!radeon->cmdbuf.cs->cdw) {
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "Begin reemit state\n");
radeonEmitAtoms(radeon, GL_TRUE);
} else {
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "Begin dirty state\n");
radeonEmitAtoms(radeon, GL_FALSE);
@@ -1166,7 +1110,7 @@ void radeonEmitState(radeonContextPtr radeon)
void radeonFlush(GLcontext *ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s %d\n", __FUNCTION__, radeon->cmdbuf.cs->cdw);
/* okay if we have no cmds in the buffer &&
@@ -1258,7 +1202,7 @@ int rcommonFlushCmdBufLocked(radeonContextPtr rmesa, const char *caller)
}
rmesa->cmdbuf.flushing = 1;
- if (RADEON_DEBUG & DEBUG_IOCTL) {
+ if (RADEON_DEBUG & RADEON_IOCTL) {
fprintf(stderr, "%s from %s - %i cliprects\n",
__FUNCTION__, caller, rmesa->numClipRects);
}
@@ -1327,15 +1271,13 @@ void rcommonInitCmdBuf(radeonContextPtr rmesa)
if (size > 64 * 256)
size = 64 * 256;
- if (RADEON_DEBUG & (DEBUG_IOCTL | DEBUG_DMA)) {
- fprintf(stderr, "sizeof(drm_r300_cmd_header_t)=%zd\n",
- sizeof(drm_r300_cmd_header_t));
- fprintf(stderr, "sizeof(drm_radeon_cmd_buffer_t)=%zd\n",
- sizeof(drm_radeon_cmd_buffer_t));
- fprintf(stderr,
+ radeon_print(RADEON_CS, RADEON_VERBOSE,
+ "sizeof(drm_r300_cmd_header_t)=%zd\n", sizeof(drm_r300_cmd_header_t));
+ radeon_print(RADEON_CS, RADEON_VERBOSE,
+ "sizeof(drm_radeon_cmd_buffer_t)=%zd\n", sizeof(drm_radeon_cmd_buffer_t));
+ radeon_print(RADEON_CS, RADEON_VERBOSE,
"Allocating %d bytes command buffer (max state is %d bytes)\n",
size * 4, rmesa->hw.max_state_size * 4);
- }
if (rmesa->radeonScreen->kernel_mm) {
int fd = rmesa->radeonScreen->driScreen->fd;
@@ -1388,20 +1330,18 @@ void rcommonBeginBatch(radeonContextPtr rmesa, int n,
int line)
{
if (!rmesa->cmdbuf.cs->cdw && dostate) {
- if (RADEON_DEBUG & DEBUG_IOCTL)
- fprintf(stderr, "Reemit state after flush (from %s)\n", function);
+ radeon_print(RADEON_STATE, RADEON_NORMAL,
+ "Reemit state after flush (from %s)\n", function);
radeonEmitState(rmesa);
}
radeon_cs_begin(rmesa->cmdbuf.cs, n, file, function, line);
- if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_IOCTL)
- fprintf(stderr, "BEGIN_BATCH(%d) at %d, from %s:%i\n",
+ radeon_print(RADEON_CS, RADEON_VERBOSE, "BEGIN_BATCH(%d) at %d, from %s:%i\n",
n, rmesa->cmdbuf.cs->cdw, function, line);
}
void radeonUserClear(GLcontext *ctx, GLuint mask)
{
- radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- meta_clear_tris(&rmesa->meta, mask);
+ _mesa_meta_clear(ctx, mask);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
index ba983e5ab6c..f3201911ac6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common.h
@@ -10,7 +10,6 @@ void radeonRecalcScissorRects(radeonContextPtr radeon);
void radeonSetCliprects(radeonContextPtr radeon);
void radeonUpdateScissor( GLcontext *ctx );
void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
-void radeonPolygonStipple( GLcontext *ctx, const GLubyte *mask );
void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask );
void radeonWaitForIdleLocked(radeonContextPtr radeon);
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index b76efa8eaa4..71ee06d9a79 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -363,7 +363,7 @@ GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv)
{
radeonContextPtr radeon = (radeonContextPtr) driContextPriv->driverPrivate;
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s ctx %p\n", __FUNCTION__,
radeon->glCtx);
@@ -527,7 +527,7 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
char *regname;
struct radeon_bo *depth_bo = NULL, *bo;
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "enter %s, drawable %p\n", __func__, drawable);
draw = drawable->driverPrivate;
@@ -654,7 +654,7 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
continue;
}
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr,
"attaching buffer %s, %d, at %d, cpp %d, pitch %d\n",
regname, buffers[i].name, buffers[i].attachment,
@@ -667,7 +667,7 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
rb->has_surface = 0;
if (buffers[i].attachment == __DRI_BUFFER_STENCIL && depth_bo) {
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "(reusing depth buffer as stencil)\n");
bo = depth_bo;
radeon_bo_ref(bo);
@@ -740,7 +740,7 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
struct gl_framebuffer *readfb;
if (!driContextPriv) {
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s ctx is null\n", __FUNCTION__);
_mesa_make_current(NULL, NULL, NULL);
return GL_TRUE;
@@ -762,7 +762,7 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
radeon_make_renderbuffer_current(radeon, drfb);
}
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s ctx %p dfb %p rfb %p\n", __FUNCTION__, radeon->glCtx, drfb, readfb);
driUpdateFramebufferSize(radeon->glCtx, driDrawPriv);
@@ -797,7 +797,7 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
}
- if (RADEON_DEBUG & DEBUG_DRI)
+ if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "End %s\n", __FUNCTION__);
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index 3463b4d264e..0309345393d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -8,6 +8,7 @@
#include "tnl/t_context.h"
#include "main/colormac.h"
+#include "radeon_debug.h"
#include "radeon_screen.h"
#include "radeon_drm.h"
#include "dri_util.h"
@@ -18,22 +19,6 @@ struct radeon_context;
#include "radeon_bocs_wrapper.h"
-/* From http://gcc. gnu.org/onlinedocs/gcc-3.2.3/gcc/Variadic-Macros.html .
- I suppose we could inline this and use macro to fetch out __LINE__ and stuff in case we run into trouble
- with other compilers ... GLUE!
-*/
-#define WARN_ONCE(a, ...) { \
- static int warn##__LINE__=1; \
- if(warn##__LINE__){ \
- fprintf(stderr, "*********************************WARN_ONCE*********************************\n"); \
- fprintf(stderr, "File %s function %s line %d\n", \
- __FILE__, __FUNCTION__, __LINE__); \
- fprintf(stderr, a, ## __VA_ARGS__);\
- fprintf(stderr, "***************************************************************************\n"); \
- warn##__LINE__=0;\
- } \
- }
-
/* This union is used to avoid warnings/miscompilation
with float to uint32_t casts due to strict-aliasing */
typedef union { GLfloat f; uint32_t ui32; } float_ui32_type;
@@ -401,23 +386,6 @@ struct radeon_dri_mirror {
int drmMinor;
};
-#define DEBUG_TEXTURE 0x001
-#define DEBUG_STATE 0x002
-#define DEBUG_IOCTL 0x004
-#define DEBUG_PRIMS 0x008
-#define DEBUG_VERTS 0x010
-#define DEBUG_FALLBACKS 0x020
-#define DEBUG_VFMT 0x040
-#define DEBUG_CODEGEN 0x080
-#define DEBUG_VERBOSE 0x100
-#define DEBUG_DRI 0x200
-#define DEBUG_DMA 0x400
-#define DEBUG_SANITY 0x800
-#define DEBUG_SYNC 0x1000
-#define DEBUG_PIXEL 0x2000
-#define DEBUG_MEMORY 0x4000
-
-
typedef void (*radeon_tri_func) (radeonContextPtr,
radeonVertex *,
radeonVertex *, radeonVertex *);
@@ -499,6 +467,8 @@ struct radeon_context {
struct radeon_cmdbuf cmdbuf;
+ struct radeon_debug debug;
+
drm_clip_rect_t fboRect;
GLboolean constant_cliprect; /* use for FBO or DRI2 rendering */
GLboolean front_cliprects;
@@ -621,15 +591,4 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
__DRIdrawablePrivate * driReadPriv);
extern void radeonDestroyContext(__DRIcontextPrivate * driContextPriv);
-/* ================================================================
- * Debugging:
- */
-#define DO_DEBUG 1
-
-#if DO_DEBUG
-extern int RADEON_DEBUG;
-#else
-#define RADEON_DEBUG 0
-#endif
-
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 32485a72702..8f4485aee7c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -137,25 +137,6 @@ static const struct tnl_pipeline_stage *radeon_pipeline[] = {
NULL,
};
-static const struct dri_debug_control debug_control[] =
-{
- { "fall", DEBUG_FALLBACKS },
- { "tex", DEBUG_TEXTURE },
- { "ioctl", DEBUG_IOCTL },
- { "prim", DEBUG_PRIMS },
- { "vert", DEBUG_VERTS },
- { "state", DEBUG_STATE },
- { "code", DEBUG_CODEGEN },
- { "vfmt", DEBUG_VFMT },
- { "vtxf", DEBUG_VFMT },
- { "verb", DEBUG_VERBOSE },
- { "dri", DEBUG_DRI },
- { "dma", DEBUG_DMA },
- { "san", DEBUG_SANITY },
- { "sync", DEBUG_SYNC },
- { NULL, 0 }
-};
-
static void r100_get_lock(radeonContextPtr radeon)
{
r100ContextPtr rmesa = (r100ContextPtr)radeon;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h
index 572acbb0069..4e2c52c835c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_context.h
@@ -299,6 +299,11 @@ struct radeon_texture_state {
#define R100_QUERYOBJ_DATA_0 1
#define R100_QUERYOBJ_CMDSIZE 2
+#define STP_CMD_0 0
+#define STP_DATA_0 1
+#define STP_CMD_1 2
+#define STP_STATE_SIZE 35
+
struct r100_hw_state {
/* Hardware state, stored as cmdbuf commands:
* -- Need to doublebuffer for
@@ -323,7 +328,7 @@ struct r100_hw_state {
struct radeon_state_atom fog;
struct radeon_state_atom glt;
struct radeon_state_atom txr[3]; /* for NPOT */
-
+ struct radeon_state_atom stp;
};
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
index 587e2acf91d..f1addb299e2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
@@ -32,6 +32,7 @@
#include <errno.h>
#include "radeon_bocs_wrapper.h"
+#include "radeon_common.h"
struct cs_manager_legacy {
struct radeon_cs_manager base;
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.h b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.h
index e177b4bafe2..cafbc9e576e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.h
+++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.h
@@ -32,7 +32,7 @@
#ifndef RADEON_CS_LEGACY_H
#define RADEON_CS_LEGACY_H
-#include "radeon_common.h"
+struct radeon_context;
struct radeon_cs_manager *radeon_cs_manager_legacy_ctor(struct radeon_context *ctx);
void radeon_cs_manager_legacy_dtor(struct radeon_cs_manager *csm);
diff --git a/src/mesa/drivers/dri/radeon/radeon_debug.c b/src/mesa/drivers/dri/radeon/radeon_debug.c
new file mode 100644
index 00000000000..a1ed39683f1
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_debug.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright © 2009 Pauli Nieminen
+ * All Rights Reserved.
+ *
+ * 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, sub license, 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 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ */
+/*
+ * Authors:
+ * Pauli Nieminen <[email protected]>
+ */
+
+#include "utils.h"
+
+#include "radeon_debug.h"
+#include "radeon_common_context.h"
+
+static const struct dri_debug_control debug_control[] = {
+ {"fall", RADEON_FALLBACKS},
+ {"tex", RADEON_TEXTURE},
+ {"ioctl", RADEON_IOCTL},
+ {"verts", RADEON_RENDER},
+ {"render", RADEON_RENDER},
+ {"swrender", RADEON_SWRENDER},
+ {"state", RADEON_STATE},
+ {"shader", RADEON_SHADER},
+ {"vfmt", RADEON_VFMT},
+ {"vtxf", RADEON_VFMT},
+ {"dri", RADEON_DRI},
+ {"dma", RADEON_DMA},
+ {"sanity", RADEON_SANITY},
+ {"sync", RADEON_SYNC},
+ {"pixel", RADEON_PIXEL},
+ {"mem", RADEON_MEMORY},
+ {"cs", RADEON_CS},
+ {"allmsg", ~RADEON_SYNC}, /* avoid the term "sync" because the parser uses strstr */
+ {NULL, 0}
+};
+
+radeon_debug_type_t radeon_enabled_debug_types;
+
+void radeon_init_debug(void)
+{
+ radeon_enabled_debug_types = driParseDebugString(getenv("RADEON_DEBUG"), debug_control);
+
+ radeon_enabled_debug_types |= RADEON_GENERAL;
+}
+
+void _radeon_debug_add_indent(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ const size_t length = sizeof(radeon->debug.indent)
+ / sizeof(radeon->debug.indent[0]);
+ if (radeon->debug.indent_depth < length - 1) {
+ radeon->debug.indent[radeon->debug.indent_depth] = '\t';
+ ++radeon->debug.indent_depth;
+ };
+}
+
+void _radeon_debug_remove_indent(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ if (radeon->debug.indent_depth > 0) {
+ radeon->debug.indent[radeon->debug.indent_depth] = '\0';
+ --radeon->debug.indent_depth;
+ }
+}
+
+extern void _radeon_print(const radeon_debug_type_t type,
+ const radeon_debug_level_t level,
+ const char* message,
+ va_list values)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (ctx) {
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ // FIXME: Make this multi thread safe
+ if (radeon->debug.indent_depth)
+ fprintf(stderr, "%s", radeon->debug.indent);
+ }
+ vfprintf(stderr, message, values);
+}
diff --git a/src/mesa/drivers/dri/radeon/radeon_debug.h b/src/mesa/drivers/dri/radeon/radeon_debug.h
new file mode 100644
index 00000000000..132e27351da
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_debug.h
@@ -0,0 +1,191 @@
+/*
+ * Copyright © 2009 Pauli Nieminen
+ * All Rights Reserved.
+ *
+ * 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, sub license, 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 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ */
+/*
+ * Authors:
+ * Pauli Nieminen <[email protected]>
+ */
+
+#ifndef RADEON_DEBUG_H_INCLUDED
+#define RADEON_DEBUG_H_INCLUDED
+
+#include <stdarg.h>
+#include <stdio.h>
+
+typedef enum radeon_debug_levels {
+ RADEON_CRITICAL = 0, /* Only errors */
+ RADEON_IMPORTANT = 1, /* Important warnings and messages */
+ RADEON_NORMAL = 2, /* Normal log messages usefull for debugging */
+ RADEON_VERBOSE = 3, /* Extra details to debugging */
+ RADEON_TRACE = 4 /* Log about everything that happens */
+} radeon_debug_level_t;
+
+/**
+ * Compile time option to change level of debugging compiled to dri driver.
+ * Selecting critical level is not recommended because perfromance gains are
+ * going to minimal but you will lose a lot of important warnings in case of
+ * errors.
+ */
+#ifndef RADEON_DEBUG_LEVEL
+#define RADEON_DEBUG_LEVEL RADEON_VERBOSE
+#endif
+
+typedef enum radeon_debug_types {
+ RADEON_TEXTURE = 0x00001,
+ RADEON_STATE = 0x00002,
+ RADEON_IOCTL = 0x00004,
+ RADEON_RENDER = 0x00008,
+ RADEON_SWRENDER = 0x00010,
+ RADEON_FALLBACKS = 0x00020,
+ RADEON_VFMT = 0x00040,
+ RADEON_SHADER = 0x00080,
+ RADEON_CS = 0x00100,
+ RADEON_DRI = 0x00200,
+ RADEON_DMA = 0x00400,
+ RADEON_SANITY = 0x00800,
+ RADEON_SYNC = 0x01000,
+ RADEON_PIXEL = 0x02000,
+ RADEON_MEMORY = 0x04000,
+ RADEON_VERTS = 0x08000,
+ RADEON_GENERAL = 0x10000 /* Used for errors and warnings */
+} radeon_debug_type_t;
+
+#define RADEON_MAX_INDENT 5
+
+struct radeon_debug {
+ size_t indent_depth;
+ char indent[RADEON_MAX_INDENT];
+};
+
+extern radeon_debug_type_t radeon_enabled_debug_types;
+
+/**
+ * Compabibility layer for old debug code
+ **/
+#define RADEON_DEBUG radeon_enabled_debug_types
+
+static inline int radeon_is_debug_enabled(const radeon_debug_type_t type,
+ const radeon_debug_level_t level)
+{
+ return RADEON_DEBUG_LEVEL >= level
+ && (type & radeon_enabled_debug_types);
+}
+/*
+ * define macro for gcc specific __attribute__ if using alternative compiler
+ */
+#ifndef __GNUC__
+#define __attribute__(x) /*empty*/
+#endif
+
+
+extern void _radeon_print(const radeon_debug_type_t type,
+ const radeon_debug_level_t level,
+ const char* message,
+ va_list values);
+/**
+ * Format attribute requires declaration for setting it. Don't ask me why!
+ */
+static inline void radeon_print(const radeon_debug_type_t type,
+ const radeon_debug_level_t level,
+ const char* message,
+ ...) __attribute__((format(printf,3,4)));
+
+/**
+ * Print out debug message if channel specified by type is enabled
+ * and compile time debugging level is at least as high as level parameter
+ */
+static inline void radeon_print(const radeon_debug_type_t type,
+ const radeon_debug_level_t level,
+ const char* message,
+ ...)
+{
+ /* Compile out if level of message is too high */
+ if (radeon_is_debug_enabled(type, level)) {
+
+ va_list values;
+ va_start( values, message );
+ _radeon_print(type, level, message, values);
+ va_end( values );
+ }
+}
+
+static inline void radeon_error(const char* message, ...) __attribute__((format(printf,1,2)));
+/**
+ * printf style function for writing error messages.
+ */
+static inline void radeon_error(const char* message, ...)
+{
+ va_list values;
+ va_start( values, message );
+ radeon_print(RADEON_GENERAL, RADEON_CRITICAL, message, values);
+ va_end( values );
+}
+
+static inline void radeon_warning(const char* message, ...) __attribute__((format(printf,1,2)));
+/**
+ * printf style function for writing warnings.
+ */
+static inline void radeon_warning(const char* message, ...)
+{
+ va_list values;
+ va_start( values, message );
+ radeon_print(RADEON_GENERAL, RADEON_IMPORTANT, message, values);
+ va_end( values );
+}
+
+extern void radeon_init_debug(void);
+extern void _radeon_debug_add_indent(void);
+extern void _radeon_debug_remove_indent(void);
+
+static inline void radeon_debug_add_indent(void)
+{
+ if (RADEON_DEBUG_LEVEL >= RADEON_VERBOSE) {
+ _radeon_debug_add_indent();
+ }
+}
+static inline void radeon_debug_remove_indent(void)
+{
+ if (RADEON_DEBUG_LEVEL >= RADEON_VERBOSE) {
+ _radeon_debug_remove_indent();
+ }
+}
+
+/* From http://gcc. gnu.org/onlinedocs/gcc-3.2.3/gcc/Variadic-Macros.html .
+ I suppose we could inline this and use macro to fetch out __LINE__ and stuff in case we run into trouble
+ with other compilers ... GLUE!
+*/
+#define WARN_ONCE(a, ...) { \
+ static int warn##__LINE__=1; \
+ if(warn##__LINE__){ \
+ radeon_warning("*********************************WARN_ONCE*********************************\n"); \
+ radeon_warning("File %s function %s line %d\n", \
+ __FILE__, __FUNCTION__, __LINE__); \
+ radeon_warning( (a), ## __VA_ARGS__);\
+ radeon_warning("***************************************************************************\n"); \
+ warn##__LINE__=0;\
+ } \
+ }
+
+
+#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index 386262b126e..2eefa3f2b1b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.c
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.c
@@ -58,7 +58,7 @@ void radeonEmitVec4(uint32_t *out, const GLvoid * data, int stride, int count)
{
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d out %p data %p\n",
__FUNCTION__, count, stride, (void *)out, (void *)data);
@@ -76,7 +76,7 @@ void radeonEmitVec8(uint32_t *out, const GLvoid * data, int stride, int count)
{
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d out %p data %p\n",
__FUNCTION__, count, stride, (void *)out, (void *)data);
@@ -95,7 +95,7 @@ void radeonEmitVec12(uint32_t *out, const GLvoid * data, int stride, int count)
{
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d out %p data %p\n",
__FUNCTION__, count, stride, (void *)out, (void *)data);
@@ -116,7 +116,7 @@ void radeonEmitVec16(uint32_t *out, const GLvoid * data, int stride, int count)
{
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d out %p data %p\n",
__FUNCTION__, count, stride, (void *)out, (void *)data);
@@ -179,8 +179,8 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size)
if (size > rmesa->dma.minimum_size)
rmesa->dma.minimum_size = (size + 15) & (~15);
- if (RADEON_DEBUG & (DEBUG_IOCTL | DEBUG_DMA))
- fprintf(stderr, "%s\n", __FUNCTION__);
+ radeon_print(RADEON_DMA, RADEON_NORMAL, "%s size %d minimum_size %d\n",
+ __FUNCTION__, size, rmesa->dma.minimum_size);
/* unmap old reserved bo */
@@ -235,7 +235,7 @@ void radeonAllocDmaRegion(radeonContextPtr rmesa,
struct radeon_bo **pbo, int *poffset,
int bytes, int alignment)
{
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s %d\n", __FUNCTION__, bytes);
if (rmesa->dma.flush)
@@ -265,7 +265,7 @@ void radeonFreeDmaRegions(radeonContextPtr rmesa)
{
struct radeon_dma_bo *dma_bo = CALLOC_STRUCT(radeon_dma_bo);
struct radeon_dma_bo *temp;
- if (RADEON_DEBUG & DEBUG_DMA)
+ if (RADEON_DEBUG & RADEON_DMA)
fprintf(stderr, "%s\n", __FUNCTION__);
foreach_s(dma_bo, temp, &rmesa->dma.free) {
@@ -293,7 +293,7 @@ void radeonReturnDmaRegion(radeonContextPtr rmesa, int return_bytes)
if (is_empty_list(&rmesa->dma.reserved))
return;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s %d\n", __FUNCTION__, return_bytes);
rmesa->dma.current_used -= return_bytes;
rmesa->dma.current_vertexptr = rmesa->dma.current_used;
@@ -317,7 +317,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
const int expire_at = ++rmesa->dma.free.expire_counter + DMA_BO_FREE_TIME;
const int time = rmesa->dma.free.expire_counter;
- if (RADEON_DEBUG & DEBUG_DMA) {
+ if (RADEON_DEBUG & RADEON_DMA) {
size_t free = 0,
wait = 0,
reserved = 0;
@@ -399,7 +399,7 @@ void rcommon_flush_last_swtcl_prim( GLcontext *ctx )
struct radeon_dma *dma = &rmesa->dma;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
dma->flush = NULL;
@@ -425,7 +425,7 @@ rcommonAllocDmaLowVerts( radeonContextPtr rmesa, int nverts, int vsize )
{
GLuint bytes = vsize * nverts;
void *head;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
if(is_empty_list(&rmesa->dma.reserved)
||rmesa->dma.current_vertexptr + bytes > first_elem(&rmesa->dma.reserved)->bo->size) {
@@ -460,7 +460,7 @@ void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs )
{
radeonContextPtr radeon = RADEON_CONTEXT( ctx );
int i;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
if (radeon->dma.flush) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 6f0cc08770c..d83b166742c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -40,7 +40,7 @@
#include "radeon_common.h"
#include "radeon_mipmap_tree.h"
-#define FILE_DEBUG_FLAG DEBUG_TEXTURE
+#define FILE_DEBUG_FLAG RADEON_TEXTURE
#define DBG(...) do { \
if (RADEON_DEBUG & FILE_DEBUG_FLAG) \
_mesa_printf(__VA_ARGS__); \
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index 9ced62418bd..a0106d00fa2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -200,7 +200,7 @@ void radeonFlushElts( GLcontext *ctx )
uint32_t *cmd = (uint32_t *)(rmesa->radeon.cmdbuf.cs->packets + rmesa->tcl.elt_cmd_start);
int dwords = (rmesa->radeon.cmdbuf.cs->section_ndw - rmesa->radeon.cmdbuf.cs->section_cdw);
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
assert( rmesa->radeon.dma.flush == radeonFlushElts );
@@ -236,7 +236,7 @@ void radeonFlushElts( GLcontext *ctx )
END_BATCH();
- if (RADEON_DEBUG & DEBUG_SYNC) {
+ if (RADEON_DEBUG & RADEON_SYNC) {
fprintf(stderr, "%s: Syncing\n", __FUNCTION__);
radeonFinish( rmesa->radeon.glCtx );
}
@@ -252,7 +252,7 @@ GLushort *radeonAllocEltsOpenEnded( r100ContextPtr rmesa,
int align_min_nr;
BATCH_LOCALS(&rmesa->radeon);
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s %d prim %x\n", __FUNCTION__, min_nr, primitive);
assert((primitive & RADEON_CP_VC_CNTL_PRIM_WALK_IND));
@@ -296,7 +296,7 @@ GLushort *radeonAllocEltsOpenEnded( r100ContextPtr rmesa,
retval = (GLushort *)(rmesa->radeon.cmdbuf.cs->packets + rmesa->tcl.elt_cmd_offset);
- if (RADEON_DEBUG & DEBUG_PRIMS)
+ if (RADEON_DEBUG & RADEON_RENDER)
fprintf(stderr, "%s: header prim %x \n",
__FUNCTION__, primitive);
@@ -318,7 +318,7 @@ void radeonEmitVertexAOS( r100ContextPtr rmesa,
#else
BATCH_LOCALS(&rmesa->radeon);
- if (RADEON_DEBUG & (DEBUG_PRIMS|DEBUG_IOCTL))
+ if (RADEON_DEBUG & (RADEON_PRIMS|DEBUG_IOCTL))
fprintf(stderr, "%s: vertex_size 0x%x offset 0x%x \n",
__FUNCTION__, vertex_size, offset);
@@ -350,7 +350,7 @@ void radeonEmitAOS( r100ContextPtr rmesa,
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
- if (RADEON_DEBUG & DEBUG_IOCTL)
+ if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
BEGIN_BATCH(sz+2+(nr * 2));
@@ -575,7 +575,7 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask )
GLuint color_mask = 0;
GLuint orig_mask = mask;
- if ( RADEON_DEBUG & DEBUG_IOCTL ) {
+ if ( RADEON_DEBUG & RADEON_IOCTL ) {
fprintf( stderr, "radeonClear\n");
}
@@ -611,7 +611,7 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask )
}
if ( mask ) {
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "%s: swrast clear, mask: %x\n", __FUNCTION__, mask);
_swrast_Clear( ctx, mask );
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_lighting.c b/src/mesa/drivers/dri/radeon/radeon_lighting.c
index ac3b94e4a68..ba444f2b100 100644
--- a/src/mesa/drivers/dri/radeon/radeon_lighting.c
+++ b/src/mesa/drivers/dri/radeon/radeon_lighting.c
@@ -195,7 +195,7 @@ void radeonUpdateMaterial( GLcontext *ctx )
if (ctx->Light.ColorMaterialEnabled)
mask &= ~ctx->Light.ColorMaterialBitmask;
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
@@ -234,7 +234,7 @@ void radeonUpdateMaterial( GLcontext *ctx )
check_twoside_fallback( ctx );
update_global_ambient( ctx );
}
- else if (RADEON_DEBUG & (DEBUG_PRIMS|DEBUG_STATE))
+ else if (RADEON_DEBUG & (RADEON_PRIMS|DEBUG_STATE))
fprintf(stderr, "%s: Elided noop material call\n", __FUNCTION__);
}
@@ -624,7 +624,7 @@ static void radeonLightingSpaceChange( GLcontext *ctx )
GLboolean tmp;
RADEON_STATECHANGE( rmesa, tcl );
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s %d\n", __FUNCTION__, ctx->_NeedEyeCoords);
if (ctx->_NeedEyeCoords)
diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c
index 6294b7e42be..02de8e5fd1d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_lock.c
+++ b/src/mesa/drivers/dri/radeon/radeon_lock.c
@@ -131,7 +131,7 @@ void radeon_lock_hardware(radeonContextPtr radeon
if (ATOMIC_INC_AND_FETCH(radeon->dri.hwLockCount) > 1)
{
#ifndef NDEBUG
- if ( RADEON_DEBUG & DEBUG_SANITY )
+ if ( RADEON_DEBUG & RADEON_SANITY )
fprintf(stderr, "*** %d times of recursive call to %s ***\n"
"Original call was from %s (file: %s line: %d)\n"
"Now call is coming from %s (file: %s line: %d)\n"
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
index 7c6ea0530e0..08e1c5d00df 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
@@ -56,7 +56,7 @@ static void emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
int size = 1;
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d\n",
__FUNCTION__, count, stride);
@@ -87,7 +87,7 @@ static void emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
static void emit_s0_vec(uint32_t *out, GLvoid *data, int stride, int count)
{
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d\n",
__FUNCTION__, count, stride);
@@ -103,7 +103,7 @@ static void emit_stq_vec(uint32_t *out, GLvoid *data, int stride, int count)
{
int i;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s count %d stride %d\n",
__FUNCTION__, count, stride);
@@ -126,7 +126,7 @@ static void emit_tex_vector(GLcontext *ctx, struct radeon_aos *aos,
int emitsize;
uint32_t *out;
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s %d/%d\n", __FUNCTION__, count, size);
switch (size) {
@@ -188,7 +188,7 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
GLuint vtx, unit;
#if 0
- if (RADEON_DEBUG & DEBUG_VERTS)
+ if (RADEON_DEBUG & RADEON_VERTS)
_tnl_print_vert_flags( __FUNCTION__, inputs );
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h b/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
index 034cda8a65b..515783135d6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
@@ -54,8 +54,7 @@ static void TAG(emit)( GLcontext *ctx,
union emit_union *v = (union emit_union *)dest;
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __FUNCTION__);
coord = (GLuint (*)[4])VB->ObjPtr->data;
coord_stride = VB->ObjPtr->stride;
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index eba9f5857f2..38db305e2a7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -121,7 +121,7 @@ static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree
lvl->faces[face].offset = *curOffset;
*curOffset += lvl->size;
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr,
"level %d, face %d: rs:%d %dx%d at %d\n",
level, face, lvl->rowstride, lvl->width, lvl->height, lvl->faces[face].offset);
@@ -190,13 +190,14 @@ static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_
* Create a new mipmap tree, calculate its layout and allocate memory.
*/
radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa, radeonTexObj *t,
- GLenum target, GLuint firstLevel, GLuint lastLevel,
+ GLenum target, GLenum internal_format, GLuint firstLevel, GLuint lastLevel,
GLuint width0, GLuint height0, GLuint depth0,
GLuint bpp, GLuint tilebits, GLuint compressed)
{
radeon_mipmap_tree *mt = CALLOC_STRUCT(_radeon_mipmap_tree);
mt->radeon = rmesa;
+ mt->internal_format = internal_format;
mt->refcount = 1;
mt->t = t;
mt->target = target;
@@ -318,8 +319,8 @@ GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
if (face >= mt->faces || level < mt->firstLevel || level > mt->lastLevel)
return GL_FALSE;
- if ((!texImage->IsCompressed && mt->compressed) ||
- (texImage->IsCompressed && !mt->compressed))
+ if (texImage->InternalFormat != mt->internal_format ||
+ texImage->IsCompressed != mt->compressed)
return GL_FALSE;
if (!texImage->IsCompressed &&
@@ -369,9 +370,9 @@ GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_textu
* given image in the given position.
*/
void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
- struct gl_texture_image *texImage, GLuint face, GLuint level)
+ radeon_texture_image *image, GLuint face, GLuint level)
{
- GLuint compressed = texImage->IsCompressed ? texImage->TexFormat->MesaFormat : 0;
+ GLuint compressed = image->base.IsCompressed ? image->base.TexFormat->MesaFormat : 0;
GLuint numfaces = 1;
GLuint firstLevel, lastLevel;
@@ -385,9 +386,10 @@ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
return;
t->mt = radeon_miptree_create(rmesa, t, t->base.Target,
+ image->base.InternalFormat,
firstLevel, lastLevel,
- texImage->Width, texImage->Height, texImage->Depth,
- texImage->TexFormat->TexelBytes, t->tile_bits, compressed);
+ image->base.Width, image->base.Height, image->base.Depth,
+ image->base.TexFormat->TexelBytes, t->tile_bits, compressed);
}
/* Although we use the image_offset[] array to store relative offsets
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
index 7ece688493d..db28252da37 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
@@ -67,6 +67,7 @@ struct _radeon_mipmap_tree {
GLuint totalsize; /** total size of the miptree, in bytes */
GLenum target; /** GL_TEXTURE_xxx */
+ GLenum internal_format;
GLuint faces; /** # of faces: 6 for cubemaps, 1 otherwise */
GLuint firstLevel; /** First mip level stored in this mipmap tree */
GLuint lastLevel; /** Last mip level stored in this mipmap tree */
@@ -83,7 +84,7 @@ struct _radeon_mipmap_tree {
};
radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa, radeonTexObj *t,
- GLenum target, GLuint firstLevel, GLuint lastLevel,
+ GLenum target, GLenum internal_format, GLuint firstLevel, GLuint lastLevel,
GLuint width0, GLuint height0, GLuint depth0,
GLuint bpp, GLuint tilebits, GLuint compressed);
void radeon_miptree_reference(radeon_mipmap_tree *mt);
@@ -93,7 +94,7 @@ GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
struct gl_texture_image *texImage, GLuint face, GLuint level);
GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_texture_object *texObj);
void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
- struct gl_texture_image *texImage, GLuint face, GLuint level);
+ radeon_texture_image *texImage, GLuint face, GLuint level);
GLuint radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level);
void radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level, GLuint *offsets);
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
index 7eef4faaf61..b79d864ba29 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
@@ -26,12 +26,11 @@
*/
#include "radeon_common.h"
#include "radeon_queryobj.h"
+#include "radeon_debug.h"
#include "main/imports.h"
#include "main/simple_list.h"
-#define DDEBUG 0
-
static int radeonQueryIsFlushed(GLcontext *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
@@ -52,7 +51,9 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
uint32_t *result;
int i;
- if (DDEBUG) fprintf(stderr, "%s: query id %d, result %d\n", __FUNCTION__, query->Base.Id, (int) query->Base.Result);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE,
+ "%s: query id %d, result %d\n",
+ __FUNCTION__, query->Base.Id, (int) query->Base.Result);
radeon_bo_map(query->bo, GL_FALSE);
@@ -61,7 +62,7 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
query->Base.Result = 0;
for (i = 0; i < query->curr_offset/sizeof(uint32_t); ++i) {
query->Base.Result += result[i];
- if (DDEBUG) fprintf(stderr, "result[%d] = %d\n", i, result[i]);
+ radeon_print(RADEON_STATE, RADEON_TRACE, "result[%d] = %d\n", i, result[i]);
}
radeon_bo_unmap(query->bo);
@@ -78,7 +79,7 @@ static struct gl_query_object * radeonNewQueryObject(GLcontext *ctx, GLuint id)
query->Base.Active = GL_FALSE;
query->Base.Ready = GL_TRUE;
- if (DDEBUG) fprintf(stderr, "%s: query id %d\n", __FUNCTION__, query->Base.Id);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE,"%s: query id %d\n", __FUNCTION__, query->Base.Id);
return &query->Base;
}
@@ -87,7 +88,7 @@ static void radeonDeleteQuery(GLcontext *ctx, struct gl_query_object *q)
{
struct radeon_query_object *query = (struct radeon_query_object *)q;
- if (DDEBUG) fprintf(stderr, "%s: query id %d\n", __FUNCTION__, q->Id);
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s: query id %d\n", __FUNCTION__, q->Id);
if (query->bo) {
radeon_bo_unref(query->bo);
@@ -104,7 +105,7 @@ static void radeonWaitQuery(GLcontext *ctx, struct gl_query_object *q)
if (!radeonQueryIsFlushed(ctx, q))
ctx->Driver.Flush(ctx);
- if (DDEBUG) fprintf(stderr, "%s: query id %d, bo %p, offset %d\n", __FUNCTION__, q->Id, query->bo, query->curr_offset);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s: query id %d, bo %p, offset %d\n", __FUNCTION__, q->Id, query->bo, query->curr_offset);
radeonQueryGetResult(ctx, q);
@@ -117,7 +118,7 @@ static void radeonBeginQuery(GLcontext *ctx, struct gl_query_object *q)
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
- if (DDEBUG) fprintf(stderr, "%s: query id %d\n", __FUNCTION__, q->Id);
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s: query id %d\n", __FUNCTION__, q->Id);
assert(radeon->query.current == NULL);
@@ -132,6 +133,7 @@ static void radeonBeginQuery(GLcontext *ctx, struct gl_query_object *q)
radeon->query.current = query;
radeon->query.queryobj.dirty = GL_TRUE;
+ radeon->hw.is_dirty = GL_TRUE;
insert_at_tail(&radeon->query.not_flushed_head, query);
}
@@ -147,7 +149,7 @@ void radeonEmitQueryEnd(GLcontext *ctx)
if (query->emitted_begin == GL_FALSE)
return;
- if (DDEBUG) fprintf(stderr, "%s: query id %d, bo %p, offset %d\n", __FUNCTION__, query->Base.Id, query->bo, query->curr_offset);
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s: query id %d, bo %p, offset %d\n", __FUNCTION__, query->Base.Id, query->bo, query->curr_offset);
radeon_cs_space_check_with_bo(radeon->cmdbuf.cs,
query->bo,
@@ -160,7 +162,7 @@ static void radeonEndQuery(GLcontext *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- if (DDEBUG) fprintf(stderr, "%s: query id %d\n", __FUNCTION__, q->Id);
+ radeon_print(RADEON_STATE, RADEON_NORMAL, "%s: query id %d\n", __FUNCTION__, q->Id);
if (radeon->dma.flush)
radeon->dma.flush(radeon->glCtx);
@@ -171,7 +173,7 @@ static void radeonEndQuery(GLcontext *ctx, struct gl_query_object *q)
static void radeonCheckQuery(GLcontext *ctx, struct gl_query_object *q)
{
- if (DDEBUG) fprintf(stderr, "%s: query id %d\n", __FUNCTION__, q->Id);
+ radeon_print(RADEON_STATE, RADEON_TRACE, "%s: query id %d\n", __FUNCTION__, q->Id);
#ifdef DRM_RADEON_GEM_BUSY
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/radeon/radeon_sanity.c b/src/mesa/drivers/dri/radeon/radeon_sanity.c
index bbed838b592..1ab570f5071 100644
--- a/src/mesa/drivers/dri/radeon/radeon_sanity.c
+++ b/src/mesa/drivers/dri/radeon/radeon_sanity.c
@@ -44,11 +44,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define MORE_VERBOSE 1
#if MORE_VERBOSE
-#define VERBOSE (RADEON_DEBUG & DEBUG_VERBOSE)
+#define VERBOSE (RADEON_DEBUG & RADEON_VERBOSE)
#define NORMAL (1)
#else
#define VERBOSE 0
-#define NORMAL (RADEON_DEBUG & DEBUG_VERBOSE)
+#define NORMAL (RADEON_DEBUG & RADEON_VERBOSE)
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index e8b2dc89fe9..5ffb55db5ef 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -220,30 +220,6 @@ static const GLuint __driNConfigOptions = 17;
extern const struct dri_extension gl_20_extension[];
-#ifndef RADEON_DEBUG
-
-static const struct dri_debug_control debug_control[] = {
- {"fall", DEBUG_FALLBACKS},
- {"tex", DEBUG_TEXTURE},
- {"ioctl", DEBUG_IOCTL},
- {"prim", DEBUG_PRIMS},
- {"vert", DEBUG_VERTS},
- {"state", DEBUG_STATE},
- {"code", DEBUG_CODEGEN},
- {"vfmt", DEBUG_VFMT},
- {"vtxf", DEBUG_VFMT},
- {"verb", DEBUG_VERBOSE},
- {"dri", DEBUG_DRI},
- {"dma", DEBUG_DMA},
- {"san", DEBUG_SANITY},
- {"sync", DEBUG_SYNC},
- {"pix", DEBUG_PIXEL},
- {"mem", DEBUG_MEMORY},
- {"allmsg", ~DEBUG_SYNC}, /* avoid the term "sync" because the parser uses strstr */
- {NULL, 0}
-};
-#endif /* RADEON_DEBUG */
-
#endif /* RADEON_COMMON && defined(RADEON_COMMON_FOR_R300) */
extern const struct dri_extension card_extensions[];
@@ -868,6 +844,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
case PCI_CHIP_RV770_9440:
case PCI_CHIP_RV770_9441:
case PCI_CHIP_RV770_9442:
+ case PCI_CHIP_RV770_9443:
case PCI_CHIP_RV770_9444:
case PCI_CHIP_RV770_9446:
case PCI_CHIP_RV770_944A:
@@ -965,9 +942,8 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
return NULL;
}
-#if DO_DEBUG && RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
- RADEON_DEBUG = driParseDebugString(getenv("RADEON_DEBUG"), debug_control);
-#endif
+ radeon_init_debug();
+
/* parse information in __driConfigOptions */
driParseOptionInfo (&screen->optionCache,
__driConfigOptions, __driNConfigOptions);
@@ -1300,9 +1276,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
return NULL;
}
-#if DO_DEBUG && RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
- RADEON_DEBUG = driParseDebugString(getenv("RADEON_DEBUG"), debug_control);
-#endif
+ radeon_init_debug();
/* parse information in __driConfigOptions */
driParseOptionInfo (&screen->optionCache,
@@ -1716,6 +1690,8 @@ __DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp)
driInitSingleExtension( NULL, NV_vp_extension );
driInitSingleExtension( NULL, ATI_fs_extension );
driInitExtensions( NULL, point_extensions, GL_FALSE );
+#elif (defined(RADEON_COMMON_FOR_R300) || defined(RADEON_COMMON_FOR_R600))
+ driInitSingleExtension( NULL, gl_20_extension );
#endif
if (!radeonInitDriver(psp)) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index e03551d6664..4d0d35ee0cd 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -814,7 +814,7 @@ void radeonUpdateMaterial( GLcontext *ctx )
if (ctx->Light.ColorMaterialEnabled)
mask &= ~ctx->Light.ColorMaterialBitmask;
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
@@ -1548,7 +1548,7 @@ static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state )
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint p, flag;
- if ( RADEON_DEBUG & DEBUG_STATE )
+ if ( RADEON_DEBUG & RADEON_STATE )
fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr( cap ),
state ? "GL_TRUE" : "GL_FALSE" );
@@ -1842,7 +1842,7 @@ static void radeonLightingSpaceChange( GLcontext *ctx )
GLboolean tmp;
RADEON_STATECHANGE( rmesa, tcl );
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s %d BEFORE %x\n", __FUNCTION__, ctx->_NeedEyeCoords,
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL]);
@@ -1857,7 +1857,7 @@ static void radeonLightingSpaceChange( GLcontext *ctx )
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_RESCALE_NORMALS;
}
- if (RADEON_DEBUG & DEBUG_STATE)
+ if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s %d AFTER %x\n", __FUNCTION__, ctx->_NeedEyeCoords,
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL]);
}
@@ -2197,6 +2197,22 @@ static void radeonWrapRunPipeline( GLcontext *ctx )
}
}
+static void radeonPolygonStipple( GLcontext *ctx, const GLubyte *mask )
+{
+ r100ContextPtr r100 = R100_CONTEXT(ctx);
+ GLint i;
+
+ radeon_firevertices(&r100->radeon);
+
+ RADEON_STATECHANGE(r100, stp);
+
+ /* Must flip pattern upside down.
+ */
+ for ( i = 31 ; i >= 0; i--) {
+ r100->hw.stp.cmd[3 + i] = ((GLuint *) mask)[i];
+ }
+}
+
/* Initialize the driver's state functions.
* Many of the ctx->Driver functions might have been initialized to
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index d014fb5c061..f3ad0dd17af 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -573,7 +573,7 @@ static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
for (j = 0; j < 5; j++) {
OUT_BATCH(CP_PACKET0(base_reg + (4 * j), 0));
OUT_BATCH_RELOC(lvl->faces[j].offset, t->mt->bo, lvl->faces[j].offset,
- RADEON_GEM_DOMAIN_VRAM, 0, 0);
+ RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
}
END_BATCH();
}
@@ -781,6 +781,10 @@ void radeonInitState( r100ContextPtr rmesa )
ALLOC_STATE( ucp[5], tcl_ucp5, UCP_STATE_SIZE, "UCP/userclip-5", 1 );
}
+ if (rmesa->radeon.radeonScreen->kernel_mm) {
+ ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
+ }
+
for (i = 0; i < 3; i++) {
if (rmesa->radeon.radeonScreen->kernel_mm)
rmesa->hw.tex[i].emit = tex_emit_cs;
@@ -873,6 +877,10 @@ void radeonInitState( r100ContextPtr rmesa )
}
if (rmesa->radeon.radeonScreen->kernel_mm) {
+ rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
+ rmesa->hw.stp.cmd[STP_DATA_0] = 0;
+ rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
+
rmesa->hw.grd.emit = scl_emit;
rmesa->hw.fog.emit = vec_emit;
rmesa->hw.glt.emit = vec_emit;
@@ -1143,7 +1151,7 @@ void radeonInitState( r100ContextPtr rmesa )
rmesa->hw.eye.cmd[EYE_Y] = 0;
rmesa->hw.eye.cmd[EYE_Z] = IEEE_ONE;
rmesa->hw.eye.cmd[EYE_RESCALE_FACTOR] = IEEE_ONE;
-
+
if (rmesa->radeon.radeonScreen->kernel_mm) {
radeon_init_query_stateobj(&rmesa->radeon, R100_QUERYOBJ_CMDSIZE);
rmesa->radeon.query.queryobj.cmd[R100_QUERYOBJ_CMD_0] = CP_PACKET0(RADEON_RB3D_ZPASS_DATA, 0);
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 32df569257a..e61f59eaeaf 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -51,6 +51,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_state.h"
#include "radeon_swtcl.h"
#include "radeon_tcl.h"
+#include "radeon_debug.h"
/* R100: xyzw, c0, c1/fog, stq[0..2] = 4+1+1+3*3 = 15 right? */
@@ -214,9 +215,8 @@ static void radeonSetVertexFormat( GLcontext *ctx )
NULL, 0 );
rmesa->radeon.swtcl.vertex_size /= 4;
RENDERINPUTS_COPY( rmesa->radeon.tnl_index_bitset, index_bitset );
- if (RADEON_DEBUG & DEBUG_VERTS)
- fprintf( stderr, "%s: vertex_size= %d floats\n",
- __FUNCTION__, rmesa->radeon.swtcl.vertex_size);
+ radeon_print(RADEON_SWRENDER, RADEON_VERBOSE,
+ "%s: vertex_size= %d floats\n", __FUNCTION__, rmesa->radeon.swtcl.vertex_size);
}
}
@@ -420,8 +420,8 @@ static GLboolean radeon_run_render( GLcontext *ctx,
if (!length)
continue;
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "radeon_render.c: prim %s %d..%d\n",
+ radeon_print(RADEON_SWRENDER, RADEON_NORMAL,
+ "radeon_render.c: prim %s %d..%d\n",
_mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK),
start, start+length);
@@ -784,7 +784,7 @@ void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_RASTER, GL_TRUE );
_swsetup_Wakeup( ctx );
rmesa->radeon.swtcl.RenderIndex = ~0;
- if (RADEON_DEBUG & DEBUG_FALLBACKS) {
+ if (RADEON_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "Radeon begin rasterization fallback: 0x%x %s\n",
bit, getFallbackString(bit));
}
@@ -815,7 +815,7 @@ void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
radeonChooseVertexState( ctx );
radeonChooseRenderState( ctx );
}
- if (RADEON_DEBUG & DEBUG_FALLBACKS) {
+ if (RADEON_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "Radeon end rasterization fallback: 0x%x %s\n",
bit, getFallbackString(bit));
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index 2404f284505..b334ea05e5b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -587,7 +587,7 @@ static void transition_to_hwtnl( GLcontext *ctx )
// radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts,
// __FUNCTION__ );
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "Radeon end tcl fallback\n");
}
@@ -624,7 +624,7 @@ void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
if (mode) {
rmesa->radeon.TclFallback |= bit;
if (oldfallback == 0) {
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "Radeon begin tcl fallback %s\n",
getFallbackString( bit ));
transition_to_swtnl( ctx );
@@ -633,7 +633,7 @@ void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
else {
rmesa->radeon.TclFallback &= ~bit;
if (oldfallback == bit) {
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "Radeon end tcl fallback %s\n",
getFallbackString( bit ));
transition_to_hwtnl( ctx );
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index 2549d5cb5cb..99865fff27b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -263,7 +263,7 @@ static void radeonTexEnv( GLcontext *ctx, GLenum target,
GLuint unit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
- if ( RADEON_DEBUG & DEBUG_STATE ) {
+ if ( RADEON_DEBUG & RADEON_STATE ) {
fprintf( stderr, "%s( %s )\n",
__FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );
}
@@ -325,10 +325,8 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target,
{
radeonTexObj* t = radeon_tex_obj(texObj);
- if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
- fprintf( stderr, "%s( %s )\n", __FUNCTION__,
+ radeon_print(RADEON_TEXTURE, RADEON_VERBOSE, "%s( %s )\n", __FUNCTION__,
_mesa_lookup_enum_by_nr( pname ) );
- }
switch ( pname ) {
case GL_TEXTURE_MIN_FILTER:
@@ -376,10 +374,9 @@ static void radeonDeleteTexture( GLcontext *ctx,
radeonTexObj* t = radeon_tex_obj(texObj);
int i;
- if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) {
- fprintf( stderr, "%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj,
+ radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
+ "%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj,
_mesa_lookup_enum_by_nr( texObj->Target ) );
- }
if ( rmesa ) {
radeon_firevertices(&rmesa->radeon);
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index c29105d7b85..9d252aa74c5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -277,7 +277,7 @@ static GLboolean radeonUpdateTextureEnv( GLcontext *ctx, int unit )
assert( (texUnit->_ReallyEnabled == 0)
|| (texUnit->_Current != NULL) );
- if ( RADEON_DEBUG & DEBUG_TEXTURE ) {
+ if ( RADEON_DEBUG & RADEON_TEXTURE ) {
fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, (void *)ctx, unit );
}
@@ -933,7 +933,7 @@ static GLboolean radeon_validate_texgen( GLcontext *ctx, GLuint unit )
(texUnit->GenS.Mode != texUnit->GenQ.Mode)) ) {
/* Mixed modes, fallback:
*/
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback mixed texgen\n");
return GL_FALSE;
}
@@ -941,7 +941,7 @@ static GLboolean radeon_validate_texgen( GLcontext *ctx, GLuint unit )
}
else {
/* some texgen mode not including both S and T bits */
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback mixed texgen/nontexgen\n");
return GL_FALSE;
}
@@ -991,7 +991,7 @@ static GLboolean radeon_validate_texgen( GLcontext *ctx, GLuint unit )
default:
/* Unsupported mode, fallback:
*/
- if (RADEON_DEBUG & DEBUG_FALLBACKS)
+ if (RADEON_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "fallback GL_SPHERE_MAP\n");
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index fa16f44c18e..fad3d1cedaf 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -579,7 +579,7 @@ static void radeon_teximage(
}
if (!t->mt)
- radeon_try_alloc_miptree(rmesa, t, texImage, face, level);
+ radeon_try_alloc_miptree(rmesa, t, image, face, level);
if (t->mt && radeon_miptree_matches_image(t->mt, texImage, face, level)) {
radeon_mipmap_level *lvl;
image->mt = t->mt;
@@ -936,7 +936,7 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
if (t->validated || t->image_override)
return GL_TRUE;
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr, "%s: Validating texture %p now\n", __FUNCTION__, texObj);
if (baseimage->base.Border > 0)
@@ -964,9 +964,9 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
}
if (!t->mt) {
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr, " Allocate new miptree\n");
- radeon_try_alloc_miptree(rmesa, t, &baseimage->base, 0, texObj->BaseLevel);
+ radeon_try_alloc_miptree(rmesa, t, baseimage, 0, texObj->BaseLevel);
if (!t->mt) {
_mesa_problem(ctx, "radeon_validate_texture failed to alloc miptree");
return GL_FALSE;
@@ -977,16 +977,16 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
for(face = 0; face < t->mt->faces; ++face) {
for(level = t->mt->firstLevel; level <= t->mt->lastLevel; ++level) {
radeon_texture_image *image = get_radeon_texture_image(texObj->Image[face][level]);
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr, " face %i, level %i... %p vs %p ", face, level, t->mt, image->mt);
if (t->mt == image->mt) {
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr, "OK\n");
continue;
}
- if (RADEON_DEBUG & DEBUG_TEXTURE)
+ if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr, "migrating\n");
migrate_image_to_miptree(t->mt, image, face, level);
}
diff --git a/src/mesa/drivers/dri/s3v/s3v_state.c b/src/mesa/drivers/dri/s3v/s3v_state.c
index c71c89a3e1b..561f42c705f 100644
--- a/src/mesa/drivers/dri/s3v/s3v_state.c
+++ b/src/mesa/drivers/dri/s3v/s3v_state.c
@@ -2,7 +2,6 @@
* Author: Max Lingua <[email protected]>
*/
-#include <X11/Xlibint.h>
#include "s3v_context.h"
#include "s3v_macros.h"
#include "s3v_dri.h"
@@ -24,7 +23,7 @@
static void s3vUpdateAlphaMode( GLcontext *ctx )
{
s3vContextPtr vmesa = S3V_CONTEXT(ctx);
- CARD32 cmd = vmesa->CMD;
+ uint32_t cmd = vmesa->CMD;
cmd &= ~ALPHA_BLEND_MASK;
if ( ctx->Color.BlendEnabled ) {
@@ -173,7 +172,7 @@ static void s3vDDClear( GLcontext *ctx, GLbitfield mask )
static void s3vUpdateZMode( GLcontext *ctx )
{
s3vContextPtr vmesa = S3V_CONTEXT(ctx);
- CARD32 cmd = vmesa->CMD;
+ uint32_t cmd = vmesa->CMD;
DEBUG(("Depth.Test = %i\n", ctx->Depth.Test));
DEBUG(("CMD was = 0x%x ", cmd));
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index a94f1c076ca..931ceff0a81 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -23,7 +23,6 @@
*/
-#include <X11/Xlibint.h>
#include <stdio.h>
#include "main/context.h"
@@ -180,7 +179,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
}
/* Allocate the private area */
- savageScreen = (savageScreenPrivate *)Xmalloc(sizeof(savageScreenPrivate));
+ savageScreen = (savageScreenPrivate *)_mesa_malloc(sizeof(savageScreenPrivate));
if (!savageScreen)
return GL_FALSE;
@@ -227,7 +226,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
savageScreen->agpTextures.handle,
savageScreen->agpTextures.size,
(drmAddress *)&(savageScreen->agpTextures.map)) != 0) {
- Xfree(savageScreen);
+ _mesa_free(savageScreen);
sPriv->private = NULL;
return GL_FALSE;
}
@@ -247,7 +246,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
savageScreen->aperture.size,
(drmAddress *)&savageScreen->aperture.map) != 0)
{
- Xfree(savageScreen);
+ _mesa_free(savageScreen);
sPriv->private = NULL;
return GL_FALSE;
}
@@ -283,7 +282,7 @@ savageDestroyScreen(__DRIscreenPrivate *sPriv)
/* free all option information */
driDestroyOptionInfo (&savageScreen->optionCache);
- Xfree(savageScreen);
+ _mesa_free(savageScreen);
sPriv->private = NULL;
}
@@ -301,7 +300,7 @@ savageCreateContext( const __GLcontextModes *mesaVis,
savageScreen->sarea_priv_offset);
int textureSize[SAVAGE_NR_TEX_HEAPS];
int i;
- imesa = (savageContextPtr)Xcalloc(sizeof(savageContext), 1);
+ imesa = (savageContextPtr)_mesa_calloc(sizeof(savageContext));
if (!imesa) {
return GL_FALSE;
}
@@ -318,7 +317,7 @@ savageCreateContext( const __GLcontextModes *mesaVis,
shareCtx = NULL;
ctx = _mesa_create_context(mesaVis, shareCtx, &functions, imesa);
if (!ctx) {
- Xfree(imesa);
+ _mesa_free(imesa);
return GL_FALSE;
}
driContextPriv->driverPrivate = imesa;
diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h
index fd6399d6a6f..53a37db1cbc 100644
--- a/src/mesa/drivers/dri/savage/savagecontext.h
+++ b/src/mesa/drivers/dri/savage/savagecontext.h
@@ -31,7 +31,6 @@ typedef struct savage_context_t savageContext;
typedef struct savage_context_t *savageContextPtr;
typedef struct savage_texture_object_t *savageTextureObjectPtr;
-#include <X11/Xlibint.h>
#include "dri_util.h"
#include "main/mtypes.h"
#include "xf86drm.h"
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 3aa7843b1bc..a858af30c11 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -65,6 +65,7 @@
#define need_GL_ARB_shader_objects
#define need_GL_ARB_vertex_array_object
#define need_GL_ARB_vertex_program
+#define need_GL_ARB_sync
#define need_GL_APPLE_vertex_array_object
#define need_GL_ATI_fragment_shader
#define need_GL_ATI_separate_stencil
@@ -97,6 +98,7 @@ const struct dri_extension card_extensions[] =
{ "GL_ARB_shader_objects", GL_ARB_shader_objects_functions },
{ "GL_ARB_vertex_array_object", GL_ARB_vertex_array_object_functions },
{ "GL_ARB_vertex_program", GL_ARB_vertex_program_functions },
+ { "GL_ARB_sync", GL_ARB_sync_functions },
{ "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions },
{ "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions },
{ "GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions },