rebase to latest upstream 9.0 pre-release branch
This commit is contained in:
parent
73c2a71b44
commit
7862bd0195
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,3 +40,4 @@ mesa-20100720.tar.bz2
|
||||
/mesa-20120717.tar.xz
|
||||
/mesa-20120816.tar.xz
|
||||
/mesa-20120827.tar.xz
|
||||
/mesa-20120924.tar.xz
|
||||
|
@ -1,60 +0,0 @@
|
||||
From 3f95ff8bfeaf839ec6c70dbed95d68f9e44861e2 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@gmail.com>
|
||||
Date: Fri, 14 Sep 2012 19:59:54 +1000
|
||||
Subject: [PATCH] glcpp: fix abuse of yylex
|
||||
|
||||
So glcpp tried to workaround yylex its own way, but failed,
|
||||
do it properly.
|
||||
|
||||
This fixes another crash found after fixing the first crash.
|
||||
|
||||
this is a candidate for 9.0 and stable branches
|
||||
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
src/glsl/glcpp/Makefile.am | 2 +-
|
||||
src/glsl/glcpp/glcpp-parse.y | 8 --------
|
||||
2 files changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/glsl/glcpp/Makefile.am b/src/glsl/glcpp/Makefile.am
|
||||
index 7a95b68..87affce 100644
|
||||
--- a/src/glsl/glcpp/Makefile.am
|
||||
+++ b/src/glsl/glcpp/Makefile.am
|
||||
@@ -31,7 +31,7 @@ AM_CFLAGS = \
|
||||
$(LIBRARY_DEFINES) \
|
||||
$(API_DEFINES)
|
||||
|
||||
-AM_YFLAGS = -v -d
|
||||
+AM_YFLAGS = -v -d -p "glcpp_parser_"
|
||||
AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
|
||||
|
||||
noinst_LTLIBRARIES = libglcpp.la
|
||||
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
|
||||
index bf6f3ad..fb9bc58 100644
|
||||
--- a/src/glsl/glcpp/glcpp-parse.y
|
||||
+++ b/src/glsl/glcpp/glcpp-parse.y
|
||||
@@ -133,8 +133,6 @@ _glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
|
||||
static void
|
||||
_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc);
|
||||
|
||||
-#define yylex glcpp_parser_lex
|
||||
-
|
||||
static int
|
||||
glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser);
|
||||
|
||||
@@ -1197,12 +1195,6 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
|
||||
return parser;
|
||||
}
|
||||
|
||||
-int
|
||||
-glcpp_parser_parse (glcpp_parser_t *parser)
|
||||
-{
|
||||
- return yyparse (parser);
|
||||
-}
|
||||
-
|
||||
void
|
||||
glcpp_parser_destroy (glcpp_parser_t *parser)
|
||||
{
|
||||
--
|
||||
1.7.11.4
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 4104ce76e435612d2561a3e3cc79f47199ec41ce Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Fri, 14 Sep 2012 10:05:53 +1000
|
||||
Subject: [PATCH 1/2] mesa: use a prefix for the program lex
|
||||
|
||||
This avoids us making a global yylex symbol which will interfere will
|
||||
all sorts of apps.
|
||||
|
||||
with libdricore which can't do symbol visibility currently we pollute
|
||||
the namespace with this.
|
||||
|
||||
This is a candidate for 9.0 & stable branches.
|
||||
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
src/mesa/Makefile.am | 2 +-
|
||||
src/mesa/program/program_lexer.l | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
|
||||
index 57325af..8e4530d 100644
|
||||
--- a/src/mesa/Makefile.am
|
||||
+++ b/src/mesa/Makefile.am
|
||||
@@ -73,7 +73,7 @@ main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py m
|
||||
|
||||
program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
|
||||
$(MKDIR_P) program
|
||||
- $(AM_V_GEN) $(YACC) -v -d --output=program/program_parse.tab.c $<
|
||||
+ $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program/program_parse.tab.c $<
|
||||
|
||||
program/lex.yy.c: program/program_lexer.l
|
||||
$(MKDIR_P) program
|
||||
diff --git a/src/mesa/program/program_lexer.l b/src/mesa/program/program_lexer.l
|
||||
index 0a50dab..0947bb0 100644
|
||||
--- a/src/mesa/program/program_lexer.l
|
||||
+++ b/src/mesa/program/program_lexer.l
|
||||
@@ -165,6 +165,7 @@ szf [HR]?
|
||||
cc C?
|
||||
sat (_SAT)?
|
||||
|
||||
+%option prefix="_mesa_program_"
|
||||
%option bison-bridge bison-locations reentrant noyywrap
|
||||
%%
|
||||
|
||||
--
|
||||
1.7.10.2
|
||||
|
@ -1,12 +1,22 @@
|
||||
Reverts:
|
||||
a669a5055eadae85ffa000cea19a2241d0699348
|
||||
6bb71b8cbe6b17a5d59e369631502e642804406e
|
||||
From d0b22a2fba91f5050aafdf41293f574875309f2d Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Mon, 24 Sep 2012 09:17:35 +1000
|
||||
Subject: [PATCH] Revert "gbm: Use libkms to replace DRI cursor images"
|
||||
|
||||
This reverts commit a669a5055eadae85ffa000cea19a2241d0699348.
|
||||
---
|
||||
configure.ac | 2 --
|
||||
src/egl/drivers/dri2/Makefile.am | 1 -
|
||||
src/gbm/Makefile.am | 3 +-
|
||||
src/gbm/backends/dri/gbm_dri.c | 65 +++++++--------------------------------
|
||||
src/gbm/backends/dri/gbm_driint.h | 8 -----
|
||||
5 files changed, 12 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c30bcf0..54b50a6 100644
|
||||
index 8badb72..2a3e766 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1226,8 +1226,6 @@ if test "x$enable_gbm" = xyes; then
|
||||
@@ -1217,8 +1217,6 @@ if test "x$enable_gbm" = xyes; then
|
||||
if test "x$enable_shared_glapi" = xno; then
|
||||
AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
|
||||
fi
|
||||
@ -15,34 +25,6 @@ index c30bcf0..54b50a6 100644
|
||||
fi
|
||||
fi
|
||||
GBM_PC_REQ_PRIV="libudev"
|
||||
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
|
||||
index 09f63ff..f35f857 100644
|
||||
--- a/include/GL/internal/dri_interface.h
|
||||
+++ b/include/GL/internal/dri_interface.h
|
||||
@@ -935,7 +935,8 @@ struct __DRIdri2ExtensionRec {
|
||||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
-#define __DRI_IMAGE_USE_CURSOR 0x0004 /* Depricated */
|
||||
+#define __DRI_IMAGE_USE_CURSOR 0x0004
|
||||
+#define __DRI_IMAGE_USE_WRITE 0x0008
|
||||
|
||||
/**
|
||||
* queryImage attributes
|
||||
@@ -984,6 +985,13 @@ struct __DRIimageExtensionRec {
|
||||
GLboolean (*validateUsage)(__DRIimage *image, unsigned int use);
|
||||
|
||||
/**
|
||||
+ * Write data into image.
|
||||
+ *
|
||||
+ * \since 4
|
||||
+ */
|
||||
+ int (*write)(__DRIimage *image, const void *buf, size_t count);
|
||||
+
|
||||
+ /**
|
||||
* Create an image out of a sub-region of a parent image. This
|
||||
* entry point lets us create individual __DRIimages for different
|
||||
* planes in a planar buffer (typically yuv), for example. While a
|
||||
diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am
|
||||
index 45f7dfa..49ec06b 100644
|
||||
--- a/src/egl/drivers/dri2/Makefile.am
|
||||
@ -77,7 +59,7 @@ index e22c55c..f079da1 100644
|
||||
if HAVE_EGL_PLATFORM_WAYLAND
|
||||
AM_CPPFLAGS = -DHAVE_WAYLAND_PLATFORM
|
||||
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
|
||||
index 1831f13..173e727 100644
|
||||
index d8b1cc7..f66c965 100644
|
||||
--- a/src/gbm/backends/dri/gbm_dri.c
|
||||
+++ b/src/gbm/backends/dri/gbm_dri.c
|
||||
@@ -299,21 +299,13 @@ gbm_dri_is_format_supported(struct gbm_device *gbm,
|
||||
@ -117,7 +99,7 @@ index 1831f13..173e727 100644
|
||||
free(bo);
|
||||
}
|
||||
|
||||
@@ -461,6 +450,9 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
@@ -454,6 +443,9 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
int dri_format;
|
||||
unsigned dri_use = 0;
|
||||
|
||||
@ -127,7 +109,7 @@ index 1831f13..173e727 100644
|
||||
bo = calloc(1, sizeof *bo);
|
||||
if (bo == NULL)
|
||||
return NULL;
|
||||
@@ -469,33 +461,6 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
@@ -462,33 +454,6 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
bo->base.base.width = width;
|
||||
bo->base.base.height = height;
|
||||
|
||||
@ -161,16 +143,7 @@ index 1831f13..173e727 100644
|
||||
switch (format) {
|
||||
case GBM_FORMAT_RGB565:
|
||||
dri_format =__DRI_IMAGE_FORMAT_RGB565;
|
||||
@@ -519,6 +484,8 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
dri_use |= __DRI_IMAGE_USE_SCANOUT;
|
||||
if (usage & GBM_BO_USE_CURSOR_64X64)
|
||||
dri_use |= __DRI_IMAGE_USE_CURSOR;
|
||||
+ if (usage & GBM_BO_USE_WRITE)
|
||||
+ dri_use |= __DRI_IMAGE_USE_WRITE;
|
||||
|
||||
/* Gallium drivers requires shared in order to get the handle/stride */
|
||||
dri_use |= __DRI_IMAGE_USE_SHARE;
|
||||
@@ -601,21 +568,13 @@ dri_device_create(int fd)
|
||||
@@ -594,21 +559,13 @@ dri_device_create(int fd)
|
||||
dri->base.type = GBM_DRM_DRIVER_TYPE_DRI;
|
||||
dri->base.base.name = "drm";
|
||||
|
||||
@ -229,79 +202,6 @@ index 4b619a0..f404368 100644
|
||||
};
|
||||
|
||||
struct gbm_dri_surface {
|
||||
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
|
||||
index 4ff0efe..782d669 100644
|
||||
--- a/src/mesa/drivers/dri/intel/intel_regions.h
|
||||
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
|
||||
@@ -144,6 +144,7 @@ intel_region_get_aligned_offset(struct intel_region *region, uint32_t x,
|
||||
struct __DRIimageRec {
|
||||
struct intel_region *region;
|
||||
GLenum internal_format;
|
||||
+ uint32_t usage;
|
||||
uint32_t dri_format;
|
||||
GLuint format;
|
||||
uint32_t offset;
|
||||
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
|
||||
index 103fcd2..f4c1602 100644
|
||||
--- a/src/mesa/drivers/dri/intel/intel_screen.c
|
||||
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
|
||||
@@ -339,7 +339,13 @@ intel_create_image(__DRIscreen *screen,
|
||||
tiling = I915_TILING_NONE;
|
||||
}
|
||||
|
||||
+ /* We only support write for cursor drm images */
|
||||
+ if ((use & __DRI_IMAGE_USE_WRITE) &&
|
||||
+ use != (__DRI_IMAGE_USE_WRITE | __DRI_IMAGE_USE_CURSOR))
|
||||
+ return NULL;
|
||||
+
|
||||
image = intel_allocate_image(format, loaderPrivate);
|
||||
+ image->usage = use;
|
||||
cpp = _mesa_get_format_bytes(image->format);
|
||||
image->region =
|
||||
intel_region_alloc(intelScreen, tiling, cpp, width, height, true);
|
||||
@@ -393,6 +399,7 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate)
|
||||
}
|
||||
|
||||
image->internal_format = orig_image->internal_format;
|
||||
+ image->usage = orig_image->usage;
|
||||
image->dri_format = orig_image->dri_format;
|
||||
image->format = orig_image->format;
|
||||
image->offset = orig_image->offset;
|
||||
@@ -409,9 +416,29 @@ intel_validate_usage(__DRIimage *image, unsigned int use)
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
+ /* We only support write for cursor drm images */
|
||||
+ if ((use & __DRI_IMAGE_USE_WRITE) &&
|
||||
+ use != (__DRI_IMAGE_USE_WRITE | __DRI_IMAGE_USE_CURSOR))
|
||||
+ return GL_FALSE;
|
||||
+
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
+static int
|
||||
+intel_image_write(__DRIimage *image, const void *buf, size_t count)
|
||||
+{
|
||||
+ if (image->region->map_refcount)
|
||||
+ return -1;
|
||||
+ if (!(image->usage & __DRI_IMAGE_USE_WRITE))
|
||||
+ return -1;
|
||||
+
|
||||
+ drm_intel_bo_map(image->region->bo, true);
|
||||
+ memcpy(image->region->bo->virtual, buf, count);
|
||||
+ drm_intel_bo_unmap(image->region->bo);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static __DRIimage *
|
||||
intel_create_sub_image(__DRIimage *parent,
|
||||
int width, int height, int dri_format,
|
||||
@@ -463,6 +490,7 @@ static struct __DRIimageExtensionRec intelImageExtension = {
|
||||
intel_query_image,
|
||||
intel_dup_image,
|
||||
intel_validate_usage,
|
||||
+ intel_image_write,
|
||||
intel_create_sub_image
|
||||
};
|
||||
|
||||
--
|
||||
1.7.12
|
||||
|
||||
|
15
mesa.spec
15
mesa.spec
@ -30,13 +30,13 @@
|
||||
%define _default_patch_fuzz 2
|
||||
|
||||
%define manpages gl-manpages-1.0.1
|
||||
%define gitdate 20120827
|
||||
%define gitdate 20120924
|
||||
#% define snapshot
|
||||
|
||||
Summary: Mesa graphics libraries
|
||||
Name: mesa
|
||||
Version: 8.1
|
||||
Release: 0.21%{?dist}
|
||||
Version: 9.0
|
||||
Release: 0.1%{?dist}
|
||||
License: MIT
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.mesa3d.org
|
||||
@ -56,10 +56,6 @@ Patch12: mesa-8.0.1-fix-16bpp.patch
|
||||
# Revert libkms usage so we don't need to revive it
|
||||
Patch13: mesa-no-libkms.patch
|
||||
|
||||
# fix yylex collision
|
||||
Patch14: mesa-fix-yylex.patch
|
||||
Patch15: mesa-fix-yylex-2.patch
|
||||
|
||||
# Courtesy of Mageia cauldron:
|
||||
# Fix undefined syms: http://svnweb.mageia.org/packages/cauldron/mesa/current/SOURCES/0001-Fix-undefined-symbols-in-libOSMesa-and-libglapi.patch?revision=278531&view=co
|
||||
Patch101: mesa-undefined-symbols.patch
|
||||
@ -288,8 +284,6 @@ Mesa shared glapi
|
||||
%patch11 -p1 -b .nouveau
|
||||
%patch12 -p1 -b .16bpp
|
||||
%patch13 -p1 -b .no-libkms
|
||||
%patch14 -p1 -b .yylex
|
||||
%patch15 -p1 -b .yylex2
|
||||
%patch101 -p1 -b .syms
|
||||
|
||||
%build
|
||||
@ -585,6 +579,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Sep 24 2012 Dave Airlie <airlied@redhat.com> 9.0-0.1
|
||||
- rebase to latest upstream 9.0 pre-release branch
|
||||
|
||||
* Fri Sep 14 2012 Dave Airlie <airlied@redhat.com> 8.1-0.21
|
||||
- why fix one yylex when you can fix two
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user