mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
update to Mesa-7.5-rc2
This commit is contained in:
parent
802cd995ef
commit
a9be99b11c
@ -67,6 +67,7 @@ XORG_PATH_XKB=/usr/share/X11/xkb
|
|||||||
XORG_PATH_XKB_OUTPUT=/var/lib/xkb
|
XORG_PATH_XKB_OUTPUT=/var/lib/xkb
|
||||||
XORG_PATH_RGB=/usr/lib/X11/rgb
|
XORG_PATH_RGB=/usr/lib/X11/rgb
|
||||||
XORG_PATH_MODULES=/usr/lib/xorg/modules
|
XORG_PATH_MODULES=/usr/lib/xorg/modules
|
||||||
|
XORG_PATH_DRIVERS=/usr/lib/xorg/modules/drivers
|
||||||
|
|
||||||
TOOLCHAIN_LANGUAGES=c
|
TOOLCHAIN_LANGUAGES=c
|
||||||
[ "$TOOLCHAIN_CXX" = yes ] && TOOLCHAIN_LANGUAGES=${TOOLCHAIN_LANGUAGES},c++
|
[ "$TOOLCHAIN_CXX" = yes ] && TOOLCHAIN_LANGUAGES=${TOOLCHAIN_LANGUAGES},c++
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -32,14 +32,17 @@ DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI" \
|
|||||||
--disable-xcb \
|
--disable-xcb \
|
||||||
--disable-glx-tls \
|
--disable-glx-tls \
|
||||||
--enable-driglx-direct \
|
--enable-driglx-direct \
|
||||||
|
--disable-egl \
|
||||||
--disable-gl-osmesa \
|
--disable-gl-osmesa \
|
||||||
--disable-glu \
|
--disable-glu \
|
||||||
--disable-glut \
|
--disable-glut \
|
||||||
--disable-glw \
|
--disable-glw \
|
||||||
|
--enable-gallium \
|
||||||
--disable-motif \
|
--disable-motif \
|
||||||
--with-driver=dri \
|
--with-driver=dri \
|
||||||
--with-dri-drivers=$DRIDRIVERS \
|
--with-dri-drivers=$DRIDRIVERS \
|
||||||
--with-dri-driverdir="$XORG_PATH_DRI" \
|
--with-dri-driverdir="$XORG_PATH_DRI" \
|
||||||
|
--with-xorg-driver-dir="$XORG_PATH_DRIVERS" \
|
||||||
--with-x \
|
--with-x \
|
||||||
--without-demos
|
--without-demos
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
commit 954dfba12986f578f2d8461818f9e9ac1f8f2b41
|
|
||||||
Author: Keith Packard <keithp@keithp.com>
|
|
||||||
Date: Fri Jan 30 21:51:32 2009 -0800
|
|
||||||
|
|
||||||
i965: bump texture limit to 4kx4k
|
|
||||||
|
|
||||||
Rendering and textures are limited to 8kx8k, but mesa limits things to
|
|
||||||
4kx4k, and magic guard band stuff may break on 8kx8k drawing. This is safe
|
|
||||||
though, and makes compiz work on bigger screens.
|
|
||||||
|
|
||||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
||||||
|
|
||||||
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
|
|
||||||
index d7a2bd9..d66781f 100644
|
|
||||||
--- a/src/mesa/drivers/dri/i965/brw_context.c
|
|
||||||
+++ b/src/mesa/drivers/dri/i965/brw_context.c
|
|
||||||
@@ -135,13 +135,12 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
|
|
||||||
ctx->Const.MaxTextureImageUnits);
|
|
||||||
ctx->Const.MaxVertexTextureImageUnits = 0; /* no vertex shader textures */
|
|
||||||
|
|
||||||
- /* Advertise the full hardware capabilities. The new memory
|
|
||||||
- * manager should cope much better with overload situations:
|
|
||||||
+ /* Mesa limits textures to 4kx4k; it would be nice to fix that someday
|
|
||||||
*/
|
|
||||||
- ctx->Const.MaxTextureLevels = 12;
|
|
||||||
+ ctx->Const.MaxTextureLevels = 13;
|
|
||||||
ctx->Const.Max3DTextureLevels = 9;
|
|
||||||
ctx->Const.MaxCubeTextureLevels = 12;
|
|
||||||
- ctx->Const.MaxTextureRectSize = (1<<11);
|
|
||||||
+ ctx->Const.MaxTextureRectSize = (1<<12);
|
|
||||||
|
|
||||||
/* if conformance mode is set, swrast can handle any size AA point */
|
|
||||||
ctx->Const.MaxPointSizeAA = 255.0;
|
|
@ -1,337 +0,0 @@
|
|||||||
Index: mesa/include/GL/internal/dri_interface.h
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/include/GL/internal/dri_interface.h 2009-01-25 17:28:10.000000000 +0200
|
|
||||||
+++ mesa/include/GL/internal/dri_interface.h 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -230,7 +230,7 @@
|
|
||||||
|
|
||||||
|
|
||||||
#define __DRI_TEX_BUFFER "DRI_TexBuffer"
|
|
||||||
-#define __DRI_TEX_BUFFER_VERSION 1
|
|
||||||
+#define __DRI_TEX_BUFFER_VERSION 2
|
|
||||||
struct __DRItexBufferExtensionRec {
|
|
||||||
__DRIextension base;
|
|
||||||
|
|
||||||
@@ -238,11 +238,23 @@
|
|
||||||
* Method to override base texture image with the contents of a
|
|
||||||
* __DRIdrawable.
|
|
||||||
*
|
|
||||||
- * For GLX_EXT_texture_from_pixmap with AIGLX.
|
|
||||||
+ * For GLX_EXT_texture_from_pixmap with AIGLX. Deprecated in favor of
|
|
||||||
+ * setTexBuffer2 in version 2 of this interface
|
|
||||||
*/
|
|
||||||
void (*setTexBuffer)(__DRIcontext *pDRICtx,
|
|
||||||
GLint target,
|
|
||||||
__DRIdrawable *pDraw);
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Method to override base texture image with the contents of a
|
|
||||||
+ * __DRIdrawable, including the required texture format attribute.
|
|
||||||
+ *
|
|
||||||
+ * For GLX_EXT_texture_from_pixmap with AIGLX.
|
|
||||||
+ */
|
|
||||||
+ void (*setTexBuffer2)(__DRIcontext *pDRICtx,
|
|
||||||
+ GLint target,
|
|
||||||
+ GLint format,
|
|
||||||
+ __DRIdrawable *pDraw);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
Index: mesa/include/GL/internal/glcore.h
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/include/GL/internal/glcore.h 2009-01-16 21:37:10.000000000 +0200
|
|
||||||
+++ mesa/include/GL/internal/glcore.h 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -176,4 +176,8 @@
|
|
||||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
|
||||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
|
||||||
|
|
||||||
+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
|
||||||
+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
|
||||||
+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
|
||||||
+
|
|
||||||
#endif /* __gl_core_h_ */
|
|
||||||
Index: mesa/src/glx/x11/glx_pbuffer.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/glx/x11/glx_pbuffer.c 2009-01-16 23:12:40.000000000 +0200
|
|
||||||
+++ mesa/src/glx/x11/glx_pbuffer.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -189,6 +189,21 @@
|
|
||||||
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static GLenum
|
|
||||||
+determineTextureFormat(const int *attribs, int numAttribs)
|
|
||||||
+{
|
|
||||||
+ GLenum target = 0;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < numAttribs; i++) {
|
|
||||||
+ if (attribs[2 * i] == GLX_TEXTURE_FORMAT_EXT)
|
|
||||||
+ return attribs[2 * i + 1];
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -294,6 +309,9 @@
|
|
||||||
if (pdraw != NULL && !pdraw->textureTarget)
|
|
||||||
pdraw->textureTarget =
|
|
||||||
determineTextureTarget((const int *) data, num_attributes);
|
|
||||||
+ if (pdraw != NULL && !pdraw->textureFormat)
|
|
||||||
+ pdraw->textureFormat =
|
|
||||||
+ determineTextureFormat((const int *) data, num_attributes);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -374,6 +392,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
pdraw->textureTarget = determineTextureTarget(attrib_list, i);
|
|
||||||
+ pdraw->textureFormat = determineTextureFormat(attrib_list, i);
|
|
||||||
} while (0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Index: mesa/src/glx/x11/glxclient.h
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/glx/x11/glxclient.h 2009-03-30 10:47:17.000000000 +0300
|
|
||||||
+++ mesa/src/glx/x11/glxclient.h 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -161,6 +161,7 @@
|
|
||||||
__GLXscreenConfigs *psc;
|
|
||||||
GLenum textureTarget;
|
|
||||||
__DRIdrawable *driDrawable;
|
|
||||||
+ GLenum textureFormat; /* EXT_texture_from_pixmap support */
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Index: mesa/src/glx/x11/glxcmds.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/glx/x11/glxcmds.c 2009-03-30 10:34:15.000000000 +0300
|
|
||||||
+++ mesa/src/glx/x11/glxcmds.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -2631,11 +2631,19 @@
|
|
||||||
if (gc->driContext) {
|
|
||||||
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL);
|
|
||||||
|
|
||||||
- if (pdraw != NULL)
|
|
||||||
- (*pdraw->psc->texBuffer->setTexBuffer)(gc->__driContext,
|
|
||||||
- pdraw->textureTarget,
|
|
||||||
- pdraw->driDrawable);
|
|
||||||
-
|
|
||||||
+ if (pdraw != NULL) {
|
|
||||||
+ if (pdraw->psc->texBuffer->base.version >= 2 &&
|
|
||||||
+ pdraw->psc->texBuffer->setTexBuffer2 != NULL) {
|
|
||||||
+ (*pdraw->psc->texBuffer->setTexBuffer2)(gc->__driContext,
|
|
||||||
+ pdraw->textureTarget,
|
|
||||||
+ pdraw->textureFormat,
|
|
||||||
+ pdraw->driDrawable);
|
|
||||||
+ } else {
|
|
||||||
+ (*pdraw->psc->texBuffer->setTexBuffer)(gc->__driContext,
|
|
||||||
+ pdraw->textureTarget,
|
|
||||||
+ pdraw->driDrawable);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
Index: mesa/src/mesa/drivers/dri/i915/i830_texstate.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/mesa/drivers/dri/i915/i830_texstate.c 2009-01-16 21:37:10.000000000 +0200
|
|
||||||
+++ mesa/src/mesa/drivers/dri/i915/i830_texstate.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
|
|
||||||
|
|
||||||
static GLuint
|
|
||||||
-translate_texture_format(GLuint mesa_format)
|
|
||||||
+translate_texture_format(GLuint mesa_format, GLuint internal_format)
|
|
||||||
{
|
|
||||||
switch (mesa_format) {
|
|
||||||
case MESA_FORMAT_L8:
|
|
||||||
@@ -56,7 +56,10 @@
|
|
||||||
case MESA_FORMAT_ARGB4444:
|
|
||||||
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
|
|
||||||
case MESA_FORMAT_ARGB8888:
|
|
||||||
- return MAPSURF_32BIT | MT_32BIT_ARGB8888;
|
|
||||||
+ if (internal_format == GL_RGB)
|
|
||||||
+ return MAPSURF_32BIT | MT_32BIT_XRGB8888;
|
|
||||||
+ else
|
|
||||||
+ return MAPSURF_32BIT | MT_32BIT_ARGB8888;
|
|
||||||
case MESA_FORMAT_YCBCR_REV:
|
|
||||||
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
|
|
||||||
case MESA_FORMAT_YCBCR:
|
|
||||||
@@ -162,7 +165,8 @@
|
|
||||||
0, intelObj->
|
|
||||||
firstLevel);
|
|
||||||
|
|
||||||
- format = translate_texture_format(firstImage->TexFormat->MesaFormat);
|
|
||||||
+ format = translate_texture_format(firstImage->TexFormat->MesaFormat,
|
|
||||||
+ firstImage->InternalFormat);
|
|
||||||
pitch = intelObj->mt->pitch * intelObj->mt->cpp;
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: mesa/src/mesa/drivers/dri/i915/i915_texstate.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/mesa/drivers/dri/i915/i915_texstate.c 2009-01-16 21:40:22.000000000 +0200
|
|
||||||
+++ mesa/src/mesa/drivers/dri/i915/i915_texstate.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -37,7 +37,8 @@
|
|
||||||
|
|
||||||
|
|
||||||
static GLuint
|
|
||||||
-translate_texture_format(GLuint mesa_format, GLenum DepthMode)
|
|
||||||
+translate_texture_format(GLuint mesa_format, GLuint internal_format,
|
|
||||||
+ GLenum DepthMode)
|
|
||||||
{
|
|
||||||
switch (mesa_format) {
|
|
||||||
case MESA_FORMAT_L8:
|
|
||||||
@@ -55,7 +56,10 @@
|
|
||||||
case MESA_FORMAT_ARGB4444:
|
|
||||||
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
|
|
||||||
case MESA_FORMAT_ARGB8888:
|
|
||||||
- return MAPSURF_32BIT | MT_32BIT_ARGB8888;
|
|
||||||
+ if (internal_format == GL_RGB)
|
|
||||||
+ return MAPSURF_32BIT | MT_32BIT_XRGB8888;
|
|
||||||
+ else
|
|
||||||
+ return MAPSURF_32BIT | MT_32BIT_ARGB8888;
|
|
||||||
case MESA_FORMAT_YCBCR_REV:
|
|
||||||
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
|
|
||||||
case MESA_FORMAT_YCBCR:
|
|
||||||
@@ -173,7 +177,8 @@
|
|
||||||
firstLevel);
|
|
||||||
|
|
||||||
format = translate_texture_format(firstImage->TexFormat->MesaFormat,
|
|
||||||
- tObj->DepthMode);
|
|
||||||
+ firstImage->InternalFormat,
|
|
||||||
+ tObj->DepthMode);
|
|
||||||
pitch = intelObj->mt->pitch * intelObj->mt->cpp;
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: mesa/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/mesa/drivers/dri/i965/brw_wm_surface_state.c 2009-03-30 10:34:15.000000000 +0300
|
|
||||||
+++ mesa/src/mesa/drivers/dri/i965/brw_wm_surface_state.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -69,7 +69,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-static GLuint translate_tex_format( GLuint mesa_format, GLenum depth_mode )
|
|
||||||
+static GLuint translate_tex_format( GLuint mesa_format, GLenum internal_format,
|
|
||||||
+ GLenum depth_mode )
|
|
||||||
{
|
|
||||||
switch( mesa_format ) {
|
|
||||||
case MESA_FORMAT_L8:
|
|
||||||
@@ -89,10 +90,16 @@
|
|
||||||
return BRW_SURFACEFORMAT_R8G8B8_UNORM;
|
|
||||||
|
|
||||||
case MESA_FORMAT_ARGB8888:
|
|
||||||
- return BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
|
|
||||||
+ if (internal_format == GL_RGB)
|
|
||||||
+ return BRW_SURFACEFORMAT_B8G8R8X8_UNORM;
|
|
||||||
+ else
|
|
||||||
+ return BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
|
|
||||||
|
|
||||||
case MESA_FORMAT_RGBA8888_REV:
|
|
||||||
- return BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
|
|
||||||
+ if (internal_format == GL_RGB)
|
|
||||||
+ return BRW_SURFACEFORMAT_R8G8B8X8_UNORM;
|
|
||||||
+ else
|
|
||||||
+ return BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
|
|
||||||
|
|
||||||
case MESA_FORMAT_RGB565:
|
|
||||||
return BRW_SURFACEFORMAT_B5G6R5_UNORM;
|
|
||||||
@@ -150,7 +157,7 @@
|
|
||||||
struct brw_wm_surface_key {
|
|
||||||
GLenum target, depthmode;
|
|
||||||
dri_bo *bo;
|
|
||||||
- GLint format;
|
|
||||||
+ GLint format, internal_format;
|
|
||||||
GLint first_level, last_level;
|
|
||||||
GLint width, height, depth;
|
|
||||||
GLint pitch, cpp;
|
|
||||||
@@ -188,9 +195,11 @@
|
|
||||||
|
|
||||||
surf.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
|
|
||||||
surf.ss0.surface_type = translate_tex_target(key->target);
|
|
||||||
-
|
|
||||||
- if (key->bo)
|
|
||||||
- surf.ss0.surface_format = translate_tex_format(key->format, key->depthmode);
|
|
||||||
+ if (key->bo) {
|
|
||||||
+ surf.ss0.surface_format = translate_tex_format(key->format,
|
|
||||||
+ key->internal_format,
|
|
||||||
+ key->depthmode);
|
|
||||||
+ }
|
|
||||||
else {
|
|
||||||
switch (key->depth) {
|
|
||||||
case 32:
|
|
||||||
@@ -267,6 +276,7 @@
|
|
||||||
key.offset = intelObj->textureOffset;
|
|
||||||
} else {
|
|
||||||
key.format = firstImage->TexFormat->MesaFormat;
|
|
||||||
+ key.internal_format = firstImage->InternalFormat;
|
|
||||||
key.pitch = intelObj->mt->pitch;
|
|
||||||
key.depth = firstImage->Depth;
|
|
||||||
key.bo = intelObj->mt->region->buffer;
|
|
||||||
Index: mesa/src/mesa/drivers/dri/intel/intel_screen.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/mesa/drivers/dri/intel/intel_screen.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
+++ mesa/src/mesa/drivers/dri/intel/intel_screen.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -210,6 +210,7 @@
|
|
||||||
static const __DRItexBufferExtension intelTexBufferExtension = {
|
|
||||||
{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
|
|
||||||
intelSetTexBuffer,
|
|
||||||
+ intelSetTexBuffer2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const __DRIextension *intelScreenExtensions[] = {
|
|
||||||
Index: mesa/src/mesa/drivers/dri/intel/intel_tex.h
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/mesa/drivers/dri/intel/intel_tex.h 2009-01-16 21:40:22.000000000 +0200
|
|
||||||
+++ mesa/src/mesa/drivers/dri/intel/intel_tex.h 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -149,6 +149,8 @@
|
|
||||||
unsigned long long offset, GLint depth, GLuint pitch);
|
|
||||||
void intelSetTexBuffer(__DRIcontext *pDRICtx,
|
|
||||||
GLint target, __DRIdrawable *pDraw);
|
|
||||||
+void intelSetTexBuffer2(__DRIcontext *pDRICtx,
|
|
||||||
+ GLint target, GLint format, __DRIdrawable *pDraw);
|
|
||||||
|
|
||||||
GLuint intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit);
|
|
||||||
|
|
||||||
Index: mesa/src/mesa/drivers/dri/intel/intel_tex_image.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa.orig/src/mesa/drivers/dri/intel/intel_tex_image.c 2009-03-30 10:34:15.000000000 +0300
|
|
||||||
+++ mesa/src/mesa/drivers/dri/intel/intel_tex_image.c 2009-04-03 11:45:43.000000000 +0300
|
|
||||||
@@ -712,7 +712,9 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
-intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
|
|
||||||
+intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
|
||||||
+ GLint glx_texture_format,
|
|
||||||
+ __DRIdrawable *dPriv)
|
|
||||||
{
|
|
||||||
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
|
|
||||||
struct intel_context *intel = pDRICtx->driverPrivate;
|
|
||||||
@@ -743,7 +745,10 @@
|
|
||||||
|
|
||||||
type = GL_BGRA;
|
|
||||||
format = GL_UNSIGNED_BYTE;
|
|
||||||
- internalFormat = (rb->region->cpp == 3 ? 3 : 4);
|
|
||||||
+ if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT)
|
|
||||||
+ internalFormat = GL_RGB;
|
|
||||||
+ else
|
|
||||||
+ internalFormat = GL_RGBA;
|
|
||||||
|
|
||||||
mt = intel_miptree_create_for_region(intel, target,
|
|
||||||
internalFormat,
|
|
||||||
@@ -783,3 +788,12 @@
|
|
||||||
|
|
||||||
_mesa_unlock_texture(&intel->ctx, texObj);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
|
|
||||||
+{
|
|
||||||
+ /* The old interface didn't have the format argument, so copy our
|
|
||||||
+ * implementation's behavior at the time.
|
|
||||||
+ */
|
|
||||||
+ intelSetTexBuffer2(pDRICtx, target, GLX_TEXTURE_FORMAT_RGBA_EXT, dPriv);
|
|
||||||
+}
|
|
@ -1,91 +0,0 @@
|
|||||||
#
|
|
||||||
# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/368049
|
|
||||||
# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=17895
|
|
||||||
# Patch: http://cgit.freedesktop.org/mesa/mesa/commit/?h=mesa_7_4_branch&id=a1ce4efefbb7f796a0a24544a1e893a56848f0c1
|
|
||||||
# Description: fix xserver segv triggered by compiz ring switcher plugin for users
|
|
||||||
# with r300/r400 radeon chipsets and -ati driver. Patch previously
|
|
||||||
# commited to mesa master as c28707b50701b1cf8727be29d61e2d939c6ee58f
|
|
||||||
# and also to mesa_7_4_branch as a1ce4efefbb7f796a0a24544a1e893a56848f0c1.
|
|
||||||
# Note: it was commited to the 7.4 branch after mesa 7.4.0 release.
|
|
||||||
# (LP: #368049)
|
|
||||||
#
|
|
||||||
|
|
||||||
Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_context.h
|
|
||||||
===================================================================
|
|
||||||
--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_context.h 2009-05-04 12:07:48.000000000 +0200
|
|
||||||
+++ mesa-7.4/src/mesa/drivers/dri/r300/r300_context.h 2009-05-04 12:08:56.000000000 +0200
|
|
||||||
@@ -211,7 +211,7 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
struct r300_texture_env_state {
|
|
||||||
- r300TexObjPtr texobj;
|
|
||||||
+ struct gl_texture_object *texobj;
|
|
||||||
GLenum format;
|
|
||||||
GLenum envMode;
|
|
||||||
};
|
|
||||||
Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_state.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_state.c 2009-05-04 12:07:59.000000000 +0200
|
|
||||||
+++ mesa-7.4/src/mesa/drivers/dri/r300/r300_state.c 2009-05-04 12:08:56.000000000 +0200
|
|
||||||
@@ -1487,7 +1487,7 @@
|
|
||||||
#endif
|
|
||||||
tmu_mappings[i] = hw_tmu;
|
|
||||||
|
|
||||||
- t = r300->state.texture.unit[i].texobj;
|
|
||||||
+ t = (r300TexObjPtr) r300->state.texture.unit[i].texobj->DriverData;
|
|
||||||
/* XXX questionable fix for bug 9170: */
|
|
||||||
if (!t)
|
|
||||||
continue;
|
|
||||||
Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texmem.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_texmem.c 2009-05-04 12:08:07.000000000 +0200
|
|
||||||
+++ mesa-7.4/src/mesa/drivers/dri/r300/r300_texmem.c 2009-05-04 12:08:56.000000000 +0200
|
|
||||||
@@ -44,6 +44,7 @@
|
|
||||||
#include "main/colormac.h"
|
|
||||||
#include "main/macros.h"
|
|
||||||
#include "main/simple_list.h"
|
|
||||||
+#include "main/texobj.h"
|
|
||||||
#include "radeon_reg.h" /* gets definition for usleep */
|
|
||||||
#include "r300_context.h"
|
|
||||||
#include "r300_state.h"
|
|
||||||
@@ -71,8 +72,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
|
|
||||||
- if (rmesa->state.texture.unit[i].texobj == t) {
|
|
||||||
- rmesa->state.texture.unit[i].texobj = NULL;
|
|
||||||
+ if (rmesa->state.texture.unit[i].texobj == t->base.tObj) {
|
|
||||||
+ _mesa_reference_texobj(&rmesa->state.texture.unit[i].texobj, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c
|
|
||||||
===================================================================
|
|
||||||
--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_texstate.c 2009-05-04 12:08:17.000000000 +0200
|
|
||||||
+++ mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c 2009-05-04 12:08:56.000000000 +0200
|
|
||||||
@@ -567,19 +567,20 @@
|
|
||||||
/* 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 != tObj) {
|
|
||||||
if (rmesa->state.texture.unit[unit].texobj != NULL) {
|
|
||||||
+ r300TexObjPtr t_old = (r300TexObjPtr) rmesa->state.texture.unit[unit].texobj->DriverData;
|
|
||||||
+
|
|
||||||
/* The old texture is no longer bound to this texture unit.
|
|
||||||
* Mark it as such.
|
|
||||||
*/
|
|
||||||
|
|
||||||
- rmesa->state.texture.unit[unit].texobj->base.bound &=
|
|
||||||
- ~(1 << unit);
|
|
||||||
+ t_old->base.bound &= ~(1 << unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
- rmesa->state.texture.unit[unit].texobj = t;
|
|
||||||
+ _mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, tObj);
|
|
||||||
t->base.bound |= (1 << unit);
|
|
||||||
- driUpdateTextureLRU((driTextureObject *) t); /* XXX: should be locked! */
|
|
||||||
+ driUpdateTextureLRU(&t->base); /* XXX: should be locked! */
|
|
||||||
}
|
|
||||||
|
|
||||||
return !t->border_fallback;
|
|
@ -19,7 +19,7 @@ diff -Naur mesa-7.1rc1-20080706.orig/configs/linux-dri mesa-7.1rc1-20080706/conf
|
|||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
#MKDEP_OPTIONS = -MF depend
|
#MKDEP_OPTIONS = -MF depend
|
||||||
|
|
||||||
OPT_FLAGS = -O -g
|
OPT_FLAGS = -O2 -g
|
||||||
+HOST_OPT_FLAGS = $(OPT_FLAGS)
|
+HOST_OPT_FLAGS = $(OPT_FLAGS)
|
||||||
PIC_FLAGS = -fPIC
|
PIC_FLAGS = -fPIC
|
||||||
|
|
||||||
@ -33,15 +33,3 @@ diff -Naur mesa-7.1rc1-20080706.orig/configs/linux-dri mesa-7.1rc1-20080706/conf
|
|||||||
|
|
||||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||||
|
|
||||||
diff -Naur mesa-7.1rc1-20080706.orig/src/mesa/x86/Makefile mesa-7.1rc1-20080706/src/mesa/x86/Makefile
|
|
||||||
--- mesa-7.1rc1-20080706.orig/src/mesa/x86/Makefile 2008-07-06 14:09:54.000000000 +0200
|
|
||||||
+++ mesa-7.1rc1-20080706/src/mesa/x86/Makefile 2008-07-06 14:15:00.000000000 +0200
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
|
|
||||||
|
|
||||||
gen_matypes: gen_matypes.c
|
|
||||||
- $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
|
|
||||||
+ $(HOST_CC) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
|
|
||||||
|
|
||||||
# need some special rules here, unfortunately
|
|
||||||
matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
|
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
diff -Naur Mesa-7.4.1/src/mesa/drivers/dri/Makefile Mesa-7.4.1.patch/src/mesa/drivers/dri/Makefile
|
diff -up mesa-20080814/src/mesa/drivers/dri/Makefile.dricore mesa-20080814/src/mesa/drivers/dri/Makefile
|
||||||
--- Mesa-7.4.1/src/mesa/drivers/dri/Makefile 2009-03-13 04:28:49.000000000 +0100
|
--- mesa-20080814/src/mesa/drivers/dri/Makefile.dricore 2008-08-14 02:28:38.000000000 +1000
|
||||||
+++ Mesa-7.4.1.patch/src/mesa/drivers/dri/Makefile 2009-04-25 22:26:13.000000000 +0200
|
+++ mesa-20080814/src/mesa/drivers/dri/Makefile 2008-08-14 16:18:20.000000000 +1000
|
||||||
@@ -6,12 +6,16 @@
|
@@ -6,12 +6,17 @@ include $(TOP)/configs/current
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-default: $(TOP)/$(LIB_DIR) subdirs
|
-default: $(TOP)/$(LIB_DIR) subdirs dri.pc
|
||||||
-
|
+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs dri.pc
|
||||||
+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs
|
|
||||||
|
|
||||||
$(TOP)/$(LIB_DIR):
|
$(TOP)/$(LIB_DIR):
|
||||||
-mkdir $(TOP)/$(LIB_DIR)
|
-mkdir $(TOP)/$(LIB_DIR)
|
||||||
|
|
||||||
+libdricore.so:
|
+libdricore.so:
|
||||||
+ $(CC) -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive -lm -lpthread -lc
|
+ gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive -lm -lpthread -lc
|
||||||
+
|
+
|
||||||
+$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
|
+$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
|
||||||
+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
|
+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
|
||||||
|
|
||||||
subdirs:
|
subdirs:
|
||||||
@for dir in $(DRI_DIRS) ; do \
|
@for dir in $(DRI_DIRS) ; do \
|
||||||
@@ -32,12 +36,14 @@
|
@@ -31,12 +36,14 @@ dri.pc: dri.pc.in
|
||||||
$(pcedit) $< > $@
|
$(pcedit) $< > $@
|
||||||
|
|
||||||
|
|
||||||
@ -36,16 +36,16 @@ diff -Naur Mesa-7.4.1/src/mesa/drivers/dri/Makefile Mesa-7.4.1.patch/src/mesa/dr
|
|||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
|
||||||
$(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
|
$(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
|
||||||
$(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
|
$(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
|
||||||
@@ -51,5 +57,6 @@
|
@@ -52,5 +59,6 @@ clean:
|
||||||
(cd $$dir && $(MAKE) clean) ; \
|
(cd $$dir && $(MAKE) clean) ; \
|
||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
+ -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so
|
+ -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so
|
||||||
-rm -f common/*.o
|
-rm -f common/*.o
|
||||||
-rm -f *.pc
|
-rm -f *.pc
|
||||||
diff -Naur Mesa-7.4.1/src/mesa/drivers/dri/Makefile.template Mesa-7.4.1.patch/src/mesa/drivers/dri/Makefile.template
|
diff -up mesa-20080814/src/mesa/drivers/dri/Makefile.template.dricore mesa-20080814/src/mesa/drivers/dri/Makefile.template
|
||||||
--- Mesa-7.4.1/src/mesa/drivers/dri/Makefile.template 2009-03-13 04:28:49.000000000 +0100
|
--- mesa-20080814/src/mesa/drivers/dri/Makefile.template.dricore 2008-08-14 02:28:38.000000000 +1000
|
||||||
+++ Mesa-7.4.1.patch/src/mesa/drivers/dri/Makefile.template 2009-04-25 22:22:59.000000000 +0200
|
+++ mesa-20080814/src/mesa/drivers/dri/Makefile.template 2008-08-14 16:19:37.000000000 +1000
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
# -*-makefile-*-
|
# -*-makefile-*-
|
||||||
|
|
||||||
@ -54,20 +54,20 @@ diff -Naur Mesa-7.4.1/src/mesa/drivers/dri/Makefile.template Mesa-7.4.1.patch/sr
|
|||||||
|
|
||||||
COMMON_SOURCES = \
|
COMMON_SOURCES = \
|
||||||
../common/utils.c \
|
../common/utils.c \
|
||||||
@@ -61,7 +61,9 @@
|
@@ -64,7 +64,9 @@ default: symlinks depend $(LIBNAME) $(TO
|
||||||
|
|
||||||
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
|
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
|
||||||
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
- $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
|
- $(OBJECTS) $(PIPE_DRIVERS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
|
||||||
+ $(OBJECTS) $(WINOBJ) \
|
+ $(OBJECTS) $(PIPE_DRIVERS) $(WINOBJ) \
|
||||||
+ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
|
+ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
|
||||||
+ $(DRI_LIB_DEPS)
|
+ $(DRI_LIB_DEPS)
|
||||||
|
|
||||||
|
|
||||||
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
|
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
|
||||||
diff -Naur Mesa-7.4.1/src/mesa/x86/read_rgba_span_x86.S Mesa-7.4.1.patch/src/mesa/x86/read_rgba_span_x86.S
|
diff -up mesa-20080814/src/mesa/x86/read_rgba_span_x86.S.dricore mesa-20080814/src/mesa/x86/read_rgba_span_x86.S
|
||||||
--- Mesa-7.4.1/src/mesa/x86/read_rgba_span_x86.S 2008-08-25 16:46:47.000000000 +0200
|
--- mesa-20080814/src/mesa/x86/read_rgba_span_x86.S.dricore 2008-08-14 02:28:38.000000000 +1000
|
||||||
+++ Mesa-7.4.1.patch/src/mesa/x86/read_rgba_span_x86.S 2009-04-25 22:20:15.000000000 +0200
|
+++ mesa-20080814/src/mesa/x86/read_rgba_span_x86.S 2008-08-14 16:16:49.000000000 +1000
|
||||||
@@ -77,7 +77,6 @@
|
@@ -77,7 +77,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ diff -Naur Mesa-7.4.1/src/mesa/x86/read_rgba_span_x86.S Mesa-7.4.1.patch/src/mes
|
|||||||
.type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
|
.type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
|
||||||
_generic_read_RGBA_span_BGRA8888_REV_MMX:
|
_generic_read_RGBA_span_BGRA8888_REV_MMX:
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
@@ -172,7 +171,6 @@
|
@@ -172,7 +171,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE
|
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
@ -84,7 +84,7 @@ diff -Naur Mesa-7.4.1/src/mesa/x86/read_rgba_span_x86.S Mesa-7.4.1.patch/src/mes
|
|||||||
.type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
|
.type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
|
||||||
_generic_read_RGBA_span_BGRA8888_REV_SSE:
|
_generic_read_RGBA_span_BGRA8888_REV_SSE:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
@@ -335,7 +333,6 @@
|
@@ -335,7 +333,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE2
|
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE2
|
||||||
@ -92,7 +92,7 @@ diff -Naur Mesa-7.4.1/src/mesa/x86/read_rgba_span_x86.S Mesa-7.4.1.patch/src/mes
|
|||||||
.type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
|
.type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
|
||||||
_generic_read_RGBA_span_BGRA8888_REV_SSE2:
|
_generic_read_RGBA_span_BGRA8888_REV_SSE2:
|
||||||
pushl %esi
|
pushl %esi
|
||||||
@@ -494,7 +491,6 @@
|
@@ -494,7 +491,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.globl _generic_read_RGBA_span_RGB565_MMX
|
.globl _generic_read_RGBA_span_RGB565_MMX
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
From c38397866d514d7776b0f876123be5718802482b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Brian Paul <brianp@vmware.com>
|
|
||||||
Date: Mon, 20 Apr 2009 22:12:16 +0000
|
|
||||||
Subject: intel: added null screen->dri2.loader pointer check
|
|
||||||
|
|
||||||
Fixes front-buffer rendering with DRI1.
|
|
||||||
---
|
|
||||||
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
|
|
||||||
index ddcd264..ecaf6b4 100644
|
|
||||||
--- a/src/mesa/drivers/dri/intel/intel_context.c
|
|
||||||
+++ b/src/mesa/drivers/dri/intel/intel_context.c
|
|
||||||
@@ -534,7 +534,8 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
|
|
||||||
if ((ctx->DrawBuffer->Name == 0) && intel->front_buffer_dirty) {
|
|
||||||
__DRIscreen *const screen = intel->intelScreen->driScrnPriv;
|
|
||||||
|
|
||||||
- if ((screen->dri2.loader->base.version >= 2)
|
|
||||||
+ if (screen->dri2.loader
|
|
||||||
+ && (screen->dri2.loader->base.version >= 2)
|
|
||||||
&& (screen->dri2.loader->flushFrontBuffer != NULL)) {
|
|
||||||
(*screen->dri2.loader->flushFrontBuffer)(intel->driDrawable,
|
|
||||||
intel->driDrawable->loaderPrivate);
|
|
||||||
--
|
|
||||||
cgit v0.8.2
|
|
@ -1 +1 @@
|
|||||||
http://switch.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-7.4.1.tar.bz2
|
http://www.mesa3d.org/beta/MesaLib-7.5-rc2.tar.gz
|
Loading…
x
Reference in New Issue
Block a user