aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libX11/include/X11/Xlibint.h5
-rw-r--r--libXext/configure.ac2
-rw-r--r--libXext/docbook.am192
-rw-r--r--libXext/specs/Makefile.am2
-rw-r--r--mesalib/docs/GL3.txt2
-rw-r--r--mesalib/docs/MESA_drm_image.spec18
-rw-r--r--mesalib/docs/relnotes-7.11.html5
-rw-r--r--mesalib/include/EGL/eglext.h1
-rw-r--r--mesalib/include/GL/internal/dri_interface.h1
-rw-r--r--mesalib/src/mesa/main/compiler.h6
-rw-r--r--mesalib/src/mesa/main/extensions.c1
-rw-r--r--mesalib/src/mesa/main/mtypes.h2
-rw-r--r--mesalib/src/mesa/main/samplerobj.c58
-rw-r--r--mesalib/src/mesa/main/texobj.c2
-rw-r--r--mesalib/src/mesa/main/texparam.c32
-rw-r--r--mesalib/src/mesa/program/prog_statevars.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_sampler.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c8
-rw-r--r--mkfontscale/mkfontscale.c4
19 files changed, 231 insertions, 115 deletions
diff --git a/libX11/include/X11/Xlibint.h b/libX11/include/X11/Xlibint.h
index 39ca4da03..0a4f75df8 100644
--- a/libX11/include/X11/Xlibint.h
+++ b/libX11/include/X11/Xlibint.h
@@ -572,6 +572,7 @@ extern LockInfoPtr _Xglobal_lock;
#endif
#endif
+#ifndef __clang_analyzer__
#define SetReqLen(req,n,badlen) \
if ((req->length + n) > (unsigned)65535) { \
if (dpy->bigreq_size) { \
@@ -582,6 +583,10 @@ extern LockInfoPtr _Xglobal_lock;
} \
} else \
req->length += n
+#else
+#define SetReqLen(req,n,badlen) \
+ req->length += n
+#endif
#define SyncHandle() \
if (dpy->synchandler) (*dpy->synchandler)(dpy)
diff --git a/libXext/configure.ac b/libXext/configure.ac
index 92609aa4c..0cd3948ff 100644
--- a/libXext/configure.ac
+++ b/libXext/configure.ac
@@ -1,7 +1,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXext], [1.2.99.0],
+AC_INIT([libXext], [1.3.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXext])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/libXext/docbook.am b/libXext/docbook.am
index 3cf21e879..94602521b 100644
--- a/libXext/docbook.am
+++ b/libXext/docbook.am
@@ -1,95 +1,97 @@
-#
-# Generate output formats for a single DocBook/XML with/without chapters
-#
-# Variables set by the calling Makefile:
-# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
-# docbook: the main DocBook/XML file, no chapters, appendix or image files
-# chapters: all files pulled in by an XInclude statement and images.
-#
-
-#
-# This makefile is intended for Users Documentation and Functional Specifications.
-# Do not use for Developer Documentation which is not installed and does not require olink.
-# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
-# for an explanation on documents classification.
-#
-
-# DocBook/XML generated output formats to be installed
-shelf_DATA =
-
-# DocBook/XML file with chapters, appendix and images it includes
-dist_shelf_DATA = $(docbook) $(chapters)
-
-#
-# Generate DocBook/XML output formats with or without stylesheets
-#
-
-# Stylesheets are available if the package xorg-sgml-doctools is installed
-if HAVE_STYLESHEETS
-
-# The location where all cross reference databases are installed
-sgmldbsdir = $(XORG_SGML_PATH)/X11/dbs
-masterdb = "$(sgmldbsdir)/masterdb$(suffix $@).xml"
-XMLTO_FLAGS = \
- --searchpath "$(XORG_SGML_PATH)/X11" \
- --stringparam target.database.document=$(masterdb) \
- --stringparam current.docid="$(<:.xml=)" \
- --stringparam collect.xref.targets="no"
-
-XMLTO_XHTML_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \
- --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
-
-XMLTO_FO_FLAGS = \
- -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
-endif HAVE_STYLESHEETS
-
-shelf_DATA += $(docbook:.xml=.html)
-%.html: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) xhtml-nochunks $<
-
-if HAVE_FOP
-shelf_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
-%.pdf: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $<
-%.ps: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $<
-endif HAVE_FOP
-
-if HAVE_XMLTO_TEXT
-shelf_DATA += $(docbook:.xml=.txt)
-%.txt: %.xml $(chapters)
- $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $<
-endif HAVE_XMLTO_TEXT
-
-#
-# Generate documents cross-reference target databases
-#
-
-# This is only possible if the xorg-sgml-doctools package is installed
-if HAVE_STYLESHEETS
-if HAVE_XSLTPROC
-
-# DocBook/XML generated document cross-reference database
-sgmldbs_DATA = $(docbook:.xml=.html.db) $(docbook:.xml=.fo.db)
-
-# Generate DocBook/XML document cross-reference database
-# Flags for the XSL Transformation processor generating xref target databases
-XSLTPROC_FLAGS = \
- --path "$(XORG_SGML_PATH)/X11" \
- --stringparam targets.filename "$@" \
- --stringparam collect.xref.targets "only" \
- --nonet --xinclude
-
-%.html.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
- http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $<
-
-%.fo.db: %.xml $(chapters)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
- http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $<
-
-endif HAVE_XSLTPROC
-endif HAVE_STYLESHEETS
-
-CLEANFILES = $(shelf_DATA) $(sgmldbs_DATA)
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook: the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_shelf_DATA = $(docbook) $(chapters)
+
+if HAVE_XMLTO
+#
+# Generate DocBook/XML output formats with or without stylesheets
+#
+
+# Stylesheets are available if the package xorg-sgml-doctools is installed
+if HAVE_STYLESHEETS
+
+# The location where all cross reference databases are installed
+sgmldbsdir = $(XORG_SGML_PATH)/X11/dbs
+masterdb = "$(sgmldbsdir)/masterdb$(suffix $@).xml"
+XMLTO_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
+ --stringparam target.database.document=$(masterdb) \
+ --stringparam current.docid="$(<:.xml=)" \
+ --stringparam collect.xref.targets="no"
+
+XMLTO_XHTML_FLAGS = \
+ -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl \
+ --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
+
+XMLTO_FO_FLAGS = \
+ -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+endif HAVE_STYLESHEETS
+
+shelf_DATA += $(docbook:.xml=.html)
+%.html: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_FOP
+shelf_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
+%.pdf: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+%.ps: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+if HAVE_XMLTO_TEXT
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) $(XMLTO_XHTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+#
+# Generate documents cross-reference target databases
+#
+
+# This is only possible if the xorg-sgml-doctools package is installed
+if HAVE_STYLESHEETS
+if HAVE_XSLTPROC
+
+# DocBook/XML generated document cross-reference database
+sgmldbs_DATA = $(docbook:.xml=.html.db) $(docbook:.xml=.fo.db)
+
+# Generate DocBook/XML document cross-reference database
+# Flags for the XSL Transformation processor generating xref target databases
+XSLTPROC_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only" \
+ --nonet --xinclude
+
+%.html.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
+ http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl $<
+
+%.fo.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
+ http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA) $(sgmldbs_DATA)
diff --git a/libXext/specs/Makefile.am b/libXext/specs/Makefile.am
index d4f57b6c5..09eafe24a 100644
--- a/libXext/specs/Makefile.am
+++ b/libXext/specs/Makefile.am
@@ -1,6 +1,5 @@
if ENABLE_SPECS
-if HAVE_XMLTO
# Main DocBook/XML files (DOCTYPE book)
docbook = dbelib.xml dpmslib.xml shapelib.xml synclib.xml xtest1.xml
@@ -11,5 +10,4 @@ shelfdir = $(docdir)
# Generate DocBook/XML output formats with or without stylesheets
include $(top_srcdir)/docbook.am
-endif HAVE_XMLTO
endif ENABLE_SPECS
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt
index d57d56366..fbdeaad17 100644
--- a/mesalib/docs/GL3.txt
+++ b/mesalib/docs/GL3.txt
@@ -65,7 +65,7 @@ BGRA vertex order (GL_ARB_vertex_array_bgra) DONE
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (swrast, gallium)
Provoking vertex (GL_ARB_provoking_vertex) DONE
-Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly?
+Seamless cubemaps (GL_ARB_seamless_cube_map) DONE
Multisample textures (GL_ARB_texture_multisample) not started
Frag depth clamp (GL_ARB_depth_clamp) DONE
Fence objects (GL_ARB_sync) DONE
diff --git a/mesalib/docs/MESA_drm_image.spec b/mesalib/docs/MESA_drm_image.spec
index 76de3f8b6..fa1e32e06 100644
--- a/mesalib/docs/MESA_drm_image.spec
+++ b/mesalib/docs/MESA_drm_image.spec
@@ -66,6 +66,7 @@ New Tokens
EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
+ EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
Accepted in the <target> parameter of eglCreateImageKHR:
@@ -89,13 +90,16 @@ Additions to the EGL 1.4 Specification:
extension is EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, where each pixel
is a CPU-endian, 32-bit quantity, with alpha in the upper 8 bits,
then red, then green, then blue. The bit values accepted by
- EGL_DRM_BUFFER_USE_MESA are EGL_DRM_BUFFER_USE_SCANOUT_MESA and
- EGL_DRM_BUFFER_USE_SHARE_MESA. EGL_DRM_BUFFER_USE_SCANOUT_MESA
- requests that the created EGLImage should be usable as a scanout
- buffer with the DRM kernel modesetting API. The
- EGL_DRM_BUFFER_USE_SHARE_MESA bit requests that the EGLImage can
- be shared with other processes by passing the underlying DRM
- buffer name.
+ EGL_DRM_BUFFER_USE_MESA are EGL_DRM_BUFFER_USE_SCANOUT_MESA,
+ EGL_DRM_BUFFER_USE_SHARE_MESA and EGL_DRM_BUFFER_USE_CURSOR_MESA.
+ EGL_DRM_BUFFER_USE_SCANOUT_MESA requests that the created EGLImage
+ should be usable as a scanout buffer with the DRM kernel
+ modesetting API. EGL_DRM_BUFFER_USE_SHARE_MESA requests that the
+ EGLImage can be shared with other processes by passing the
+ underlying DRM buffer name. EGL_DRM_BUFFER_USE_CURSOR_MESA
+ requests that the image must be usable as a cursor with KMS. When
+ EGL_DRM_BUFFER_USE_CURSOR_MESA is set, width and height must both
+ be 64.
To create a process local handle or a global DRM name for a
buffer, call
diff --git a/mesalib/docs/relnotes-7.11.html b/mesalib/docs/relnotes-7.11.html
index 6951984bd..898958705 100644
--- a/mesalib/docs/relnotes-7.11.html
+++ b/mesalib/docs/relnotes-7.11.html
@@ -44,6 +44,8 @@ tbd
<li>GL_ARB_occlusion_query2 (gallium drivers, swrast)
<li>GL_ARB_robustness (all drivers)
<li>GL_ARB_sampler_objects (gallium drivers)
+<li>GL_ARB_seamless_cube_map (gallium r600)
+<li>GL_ARB_sync (gallium drivers only, intel support was in 7.6)
<li>GL_ARB_texture_compression_rgtc (gallium drivers, swrast, i965)
<li>GL_ARB_texture_float (gallium, i965)
<li>GL_EXT_packed_float (gallium r600)
@@ -52,6 +54,9 @@ tbd
<li>GL_EXT_texture_shared_exponent (gallium drivers, swrast)
<li>GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965)
<li>GL_EXT_texture_snorm (gallium drivers)
+<li>GL_AMD_draw_buffers_blend (alias of the ARB variant)
+<li>GL_AMD_seamless_cubemap_per_texture (gallium r600)
+<li>GL_AMD_shader_stencil_export (alias of the ARB variant)
<li>GL_ATI_draw_buffers (all drivers)
<li>GL_ATI_texture_compression_3dc (gallium drivers, swrast)
<li>GL_ATI_texture_float (gallium, i965)
diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h
index 43eff8e99..7d49ff68a 100644
--- a/mesalib/include/EGL/eglext.h
+++ b/mesalib/include/EGL/eglext.h
@@ -131,6 +131,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
/* EGL_DRM_BUFFER_USE_MESA bits */
#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
+#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 /* eglCreateImageKHR attribute */
diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h
index 8098a2eb9..1564e4cea 100644
--- a/mesalib/include/GL/internal/dri_interface.h
+++ b/mesalib/include/GL/internal/dri_interface.h
@@ -818,6 +818,7 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_USE_SHARE 0x0001
#define __DRI_IMAGE_USE_SCANOUT 0x0002
+#define __DRI_IMAGE_USE_CURSOR 0x0004
/**
* queryImage attributes
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index f2b344fd1..b5cac72d3 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -333,7 +333,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
#ifndef M_PI
-#define M_PI (3.1415926536)
+#define M_PI (3.14159265358979323846)
#endif
#ifndef M_E
@@ -344,10 +344,6 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
#define M_LOG2E (1.4426950408889634074)
#endif
-#ifndef ONE_DIV_LN2
-#define ONE_DIV_LN2 (1.442695040888963456)
-#endif
-
#ifndef ONE_DIV_SQRT_LN2
#define ONE_DIV_SQRT_LN2 (1.201122408786449815)
#endif
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 1884d3e1a..e2413f7a9 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -260,6 +260,7 @@ static const struct extension extension_table[] = {
{ "GL_3DFX_texture_compression_FXT1", o(TDFX_texture_compression_FXT1), GL, 1999 },
{ "GL_AMD_conservative_depth", o(AMD_conservative_depth), GL, 2009 },
{ "GL_AMD_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 },
+ { "GL_AMD_seamless_cubemap_per_texture", o(AMD_seamless_cubemap_per_texture), GL, 2009 },
{ "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
{ "GL_APPLE_client_storage", o(APPLE_client_storage), GL, 2002 },
{ "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 },
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 02fdeffb6..4ec15d1e2 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -1339,6 +1339,7 @@ struct gl_sampler_object
GLenum CompareFunc; /**< GL_ARB_shadow */
GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */
GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */
+ GLboolean CubeMapSeamless; /**< GL_AMD_seamless_cubemap_per_texture */
/* deprecated sampler state */
GLenum DepthMode; /**< GL_ARB_depth_texture */
@@ -2885,6 +2886,7 @@ struct gl_extensions
GLboolean OES_standard_derivatives;
/* vendor extensions */
GLboolean AMD_conservative_depth;
+ GLboolean AMD_seamless_cubemap_per_texture;
GLboolean APPLE_client_storage;
GLboolean APPLE_packed_pixels;
GLboolean APPLE_vertex_array_object;
diff --git a/mesalib/src/mesa/main/samplerobj.c b/mesalib/src/mesa/main/samplerobj.c
index 4642b80d7..473190638 100644
--- a/mesalib/src/mesa/main/samplerobj.c
+++ b/mesalib/src/mesa/main/samplerobj.c
@@ -133,6 +133,7 @@ _mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name)
sampObj->CompareFunc = GL_LEQUAL;
sampObj->CompareFailValue = 0.0;
sampObj->sRGBDecode = GL_FALSE;
+ sampObj->CubeMapSeamless = GL_FALSE;
sampObj->DepthMode = 0;
}
@@ -567,6 +568,25 @@ set_sampler_max_anisotropy(struct gl_context *ctx,
}
+static GLuint
+set_sampler_cube_map_seamless(struct gl_context *ctx,
+ struct gl_sampler_object *samp, GLboolean param)
+{
+ if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
+ return INVALID_PNAME;
+
+ if (samp->CubeMapSeamless == param)
+ return GL_FALSE;
+
+ if (param != GL_TRUE && param != GL_FALSE)
+ return INVALID_VALUE;
+
+ flush(ctx);
+ samp->CubeMapSeamless = param;
+ return GL_TRUE;
+}
+
+
static void GLAPIENTRY
_mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
{
@@ -615,6 +635,9 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) param);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ res = set_sampler_cube_map_seamless(ctx, sampObj, param);
+ break;
case GL_TEXTURE_BORDER_COLOR:
/* fall-through */
default:
@@ -696,6 +719,9 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
res = set_sampler_max_anisotropy(ctx, sampObj, param);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ res = set_sampler_cube_map_seamless(ctx, sampObj, (GLboolean) param);
+ break;
case GL_TEXTURE_BORDER_COLOR:
/* fall-through */
default:
@@ -774,6 +800,9 @@ _mesa_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params)
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) params[0]);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ res = set_sampler_cube_map_seamless(ctx, sampObj, params[0]);
+ break;
case GL_TEXTURE_BORDER_COLOR:
{
GLfloat c[4];
@@ -862,6 +891,9 @@ _mesa_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
res = set_sampler_max_anisotropy(ctx, sampObj, params[0]);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ res = set_sampler_cube_map_seamless(ctx, sampObj, (GLboolean) params[0]);
+ break;
case GL_TEXTURE_BORDER_COLOR:
res = set_sampler_border_colorf(ctx, sampObj, params);
break;
@@ -941,6 +973,9 @@ _mesa_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) params[0]);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ res = set_sampler_cube_map_seamless(ctx, sampObj, params[0]);
+ break;
case GL_TEXTURE_BORDER_COLOR:
res = set_sampler_border_colori(ctx, sampObj, params);
break;
@@ -1021,6 +1056,9 @@ _mesa_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) params[0]);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ res = set_sampler_cube_map_seamless(ctx, sampObj, params[0]);
+ break;
case GL_TEXTURE_BORDER_COLOR:
res = set_sampler_border_colorui(ctx, sampObj, params);
break;
@@ -1110,6 +1148,11 @@ _mesa_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
params[2] = FLOAT_TO_INT(sampObj->BorderColor.f[2]);
params[3] = FLOAT_TO_INT(sampObj->BorderColor.f[3]);
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
+ goto invalid_pname;
+ *params = sampObj->CubeMapSeamless;
+ break;
default:
goto invalid_pname;
}
@@ -1178,6 +1221,11 @@ _mesa_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
params[2] = sampObj->BorderColor.f[2];
params[3] = sampObj->BorderColor.f[3];
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
+ goto invalid_pname;
+ *params = (GLfloat) sampObj->CubeMapSeamless;
+ break;
default:
goto invalid_pname;
}
@@ -1247,6 +1295,11 @@ _mesa_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
params[2] = sampObj->BorderColor.i[2];
params[3] = sampObj->BorderColor.i[3];
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
+ goto invalid_pname;
+ *params = sampObj->CubeMapSeamless;
+ break;
default:
goto invalid_pname;
}
@@ -1316,6 +1369,11 @@ _mesa_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
params[2] = sampObj->BorderColor.ui[2];
params[3] = sampObj->BorderColor.ui[3];
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
+ goto invalid_pname;
+ *params = sampObj->CubeMapSeamless;
+ break;
default:
goto invalid_pname;
}
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 426347e1b..9dc065a5d 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -141,6 +141,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
obj->Sampler.CompareFunc = GL_LEQUAL; /* ARB_shadow */
obj->Sampler.CompareFailValue = 0.0F; /* ARB_shadow_ambient */
obj->Sampler.DepthMode = GL_LUMINANCE; /* ARB_depth_texture */
+ obj->Sampler.CubeMapSeamless = GL_FALSE;
obj->Swizzle[0] = GL_RED;
obj->Swizzle[1] = GL_GREEN;
obj->Swizzle[2] = GL_BLUE;
@@ -251,6 +252,7 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
dest->Sampler.CompareMode = src->Sampler.CompareMode;
dest->Sampler.CompareFunc = src->Sampler.CompareFunc;
dest->Sampler.CompareFailValue = src->Sampler.CompareFailValue;
+ dest->Sampler.CubeMapSeamless = src->Sampler.CubeMapSeamless;
dest->Sampler.DepthMode = src->Sampler.DepthMode;
dest->_MaxLevel = src->_MaxLevel;
dest->_MaxLambda = src->_MaxLambda;
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c
index 74e1f4a1b..545c44ab9 100644
--- a/mesalib/src/mesa/main/texparam.c
+++ b/mesalib/src/mesa/main/texparam.c
@@ -439,6 +439,20 @@ set_tex_parameteri(struct gl_context *ctx,
}
goto invalid_pname;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (ctx->Extensions.AMD_seamless_cubemap_per_texture) {
+ GLenum param = params[0];
+ if (param != GL_TRUE && param != GL_FALSE) {
+ goto invalid_param;
+ }
+ if (param != texObj->Sampler.CubeMapSeamless) {
+ flush(ctx);
+ texObj->Sampler.CubeMapSeamless = param;
+ }
+ return GL_TRUE;
+ }
+ goto invalid_pname;
+
default:
goto invalid_pname;
}
@@ -580,6 +594,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
case GL_TEXTURE_COMPARE_FUNC_ARB:
case GL_DEPTH_TEXTURE_MODE_ARB:
case GL_TEXTURE_SRGB_DECODE_EXT:
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
{
/* convert float param to int */
GLint p[4];
@@ -629,6 +644,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
case GL_TEXTURE_COMPARE_FUNC_ARB:
case GL_DEPTH_TEXTURE_MODE_ARB:
case GL_TEXTURE_SRGB_DECODE_EXT:
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
{
/* convert float param to int */
GLint p[4];
@@ -1235,6 +1251,14 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
}
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (ctx->Extensions.AMD_seamless_cubemap_per_texture) {
+ *params = (GLfloat) obj->Sampler.CubeMapSeamless;
+ }
+ else {
+ error = GL_TRUE;
+ }
+
default:
error = GL_TRUE;
break;
@@ -1396,6 +1420,14 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
}
break;
+ case GL_TEXTURE_CUBE_MAP_SEAMLESS:
+ if (ctx->Extensions.AMD_seamless_cubemap_per_texture) {
+ *params = (GLint) obj->Sampler.CubeMapSeamless;
+ }
+ else {
+ error = GL_TRUE;
+ }
+
default:
; /* silence warnings */
}
diff --git a/mesalib/src/mesa/program/prog_statevars.c b/mesalib/src/mesa/program/prog_statevars.c
index 6a3752810..ddda78e19 100644
--- a/mesalib/src/mesa/program/prog_statevars.c
+++ b/mesalib/src/mesa/program/prog_statevars.c
@@ -459,7 +459,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
value[0] = (ctx->Fog.End == ctx->Fog.Start)
? 1.0f : (GLfloat)(-1.0F / (ctx->Fog.End - ctx->Fog.Start));
value[1] = ctx->Fog.End * -value[0];
- value[2] = (GLfloat)(ctx->Fog.Density * ONE_DIV_LN2);
+ value[2] = (GLfloat)(ctx->Fog.Density * M_LOG2E); /* M_LOG2E == 1/ln(2) */
value[3] = (GLfloat)(ctx->Fog.Density * ONE_DIV_SQRT_LN2);
return;
diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
index 80e6cb02c..e1700d6a9 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
@@ -201,6 +201,9 @@ update_samplers(struct st_context *st)
= st_compare_func_to_pipe(msamp->CompareFunc);
}
+ sampler->seamless_cube_map =
+ st->ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless;
+
st->state.num_samplers = su + 1;
/*printf("%s su=%u non-null\n", __FUNCTION__, su);*/
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 0c5e1991c..acad668d2 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -595,4 +595,12 @@ void st_init_extensions(struct st_context *st)
PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_float = GL_TRUE;
}
+
+ if (screen->get_param(screen, PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE)) {
+ ctx->Extensions.ARB_seamless_cube_map = GL_TRUE;
+ ctx->Extensions.AMD_seamless_cubemap_per_texture = GL_TRUE;
+ }
+ else if (screen->get_param(screen, PIPE_CAP_SEAMLESS_CUBE_MAP)) {
+ ctx->Extensions.ARB_seamless_cube_map = GL_TRUE;
+ }
}
diff --git a/mkfontscale/mkfontscale.c b/mkfontscale/mkfontscale.c
index 2c93e3ec7..74c749b60 100644
--- a/mkfontscale/mkfontscale.c
+++ b/mkfontscale/mkfontscale.c
@@ -940,10 +940,8 @@ doDirectory(char *dirname_given, int numEncodings, ListPtr encodingsToDo)
}
}
done:
- if(have_face) {
+ if(have_face)
FT_Done_Face(face);
- have_face = 0;
- }
deepDestroyList(xlfd);
xlfd = NULL;
free(filename);