Compare commits

...

3 Commits

Author SHA1 Message Date
Adam Jackson 69ae1716ff GLX_EXT_no_config_context
{EGL_KHR,GLX_ARB}_context_flush_control
2017-11-09 09:50:53 -05:00
Adam Jackson 1b6550bd08 --enable-omx-bellagio 2017-11-06 14:05:09 -05:00
Adam Jackson 4ed50364ed today's git snapshot 2017-11-06 13:49:21 -05:00
5 changed files with 1610 additions and 45 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,250 @@
From 0d9f80a538a1d39206ac82c97f10253481595150 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 7 Nov 2017 10:42:08 -0500
Subject: [PATCH] glx: Implement GLX_EXT_no_config_context (v2 squash)
This more or less ports EGL_KHR_no_config_context to GLX.
v2: Enable the extension only for those backends that support it.
Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
src/glx/create_context.c | 41 +++++++++++++++++++++++++++--------------
src/glx/dri2_glx.c | 5 +++--
src/glx/dri3_glx.c | 6 ++++--
src/glx/drisw_glx.c | 5 +++--
src/glx/glxcmds.c | 30 +++++++++++++++++-------------
src/glx/glxextensions.c | 1 +
src/glx/glxextensions.h | 1 +
7 files changed, 56 insertions(+), 33 deletions(-)
diff --git a/src/glx/create_context.c b/src/glx/create_context.c
index 38e949ab4c..eab6511ad8 100644
--- a/src/glx/create_context.c
+++ b/src/glx/create_context.c
@@ -47,21 +47,11 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
xcb_generic_error_t *err;
xcb_void_cookie_t cookie;
unsigned dummy_err = 0;
+ int screen = -1;
-
- if (dpy == NULL || cfg == NULL)
- return NULL;
-
- /* This means that either the caller passed the wrong display pointer or
- * one of the internal GLX data structures (probably the fbconfig) has an
- * error. There is nothing sensible to do, so return an error.
- */
- psc = GetGLXScreenConfigs(dpy, cfg->screen);
- if (psc == NULL)
+ if (dpy == NULL)
return NULL;
- assert(cfg->screen == psc->scr);
-
/* Count the number of attributes specified by the application. All
* attributes appear in pairs, except the terminating None.
*/
@@ -70,6 +60,29 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
/* empty */ ;
}
+ if (cfg) {
+ screen = cfg->screen;
+ } else {
+ int i;
+ for (i = 0; i < num_attribs; i++) {
+ if (attrib_list[i * 2] == GLX_SCREEN)
+ screen = attrib_list[i * 2 + 1];
+ }
+ }
+
+ /* This means that either the caller passed the wrong display pointer or
+ * one of the internal GLX data structures (probably the fbconfig) has an
+ * error. There is nothing sensible to do, so return an error.
+ */
+ psc = GetGLXScreenConfigs(dpy, screen);
+ if (psc == NULL)
+ return NULL;
+
+ assert(screen == psc->scr);
+
+ if (!cfg && !__glXExtensionBitIsEnabled(psc, EXT_no_config_context_bit))
+ return NULL;
+
if (direct && psc->vtable->create_context_attribs) {
/* GLX drops the error returned by the driver. The expectation is that
* an error will also be returned by the server. The server's error
@@ -104,8 +117,8 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
cookie =
xcb_glx_create_context_attribs_arb_checked(c,
gc->xid,
- cfg->fbconfigID,
- cfg->screen,
+ cfg ? cfg->fbconfigID : 0,
+ screen,
gc->share_xid,
gc->isDirect,
num_attribs,
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index e67a15f9da..eeec4f0d60 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -278,7 +278,7 @@ dri2_create_context_attribs(struct glx_screen *base,
goto error_exit;
}
- if (!glx_context_init(&pcp->base, &psc->base, &config->base))
+ if (!glx_context_init(&pcp->base, &psc->base, config_base))
goto error_exit;
ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
@@ -317,7 +317,7 @@ dri2_create_context_attribs(struct glx_screen *base,
pcp->driContext =
(*psc->dri2->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig : NULL,
shared,
num_ctx_attribs / 2,
ctx_attribs,
@@ -1129,6 +1129,7 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
+ __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
if ((mask & ((1 << __DRI_API_GLES) |
(1 << __DRI_API_GLES2) |
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index d613073994..4470d1ef68 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -263,7 +263,7 @@ dri3_create_context_attribs(struct glx_screen *base,
goto error_exit;
}
- if (!glx_context_init(&pcp->base, &psc->base, &config->base))
+ if (!glx_context_init(&pcp->base, &psc->base, config_base))
goto error_exit;
ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
@@ -297,7 +297,8 @@ dri3_create_context_attribs(struct glx_screen *base,
pcp->driContext =
(*psc->image_driver->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig
+ : NULL,
shared,
num_ctx_attribs / 2,
ctx_attribs,
@@ -718,6 +719,7 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
+ __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
if ((mask & ((1 << __DRI_API_GLES) |
(1 << __DRI_API_GLES2) |
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index a471856634..1f86ac2d4c 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -455,7 +455,7 @@ drisw_create_context_attribs(struct glx_screen *base,
if (pcp == NULL)
return NULL;
- if (!glx_context_init(&pcp->base, &psc->base, &config->base)) {
+ if (!glx_context_init(&pcp->base, &psc->base, config_base)) {
free(pcp);
return NULL;
}
@@ -483,7 +483,7 @@ drisw_create_context_attribs(struct glx_screen *base,
pcp->driContext =
(*psc->swrast->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig : 0,
shared,
num_ctx_attribs / 2,
ctx_attribs,
@@ -630,6 +630,7 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
if (psc->swrast->base.version >= 3) {
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
+ __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
/* DRISW version >= 2 implies support for OpenGL ES.
*/
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 10c7c2c3eb..c707d0cedf 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -235,19 +235,23 @@ Bool
validate_renderType_against_config(const struct glx_config *config,
int renderType)
{
- switch (renderType) {
- case GLX_RGBA_TYPE:
- return (config->renderType & GLX_RGBA_BIT) != 0;
- case GLX_COLOR_INDEX_TYPE:
- return (config->renderType & GLX_COLOR_INDEX_BIT) != 0;
- case GLX_RGBA_FLOAT_TYPE_ARB:
- return (config->renderType & GLX_RGBA_FLOAT_BIT_ARB) != 0;
- case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT:
- return (config->renderType & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT) != 0;
- default:
- break;
- }
- return 0;
+ /* GLX_EXT_no_config_context supports any render type */
+ if (!config)
+ return True;
+
+ switch (renderType) {
+ case GLX_RGBA_TYPE:
+ return (config->renderType & GLX_RGBA_BIT) != 0;
+ case GLX_COLOR_INDEX_TYPE:
+ return (config->renderType & GLX_COLOR_INDEX_BIT) != 0;
+ case GLX_RGBA_FLOAT_TYPE_ARB:
+ return (config->renderType & GLX_RGBA_FLOAT_BIT_ARB) != 0;
+ case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT:
+ return (config->renderType & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT) != 0;
+ default:
+ break;
+ }
+ return 0;
}
_X_HIDDEN Bool
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index af6ffbf660..4853ad534e 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -146,6 +146,7 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(EXT_fbconfig_packed_float), VER(0,0), Y, Y, N, N },
{ GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N },
{ GLX(EXT_import_context), VER(0,0), Y, Y, N, N },
+ { GLX(EXT_no_config_context), VER(0,0), Y, N, N, N },
{ GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N },
{ GLX(EXT_visual_info), VER(0,0), Y, Y, N, N },
{ GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N },
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index d73128bd0e..07cd3af0ff 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -50,6 +50,7 @@ enum
EXT_fbconfig_packed_float_bit,
EXT_framebuffer_sRGB_bit,
EXT_import_context_bit,
+ EXT_no_config_context_bit,
EXT_texture_from_pixmap_bit,
EXT_visual_info_bit,
EXT_visual_rating_bit,
--
2.14.3

View File

@ -1,26 +1,13 @@
From c2b4d93a5e4796ca53361c61d7e31edc24241932 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sun, 20 Mar 2016 13:26:25 +0100
Subject: [PATCH 1/4] llvm SONAME without version
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5f75c60..d77f907 100644
index 0116b90743..4f5c8e31da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2387,7 +2387,7 @@ if test "x$MESA_LLVM" != x0; then
@@ -2646,7 +2646,7 @@ detect_old_buggy_llvm() {
dnl ourselves.
dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
if test "x$enable_llvm_shared_libs" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
- LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
+ LLVM_SO_NAME=LLVM
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
- LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
+ LLVM_SO_NAME=LLVM
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
if test "x$llvm_have_one_so" = xyes; then
--
2.7.4
if test "x$llvm_have_one_so" = xyes; then

View File

@ -58,12 +58,14 @@
Name: mesa
Summary: Mesa graphics libraries
Version: 17.2.4
Release: 1%{?rctag:.%{rctag}}%{?dist}
Version: 17.3.99.0
Release: 0.2%{?rctag:.%{rctag}}%{?dist}
License: MIT
URL: http://www.mesa3d.org
Source0: https://mesa.freedesktop.org/archive/%{name}-%{version}%{?rctag:-%{rctag}}.tar.xz
#Source0: https://mesa.freedesktop.org/archive/%{name}-%{version}%{?rctag:-%{rctag}}.tar.xz
# wrong version number, sorry about that
Source0: mesa-17.3.0-devel.tar.xz
Source1: vl_decoder.c
Source2: vl_mpeg12_decoder.c
# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license.
@ -71,19 +73,17 @@ Source2: vl_mpeg12_decoder.c
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source3: Mesa-MLAA-License-Clarification-Email.txt
# https://cgit.freedesktop.org/~ajax/mesa/log/?h=mesa-17.2-s3tc
Patch0: 0001-mesa-Squash-merge-of-S3TC-support.patch
Patch1: 0001-llvm-SONAME-without-version.patch
Patch2: 0002-hardware-gloat.patch
Patch3: 0003-evergreen-big-endian.patch
Patch4: 0004-bigendian-assert.patch
Patch5: vc4-Don-t-advertise-tiled-dmabuf-modifiers-if-we-can-t-use-them.patch
Patch5: 0001-context_flush_control-squash.patch
Patch6: 0001-glx-Implement-GLX_EXT_no_config_context-v2-squash.patch
# glvnd support patches
# non-upstreamed ones
Patch10: glvnd-fix-gl-dot-pc.patch
Patch11: 0001-Fix-linkage-against-shared-glapi.patch
#Patch11: 0001-Fix-linkage-against-shared-glapi.patch
# backport from upstream
@ -143,7 +143,6 @@ BuildRequires: libclc-devel opencl-filesystem
BuildRequires: vulkan-devel
%endif
BuildRequires: python-mako
BuildRequires: libstdc++-static
%ifarch %{valgrind_arches}
BuildRequires: pkgconfig(valgrind)
%endif
@ -369,7 +368,8 @@ Headers for development with the Vulkan API.
%endif
%prep
%autosetup -n %{name}-%{version}%{?rctag:-%{rctag}} -p1
#autosetup -n %{name}-%{version}%{?rctag:-%{rctag}} -p1
%autosetup -n %{name}-17.3.0-devel -p1
%if 0%{sanitize}
cp -f %{SOURCE1} src/gallium/auxiliary/vl/vl_decoder.c
cp -f %{SOURCE2} src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@ -377,10 +377,6 @@ Headers for development with the Vulkan API.
cp %{SOURCE3} docs/
# this is a hack for S3TC support. r200_screen.c is symlinked to
# radeon_screen.c in git, but is its own file in the tarball.
cp -f src/mesa/drivers/dri/{radeon,r200}/radeon_screen.c
%build
autoreconf -vfi
@ -389,8 +385,7 @@ autoreconf -vfi
#
# We do say 'catch' in the clover and d3d1x state trackers, but we're not
# building those yet.
export CXXFLAGS="%{?with_opencl:-frtti -fexceptions} %{!?with_opencl:-fno-rtti -fno-exceptions}"
export LDFLAGS="-static-libstdc++"
# export CXXFLAGS="%{?with_opencl:-frtti -fexceptions} %{!?with_opencl:-fno-rtti -fno-exceptions}"
%ifarch %{ix86}
# i do not have words for how much the assembly dispatch code infuriates me
%global asm_flags --disable-asm
@ -411,7 +406,7 @@ export LDFLAGS="-static-libstdc++"
--with-platforms=x11,drm,surfaceless%{?with_wayland:,wayland} \
--enable-shared-glapi \
--enable-gbm \
%{?with_omx:--enable-omx} \
%{?with_omx:--enable-omx-bellagio} \
%{?with_opencl:--enable-opencl --enable-opencl-icd} %{!?with_opencl:--disable-opencl} \
--enable-glx-tls \
--enable-texture-float=yes \
@ -430,13 +425,6 @@ export LDFLAGS="-static-libstdc++"
%endif
%{?dri_drivers}
# libtool refuses to pass through things you ask for in LDFLAGS that it doesn't
# know about, like -static-libstdc++, so...
sed -i 's/-fuse-linker-plugin|/-static-lib*|&/' libtool
sed -i 's/-nostdlib//g' libtool
sed -i 's/^predep_objects=.*$/#&/' libtool
sed -i 's/^postdep_objects=.*$/#&/' libtool
sed -i 's/^postdeps=.*$/#&/' libtool
%make_build MKDEP=/bin/true V=1
%install
@ -694,6 +682,13 @@ popd
%endif
%changelog
* Thu Nov 09 2017 Adam Jackson <ajax@redhat.com> - 17.3.99.0-0.2
- GLX_EXT_no_config_context
- {EGL_KHR,GLX_ARB}_context_flush_control
* Mon Nov 06 2017 Adam Jackson <ajax@redhat.com> - 17.3.99.0-0.1
- today's git snapshot
* Tue Oct 31 2017 Peter Robinson <pbrobinson@fedoraproject.org> 17.2.4-1
- Update to 17.2.4 GA

View File

@ -1 +1,2 @@
SHA512 (mesa-17.2.4.tar.xz) = 665b63aab6af3f8f263f182d85d9ad71db7a23bcbaf67d62fe53c258cb0f600266ac82e72d681ec20cf7c66b47d4076aad5c3f553519f19110ee577da2707085
SHA512 (mesa-17.3.0-devel.tar.xz) = 5ea482ad85d93cc0fd18ba96539fc7b4cf26da225a39d5c66e5f8e0cb9f2e468333ff655ec8f28480720a35b38508463069add04843d5170b62a0ddc73ae5cd2