From 6dd4054ca544952393f74eee1b37406404d7d823 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 17 Mar 2010 16:33:29 -0600
Subject: cell: be more conservative in cell_is_format_supported()
This fixes a regression from commit a84575cdc0c8193b2c7858734e2ec6b1ec4511b2
which changed the depth/stencil format we were trying to use.
---
src/gallium/drivers/cell/ppu/cell_screen.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index a43f8638dcd..eada62181af 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -134,12 +134,16 @@ cell_is_format_supported( struct pipe_screen *screen,
unsigned tex_usage,
unsigned geom_flags )
{
- /* cell supports most formats, XXX for now anyway */
- if (format == PIPE_FORMAT_DXT5_RGBA ||
- format == PIPE_FORMAT_A8B8G8R8_SRGB)
- return FALSE;
- else
+ /* only a few formats are known to work at this time */
+ switch (format) {
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
return TRUE;
+ default:
+ return FALSE;
+ }
}
--
cgit v1.2.3
From 05a980ac2a6b74af0436c1bb15c986a8160ec2eb Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 17 Mar 2010 17:39:49 -0600
Subject: cell: return 1 for PIPE_CAP_BLEND_EQUATION_SEPARATE
With this feature, we get OpenGL version 2.0 and the progs/glsl/
demos run as-is.
---
src/gallium/drivers/cell/ppu/cell_screen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index eada62181af..7957e0149d7 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -95,6 +95,8 @@ cell_get_param(struct pipe_screen *screen, int param)
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
return 0;
+ case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+ return 1;
default:
return 0;
}
--
cgit v1.2.3
From 38bd7282f2c2d28681f1c242545727e4c36df113 Mon Sep 17 00:00:00 2001
From: Kristian Høgsberg
Date: Wed, 17 Mar 2010 22:44:58 -0400
Subject: intel: Call _mesa_make_current() after getting initial buffers
The default viewport is the window rectangle, which is set up by
_mesa_make_current(). To be able to do that we need to get the
window dimension (and buffers) first, so we have to call
intel_prepare_render() before we can call into _mesa_make_current().
Fixes #26676 and #26678.
---
src/mesa/drivers/dri/intel/intel_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index d6a1ba69524..c86dd1d0d98 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -880,12 +880,12 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
struct gl_framebuffer *fb = driDrawPriv->driverPrivate;
struct gl_framebuffer *readFb = driReadPriv->driverPrivate;
- _mesa_make_current(&intel->ctx, fb, readFb);
intel->driReadDrawable = driReadPriv;
intel->driDrawable = driDrawPriv;
driContextPriv->dri2.draw_stamp = driDrawPriv->dri2.stamp - 1;
driContextPriv->dri2.read_stamp = driReadPriv->dri2.stamp - 1;
intel_prepare_render(intel);
+ _mesa_make_current(&intel->ctx, fb, readFb);
}
else {
_mesa_make_current(NULL, NULL, NULL);
--
cgit v1.2.3
From b7e8039132830a2cd7a75691d11750d2ccc0a4e2 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 18 Mar 2010 09:17:11 -0600
Subject: st/mesa: s/unpack/pack/ to be more consistent
---
src/mesa/state_tracker/st_cb_drawpixels.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 7c611cb4ec9..b937288f8c0 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -939,7 +939,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
int ptw, pth;
GLboolean invertTex = GL_FALSE;
GLint readX, readY, readW, readH;
- struct gl_pixelstore_attrib unpack = ctx->DefaultPacking;
+ struct gl_pixelstore_attrib pack = ctx->DefaultPacking;
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
@@ -1003,7 +1003,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
readY = srcy;
readW = width;
readH = height;
- _mesa_clip_readpixels(ctx, &readX, &readY, &readW, &readH, &unpack);
+ _mesa_clip_readpixels(ctx, &readX, &readY, &readW, &readH, &pack);
readW = MAX2(0, readW);
readH = MAX2(0, readH);
@@ -1046,13 +1046,13 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
if (pipe->surface_copy) {
pipe->surface_copy(pipe,
psTex, /* dest surf */
- unpack.SkipPixels, unpack.SkipRows, /* dest pos */
+ pack.SkipPixels, pack.SkipRows, /* dest pos */
psRead, /* src surf */
readX, readY, readW, readH); /* src region */
} else {
util_surface_copy(pipe, FALSE,
psTex,
- unpack.SkipPixels, unpack.SkipRows,
+ pack.SkipPixels, pack.SkipRows,
psRead,
readX, readY, readW, readH);
}
@@ -1091,7 +1091,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* alternate path using get/put_tile() */
GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(ptRead, readX, readY, readW, readH, buf);
- pipe_put_tile_rgba(ptTex, unpack.SkipPixels, unpack.SkipRows,
+ pipe_put_tile_rgba(ptTex, pack.SkipPixels, pack.SkipRows,
readW, readH, buf);
free(buf);
}
@@ -1099,7 +1099,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* GL_DEPTH */
GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
pipe_get_tile_z(ptRead, readX, readY, readW, readH, buf);
- pipe_put_tile_z(ptTex, unpack.SkipPixels, unpack.SkipRows,
+ pipe_put_tile_z(ptTex, pack.SkipPixels, pack.SkipRows,
readW, readH, buf);
free(buf);
}
--
cgit v1.2.3
From fda5078324e0a940a2ddfdd1c63ffceb47c5a717 Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Thu, 18 Mar 2010 15:35:05 -0700
Subject: Use bit-wise not instead of logical not.
The assertion is checking that the low-order bits of offset are not
set. It does this by anding the inverted offset mask with the
offset. This is clearly intended to be a bit-wise "invert".
Fixes bug #25984.
---
src/mesa/drivers/dri/i915/intel_tris.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index fb191fe346f..4b6d3b4c5be 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -251,7 +251,7 @@ void intel_flush_prim(struct intel_context *intel)
BEGIN_BATCH(5);
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(0) | I1_LOAD_S(1) | 1);
- assert((offset & !S0_VB_OFFSET_MASK) == 0);
+ assert((offset & ~S0_VB_OFFSET_MASK) == 0);
OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, offset);
OUT_BATCH((intel->vertex_size << S1_VERTEX_WIDTH_SHIFT) |
(intel->vertex_size << S1_VERTEX_PITCH_SHIFT));
--
cgit v1.2.3
From 689e4b554123bbf9af727b910dad9d1b32521f95 Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Thu, 18 Mar 2010 17:28:52 -0700
Subject: intel: Correct value of S0_VB_OFFSET_MASK to match hardware docs.
---
src/mesa/drivers/dri/intel/intel_reg.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/intel/intel_reg.h b/src/mesa/drivers/dri/intel/intel_reg.h
index d19f1bae34c..36d8180598e 100644
--- a/src/mesa/drivers/dri/intel/intel_reg.h
+++ b/src/mesa/drivers/dri/intel/intel_reg.h
@@ -70,8 +70,10 @@
/** @{
* 915 definitions
+ *
+ * 915 documents say that bits 31:28 and 1 are "undefined, must be zero."
*/
-#define S0_VB_OFFSET_MASK 0xffffffc0
+#define S0_VB_OFFSET_MASK 0x0ffffffc
#define S0_AUTO_CACHE_INV_DISABLE (1<<0)
/** @} */
--
cgit v1.2.3
From 062a208814ad65d330f403c46d4bed88648f334f Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Thu, 18 Mar 2010 17:30:15 -0700
Subject: intel: Use bit-wise not instead of logical not (i830 path)
The assertion is checking that the low-order bits of offset are not
set. It does this by anding the inverted offset mask with the
offset. This is clearly intended to be a bit-wise "invert".
Fixes bug #25984.
---
src/mesa/drivers/dri/i915/intel_tris.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 4b6d3b4c5be..81c4adeaf34 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -270,7 +270,7 @@ void intel_flush_prim(struct intel_context *intel)
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(0) | I1_LOAD_S(2) | 1);
/* S0 */
- assert((offset & !S0_VB_OFFSET_MASK_830) == 0);
+ assert((offset & ~S0_VB_OFFSET_MASK_830) == 0);
OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0,
offset | (intel->vertex_size << S0_VB_PITCH_SHIFT_830) |
S0_VB_ENABLE_830);
--
cgit v1.2.3
From 73060ec7ebaa6a304402caa60610f94dac2cf24b Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Fri, 19 Mar 2010 10:35:58 -0600
Subject: drivers/x11: add PUBLIC qualifier to more API functions
Based on a patch from Tom Fogal.
---
src/mesa/drivers/x11/glxapi.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index e11aff1a849..955eba4e944 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -1113,7 +1113,7 @@ glXGetAGPOffsetMESA( const GLvoid *pointer )
/*** GLX_MESA_allocate_memory */
-void *
+void PUBLIC *
glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size,
float readfreq, float writefreq, float priority)
{
@@ -1121,14 +1121,14 @@ glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size,
return NULL;
}
-void
+void PUBLIC
glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer)
{
/* dummy */
}
-GLuint
+GLuint PUBLIC
glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer)
{
/* dummy */
@@ -1138,7 +1138,7 @@ glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer)
/*** GLX_EXT_texture_from_pixmap */
-void
+void PUBLIC
glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer,
const int *attrib_list)
{
@@ -1148,7 +1148,7 @@ glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer,
t->BindTexImageEXT(dpy, drawable, buffer, attrib_list);
}
-void
+void PUBLIC
glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer)
{
struct _glxapi_table *t;
@@ -1426,7 +1426,7 @@ _glxapi_get_proc_address(const char *funcName)
* This function does not get dispatched through the dispatch table
* since it's really a "meta" function.
*/
-__GLXextFuncPtr
+__GLXextFuncPtr PUBLIC
glXGetProcAddressARB(const GLubyte *procName)
{
__GLXextFuncPtr f;
@@ -1442,7 +1442,8 @@ glXGetProcAddressARB(const GLubyte *procName)
/* GLX 1.4 */
-void (*glXGetProcAddress(const GLubyte *procName))()
+void PUBLIC
+(*glXGetProcAddress(const GLubyte *procName))()
{
return glXGetProcAddressARB(procName);
}
--
cgit v1.2.3
From 7e6e049bb769012ef93d373d8a95a727120d2bc7 Mon Sep 17 00:00:00 2001
From: Marek Olšák
Date: Tue, 9 Mar 2010 02:10:36 +0100
Subject: r300g: remove hacks from translate_vertex_data_swizzle
Fixing RGBA 4ub vertex colors.
---
src/gallium/drivers/r300/r300_state_inlines.h | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 2f3a56e1fbc..af7827820cc 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -453,7 +453,6 @@ r300_translate_vertex_data_type(enum pipe_format format) {
static INLINE uint16_t
r300_translate_vertex_data_swizzle(enum pipe_format format) {
const struct util_format_description *desc = util_format_description(format);
- unsigned swizzle[4], i;
assert(format);
@@ -463,25 +462,10 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) {
return 0;
}
- /* Swizzles for 8bits formats are in the reversed order, not sure why. */
- if (desc->channel[0].size == 8) {
- for (i = 0; i < 4; i++) {
- if (desc->swizzle[i] <= 3) {
- swizzle[i] = 3 - desc->swizzle[i];
- } else {
- swizzle[i] = desc->swizzle[i];
- }
- }
- } else {
- for (i = 0; i < 4; i++) {
- swizzle[i] = desc->swizzle[i];
- }
- }
-
- return ((swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) |
- (swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) |
- (swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) |
- (swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) |
+ return ((desc->swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) |
+ (desc->swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) |
+ (desc->swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) |
+ (desc->swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) |
(0xf << R300_WRITE_ENA_SHIFT));
}
--
cgit v1.2.3
From 41a87a43e11c664935349f938022d58d3e22da4e Mon Sep 17 00:00:00 2001
From: Chia-I Wu
Date: Thu, 18 Mar 2010 11:36:57 +0800
Subject: glapi: Correctly generate static disatches for X86.
The entry point names, instead of the function name, should be used to
test if the entry point should be statically dispatched.
---
src/mesa/glapi/gen/gl_x86_asm.py | 4 +--
src/mesa/x86/glapi_x86.S | 66 +++-------------------------------------
2 files changed, 6 insertions(+), 64 deletions(-)
diff --git a/src/mesa/glapi/gen/gl_x86_asm.py b/src/mesa/glapi/gen/gl_x86_asm.py
index a48724ee615..7fb7af50b53 100644
--- a/src/mesa/glapi/gen/gl_x86_asm.py
+++ b/src/mesa/glapi/gen/gl_x86_asm.py
@@ -226,8 +226,8 @@ class PrintGenericStubs(gl_XML.gl_print_base):
stack = self.get_stack_size(f)
alt = "%s@%u" % (name, stack)
- if f.is_static_entry_point(f.name):
- for n in f.entry_points:
+ for n in f.entry_points:
+ if f.is_static_entry_point(n):
if n != f.name:
alt2 = "%s@%u" % (n, stack)
text = '\tGL_STUB_ALIAS(%s, _gloffset_%s, %s, %s, %s)' % (n, f.name, alt2, f.name, alt)
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index a7dd8d72186..26c1ce4bc2a 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -1022,74 +1022,16 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(BlendColorEXT, _gloffset_BlendColor, BlendColorEXT@16, BlendColor, BlendColor@16)
GL_STUB_ALIAS(BlendEquationEXT, _gloffset_BlendEquation, BlendEquationEXT@4, BlendEquation, BlendEquation@4)
GL_STUB_ALIAS(DrawRangeElementsEXT, _gloffset_DrawRangeElements, DrawRangeElementsEXT@24, DrawRangeElements, DrawRangeElements@24)
- GL_STUB_ALIAS(ColorTableSGI, _gloffset_ColorTable, ColorTableSGI@24, ColorTable, ColorTable@24)
GL_STUB_ALIAS(ColorTableEXT, _gloffset_ColorTable, ColorTableEXT@24, ColorTable, ColorTable@24)
- GL_STUB_ALIAS(ColorTableParameterfvSGI, _gloffset_ColorTableParameterfv, ColorTableParameterfvSGI@12, ColorTableParameterfv, ColorTableParameterfv@12)
- GL_STUB_ALIAS(ColorTableParameterivSGI, _gloffset_ColorTableParameteriv, ColorTableParameterivSGI@12, ColorTableParameteriv, ColorTableParameteriv@12)
- GL_STUB_ALIAS(CopyColorTableSGI, _gloffset_CopyColorTable, CopyColorTableSGI@20, CopyColorTable, CopyColorTable@20)
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetColorTableSGI, _gloffset_GetColorTable, GetColorTableSGI@16, GetColorTable, GetColorTable@16)
-#endif
#ifndef GLX_INDIRECT_RENDERING
GL_STUB_ALIAS(GetColorTableEXT, _gloffset_GetColorTable, GetColorTableEXT@16, GetColorTable, GetColorTable@16)
#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetColorTableParameterfvSGI, _gloffset_GetColorTableParameterfv, GetColorTableParameterfvSGI@12, GetColorTableParameterfv, GetColorTableParameterfv@12)
-#endif
#ifndef GLX_INDIRECT_RENDERING
GL_STUB_ALIAS(GetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv, GetColorTableParameterfvEXT@12, GetColorTableParameterfv, GetColorTableParameterfv@12)
#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetColorTableParameterivSGI, _gloffset_GetColorTableParameteriv, GetColorTableParameterivSGI@12, GetColorTableParameteriv, GetColorTableParameteriv@12)
-#endif
#ifndef GLX_INDIRECT_RENDERING
GL_STUB_ALIAS(GetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv, GetColorTableParameterivEXT@12, GetColorTableParameteriv, GetColorTableParameteriv@12)
#endif
- GL_STUB_ALIAS(ColorSubTableEXT, _gloffset_ColorSubTable, ColorSubTableEXT@24, ColorSubTable, ColorSubTable@24)
- GL_STUB_ALIAS(CopyColorSubTableEXT, _gloffset_CopyColorSubTable, CopyColorSubTableEXT@20, CopyColorSubTable, CopyColorSubTable@20)
- GL_STUB_ALIAS(ConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D, ConvolutionFilter1DEXT@24, ConvolutionFilter1D, ConvolutionFilter1D@24)
- GL_STUB_ALIAS(ConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D, ConvolutionFilter2DEXT@28, ConvolutionFilter2D, ConvolutionFilter2D@28)
- GL_STUB_ALIAS(ConvolutionParameterfEXT, _gloffset_ConvolutionParameterf, ConvolutionParameterfEXT@12, ConvolutionParameterf, ConvolutionParameterf@12)
- GL_STUB_ALIAS(ConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv, ConvolutionParameterfvEXT@12, ConvolutionParameterfv, ConvolutionParameterfv@12)
- GL_STUB_ALIAS(ConvolutionParameteriEXT, _gloffset_ConvolutionParameteri, ConvolutionParameteriEXT@12, ConvolutionParameteri, ConvolutionParameteri@12)
- GL_STUB_ALIAS(ConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv, ConvolutionParameterivEXT@12, ConvolutionParameteriv, ConvolutionParameteriv@12)
- GL_STUB_ALIAS(CopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D, CopyConvolutionFilter1DEXT@20, CopyConvolutionFilter1D, CopyConvolutionFilter1D@20)
- GL_STUB_ALIAS(CopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D, CopyConvolutionFilter2DEXT@24, CopyConvolutionFilter2D, CopyConvolutionFilter2D@24)
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetConvolutionFilterEXT, _gloffset_GetConvolutionFilter, GetConvolutionFilterEXT@16, GetConvolutionFilter, GetConvolutionFilter@16)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetConvolutionParameterfvEXT, _gloffset_GetConvolutionParameterfv, GetConvolutionParameterfvEXT@12, GetConvolutionParameterfv, GetConvolutionParameterfv@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetConvolutionParameterivEXT, _gloffset_GetConvolutionParameteriv, GetConvolutionParameterivEXT@12, GetConvolutionParameteriv, GetConvolutionParameteriv@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetSeparableFilterEXT, _gloffset_GetSeparableFilter, GetSeparableFilterEXT@24, GetSeparableFilter, GetSeparableFilter@24)
-#endif
- GL_STUB_ALIAS(SeparableFilter2DEXT, _gloffset_SeparableFilter2D, SeparableFilter2DEXT@32, SeparableFilter2D, SeparableFilter2D@32)
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetHistogramEXT, _gloffset_GetHistogram, GetHistogramEXT@20, GetHistogram, GetHistogram@20)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetHistogramParameterfvEXT, _gloffset_GetHistogramParameterfv, GetHistogramParameterfvEXT@12, GetHistogramParameterfv, GetHistogramParameterfv@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetHistogramParameterivEXT, _gloffset_GetHistogramParameteriv, GetHistogramParameterivEXT@12, GetHistogramParameteriv, GetHistogramParameteriv@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetMinmaxEXT, _gloffset_GetMinmax, GetMinmaxEXT@20, GetMinmax, GetMinmax@20)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetMinmaxParameterfvEXT, _gloffset_GetMinmaxParameterfv, GetMinmaxParameterfvEXT@12, GetMinmaxParameterfv, GetMinmaxParameterfv@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- GL_STUB_ALIAS(GetMinmaxParameterivEXT, _gloffset_GetMinmaxParameteriv, GetMinmaxParameterivEXT@12, GetMinmaxParameteriv, GetMinmaxParameteriv@12)
-#endif
- GL_STUB_ALIAS(HistogramEXT, _gloffset_Histogram, HistogramEXT@16, Histogram, Histogram@16)
- GL_STUB_ALIAS(MinmaxEXT, _gloffset_Minmax, MinmaxEXT@12, Minmax, Minmax@12)
- GL_STUB_ALIAS(ResetHistogramEXT, _gloffset_ResetHistogram, ResetHistogramEXT@4, ResetHistogram, ResetHistogram@4)
- GL_STUB_ALIAS(ResetMinmaxEXT, _gloffset_ResetMinmax, ResetMinmaxEXT@4, ResetMinmax, ResetMinmax@4)
GL_STUB_ALIAS(TexImage3DEXT, _gloffset_TexImage3D, TexImage3DEXT@40, TexImage3D, TexImage3D@40)
GL_STUB_ALIAS(TexSubImage3DEXT, _gloffset_TexSubImage3D, TexSubImage3DEXT@44, TexSubImage3D, TexSubImage3D@44)
GL_STUB_ALIAS(CopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D, CopyTexSubImage3DEXT@36, CopyTexSubImage3D, CopyTexSubImage3D@36)
@@ -1127,7 +1069,6 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(MultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB, MultiTexCoord4iv@8, MultiTexCoord4ivARB, MultiTexCoord4ivARB@8)
GL_STUB_ALIAS(MultiTexCoord4s, _gloffset_MultiTexCoord4sARB, MultiTexCoord4s@20, MultiTexCoord4sARB, MultiTexCoord4sARB@20)
GL_STUB_ALIAS(MultiTexCoord4sv, _gloffset_MultiTexCoord4svARB, MultiTexCoord4sv@8, MultiTexCoord4svARB, MultiTexCoord4svARB@8)
- GL_STUB_ALIAS(StencilOpSeparateATI, _gloffset_StencilOpSeparate, StencilOpSeparateATI@16, StencilOpSeparate, StencilOpSeparate@16)
GL_STUB_ALIAS(LoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB, LoadTransposeMatrixd@4, LoadTransposeMatrixdARB, LoadTransposeMatrixdARB@4)
GL_STUB_ALIAS(LoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB, LoadTransposeMatrixf@4, LoadTransposeMatrixfARB, LoadTransposeMatrixfARB@4)
GL_STUB_ALIAS(MultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB, MultTransposeMatrixd@4, MultTransposeMatrixdARB, MultTransposeMatrixdARB@4)
@@ -1242,10 +1183,8 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(RenderbufferStorageMultisampleEXT, _gloffset_RenderbufferStorageMultisample, RenderbufferStorageMultisampleEXT@20, RenderbufferStorageMultisample, RenderbufferStorageMultisample@20)
GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8)
GL_STUB_ALIAS(PointParameterfARB, _gloffset_PointParameterfEXT, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8)
- GL_STUB_ALIAS(PointParameterfSGIS, _gloffset_PointParameterfEXT, PointParameterfSGIS@8, PointParameterfEXT, PointParameterfEXT@8)
GL_STUB_ALIAS(PointParameterfv, _gloffset_PointParameterfvEXT, PointParameterfv@8, PointParameterfvEXT, PointParameterfvEXT@8)
GL_STUB_ALIAS(PointParameterfvARB, _gloffset_PointParameterfvEXT, PointParameterfvARB@8, PointParameterfvEXT, PointParameterfvEXT@8)
- GL_STUB_ALIAS(PointParameterfvSGIS, _gloffset_PointParameterfvEXT, PointParameterfvSGIS@8, PointParameterfvEXT, PointParameterfvEXT@8)
GL_STUB_ALIAS(SecondaryColor3b, _gloffset_SecondaryColor3bEXT, SecondaryColor3b@12, SecondaryColor3bEXT, SecondaryColor3bEXT@12)
GL_STUB_ALIAS(SecondaryColor3bv, _gloffset_SecondaryColor3bvEXT, SecondaryColor3bv@4, SecondaryColor3bvEXT, SecondaryColor3bvEXT@4)
GL_STUB_ALIAS(SecondaryColor3d, _gloffset_SecondaryColor3dEXT, SecondaryColor3d@24, SecondaryColor3dEXT, SecondaryColor3dEXT@24)
@@ -1271,7 +1210,6 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(FogCoordf, _gloffset_FogCoordfEXT, FogCoordf@4, FogCoordfEXT, FogCoordfEXT@4)
GL_STUB_ALIAS(FogCoordfv, _gloffset_FogCoordfvEXT, FogCoordfv@4, FogCoordfvEXT, FogCoordfvEXT@4)
GL_STUB_ALIAS(BlendFuncSeparate, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparate@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
- GL_STUB_ALIAS(BlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateINGR@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
GL_STUB_ALIAS(WindowPos2d, _gloffset_WindowPos2dMESA, WindowPos2d@16, WindowPos2dMESA, WindowPos2dMESA@16)
GL_STUB_ALIAS(WindowPos2dARB, _gloffset_WindowPos2dMESA, WindowPos2dARB@16, WindowPos2dMESA, WindowPos2dMESA@16)
GL_STUB_ALIAS(WindowPos2dv, _gloffset_WindowPos2dvMESA, WindowPos2dv@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
@@ -1312,6 +1250,9 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, IsProgramARB@4, IsProgramNV, IsProgramNV@4)
GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, PointParameteri@8, PointParameteriNV, PointParameteriNV@8)
GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8)
+ GL_STUB_ALIAS(DeleteVertexArrays, _gloffset_DeleteVertexArraysAPPLE, DeleteVertexArrays@8, DeleteVertexArraysAPPLE, _dispatch_stub_755@8)
+ GL_STUB_ALIAS(IsVertexArray, _gloffset_IsVertexArrayAPPLE, IsVertexArray@4, IsVertexArrayAPPLE, _dispatch_stub_757@4)
+ GL_STUB_ALIAS(BlendEquationSeparate, _gloffset_BlendEquationSeparateEXT, BlendEquationSeparate@8, BlendEquationSeparateEXT, _dispatch_stub_765@8)
GL_STUB_ALIAS(BindFramebuffer, _gloffset_BindFramebufferEXT, BindFramebuffer@8, BindFramebufferEXT, BindFramebufferEXT@8)
GL_STUB_ALIAS(BindRenderbuffer, _gloffset_BindRenderbufferEXT, BindRenderbuffer@8, BindRenderbufferEXT, BindRenderbufferEXT@8)
GL_STUB_ALIAS(CheckFramebufferStatus, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatus@4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4)
@@ -1329,6 +1270,7 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(IsFramebuffer, _gloffset_IsFramebufferEXT, IsFramebuffer@4, IsFramebufferEXT, IsFramebufferEXT@4)
GL_STUB_ALIAS(IsRenderbuffer, _gloffset_IsRenderbufferEXT, IsRenderbuffer@4, IsRenderbufferEXT, IsRenderbufferEXT@4)
GL_STUB_ALIAS(RenderbufferStorage, _gloffset_RenderbufferStorageEXT, RenderbufferStorage@16, RenderbufferStorageEXT, RenderbufferStorageEXT@16)
+ GL_STUB_ALIAS(BlitFramebuffer, _gloffset_BlitFramebufferEXT, BlitFramebuffer@40, BlitFramebufferEXT, _dispatch_stub_783@40)
GL_STUB_ALIAS(FramebufferTextureLayer, _gloffset_FramebufferTextureLayerEXT, FramebufferTextureLayer@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20)
GL_STUB_ALIAS(ProvokingVertex, _gloffset_ProvokingVertexEXT, ProvokingVertex@4, ProvokingVertexEXT, ProvokingVertexEXT@4)
--
cgit v1.2.3
From 6fed3a9fa0a87ae797f995de5b51eb9be3493fe0 Mon Sep 17 00:00:00 2001
From: Chia-I Wu
Date: Sat, 20 Mar 2010 23:58:15 +0800
Subject: glapi: Fix aliases to non-static functions.
The bug is triggered by 41a87a43e11c664935349f938022d58d3e22da4e.
glBlitFramebuffer, for example, is an alias to the non-static
glBlitFramebufferEXT. We should define glBlitFramebuffer as an alias to
_dispatch_stub_NNN.
---
src/mesa/glapi/gen/gl_x86_asm.py | 2 +-
src/mesa/x86/glapi_x86.S | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mesa/glapi/gen/gl_x86_asm.py b/src/mesa/glapi/gen/gl_x86_asm.py
index 7fb7af50b53..10dfa1ddb34 100644
--- a/src/mesa/glapi/gen/gl_x86_asm.py
+++ b/src/mesa/glapi/gen/gl_x86_asm.py
@@ -230,7 +230,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
if f.is_static_entry_point(n):
if n != f.name:
alt2 = "%s@%u" % (n, stack)
- text = '\tGL_STUB_ALIAS(%s, _gloffset_%s, %s, %s, %s)' % (n, f.name, alt2, f.name, alt)
+ text = '\tGL_STUB_ALIAS(%s, _gloffset_%s, %s, %s, %s)' % (n, f.name, alt2, name, alt)
if f.has_different_protocol(n):
print '#ifndef GLX_INDIRECT_RENDERING'
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index 26c1ce4bc2a..b1730d25a0d 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -1250,9 +1250,9 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, IsProgramARB@4, IsProgramNV, IsProgramNV@4)
GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, PointParameteri@8, PointParameteriNV, PointParameteriNV@8)
GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8)
- GL_STUB_ALIAS(DeleteVertexArrays, _gloffset_DeleteVertexArraysAPPLE, DeleteVertexArrays@8, DeleteVertexArraysAPPLE, _dispatch_stub_755@8)
- GL_STUB_ALIAS(IsVertexArray, _gloffset_IsVertexArrayAPPLE, IsVertexArray@4, IsVertexArrayAPPLE, _dispatch_stub_757@4)
- GL_STUB_ALIAS(BlendEquationSeparate, _gloffset_BlendEquationSeparateEXT, BlendEquationSeparate@8, BlendEquationSeparateEXT, _dispatch_stub_765@8)
+ GL_STUB_ALIAS(DeleteVertexArrays, _gloffset_DeleteVertexArraysAPPLE, DeleteVertexArrays@8, _dispatch_stub_755, _dispatch_stub_755@8)
+ GL_STUB_ALIAS(IsVertexArray, _gloffset_IsVertexArrayAPPLE, IsVertexArray@4, _dispatch_stub_757, _dispatch_stub_757@4)
+ GL_STUB_ALIAS(BlendEquationSeparate, _gloffset_BlendEquationSeparateEXT, BlendEquationSeparate@8, _dispatch_stub_765, _dispatch_stub_765@8)
GL_STUB_ALIAS(BindFramebuffer, _gloffset_BindFramebufferEXT, BindFramebuffer@8, BindFramebufferEXT, BindFramebufferEXT@8)
GL_STUB_ALIAS(BindRenderbuffer, _gloffset_BindRenderbufferEXT, BindRenderbuffer@8, BindRenderbufferEXT, BindRenderbufferEXT@8)
GL_STUB_ALIAS(CheckFramebufferStatus, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatus@4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4)
@@ -1270,7 +1270,7 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(IsFramebuffer, _gloffset_IsFramebufferEXT, IsFramebuffer@4, IsFramebufferEXT, IsFramebufferEXT@4)
GL_STUB_ALIAS(IsRenderbuffer, _gloffset_IsRenderbufferEXT, IsRenderbuffer@4, IsRenderbufferEXT, IsRenderbufferEXT@4)
GL_STUB_ALIAS(RenderbufferStorage, _gloffset_RenderbufferStorageEXT, RenderbufferStorage@16, RenderbufferStorageEXT, RenderbufferStorageEXT@16)
- GL_STUB_ALIAS(BlitFramebuffer, _gloffset_BlitFramebufferEXT, BlitFramebuffer@40, BlitFramebufferEXT, _dispatch_stub_783@40)
+ GL_STUB_ALIAS(BlitFramebuffer, _gloffset_BlitFramebufferEXT, BlitFramebuffer@40, _dispatch_stub_783, _dispatch_stub_783@40)
GL_STUB_ALIAS(FramebufferTextureLayer, _gloffset_FramebufferTextureLayerEXT, FramebufferTextureLayer@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20)
GL_STUB_ALIAS(ProvokingVertex, _gloffset_ProvokingVertexEXT, ProvokingVertex@4, ProvokingVertexEXT, ProvokingVertexEXT@4)
--
cgit v1.2.3
From f0491c945cb5d10ef1c45f4e28e874dffba8be4b Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 20 Mar 2010 10:33:10 -0600
Subject: docs: remove the 'Last updated date'
---
docs/shading.html | 4 ----
1 file changed, 4 deletions(-)
diff --git a/docs/shading.html b/docs/shading.html
index bd02335a803..750884cf36c 100644
--- a/docs/shading.html
+++ b/docs/shading.html
@@ -14,10 +14,6 @@ This page describes the features and status of Mesa's support for the
OpenGL Shading Language.
-
-Last updated on 15 December 2008.
-
-
Contents
--
cgit v1.2.3
From 3d72c4ae78cfdad7d160b0960adb792cbbbb863b Mon Sep 17 00:00:00 2001
From: Marek Olšák
Date: Sat, 20 Mar 2010 18:31:11 +0100
Subject: r300/compiler: fix assertion failure in the r500-fragprog emission
path
---
src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
index 710cae727a1..4e84eefd658 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
@@ -469,9 +469,8 @@ void r500BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *compi
if (compiler->Base.Error)
return;
- assert(code->inst_end >= 0);
-
- if ((code->inst[code->inst_end].inst0 & R500_INST_TYPE_MASK) != R500_INST_TYPE_OUT) {
+ if (code->inst_end == -1 ||
+ (code->inst[code->inst_end].inst0 & R500_INST_TYPE_MASK) != R500_INST_TYPE_OUT) {
/* This may happen when dead-code elimination is disabled or
* when most of the fragment program logic is leading to a KIL */
if (code->inst_end >= 511) {
--
cgit v1.2.3
From a81cd67a4f37233319281a69385f07feaa97fd13 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Sun, 21 Mar 2010 13:11:47 +0200
Subject: tests: Add test for huge client arrays that has to be split.
When running this test case in valgrind report includes read of unitialized
value in _tnl_draw_prims. The bug doesn't cause any vissible errors.
Bug is caused by vbo_split_copy that is calling draw function with max_index
one past the end instead of the end.
---
progs/tests/Makefile | 1 +
progs/tests/cva_huge.c | 236 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 237 insertions(+)
create mode 100644 progs/tests/cva_huge.c
diff --git a/progs/tests/Makefile b/progs/tests/Makefile
index 67efc3b7a9c..6bb0249e171 100644
--- a/progs/tests/Makefile
+++ b/progs/tests/Makefile
@@ -41,6 +41,7 @@ SOURCES = \
copypixrate.c \
crossbar.c \
cva.c \
+ cva_huge.c \
cylwrap.c \
drawbuffers.c \
drawbuffers2.c \
diff --git a/progs/tests/cva_huge.c b/progs/tests/cva_huge.c
new file mode 100644
index 00000000000..da63596d486
--- /dev/null
+++ b/progs/tests/cva_huge.c
@@ -0,0 +1,236 @@
+/*
+ * Copyright © 2010 Pauli Nieminen
+ *
+ * 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.
+ */
+
+
+/*
+ * Test case for huge cva arrays. Mesa code has to split this to multiple VBOs
+ * which had memory access error.
+ * This test case doesn't render incorrectly but valgrind showed the memory
+ * access error.
+ */
+
+#include
+#include
+#include
+#ifdef __VMS
+# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
+#else
+# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
+#endif
+#ifdef _WIN32
+#include
+#endif
+#define GL_GLEXT_LEGACY
+#include
+
+GLfloat *verts;
+
+GLubyte *color;
+
+GLuint *indices;
+
+#define rows 1000 /* Create 1000x1000 vertex grid */
+#define row_width 5000.0
+#define grid_depth -50.0
+GLuint nr_verts_in_row = rows;
+GLuint nr_indices_in_strip = rows * 2;
+
+GLboolean double_buffer;
+GLboolean compiled = GL_TRUE;
+
+static void generate_verts( void )
+{
+ unsigned x, y;
+ GLfloat step = row_width /(GLfloat)(nr_verts_in_row - 1);
+ verts = malloc(sizeof(verts[0]) * 4 * nr_verts_in_row * nr_verts_in_row);
+
+ for (y = 0; y < nr_verts_in_row; ++y) {
+ for (x = 0; x < nr_verts_in_row; ++x) {
+ unsigned idx = 4*(x + y * nr_verts_in_row);
+ verts[idx + 0] = step * x - row_width/2.0;
+ verts[idx + 1] = step * y - row_width/2.0;
+ /* deep enough not to be vissible */
+ verts[idx + 2] = grid_depth;
+ verts[idx + 3] = 0.0;
+ }
+ }
+ glVertexPointer( 3, GL_FLOAT, sizeof(verts[0])*4, verts );
+}
+
+static void generate_colors( void )
+{
+ unsigned x, y;
+ GLfloat step = 255.0/(GLfloat)(nr_verts_in_row - 1);
+ color = malloc(sizeof(color[0]) * 4 * nr_verts_in_row * nr_verts_in_row);
+
+ for (y = 0; y < nr_verts_in_row; ++y) {
+ for (x = 0; x < nr_verts_in_row; ++x) {
+ unsigned idx = 4*(x + y * nr_verts_in_row);
+ color[idx + 0] = (GLubyte)(step * x);
+ color[idx + 1] = 0x00;
+ color[idx + 2] = (GLubyte)(step * y);
+ color[idx + 3] = 0x00;
+ }
+ }
+ glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
+}
+
+static void generate_indices( void )
+{
+ unsigned strip, i;
+
+ /* indice size * number of strips * number of indices in strip */
+ indices = malloc(sizeof(indices[0]) * (nr_verts_in_row - 1) *
+ (nr_indices_in_strip));
+
+ for (strip = 0; strip < nr_verts_in_row - 1; strip += 2) {
+ for (i = 0; i < nr_indices_in_strip; i+=2) {
+ unsigned idx = i + strip * nr_indices_in_strip;
+ unsigned idx2 = (nr_indices_in_strip - i - 2) + (strip +
+ 1) * (nr_indices_in_strip);
+ indices[idx + 1] = i/2 + strip*nr_verts_in_row;
+ indices[idx] = i/2 + (strip + 1)*nr_verts_in_row;
+ if (strip + 1 < nr_verts_in_row - 1) {
+ indices[idx2] = i/2 + (strip + 1)*nr_verts_in_row;
+ indices[idx2 + 1] = i/2 + (strip + 2)*nr_verts_in_row;
+ }
+ }
+ }
+}
+
+static void init( void )
+{
+
+
+ generate_verts();
+ generate_colors();
+ generate_indices();
+
+ glClearColor( 0.0, 0.0, 0.0, 0.0 );
+ glShadeModel( GL_SMOOTH );
+
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glEnableClientState( GL_COLOR_ARRAY );
+
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glFrustum( -100.0, 100.0, -100.0, 100.0, 1.0, 100.0 );
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+
+#ifdef GL_EXT_compiled_vertex_array
+ if ( compiled ) {
+ glLockArraysEXT( 0, rows * rows );
+ }
+#endif
+}
+
+static void display( void )
+{
+ glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+
+ glDrawElements( GL_TRIANGLE_STRIP, nr_indices_in_strip * (nr_verts_in_row - 1) , GL_UNSIGNED_INT, indices );
+
+ if ( double_buffer )
+ glutSwapBuffers();
+ else
+ glFlush();
+}
+
+static void keyboard( unsigned char key, int x, int y )
+{
+ switch ( key ) {
+ case 27:
+ exit( 0 );
+ break;
+ }
+
+ glutPostRedisplay();
+}
+
+static GLboolean args( int argc, char **argv )
+{
+ GLint i;
+
+ double_buffer = GL_TRUE;
+
+ for ( i = 1 ; i < argc ; i++ ) {
+ if ( strcmp( argv[i], "-sb" ) == 0 ) {
+ double_buffer = GL_FALSE;
+ } else if ( strcmp( argv[i], "-db" ) == 0 ) {
+ double_buffer = GL_TRUE;
+ } else {
+ fprintf( stderr, "%s (Bad option).\n", argv[i] );
+ return GL_FALSE;
+ }
+ }
+ return GL_TRUE;
+}
+
+int main( int argc, char **argv )
+{
+ GLenum type;
+ char *string;
+ double version;
+
+ glutInit( &argc, argv );
+
+ if ( args( argc, argv ) == GL_FALSE ) {
+ exit( 1 );
+ }
+
+ type = GLUT_RGB | GLUT_DEPTH;
+ type |= ( double_buffer ) ? GLUT_DOUBLE : GLUT_SINGLE;
+
+ glutInitDisplayMode( type );
+ glutInitWindowSize( 250, 250 );
+ glutInitWindowPosition( 100, 100 );
+ glutCreateWindow( "CVA Test" );
+
+ /* Make sure the server supports GL 1.2 vertex arrays.
+ */
+ string = (char *) glGetString( GL_VERSION );
+
+ version = atof(string);
+ if ( version < 1.2 ) {
+ fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
+ exit( -1 );
+ }
+
+ /* See if the server supports compiled vertex arrays.
+ */
+ string = (char *) glGetString( GL_EXTENSIONS );
+
+ if ( !strstr( string, "GL_EXT_compiled_vertex_array" ) ) {
+ fprintf( stderr, "Compiled vertex arrays not supported by this renderer.\n" );
+ compiled = GL_FALSE;
+ }
+
+ init();
+
+ glutDisplayFunc( display );
+ glutKeyboardFunc( keyboard );
+ glutMainLoop();
+
+ return 0;
+}
--
cgit v1.2.3
From 9a7acbccfbc061322be493633d5c5bf4afd302b5 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Sun, 21 Mar 2010 12:42:10 +0200
Subject: vbo: Fix vbo_split_copy to pass correct max_index to draw.
vbo_split_copy was passing one past the max_index to draw function
which caused _tnl_draw_prims function to read uninitialized values
from copied array.
Bug was spoted in valgrind report of progs/tests/cva_huge.
---
src/mesa/vbo/vbo_split_copy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index bce401744da..2ec7d9b0fe3 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -196,7 +196,7 @@ flush( struct copy_context *copy )
©->dstib,
GL_TRUE,
0,
- copy->dstbuf_nr );
+ copy->dstbuf_nr - 1 );
/* Reset all pointers:
*/
--
cgit v1.2.3
From 44e3ec3c05f0806f0940887ed9e30d94bf0748e0 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Sun, 21 Mar 2010 20:02:10 +0200
Subject: r200: Fix mixed indetion in r200TclFallback.
---
src/mesa/drivers/dri/r200/r200_tcl.c | 41 ++++++++++++++++++------------------
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index f3f558b7def..41b68cc0ca0 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -687,25 +687,24 @@ static char *getFallbackString(GLuint bit)
void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
{
- r200ContextPtr rmesa = R200_CONTEXT(ctx);
- GLuint oldfallback = rmesa->radeon.TclFallback;
-
- if (mode) {
- rmesa->radeon.TclFallback |= bit;
- if (oldfallback == 0) {
- if (R200_DEBUG & RADEON_FALLBACKS)
- fprintf(stderr, "R200 begin tcl fallback %s\n",
- getFallbackString( bit ));
- transition_to_swtnl( ctx );
- }
- }
- else {
- rmesa->radeon.TclFallback &= ~bit;
- if (oldfallback == bit) {
- if (R200_DEBUG & RADEON_FALLBACKS)
- fprintf(stderr, "R200 end tcl fallback %s\n",
- getFallbackString( bit ));
- transition_to_hwtnl( ctx );
- }
- }
+ r200ContextPtr rmesa = R200_CONTEXT(ctx);
+ GLuint oldfallback = rmesa->radeon.TclFallback;
+
+ if (mode) {
+ rmesa->radeon.TclFallback |= bit;
+ if (oldfallback == 0) {
+ if (R200_DEBUG & RADEON_FALLBACKS)
+ fprintf(stderr, "R200 begin tcl fallback %s\n",
+ getFallbackString( bit ));
+ transition_to_swtnl( ctx );
+ }
+ } else {
+ rmesa->radeon.TclFallback &= ~bit;
+ if (oldfallback == bit) {
+ if (R200_DEBUG & RADEON_FALLBACKS)
+ fprintf(stderr, "R200 end tcl fallback %s\n",
+ getFallbackString( bit ));
+ transition_to_hwtnl( ctx );
+ }
+ }
}
--
cgit v1.2.3
From 1968d8f31d0ac83557c9366dea39b15e92bb1516 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Sun, 21 Mar 2010 20:16:17 +0200
Subject: r200: Fix swtnl fallback to flush pending rendering before
transition.
Flush after transition would emit wrong state that could cause
wrong state emited for pending rendering operation.
Fixes wan once from extrement tuxracer that is using per vertex
materials.
---
src/mesa/drivers/dri/r200/r200_tcl.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 41b68cc0ca0..f52e4fe9177 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -691,20 +691,30 @@ void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
GLuint oldfallback = rmesa->radeon.TclFallback;
if (mode) {
- rmesa->radeon.TclFallback |= bit;
if (oldfallback == 0) {
+ /* We have to flush before transition */
+ if ( rmesa->radeon.dma.flush )
+ rmesa->radeon.dma.flush( rmesa->radeon.glCtx );
+
if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "R200 begin tcl fallback %s\n",
getFallbackString( bit ));
+ rmesa->radeon.TclFallback |= bit;
transition_to_swtnl( ctx );
- }
+ } else
+ rmesa->radeon.TclFallback |= bit;
} else {
- rmesa->radeon.TclFallback &= ~bit;
if (oldfallback == bit) {
+ /* We have to flush before transition */
+ if ( rmesa->radeon.dma.flush )
+ rmesa->radeon.dma.flush( rmesa->radeon.glCtx );
+
if (R200_DEBUG & RADEON_FALLBACKS)
fprintf(stderr, "R200 end tcl fallback %s\n",
getFallbackString( bit ));
+ rmesa->radeon.TclFallback &= ~bit;
transition_to_hwtnl( ctx );
- }
+ } else
+ rmesa->radeon.TclFallback &= ~bit;
}
}
--
cgit v1.2.3
From 0900544fb54cbc2127b8729393c9c1308cd218f9 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Sun, 21 Mar 2010 22:55:13 +0200
Subject: r200: Don't flush when closing elts in KMS.
Flush in middle of rendering in KMS is not allowed because
buffers are discarded in flush.
Fixes crash when emiting split indices with RADEON_DEBUG=all.
---
src/mesa/drivers/dri/r200/r200_cmdbuf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index 2f2b8d94dca..382ae0daa4f 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -189,7 +189,8 @@ void r200FlushElts(GLcontext *ctx)
if (R200_ELT_BUF_SZ > elt_used)
radeonReturnDmaRegion(&rmesa->radeon, R200_ELT_BUF_SZ - elt_used);
- if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)) {
+ if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)
+ && !rmesa->radeon.radeonScreen->kernel_mm) {
radeon_print(RADEON_SYNC, RADEON_NORMAL, "%s: Syncing\n", __FUNCTION__);
radeonFinish( rmesa->radeon.glCtx );
}
--
cgit v1.2.3
From 4ea694a26b99835d0b5bc814cf024850874a9a83 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Sun, 21 Mar 2010 23:23:21 +0200
Subject: r200: Fix emit size prediction to account elt splitting.
Emit sizes prediction didn't account for render splitting in
hwtnl path.
---
src/mesa/drivers/dri/r200/r200_cmdbuf.c | 2 +-
src/mesa/drivers/dri/r200/r200_tcl.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index 382ae0daa4f..ad43a8ca920 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -190,7 +190,7 @@ void r200FlushElts(GLcontext *ctx)
radeonReturnDmaRegion(&rmesa->radeon, R200_ELT_BUF_SZ - elt_used);
if (radeon_is_debug_enabled(RADEON_SYNC, RADEON_CRITICAL)
- && !rmesa->radeon.radeonScreen->kernel_mm) {
+ && !rmesa->radeon.radeonScreen->kernel_mm) {
radeon_print(RADEON_SYNC, RADEON_NORMAL, "%s: Syncing\n", __FUNCTION__);
radeonFinish( rmesa->radeon.glCtx );
}
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index f52e4fe9177..d43e14581e9 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -404,8 +404,9 @@ static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev )
rendering code may decide convert to elts.
In that case we have to make pessimistic prediction.
and use larger of 2 paths. */
- const GLuint elts = ELTS_BUFSZ(nr_aos);
- const GLuint index = INDEX_BUFSZ;
+ const GLuint elt_count =(VB->Primitive[i].count/GET_MAX_HW_ELTS() + 1);
+ const GLuint elts = ELTS_BUFSZ(nr_aos) * elt_count;
+ const GLuint index = INDEX_BUFSZ * elt_count;
const GLuint vbuf = VBUF_BUFSZ;
if ( (!VB->Elts && VB->Primitive[i].count >= MAX_CONVERSION_SIZE)
|| vbuf > index + elts)
--
cgit v1.2.3
From 1e7d65bb5b50efbd5812e7996910b7688eb27192 Mon Sep 17 00:00:00 2001
From: Vinson Lee
Date: Sun, 21 Mar 2010 19:09:54 -0700
Subject: progs/tests: Include stddef.h for ptrdiff_t on all platforms.
stddef.h is the standard C header that defines ptrdiff_t.
Fixes build of cva_huge on Mac OS X.
---
progs/tests/cva_huge.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/progs/tests/cva_huge.c b/progs/tests/cva_huge.c
index da63596d486..88ec2af2a84 100644
--- a/progs/tests/cva_huge.c
+++ b/progs/tests/cva_huge.c
@@ -32,11 +32,7 @@
#include
#include
#include
-#ifdef __VMS
-# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
-#else
-# include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
-#endif
+#include /* for ptrdiff_t, referenced by GL.h when GL_GLEXT_LEGACY defined */
#ifdef _WIN32
#include
#endif
--
cgit v1.2.3
From fce72d58036eb8a993bda1a7c5d74b8fcc819a8c Mon Sep 17 00:00:00 2001
From: Vinson Lee
Date: Sun, 21 Mar 2010 19:21:11 -0700
Subject: progs/tests: Add cva_huge to SCons build.
---
progs/tests/SConscript | 1 +
1 file changed, 1 insertion(+)
diff --git a/progs/tests/SConscript b/progs/tests/SConscript
index 3580ba914db..b1c7c99a7b6 100644
--- a/progs/tests/SConscript
+++ b/progs/tests/SConscript
@@ -45,6 +45,7 @@ progs = [
'copypixrate',
'crossbar',
'cva',
+ 'cva_huge',
'cylwrap',
'drawbuffers',
'drawbuffers2',
--
cgit v1.2.3
From 361e8e911886784407c7aff91e09b9b2bfd5cde8 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen
Date: Mon, 22 Mar 2010 15:14:16 +0200
Subject: mesa: Add end of line to the end of a debug output.
---
src/mesa/main/matrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 5c863f6f32a..4b8c00b5b63 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -322,7 +322,7 @@ _mesa_LoadIdentity( void )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glLoadIdentity()");
+ _mesa_debug(ctx, "glLoadIdentity()\n");
_math_matrix_set_identity( ctx->CurrentStack->Top );
ctx->NewState |= ctx->CurrentStack->DirtyFlag;
--
cgit v1.2.3
From ca97f8b9bab80844be613a9253643b7da8e738c7 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 22 Mar 2010 09:00:13 -0600
Subject: glslcompiler: fix build breakage
---
src/mesa/drivers/glslcompiler/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/glslcompiler/Makefile b/src/mesa/drivers/glslcompiler/Makefile
index 080fe475c16..d3404988d52 100644
--- a/src/mesa/drivers/glslcompiler/Makefile
+++ b/src/mesa/drivers/glslcompiler/Makefile
@@ -10,9 +10,10 @@ PROGRAM = glslcompiler
OBJECTS = \
glslcompiler.o \
../../glapi/glapi.o \
+ ../../glapi/glapi_getproc.o \
+ ../../glapi/glapi_dispatch.o \
../../glapi/glapi_nop.o \
../../glapi/glthread.o \
- ../../main/dispatch.o \
../common/driverfuncs.o \
../../libmesa.a
--
cgit v1.2.3