rpms/mesa/devel mesa-7.3-dri-configs-fixes.patch, NONE, 1.1 mesa-7.3-fixes-from-7.4-branch.patch, NONE, 1.1 mesa.spec, 1.225, 1.226 radeon-rewrite.patch, 1.3, 1.4
Dave Airlie
airlied at fedoraproject.org
Wed Mar 4 07:01:07 UTC 2009
- Previous message (by thread): rpms/xorg-x11-drv-synaptics/devel .cvsignore, 1.10, 1.11 sources, 1.10, 1.11 xorg-x11-drv-synaptics.spec, 1.23, 1.24
- Next message (by thread): rpms/empathy/devel .cvsignore, 1.28, 1.29 empathy.spec, 1.49, 1.50 sources, 1.28, 1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: airlied
Update of /cvs/pkgs/rpms/mesa/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10332
Modified Files:
mesa.spec radeon-rewrite.patch
Added Files:
mesa-7.3-dri-configs-fixes.patch
mesa-7.3-fixes-from-7.4-branch.patch
Log Message:
* Wed Mar 04 2009 Dave Airlie <airlied at redhat.com> 7.3-9
- try again: pull in 7.4 fixes, dri configs changes, new radeon-rewrite
mesa-7.3-dri-configs-fixes.patch:
--- NEW FILE mesa-7.3-dri-configs-fixes.patch ---
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 30c860b..fb2efbb 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -523,7 +523,8 @@ __DRIconfig **
driCreateConfigs(GLenum fb_format, GLenum fb_type,
const uint8_t * depth_bits, const uint8_t * stencil_bits,
unsigned num_depth_stencil_bits,
- const GLenum * db_modes, unsigned num_db_modes)
+ const GLenum * db_modes, unsigned num_db_modes,
+ const u_int8_t * msaa_samples, unsigned num_msaa_modes)
{
static const uint8_t bits_table[4][4] = {
/* R G B A */
@@ -583,9 +584,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
int index;
__DRIconfig **configs, **c;
__GLcontextModes *modes;
- unsigned i;
- unsigned j;
- unsigned k;
+ unsigned i, j, k, h;
unsigned num_modes;
unsigned num_accum_bits = 2;
@@ -666,66 +665,74 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
c = configs;
for ( k = 0 ; k < num_depth_stencil_bits ; k++ ) {
for ( i = 0 ; i < num_db_modes ; i++ ) {
- for ( j = 0 ; j < num_accum_bits ; j++ ) {
- *c = _mesa_malloc (sizeof **c);
- modes = &(*c)->modes;
- c++;
-
- memset(modes, 0, sizeof *modes);
- modes->redBits = bits[0];
- modes->greenBits = bits[1];
- modes->blueBits = bits[2];
- modes->alphaBits = bits[3];
- modes->redMask = masks[0];
- modes->greenMask = masks[1];
- modes->blueMask = masks[2];
- modes->alphaMask = masks[3];
- modes->rgbBits = modes->redBits + modes->greenBits
- + modes->blueBits + modes->alphaBits;
-
- modes->accumRedBits = 16 * j;
- modes->accumGreenBits = 16 * j;
- modes->accumBlueBits = 16 * j;
- modes->accumAlphaBits = (masks[3] != 0) ? 16 * j : 0;
- modes->visualRating = (j == 0) ? GLX_NONE : GLX_SLOW_CONFIG;
-
- modes->stencilBits = stencil_bits[k];
- modes->depthBits = depth_bits[k];
-
- modes->transparentPixel = GLX_NONE;
- modes->transparentRed = GLX_DONT_CARE;
- modes->transparentGreen = GLX_DONT_CARE;
- modes->transparentBlue = GLX_DONT_CARE;
- modes->transparentAlpha = GLX_DONT_CARE;
- modes->transparentIndex = GLX_DONT_CARE;
- modes->visualType = GLX_DONT_CARE;
- modes->renderType = GLX_RGBA_BIT;
- modes->drawableType = GLX_WINDOW_BIT;
- modes->rgbMode = GL_TRUE;
-
- if ( db_modes[i] == GLX_NONE ) {
- modes->doubleBufferMode = GL_FALSE;
- }
- else {
- modes->doubleBufferMode = GL_TRUE;
- modes->swapMethod = db_modes[i];
- }
-
- modes->haveAccumBuffer = ((modes->accumRedBits +
+ for ( h = 0 ; h < num_msaa_modes; h++ ) {
+ for ( j = 0 ; j < num_accum_bits ; j++ ) {
+ *c = _mesa_malloc (sizeof **c);
+ modes = &(*c)->modes;
+ c++;
+
+ memset(modes, 0, sizeof *modes);
+ modes->redBits = bits[0];
+ modes->greenBits = bits[1];
+ modes->blueBits = bits[2];
+ modes->alphaBits = bits[3];
+ modes->redMask = masks[0];
+ modes->greenMask = masks[1];
+ modes->blueMask = masks[2];
+ modes->alphaMask = masks[3];
+ modes->rgbBits = modes->redBits + modes->greenBits
+ + modes->blueBits + modes->alphaBits;
+
+ modes->accumRedBits = 16 * j;
+ modes->accumGreenBits = 16 * j;
+ modes->accumBlueBits = 16 * j;
+ modes->accumAlphaBits = (masks[3] != 0) ? 16 * j : 0;
+ modes->visualRating = (j == 0) ? GLX_NONE : GLX_SLOW_CONFIG;
+
+ modes->stencilBits = stencil_bits[k];
+ modes->depthBits = depth_bits[k];
+
+ modes->transparentPixel = GLX_NONE;
+ modes->transparentRed = GLX_DONT_CARE;
+ modes->transparentGreen = GLX_DONT_CARE;
+ modes->transparentBlue = GLX_DONT_CARE;
+ modes->transparentAlpha = GLX_DONT_CARE;
+ modes->transparentIndex = GLX_DONT_CARE;
+ modes->visualType = GLX_DONT_CARE;
+ modes->renderType = GLX_RGBA_BIT;
+ modes->drawableType = GLX_WINDOW_BIT;
+ modes->rgbMode = GL_TRUE;
+
+ if ( db_modes[i] == GLX_NONE ) {
+ modes->doubleBufferMode = GL_FALSE;
+ }
+ else {
+ modes->doubleBufferMode = GL_TRUE;
+ modes->swapMethod = db_modes[i];
+ }
+
+ modes->samples = msaa_samples[h];
+ modes->sampleBuffers = modes->samples ? 1 : 0;
+
+
+ modes->haveAccumBuffer = ((modes->accumRedBits +
modes->accumGreenBits +
modes->accumBlueBits +
modes->accumAlphaBits) > 0);
- modes->haveDepthBuffer = (modes->depthBits > 0);
- modes->haveStencilBuffer = (modes->stencilBits > 0);
-
- modes->bindToTextureRgb = GL_TRUE;
- modes->bindToTextureRgba = GL_TRUE;
- modes->bindToMipmapTexture = GL_FALSE;
- modes->bindToTextureTargets = modes->rgbMode ?
- __DRI_ATTRIB_TEXTURE_1D_BIT |
- __DRI_ATTRIB_TEXTURE_2D_BIT |
- __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT :
- 0;
+ modes->haveDepthBuffer = (modes->depthBits > 0);
+ modes->haveStencilBuffer = (modes->stencilBits > 0);
+
+ modes->bindToTextureRgb = GL_TRUE;
+ modes->bindToTextureRgba = GL_TRUE;
+ modes->bindToMipmapTexture = GL_FALSE;
+ modes->bindToTextureTargets = modes->rgbMode ?
+ __DRI_ATTRIB_TEXTURE_1D_BIT |
+ __DRI_ATTRIB_TEXTURE_2D_BIT |
+ __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT :
+ 0;
+
+ modes = modes->next;
+ }
}
}
}
@@ -734,9 +741,10 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
return configs;
}
-const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b)
+__DRIconfig **driConcatConfigs(__DRIconfig **a,
+ __DRIconfig **b)
{
- const __DRIconfig **all;
+ __DRIconfig **all;
int i, j, index;
i = 0;
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index 0c974db..9e9e5bc 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -131,9 +131,11 @@ extern __DRIconfig **
driCreateConfigs(GLenum fb_format, GLenum fb_type,
const uint8_t * depth_bits, const uint8_t * stencil_bits,
unsigned num_depth_stencil_bits,
- const GLenum * db_modes, unsigned num_db_modes);
+ const GLenum * db_modes, unsigned num_db_modes,
+ const uint8_t * msaa_samples, unsigned num_msaa_modes);
-const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b);
+__DRIconfig **driConcatConfigs(__DRIconfig **a,
+ __DRIconfig **b);
int
driGetConfigAttrib(const __DRIconfig *config,
diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
index 679f856..b1bb010 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
@@ -626,6 +626,7 @@ ffbFillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[3];
uint8_t stencil_bits_array[3];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = 0;
depth_bits_array[1] = depth_bits;
@@ -639,6 +640,8 @@ ffbFillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[1] = 0;
stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1;
back_buffer_factor = (have_back_buffer) ? 3 : 1;
@@ -654,9 +657,10 @@ ffbFillInModes( __DRIscreenPrivate *psp,
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor, back_buffer_modes,
- back_buffer_factor);
+ back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
__LINE__);
return NULL;
}
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c
index 48603f5..9a5a39c 100644
--- a/src/mesa/drivers/dri/i810/i810screen.c
+++ b/src/mesa/drivers/dri/i810/i810screen.c
@@ -77,6 +77,7 @@ i810FillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[2];
uint8_t stencil_bits_array[2];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = depth_bits;
depth_bits_array[1] = depth_bits;
@@ -88,13 +89,16 @@ i810FillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[0] = 0;
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
depth_bits_array, stencil_bits_array,
depth_buffer_factor,
- back_buffer_modes, back_buffer_factor);
+ back_buffer_modes, back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
__func__, __LINE__ );
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 7042c25..52a28b3 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -467,8 +467,6 @@ intelFillInModes(__DRIscreenPrivate *psp,
__GLcontextModes *m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
- GLenum fb_format;
- GLenum fb_type;
int i;
/* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
@@ -480,6 +478,7 @@ intelFillInModes(__DRIscreenPrivate *psp,
uint8_t depth_bits_array[3];
uint8_t stencil_bits_array[3];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = 0;
depth_bits_array[1] = depth_bits;
@@ -496,22 +495,39 @@ intelFillInModes(__DRIscreenPrivate *psp,
stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1;
back_buffer_factor = (have_back_buffer) ? 3 : 1;
if (pixel_bits == 16) {
- fb_format = GL_RGB;
- fb_type = GL_UNSIGNED_SHORT_5_6_5;
+ configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
+ depth_bits_array, stencil_bits_array,
+ depth_buffer_factor, back_buffer_modes,
+ back_buffer_factor,
+ msaa_samples_array, 1);
}
else {
- fb_format = GL_BGRA;
- fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ __DRIconfig **configs_a8r8g8b8;
+ __DRIconfig **configs_x8r8g8b8;
+
+ configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
+ depth_bits_array,
+ stencil_bits_array,
+ depth_buffer_factor,
+ back_buffer_modes,
+ back_buffer_factor,
+ msaa_samples_array, 1);
+ configs_x8r8g8b8 = driCreateConfigs(GL_BGR, GL_UNSIGNED_INT_8_8_8_8_REV,
+ depth_bits_array,
+ stencil_bits_array,
+ depth_buffer_factor,
+ back_buffer_modes,
+ back_buffer_factor,
+ msaa_samples_array, 1);
+ configs = driConcatConfigs(configs_a8r8g8b8, configs_x8r8g8b8);
}
- configs = driCreateConfigs(fb_format, fb_type,
- depth_bits_array, stencil_bits_array,
- depth_buffer_factor, back_buffer_modes,
- back_buffer_factor);
if (configs == NULL) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
__LINE__);
@@ -673,6 +689,17 @@ static const
__DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp)
{
intelScreenPrivate *intelScreen;
+ GLenum fb_format[3];
+ GLenum fb_type[3];
+ /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
+ * support pageflipping at all.
+ */
+ static const GLenum back_buffer_modes[] = {
+ GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
+ };
+ uint8_t depth_bits[4], stencil_bits[4], msaa_samples_array[1];
+ int color;
+ __DRIconfig **configs = NULL;
/* Calling driInitExtensions here, with a NULL context pointer,
* does not actually enable the extensions. It just makes sure
@@ -712,8 +739,50 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp)
intelScreen->irq_active = 1;
psp->extensions = intelScreenExtensions;
- return driConcatConfigs(intelFillInModes(psp, 16, 16, 0, 1),
- intelFillInModes(psp, 32, 24, 8, 1));
+ depth_bits[0] = 0;
+ stencil_bits[0] = 0;
+ depth_bits[1] = 16;
+ stencil_bits[1] = 0;
+ depth_bits[2] = 24;
+ stencil_bits[2] = 0;
+ depth_bits[3] = 24;
+ stencil_bits[3] = 8;
+
+ msaa_samples_array[0] = 0;
+
+ fb_format[0] = GL_RGB;
+ fb_type[0] = GL_UNSIGNED_SHORT_5_6_5;
+
+ fb_format[1] = GL_BGR;
+ fb_type[1] = GL_UNSIGNED_INT_8_8_8_8_REV;
+
+ fb_format[2] = GL_BGRA;
+ fb_type[2] = GL_UNSIGNED_INT_8_8_8_8_REV;
+
+ for (color = 0; color < ARRAY_SIZE(fb_format); color++) {
+ __DRIconfig **new_configs;
+
+ new_configs = driCreateConfigs(fb_format[color], fb_type[color],
+ depth_bits,
+ stencil_bits,
+ ARRAY_SIZE(depth_bits),
+ back_buffer_modes,
+ ARRAY_SIZE(back_buffer_modes),
+ msaa_samples_array,
+ ARRAY_SIZE(msaa_samples_array));
+ if (configs == NULL)
+ configs = new_configs;
+ else
+ configs = driConcatConfigs(configs, new_configs);
+ }
+
+ if (configs == NULL) {
+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
+ __LINE__);
+ return NULL;
+ }
+
+ return (const __DRIconfig **)configs;
}
const struct __DriverAPIRec driDriverAPI = {
diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c
index 6bfb4c3..43e5959 100644
--- a/src/mesa/drivers/dri/mach64/mach64_screen.c
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c
@@ -93,6 +93,7 @@ mach64FillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[2];
uint8_t stencil_bits_array[2];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = depth_bits;
depth_bits_array[1] = depth_bits;
@@ -104,6 +105,8 @@ mach64FillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[0] = 0;
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
@@ -119,7 +122,8 @@ mach64FillInModes( __DRIscreenPrivate *psp,
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor, back_buffer_modes,
- back_buffer_factor);
+ back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n",
__func__, __LINE__);
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index 86da3a2..af706b3 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -133,6 +133,7 @@ mgaFillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[3];
uint8_t stencil_bits_array[3];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = 0;
@@ -147,6 +148,8 @@ mgaFillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[1] = 0;
stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
@@ -162,7 +165,8 @@ mgaFillInModes( __DRIscreenPrivate *psp,
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor,
- back_buffer_modes, back_buffer_factor);
+ back_buffer_modes, back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
__func__, __LINE__ );
diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c
index cb3a147..7cda4ca 100644
--- a/src/mesa/drivers/dri/r128/r128_screen.c
+++ b/src/mesa/drivers/dri/r128/r128_screen.c
@@ -422,7 +422,7 @@ r128FillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[2];
uint8_t stencil_bits_array[2];
-
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = depth_bits;
depth_bits_array[1] = depth_bits;
@@ -434,6 +434,8 @@ r128FillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[0] = 0;
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
@@ -446,26 +448,27 @@ r128FillInModes( __DRIscreenPrivate *psp,
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
}
- configs = driCreateConfigs(fb_format, fb_type,
- depth_bits_array, stencil_bits_array,
- depth_buffer_factor, back_buffer_modes,
- back_buffer_factor);
- if (configs == NULL) {
- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
- __LINE__);
- return NULL;
- }
+ configs = driCreateConfigs(fb_format, fb_type,
+ depth_bits_array, stencil_bits_array,
+ depth_buffer_factor, back_buffer_modes,
+ back_buffer_factor,
+ msaa_samples_array, 1);
+ if (configs == NULL) {
+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
+ __LINE__);
+ return NULL;
+ }
- /* Mark the visual as slow if there are "fake" stencil bits.
- */
- for (i = 0; configs[i]; i++) {
- m = &configs[i]->modes;
- if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) {
- m->visualRating = GLX_SLOW_CONFIG;
- }
- }
+ /* Mark the visual as slow if there are "fake" stencil bits.
+ */
+ for (i = 0; configs[i]; i++) {
+ m = &configs[i]->modes;
+ if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) {
+ m->visualRating = GLX_SLOW_CONFIG;
+ }
+ }
- return (const __DRIconfig **) configs;
+ return (const __DRIconfig **) configs;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 81337da..e3afaa9 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -274,7 +274,7 @@ radeonFillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[2];
uint8_t stencil_bits_array[2];
-
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = depth_bits;
depth_bits_array[1] = depth_bits;
@@ -286,6 +286,8 @@ radeonFillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[0] = 0;
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
@@ -301,7 +303,8 @@ radeonFillInModes( __DRIscreenPrivate *psp,
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor,
- back_buffer_modes, back_buffer_factor);
+ back_buffer_modes, back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
__func__, __LINE__ );
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index a344aab..5c835ac 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -914,7 +914,7 @@ savageFillInModes( __DRIscreenPrivate *psp,
uint8_t depth_bits_array[2];
uint8_t stencil_bits_array[2];
-
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = depth_bits;
depth_bits_array[1] = depth_bits;
@@ -926,6 +926,8 @@ savageFillInModes( __DRIscreenPrivate *psp,
stencil_bits_array[0] = 0;
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
@@ -941,7 +943,8 @@ savageFillInModes( __DRIscreenPrivate *psp,
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor,
- back_buffer_modes, back_buffer_factor);
+ back_buffer_modes, back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
__func__, __LINE__ );
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index b1a5d15..9eb27fe 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.c
+++ b/src/mesa/drivers/dri/sis/sis_screen.c
@@ -77,6 +77,7 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp)
};
uint8_t depth_bits_array[4];
uint8_t stencil_bits_array[4];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = 0;
stencil_bits_array[0] = 0;
@@ -87,6 +88,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp)
depth_bits_array[3] = 32;
stencil_bits_array[3] = 0;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = 4;
back_buffer_factor = 2;
@@ -100,7 +103,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp)
configs = driCreateConfigs(fb_format, fb_type, depth_bits_array,
stencil_bits_array, depth_buffer_factor,
- back_buffer_modes, back_buffer_factor);
+ back_buffer_modes, back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__);
return NULL;
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 15b5724..6bfb866 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -147,6 +147,7 @@ swrastFillInModes(__DRIscreen *psp,
uint8_t depth_bits_array[4];
uint8_t stencil_bits_array[4];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = 0;
depth_bits_array[1] = 0;
@@ -161,26 +162,38 @@ swrastFillInModes(__DRIscreen *psp,
stencil_bits_array[2] = 0;
stencil_bits_array[3] = (stencil_bits == 0) ? 8 : stencil_bits;
+ msaa_samples_array[0] = 0;
+
depth_buffer_factor = 4;
back_buffer_factor = 2;
- if (pixel_bits == 8) {
+ switch (pixel_bits) {
+ case 8:
fb_format = GL_RGB;
fb_type = GL_UNSIGNED_BYTE_2_3_3_REV;
- }
- else if (pixel_bits == 16) {
+ break;
+ case 16:
fb_format = GL_RGB;
fb_type = GL_UNSIGNED_SHORT_5_6_5;
- }
- else {
+ break;
+ case 24:
+ fb_format = GL_BGR;
+ fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ break;
+ case 32:
fb_format = GL_BGRA;
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ break;
+ default:
+ fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__,
+ pixel_bits);
+ return NULL;
}
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor, back_buffer_modes,
- back_buffer_factor);
+ back_buffer_factor, msaa_samples_array, 1);
if (configs == NULL) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
__LINE__);
@@ -196,7 +209,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions,
{
static const __DRIextension *emptyExtensionList[] = { NULL };
__DRIscreen *psp;
- __DRIconfig **configs8, **configs16, **configs32;
+ __DRIconfig **configs8, **configs16, **configs24, **configs32;
(void) data;
@@ -213,11 +226,13 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions,
configs8 = swrastFillInModes(psp, 8, 8, 0, 1);
configs16 = swrastFillInModes(psp, 16, 16, 0, 1);
+ configs24 = swrastFillInModes(psp, 24, 24, 8, 1);
configs32 = swrastFillInModes(psp, 32, 24, 8, 1);
- configs16 = (__DRIconfig **)driConcatConfigs(configs8, configs16);
-
- *driver_configs = driConcatConfigs(configs16, configs32);
+ configs16 = driConcatConfigs(configs8, configs16);
+ configs24 = driConcatConfigs(configs16, configs24);
+ *driver_configs = (const __DRIconfig **)
+ driConcatConfigs(configs24, configs32);
driInitExtensions( NULL, card_extensions, GL_FALSE );
@@ -249,19 +264,24 @@ static GLuint
choose_pixel_format(const GLvisual *v)
{
if (v->rgbMode) {
- int bpp = v->rgbBits;
+ int depth = v->rgbBits;
- if (bpp == 32
+ if (depth == 32
&& v->redMask == 0xff0000
&& v->greenMask == 0x00ff00
&& v->blueMask == 0x0000ff)
return PF_A8R8G8B8;
- else if (bpp == 16
+ else if (depth == 24
+ && v->redMask == 0xff0000
+ && v->greenMask == 0x00ff00
+ && v->blueMask == 0x0000ff)
+ return PF_X8R8G8B8;
+ else if (depth == 16
&& v->redMask == 0xf800
&& v->greenMask == 0x07e0
&& v->blueMask == 0x001f)
return PF_R5G6B5;
- else if (bpp == 8
+ else if (depth == 8
&& v->redMask == 0x07
&& v->greenMask == 0x38
&& v->blueMask == 0xc0)
@@ -290,7 +310,6 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
- int bpp;
unsigned mask = PITCH_ALIGN_BITS - 1;
TRACE;
@@ -299,23 +318,8 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->Width = width;
rb->Height = height;
- switch (internalFormat) {
- case GL_RGB:
- bpp = rb->RedBits + rb->GreenBits + rb->BlueBits;
- break;
- case GL_RGBA:
- bpp = rb->RedBits + rb->GreenBits + rb->BlueBits + rb->AlphaBits;
- break;
- case GL_COLOR_INDEX8_EXT:
- bpp = rb->IndexBits;
- break;
- default:
- _mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ );
- return GL_FALSE;
- }
-
/* always pad to PITCH_ALIGN_BITS */
- xrb->pitch = ((width * bpp + mask) & ~mask) / 8;
+ xrb->pitch = ((width * xrb->bpp + mask) & ~mask) / 8;
return GL_TRUE;
}
@@ -371,6 +375,17 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
xrb->Base.GreenBits = 8 * sizeof(GLubyte);
xrb->Base.BlueBits = 8 * sizeof(GLubyte);
xrb->Base.AlphaBits = 8 * sizeof(GLubyte);
+ xrb->bpp = 32;
+ break;
+ case PF_X8R8G8B8:
+ xrb->Base.InternalFormat = GL_RGB;
+ xrb->Base._BaseFormat = GL_RGB;
+ xrb->Base.DataType = GL_UNSIGNED_BYTE;
+ xrb->Base.RedBits = 8 * sizeof(GLubyte);
+ xrb->Base.GreenBits = 8 * sizeof(GLubyte);
+ xrb->Base.BlueBits = 8 * sizeof(GLubyte);
+ xrb->Base.AlphaBits = 0;
+ xrb->bpp = 32;
break;
case PF_R5G6B5:
xrb->Base.InternalFormat = GL_RGB;
@@ -380,6 +395,7 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
xrb->Base.GreenBits = 6 * sizeof(GLubyte);
xrb->Base.BlueBits = 5 * sizeof(GLubyte);
xrb->Base.AlphaBits = 0;
+ xrb->bpp = 16;
break;
case PF_R3G3B2:
xrb->Base.InternalFormat = GL_RGB;
@@ -389,12 +405,14 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
xrb->Base.GreenBits = 3 * sizeof(GLubyte);
xrb->Base.BlueBits = 2 * sizeof(GLubyte);
xrb->Base.AlphaBits = 0;
+ xrb->bpp = 8;
break;
case PF_CI8:
xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT;
xrb->Base._BaseFormat = GL_COLOR_INDEX;
xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->Base.IndexBits = 8 * sizeof(GLubyte);
+ xrb->bpp = 8;
break;
default:
return NULL;
diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h
index a707ffc..1a5fb31 100644
--- a/src/mesa/drivers/dri/swrast/swrast_priv.h
+++ b/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -90,6 +90,8 @@ struct swrast_renderbuffer {
/* renderbuffer pitch (in bytes) */
GLuint pitch;
+ /* bits per pixel of storage */
+ GLuint bpp;
};
static INLINE __DRIcontext *
@@ -115,10 +117,10 @@ swrast_renderbuffer(struct gl_renderbuffer *rb)
* Pixel formats we support
*/
#define PF_CI8 1 /**< Color Index mode */
-#define PF_A8R8G8B8 2 /**< 32-bit TrueColor: 8-A, 8-R, 8-G, 8-B bits */
-#define PF_R5G6B5 3 /**< 16-bit TrueColor: 5-R, 6-G, 5-B bits */
-#define PF_R3G3B2 4 /**< 8-bit TrueColor: 3-R, 3-G, 2-B bits */
-
+#define PF_A8R8G8B8 2 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */
+#define PF_R5G6B5 3 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */
+#define PF_R3G3B2 4 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */
+#define PF_X8R8G8B8 5 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */
/**
* Renderbuffer pitch alignment (in bits).
diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c
index 5e99036..2d3c25d 100644
--- a/src/mesa/drivers/dri/swrast/swrast_span.c
+++ b/src/mesa/drivers/dri/swrast/swrast_span.c
@@ -79,6 +79,24 @@ static const GLubyte kernel[16] = {
DST[BCOMP] = SRC[0]
+/* 32-bit BGRX */
+#define STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) \
+ DST[3] = 0xff; \
+ DST[2] = VALUE[RCOMP]; \
+ DST[1] = VALUE[GCOMP]; \
+ DST[0] = VALUE[BCOMP]
+#define STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) \
+ DST[3] = 0xff; \
+ DST[2] = VALUE[RCOMP]; \
+ DST[1] = VALUE[GCOMP]; \
+ DST[0] = VALUE[BCOMP]
+#define FETCH_PIXEL_X8R8G8B8(DST, SRC) \
+ DST[ACOMP] = 0xff; \
+ DST[RCOMP] = SRC[2]; \
+ DST[GCOMP] = SRC[1]; \
+ DST[BCOMP] = SRC[0]
+
+
/* 16-bit BGR */
#define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \
do { \
@@ -139,6 +157,24 @@ static const GLubyte kernel[16] = {
#include "swrast/s_spantemp.h"
+/* 32-bit BGRX */
+#define NAME(FUNC) FUNC##_X8R8G8B8
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4;
+#define INC_PIXEL_PTR(P) P += 4
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE)
+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
+ STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_X8R8G8B8(DST, SRC)
+
+#include "swrast/s_spantemp.h"
+
+
/* 16-bit BGR */
#define NAME(FUNC) FUNC##_R5G6B5
#define RB_TYPE GLubyte
@@ -210,6 +246,24 @@ static const GLubyte kernel[16] = {
#include "swrast_spantemp.h"
+/* 32-bit BGRX */
+#define NAME(FUNC) FUNC##_X8R8G8B8_front
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)row;
+#define INC_PIXEL_PTR(P) P += 4
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE)
+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
+ STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_X8R8G8B8(DST, SRC)
+
+#include "swrast_spantemp.h"
+
+
/* 16-bit BGR */
#define NAME(FUNC) FUNC##_R5G6B5_front
#define RB_TYPE GLubyte
@@ -279,6 +333,15 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb,
xrb->Base.PutValues = put_values_A8R8G8B8;
xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8;
break;
+ case PF_X8R8G8B8:
+ xrb->Base.GetRow = get_row_X8R8G8B8;
+ xrb->Base.GetValues = get_values_X8R8G8B8;
+ xrb->Base.PutRow = put_row_X8R8G8B8;
+ xrb->Base.PutRowRGB = put_row_rgb_X8R8G8B8;
+ xrb->Base.PutMonoRow = put_mono_row_X8R8G8B8;
+ xrb->Base.PutValues = put_values_X8R8G8B8;
+ xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8;
+ break;
case PF_R5G6B5:
xrb->Base.GetRow = get_row_R5G6B5;
xrb->Base.GetValues = get_values_R5G6B5;
@@ -334,6 +397,15 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb,
xrb->Base.PutValues = put_values_A8R8G8B8_front;
xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8_front;
break;
+ case PF_X8R8G8B8:
+ xrb->Base.GetRow = get_row_X8R8G8B8_front;
+ xrb->Base.GetValues = get_values_X8R8G8B8_front;
+ xrb->Base.PutRow = put_row_X8R8G8B8_front;
+ xrb->Base.PutRowRGB = put_row_rgb_X8R8G8B8_front;
+ xrb->Base.PutMonoRow = put_mono_row_X8R8G8B8_front;
+ xrb->Base.PutValues = put_values_X8R8G8B8_front;
+ xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8_front;
+ break;
case PF_R5G6B5:
xrb->Base.GetRow = get_row_R5G6B5_front;
xrb->Base.GetValues = get_values_R5G6B5_front;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index cd22b84..5f2f5cf 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -361,6 +361,7 @@ tdfxFillInModes(__DRIscreenPrivate *psp,
static const GLenum db_modes[2] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML };
uint8_t depth_bits_array[4];
uint8_t stencil_bits_array[4];
+ uint8_t msaa_samples_array[1];
if(deep) {
depth_bits_array[0] = 0;
depth_bits_array[1] = 24;
@@ -377,13 +378,17 @@ tdfxFillInModes(__DRIscreenPrivate *psp,
stencil_bits_array[3] = 8;
}
- return driCreateConfigs(
- deep ? GL_RGBA : GL_RGB,
- deep ? GL_UNSIGNED_INT_8_8_8_8 : GL_UNSIGNED_SHORT_5_6_5,
- depth_bits_array,
- stencil_bits_array,
- deep ? 2 : 4,
- db_modes, 2);
+ msaa_samples_array[0] = 0;
+
+ return (const __DRIconfig **)
+ driCreateConfigs(deep ? GL_RGBA : GL_RGB,
+ deep ? GL_UNSIGNED_INT_8_8_8_8 :
+ GL_UNSIGNED_SHORT_5_6_5,
+ depth_bits_array,
+ stencil_bits_array,
+ deep ? 2 : 4,
+ db_modes, 2,
+ msaa_samples_array, 1);
}
/**
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 988f993..e9f5661 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -342,6 +342,7 @@ viaFillInModes( __DRIscreenPrivate *psp,
*/
static const uint8_t depth_bits_array[4] = { 0, 16, 24, 32 };
static const uint8_t stencil_bits_array[4] = { 0, 0, 8, 0 };
+ uint8_t msaa_samples_array[1] = { 0 };
const unsigned depth_buffer_factor = 3;
if ( pixel_bits == 16 ) {
@@ -356,7 +357,8 @@ viaFillInModes( __DRIscreenPrivate *psp,
configs = driCreateConfigs(fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor, back_buffer_modes,
- back_buffer_factor);
+ back_buffer_factor,
+ msaa_samples_array, 1);
if (configs == NULL) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
__LINE__);
mesa-7.3-fixes-from-7.4-branch.patch:
--- NEW FILE mesa-7.3-fixes-from-7.4-branch.patch ---
diff --git a/Makefile b/Makefile
index ebc5254..ee40b75 100644
--- a/Makefile
+++ b/Makefile
@@ -174,10 +174,10 @@ ultrix-gcc:
# Rules for making release tarballs
-DIRECTORY = Mesa-7.3
-LIB_NAME = MesaLib-7.3
-DEMO_NAME = MesaDemos-7.3
-GLUT_NAME = MesaGLUT-7.3
+DIRECTORY = Mesa-7.4
+LIB_NAME = MesaLib-7.4
+DEMO_NAME = MesaDemos-7.4
+GLUT_NAME = MesaGLUT-7.4
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
diff --git a/configure.ac b/configure.ac
index 33c1072..73caf00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,10 +46,14 @@ esac
MKDEP_OPTIONS=-fdepend
dnl Ask gcc where it's keeping its secret headers
if test "x$GCC" = xyes; then
- GCC_INCLUDES=`$CC -print-file-name=include`
- if test "x$GCC_INCLUDES" != x; then
- MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
- fi
+ for dir in include include-fixed; do
+ GCC_INCLUDES=`$CC -print-file-name=$dir`
+ if test "x$GCC_INCLUDES" != x && \
+ test "$GCC_INCLUDES" != "$dir" && \
+ test -d "$GCC_INCLUDES"; then
+ MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
+ fi
+ done
fi
AC_SUBST([MKDEP_OPTIONS])
@@ -362,7 +366,7 @@ default_driver="xlib"
case "$host_os" in
linux*)
case "$host_cpu" in
- i*86|x86_64|powerpc*) default_driver="dri";;
+ i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
;;
*freebsd* | dragonfly*)
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index c083fcb..df89884 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -22,13 +22,21 @@ Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
-for DRI ardware acceleration.
+for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
-tbd
+8ed03191432b22d118d88d6db497f304 MesaLib-7.3.tar.gz
+781e7811a6ed5c97b2b8defefc8ffbc9 MesaLib-7.3.tar.bz2
+3ccba9a1734ed6d4b3389e1535d90fbf MesaLib-7.3.zip
+d312e974b31043b13b61bac5fbf00b87 MesaDemos-7.3.tar.gz
+3f0741394069bdf2329565a387396cda MesaDemos-7.3.tar.bz2
+4d0887fd4c66a824295cdd619f6d34cb MesaDemos-7.3.zip
+2d7661b66022bcb8878728f3d5bd33ab MesaGLUT-7.3.tar.gz
+abe8036a724c1a483bdad6b5a55ddc1a MesaGLUT-7.3.tar.bz2
+5f247819b47e2a7c62d07a6afe5262fb MesaGLUT-7.3.zip
</pre>
diff --git a/docs/relnotes-7.4.html b/docs/relnotes-7.4.html
new file mode 100644
index 0000000..8ad23e5
--- /dev/null
+++ b/docs/relnotes-7.4.html
@@ -0,0 +1,79 @@
+<HTML>
+
+<TITLE>Mesa Release Notes</TITLE>
+
+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.4 Release Notes / date TBD</H1>
+
+<p>
+Mesa 7.4 is a stable development release fixing bugs since the 7.3 release.
+</p>
+<p>
+Mesa 7.4 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI ardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+tbd
+</pre>
+
+
+<h2>New features</h2>
+<ul>
+<li>Added MESA_GLX_FORCE_DIRECT env var for Xlib/software driver
+<li>GLSL version 1.20 is returnd by the GL_SHADING_LANGUAGE_VERSION query
+</ul>
+
+
+<h2>Bug fixes</h2>
+<ul>
+<li>glGetActiveUniform() returned wrong size for some array types
+<li>Fixed some error checking in glUniform()
+<li>Fixed a potential glTexImage('proxy target') segfault
+<li>Fixed bad reference counting for 1D/2D texture arrays
+<li>Fixed VBO + glPush/PopClientAttrib() bug #19835
+<li>Assorted i965 driver bug fixes
+<li>Fixed a Windows compilation failure in s_triangle.c
+<li>Fixed a GLSL array indexing bug
+<li>Fixes for building on Haiku
+</ul>
+
+<h2>Changes</h2>
+<ul>
+</ul>
+
+
+
+<h2>Driver Status</h2>
+
+<pre>
+Driver Status
+---------------------- ----------------------
+DRI drivers varies with the driver
+XMesa/GLX (on Xlib) implements OpenGL 2.1
+OSMesa (off-screen) implements OpenGL 2.1
+Windows/Win32 implements OpenGL 2.1
+Glide (3dfx Voodoo1/2) implements OpenGL 1.3
+SVGA unsupported
+Wind River UGL unsupported
+DJGPP unsupported
+GGI unsupported
+BeOS unsupported
+Allegro unsupported
+D3D unsupported
+</pre>
+
+</body>
+</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index 020e485..61c6a20 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
+<LI><A HREF="relnotes-7.4.html">7.4 release notes</A>
<LI><A HREF="relnotes-7.3.html">7.3 release notes</A>
<LI><A HREF="relnotes-7.2.html">7.2 release notes</A>
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
diff --git a/docs/xlibdriver.html b/docs/xlibdriver.html
index d95f4d5..029e2b1 100644
--- a/docs/xlibdriver.html
+++ b/docs/xlibdriver.html
@@ -169,6 +169,20 @@ the Gamma FAQ</a>
</p>
+<H2>Direct Rendering Flag</H2>
+<p>
+Some applications won't run with indirect rendering contexts (which is
+what the Xlib driver supports).
+To force the glXIsDirect() query to return True, set the MESA_GLX_FORCE_DIRECT
+environment variable.
+For example:
+</p>
+<pre>
+ $ export MESA_GLX_FORCE_DIRECT=1
+</pre>
+
+
+
<H2>Overlay Planes</H2>
[...2126 lines suppressed...]
texdx[1], texdy[1], /* dt/dx, dt/dy */
@@ -85,14 +93,20 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
1.0F / texcoord[3]) + lodBias;
lambda = CLAMP(lambda, texObj->MinLod, texObj->MaxLod);
- }
- swrast->TextureSample[unit](ctx, texObj, 1, (const GLfloat (*)[4]) texcoord,
- &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
+ /* XXX use a float-valued TextureSample routine here!!! */
+ swrast->TextureSample[unit](ctx, texObj, 1,
+ (const GLfloat (*)[4]) texcoord,
+ &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+ }
+ else {
+ color[0] = color[1] = color[2] = 0.0F;
+ color[3] = 1.0F;
+ }
}
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index a2e8433..a501f42 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -265,9 +265,6 @@ affine_span(GLcontext *ctx, SWspan *span,
GLchan sample[4]; /* the filtered texture sample */
const GLuint texEnableSave = ctx->Texture._EnabledUnits;
- /* Disable tex units so they're not re-applied in swrast_write_rgba_span */
- ctx->Texture._EnabledUnits = 0x0;
-
/* Instead of defining a function for each mode, a test is done
* between the outer and inner loops. This is to reduce code size
* and complexity. Observe that an optimizing compiler kills
@@ -396,6 +393,9 @@ affine_span(GLcontext *ctx, SWspan *span,
GLuint i;
GLchan *dest = span->array->rgba[0];
+ /* Disable tex units so they're not re-applied in swrast_write_rgba_span */
+ ctx->Texture._EnabledUnits = 0x0;
+
span->intTex[0] -= FIXED_HALF;
span->intTex[1] -= FIXED_HALF;
switch (info->filter) {
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 5e2a582..19ec556 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -109,24 +109,28 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
tnl->pipeline.new_state |= new_state;
- /* Calculate tnl->render_inputs:
+ /* Calculate tnl->render_inputs. This bitmask indicates which vertex
+ * attributes need to be emitted to the rasterizer.
*/
if (ctx->Visual.rgbMode) {
GLuint i;
RENDERINPUTS_ZERO( tnl->render_inputs_bitset );
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
+
if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) {
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 );
}
+
+ if (NEED_SECONDARY_COLOR(ctx))
+ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
+
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- if (ctx->Texture._EnabledCoordUnits & (1 << i)) {
+ if (ctx->Texture._EnabledCoordUnits & (1 << i) ||
+ (fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) {
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) );
}
}
-
- if (NEED_SECONDARY_COLOR(ctx))
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
}
else {
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index d48f523..f6daa25 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -148,11 +148,14 @@ static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
/* Note: the exec->vtx.current[i] pointers point into the
* ctx->Current.Attrib and ctx->Light.Material.Attrib arrays.
*/
+ if (exec->vtx.attrptr[i]) {
+
COPY_CLEAN_4V(current,
exec->vtx.attrsz[i],
exec->vtx.attrptr[i]);
-
+ }
+
/* Given that we explicitly state size here, there is no need
* for the COPY_CLEAN above, could just copy 16 bytes and be
* done. The only problem is when Mesa accesses ctx->Current
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 92356ba..ad8b6e8 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -175,7 +175,20 @@ static void vbo_exec_bind_arrays( GLcontext *ctx )
exec->vtx.inputs[attr + 16] = &vbo->generic_currval[attr];
}
map = vbo->map_vp_arb;
+
+ /* check if VERT_ATTRIB_POS is not read but VERT_BIT_GENERIC0 is read.
+ * In that case we effectively need to route the data from
+ * glVertexAttrib(0, val) calls to feed into the GENERIC0 input.
+ */
+ if ((ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_POS) == 0 &&
+ (ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) {
+ exec->vtx.inputs[16] = exec->vtx.inputs[0];
+ exec->vtx.attrsz[16] = exec->vtx.attrsz[0];
+ exec->vtx.attrsz[0] = 0;
+ }
break;
+ default:
+ assert(0);
}
/* Make all active attributes (including edgeflag) available as
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index ed82f09..ed40b5c 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -110,6 +110,9 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
GLuint data = node->buffer_offset;
const GLuint *map;
GLuint attr;
+ GLubyte node_attrsz[VBO_ATTRIB_MAX]; /* copy of node->attrsz[] */
+
+ memcpy(node_attrsz, node->attrsz, sizeof(node->attrsz));
/* Install the default (ie Current) attributes first, then overlay
* all active ones.
@@ -135,13 +138,26 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
save->inputs[attr + 16] = &vbo->generic_currval[attr];
}
map = vbo->map_vp_arb;
+
+ /* check if VERT_ATTRIB_POS is not read but VERT_BIT_GENERIC0 is read.
+ * In that case we effectively need to route the data from
+ * glVertexAttrib(0, val) calls to feed into the GENERIC0 input.
+ */
+ if ((ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_POS) == 0 &&
+ (ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) {
+ save->inputs[16] = save->inputs[0];
+ node_attrsz[16] = node_attrsz[0];
+ node_attrsz[0] = 0;
+ }
break;
+ default:
+ assert(0);
}
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
GLuint src = map[attr];
- if (node->attrsz[src]) {
+ if (node_attrsz[src]) {
/* override the default array set above */
save->inputs[attr] = &arrays[attr];
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index afb4b11..8c690b4 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -61,7 +61,7 @@ do { \
printf( "\n" ); \
} while (0)
-#if defined(__BEOS__) || defined(_LP64)
+#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
#define OFFSET( s, t, m ) \
printf( "#define %s\t%ld\n", s, offsetof( t, m ) );
#else
@@ -69,7 +69,7 @@ do { \
printf( "#define %s\t%d\n", s, offsetof( t, m ) );
#endif
-#if defined(__BEOS__) || defined(_LP64)
+#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
#define SIZEOF( s, t ) \
printf( "#define %s\t%ld\n", s, sizeof(t) );
#else
Index: mesa.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mesa/devel/mesa.spec,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -r1.225 -r1.226
--- mesa.spec 27 Feb 2009 09:41:56 -0000 1.225
+++ mesa.spec 4 Mar 2009 07:00:36 -0000 1.226
@@ -20,7 +20,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 7.3
-Release: 8%{?dist}
+Release: 9%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@@ -36,11 +36,13 @@
Source5: http://www.x.org/pub/individual/app/%{xdriinfo}.tar.bz2
-Patch0: mesa-7.1-osmesa-version.patch
+Patch0: mesa-7.3-fixes-from-7.4-branch.patch
+Patch1: mesa-7.1-osmesa-version.patch
Patch2: mesa-7.1-nukeglthread-debug.patch
Patch3: mesa-no-mach64.patch
-Patch5: radeon-rewrite.patch
+Patch5: mesa-7.3-dri-configs-fixes.patch
+Patch6: radeon-rewrite.patch
Patch7: mesa-7.1-link-shared.patch
Patch9: intel-revert-vbl.patch
@@ -167,10 +169,12 @@
%prep
%setup -q -n Mesa-%{version}%{?snapshot} -b0 -b1 -b2 -b5
#%setup -q -n mesa-%{gitdate} -b2 -b5
-%patch0 -p1 -b .osmesa
+%patch0 -p1 -b .mesa74
+%patch1 -p1 -b .osmesa
%patch2 -p1 -b .intel-glthread
%patch3 -p0 -b .no-mach64
-%patch5 -p1 -b .radeon-rewrite
+%patch5 -p1 -b .driconfigs
+%patch6 -p1 -b .radeon-rewrite
%patch7 -p1 -b .dricore
%patch9 -p1 -b .intel-vbl
%patch12 -p1 -b .intel-nowarn
@@ -423,6 +427,9 @@
%{_libdir}/mesa-demos-data
%changelog
+* Wed Mar 04 2009 Dave Airlie <airlied at redhat.com> 7.3-9
+- try again: pull in 7.4 fixes, dri configs changes, new radeon-rewrite
+
* Fri Feb 27 2009 Dave Airlie <airlied at redhat.com> 7.3-8
- reset whole place back to 7.3-6 - bad plan
radeon-rewrite.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.3 -r 1.4 radeon-rewrite.patch
Index: radeon-rewrite.patch
===================================================================
RCS file: /cvs/pkgs/rpms/mesa/devel/radeon-rewrite.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- radeon-rewrite.patch 27 Feb 2009 09:41:56 -0000 1.3
+++ radeon-rewrite.patch 4 Mar 2009 07:00:36 -0000 1.4
@@ -1,18848 +1,47 @@
-diff --git a/configs/autoconf.in b/configs/autoconf.in
-index b352974..d786029 100644
---- a/configs/autoconf.in
-+++ b/configs/autoconf.in
-@@ -20,6 +20,8 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
- $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
- LDFLAGS = @LDFLAGS@
- EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
-+RADEON_CFLAGS = @RADEON_CFLAGS@
-+RADEON_LDFLAGS = @RADEON_LDFLAGS@
-
- # Assembler
- MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
-diff --git a/configure.ac b/configure.ac
-index a9a8d5a..ea2992d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -573,6 +575,13 @@ dri)
- GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
- DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
-
-+ PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
-+
-+ if test "$HAVE_LIBDRM_RADEON" = yes; then
-+ RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
-+ RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
-+ fi
-+
- # find the DRI deps for libGL
- if test "$x11_pkgconfig" = yes; then
- # add xcb modules if necessary
-@@ -578,6 +585,8 @@ AC_SUBST([GL_PC_REQ_PRIV])
- AC_SUBST([GL_PC_LIB_PRIV])
- AC_SUBST([GL_PC_CFLAGS])
- AC_SUBST([DRI_PC_REQ_PRIV])
-+AC_SUBST([RADEON_CFLAGS])
-+AC_SUBST([RADEON_LDFLAGS])
-
- dnl
- dnl More X11 setup
-diff --git a/src/mesa/drivers/dri/r200/Makefile b/src/mesa/drivers/dri/r200/Makefile
-index e9144ac..e593ed9 100644
---- a/src/mesa/drivers/dri/r200/Makefile
-+++ b/src/mesa/drivers/dri/r200/Makefile
-@@ -3,6 +3,8 @@
- TOP = ../../../../..
- include $(TOP)/configs/current
-
-+CFLAGS += $(RADEON_CFLAGS)
-+
- LIBNAME = r200_dri.so
-
- MINIGLX_SOURCES = server/radeon_dri.c
-@@ -11,25 +13,35 @@ ifeq ($(USING_EGL), 1)
- EGL_SOURCES = server/radeon_egl.c
- endif
-
-+RADEON_COMMON_SOURCES = \
-+ radeon_texture.c \
-+ radeon_common_context.c \
-+ radeon_common.c \
-+ radeon_dma.c \
-+ radeon_lock.c \
-+ radeon_bo_legacy.c \
-+ radeon_cs_legacy.c \
-+ radeon_mipmap_tree.c \
-+ radeon_span.c
-+
-+
- DRIVER_SOURCES = r200_context.c \
- r200_ioctl.c \
-- r200_lock.c \
- r200_state.c \
- r200_state_init.c \
- r200_cmdbuf.c \
- r200_pixel.c \
- r200_tex.c \
-- r200_texmem.c \
- r200_texstate.c \
- r200_tcl.c \
- r200_swtcl.c \
-- r200_span.c \
- r200_maos.c \
- r200_sanity.c \
- r200_fragshader.c \
- r200_vertprog.c \
- radeon_screen.c \
-- $(EGL_SOURCES)
-+ $(EGL_SOURCES) \
-+ $(RADEON_COMMON_SOURCES)
-
- C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
-
-@@ -48,7 +60,29 @@ SYMLINKS = \
- COMMON_SYMLINKS = \
- radeon_chipset.h \
- radeon_screen.c \
-- radeon_screen.h
-+ radeon_screen.h \
-+ radeon_bo_legacy.c \
-+ radeon_cs_legacy.c \
-+ radeon_bo_legacy.h \
-+ radeon_cs_legacy.h \
-+ radeon_bocs_wrapper.h \
-+ radeon_span.h \
-+ radeon_span.c \
-+ radeon_lock.c \
-+ radeon_lock.h \
-+ radeon_common.c \
-+ radeon_common_context.c \
-+ radeon_common_context.h \
-+ radeon_common.h \
-+ radeon_cmdbuf.h \
-+ radeon_mipmap_tree.c \
-+ radeon_mipmap_tree.h \
-+ radeon_texture.c \
-+ radeon_texture.h \
-+ radeon_dma.c \
-+ radeon_dma.h
-+
-+DRI_LIB_DEPS += $(RADEON_LDFLAGS)
-
- ##### TARGETS #####
-
-diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
-index e163377..ae31bcb 100644
---- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
-+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
-@@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- #include "swrast/swrast.h"
- #include "main/simple_list.h"
-
-+#include "radeon_common.h"
- #include "r200_context.h"
- #include "r200_state.h"
- #include "r200_ioctl.h"
-@@ -45,18 +46,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- #include "r200_sanity.h"
- #include "radeon_reg.h"
-
--static void print_state_atom( struct r200_state_atom *state )
--{
-- int i;
--
-- fprintf(stderr, "emit %s/%d\n", state->name, state->cmd_size);
--
-- if (0 & R200_DEBUG & DEBUG_VERBOSE)
-- for (i = 0 ; i < state->cmd_size ; i++)
-- fprintf(stderr, "\t%s[%d]: %x\n", state->name, i, state->cmd[i]);
--
--}
--
- /* The state atoms will be emitted in the order they appear in the atom list,
- * so this step is important.
- */
-@@ -64,141 +53,56 @@ void r200SetUpAtomList( r200ContextPtr rmesa )
- {
- int i, mtu;
-
-- mtu = rmesa->glCtx->Const.MaxTextureUnits;
--
-- make_empty_list(&rmesa->hw.atomlist);
-- rmesa->hw.atomlist.name = "atom-list";
--
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.ctx );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.set );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.lin );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.msk );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vpt );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vtx );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vap );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vte );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.msc );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.cst );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.zbs );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tcl );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.msl );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tcg );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.grd );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.fog );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tam );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tf );
-- insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.atf );
-+ mtu = rmesa->radeon.glCtx->Const.MaxTextureUnits;
-+
-+ make_empty_list(&rmesa->radeon.hw.atomlist);
-+ rmesa->radeon.hw.atomlist.name = "atom-list";
-+
-+ insert_at_tail( &rmesa->radeon.hw.atomlist, &rmesa->hw.ctx );
-+ insert_at_tail( &rmesa->radeon.hw.atomlist, &rmesa->hw.set );
-+ insert_at_tail( &rmesa->radeon.hw.atomlist, &rmesa->hw.lin );
[...28039 lines suppressed...]
-- fprintf(stderr, "%s: upload failed\n", __FUNCTION__);
-- return GL_FALSE;
-- }
-+ if (t->base.Target == GL_TEXTURE_RECTANGLE_NV) {
-+ t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2;
- }
-
- return GL_TRUE;
- }
-
--
--static GLboolean update_tex_common( GLcontext *ctx, int unit )
-+static GLboolean radeon_validate_texture(GLcontext *ctx, struct gl_texture_object *texObj, int unit)
- {
-- radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
-- struct gl_texture_object *tObj = texUnit->_Current;
-- radeonTexObjPtr t = (radeonTexObjPtr) tObj->DriverData;
-- GLenum format;
-+ r100ContextPtr rmesa = R100_CONTEXT(ctx);
-+ radeonTexObj *t = radeon_tex_obj(texObj);
-+ int ret;
-
-- /* Fallback if there's a texture border */
-- if ( tObj->Image[0][tObj->BaseLevel]->Border > 0 ) {
-- fprintf(stderr, "%s: border\n", __FUNCTION__);
-+ if (!radeon_validate_texture_miptree(ctx, texObj))
- return GL_FALSE;
-- }
-+
-+ ret = setup_hardware_state(rmesa, t, unit);
-+ if (ret == GL_FALSE)
-+ return GL_FALSE;
-+
- /* yuv conversion only works in first unit */
- if (unit != 0 && (t->pp_txfilter & RADEON_YUV_TO_RGB))
- return GL_FALSE;
-
-- /* Update state if this is a different texture object to last
-- * time.
-- */
-- if ( rmesa->state.texture.unit[unit].texobj != t ) {
-- if ( rmesa->state.texture.unit[unit].texobj != NULL ) {
-- /* The old texture is no longer bound to this texture unit.
-- * Mark it as such.
-- */
--
-- rmesa->state.texture.unit[unit].texobj->base.bound &=
-- ~(1UL << unit);
-- }
-+ RADEON_STATECHANGE( rmesa, ctx );
-+ rmesa->hw.ctx.cmd[CTX_PP_CNTL] |=
-+ (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit;
-
-- rmesa->state.texture.unit[unit].texobj = t;
-- t->base.bound |= (1UL << unit);
-- t->dirty_state |= 1<<unit;
-- driUpdateTextureLRU( (driTextureObject *) t ); /* XXX: should be locked! */
-- }
-+ RADEON_STATECHANGE( rmesa, tcl );
-+ rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_ST_BIT(unit);
-
-+ rmesa->recheck_texgen[unit] = GL_TRUE;
-
-- /* Newly enabled?
-- */
-- if ( !(rmesa->hw.ctx.cmd[CTX_PP_CNTL] & (RADEON_TEX_0_ENABLE<<unit))) {
-- RADEON_STATECHANGE( rmesa, ctx );
-- rmesa->hw.ctx.cmd[CTX_PP_CNTL] |=
-- (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit;
--
-- RADEON_STATECHANGE( rmesa, tcl );
--
-- rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_ST_BIT(unit);
--
-- rmesa->recheck_texgen[unit] = GL_TRUE;
-- }
--
-- if (t->dirty_state & (1<<unit)) {
-- import_tex_obj_state( rmesa, unit, t );
-- /* may need to update texture matrix (for texrect adjustments) */
-- rmesa->NewGLState |= _NEW_TEXTURE_MATRIX;
-- }
-+ import_tex_obj_state( rmesa, unit, t );
-
- if (rmesa->recheck_texgen[unit]) {
- GLboolean fallback = !radeon_validate_texgen( ctx, unit );
- TCL_FALLBACK( ctx, (RADEON_TCL_FALLBACK_TEXGEN_0<<unit), fallback);
- rmesa->recheck_texgen[unit] = 0;
-- rmesa->NewGLState |= _NEW_TEXTURE_MATRIX;
-+ rmesa->radeon.NewGLState |= _NEW_TEXTURE_MATRIX;
- }
-
-- format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat;
-- if ( rmesa->state.texture.unit[unit].format != format ||
-- rmesa->state.texture.unit[unit].envMode != texUnit->EnvMode ) {
-- rmesa->state.texture.unit[unit].format = format;
-- rmesa->state.texture.unit[unit].envMode = texUnit->EnvMode;
-- if ( ! radeonUpdateTextureEnv( ctx, unit ) ) {
-- return GL_FALSE;
-- }
-+ if ( ! radeonUpdateTextureEnv( ctx, unit ) ) {
-+ return GL_FALSE;
- }
--
- FALLBACK( rmesa, RADEON_FALLBACK_BORDER_MODE, t->border_fallback );
-+
-+ t->validated = GL_TRUE;
- return !t->border_fallback;
- }
-
--
--
- static GLboolean radeonUpdateTextureUnit( GLcontext *ctx, int unit )
- {
-+ r100ContextPtr rmesa = R100_CONTEXT(ctx);
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
-
-- if ( texUnit->_ReallyEnabled & (TEXTURE_RECT_BIT) ) {
-- return (enable_tex_rect( ctx, unit ) &&
-- update_tex_common( ctx, unit ));
-- }
-- else if ( texUnit->_ReallyEnabled & (TEXTURE_1D_BIT | TEXTURE_2D_BIT) ) {
-- return (enable_tex_2d( ctx, unit ) &&
-- update_tex_common( ctx, unit ));
-- }
-- else if ( texUnit->_ReallyEnabled & (TEXTURE_CUBE_BIT) ) {
-- return (enable_tex_cube( ctx, unit ) &&
-- update_tex_common( ctx, unit ));
-+
-+ if (ctx->Texture.Unit[unit]._ReallyEnabled & TEXTURE_3D_BIT) {
-+ return GL_FALSE;
- }
-- else if ( texUnit->_ReallyEnabled ) {
-- return GL_FALSE;
-+
-+ if (!ctx->Texture.Unit[unit]._ReallyEnabled) {
-+ /* disable the unit */
-+ disable_tex_obj_state(rmesa, unit);
-+ return GL_TRUE;
- }
-- else {
-- disable_tex( ctx, unit );
-- return GL_TRUE;
-+
-+ if (!radeon_validate_texture(ctx, ctx->Texture.Unit[unit]._Current, unit)) {
-+ _mesa_warning(ctx,
-+ "failed to validate texture for unit %d.\n",
-+ unit);
-+ rmesa->state.texture.unit[unit].texobj = NULL;
-+ return GL_FALSE;
- }
-+ rmesa->state.texture.unit[unit].texobj = radeon_tex_obj(ctx->Texture.Unit[unit]._Current);
-+ return GL_TRUE;
- }
-
- void radeonUpdateTextureState( GLcontext *ctx )
- {
-- radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-+ r100ContextPtr rmesa = R100_CONTEXT(ctx);
- GLboolean ok;
-
-+ /* set the ctx all textures off */
-+ RADEON_STATECHANGE( rmesa, ctx );
-+ rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~((RADEON_TEX_ENABLE_MASK) | (RADEON_TEX_BLEND_ENABLE_MASK));
-+
- ok = (radeonUpdateTextureUnit( ctx, 0 ) &&
- radeonUpdateTextureUnit( ctx, 1 ) &&
- radeonUpdateTextureUnit( ctx, 2 ));
-
- FALLBACK( rmesa, RADEON_FALLBACK_TEXTURE, !ok );
-
-- if (rmesa->TclFallback)
-+ if (rmesa->radeon.TclFallback)
- radeonChooseVertexState( ctx );
- }
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
new file mode 100644
index 0000000..63680b4
@@ -34369,17 +6081,6 @@
+ struct gl_texture_image *texImage);
+
+#endif
-diff --git a/src/mesa/drivers/dri/radeon/server/radeon_reg.h b/src/mesa/drivers/dri/radeon/server/radeon_reg.h
-index 596a8aa..0df634b 100644
---- a/src/mesa/drivers/dri/radeon/server/radeon_reg.h
-+++ b/src/mesa/drivers/dri/radeon/server/radeon_reg.h
-@@ -2031,6 +2031,9 @@
- #define RADEON_CP_PACKET3_3D_DRAW_INDX 0xC0002A00
- #define RADEON_CP_PACKET3_LOAD_PALETTE 0xC0002C00
- #define RADEON_CP_PACKET3_3D_LOAD_VBPNTR 0xC0002F00
-+#define R200_CP_CMD_3D_DRAW_VBUF_2 0xC0003400
-+#define R200_CP_CMD_3D_DRAW_IMMD_2 0xC0003500
-+#define R200_CP_CMD_3D_DRAW_INDX_2 0xC0003600
- #define RADEON_CP_PACKET3_CNTL_PAINT 0xC0009100
- #define RADEON_CP_PACKET3_CNTL_BITBLT 0xC0009200
- #define RADEON_CP_PACKET3_CNTL_SMALLTEXT 0xC0009300
+--
+1.6.0.3
+
- Previous message (by thread): rpms/xorg-x11-drv-synaptics/devel .cvsignore, 1.10, 1.11 sources, 1.10, 1.11 xorg-x11-drv-synaptics.spec, 1.23, 1.24
- Next message (by thread): rpms/empathy/devel .cvsignore, 1.28, 1.29 empathy.spec, 1.49, 1.50 sources, 1.28, 1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list