aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/configure.ac3
-rw-r--r--mesalib/docs/news.html9
-rw-r--r--mesalib/docs/relnotes-7.10.1.html380
-rw-r--r--mesalib/docs/relnotes-7.9.2.html336
-rw-r--r--mesalib/docs/relnotes.html2
-rw-r--r--mesalib/scons/custom.py2
-rw-r--r--mesalib/scons/gallium.py2
-rw-r--r--mesalib/src/glsl/SConscript18
-rw-r--r--mesalib/src/glsl/glcpp/Makefile.am44
-rw-r--r--mesalib/src/glsl/glcpp/glcpp-lex.l645
-rw-r--r--mesalib/src/mesa/SConscript4
-rw-r--r--mesalib/src/mesa/main/context.c1
-rw-r--r--mesalib/src/mesa/main/framebuffer.c2
-rw-r--r--mesalib/src/mesa/main/mtypes.h1
-rw-r--r--mesalib/src/mesa/program/prog_instruction.h2
-rw-r--r--mesalib/src/mesa/program/program.c3
-rw-r--r--mesalib/src/mesa/program/program_parse.y4
-rw-r--r--mesalib/src/mesa/vbo/vbo_save_api.c2
18 files changed, 1084 insertions, 376 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 2dee7a7da..4c278eef5 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -1162,6 +1162,9 @@ if test "x$enable_egl" = xyes; then
if test "$have_libudev" = yes; then
DEFINES="$DEFINES -DHAVE_LIBUDEV"
fi
+ # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
+ AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
+ [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
fi
fi
diff --git a/mesalib/docs/news.html b/mesalib/docs/news.html
index 1bdef71de..8185e14a9 100644
--- a/mesalib/docs/news.html
+++ b/mesalib/docs/news.html
@@ -11,6 +11,15 @@
<H1>News</H1>
+<h2>March 2, 2011</h2>
+
+<p>
+<a href="relnotes-7.9.2.html">Mesa 7.9.2</a> and
+<a href="relnotes-7.10.1.html">Mesa 7.10.1</a> are released. These are
+stable releases containing bug fixes since the 7.9.1 and 7.10 releases.
+</p>
+
+
<h2>October 4, 2010</h2>
<p>
diff --git a/mesalib/docs/relnotes-7.10.1.html b/mesalib/docs/relnotes-7.10.1.html
new file mode 100644
index 000000000..ea605d966
--- /dev/null
+++ b/mesalib/docs/relnotes-7.10.1.html
@@ -0,0 +1,380 @@
+<HTML>
+
+<head>
+<TITLE>Mesa Release Notes</TITLE>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.10.1 Release Notes / TBD</H1>
+
+<p>
+Mesa 7.10.1 is a bug fix release which fixes bugs found since the 7.10 release.
+</p>
+<p>
+Mesa 7.10.1 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 hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+4b4cee19f3bf16eb78bd4cc278ccf812 MesaLib-7.10.1.tar.gz
+efe8da4d80c2a5d32a800770b8ce5dfa MesaLib-7.10.1.tar.bz2
+0fd2b1a025934de3f8cecf9fb9b57f4c MesaLib-7.10.1.zip
+42beb0f5188d544476c19496f725fa67 MesaGLUT-7.10.1.tar.gz
+637bb8a20fdad89f7382b4ea83f896e3 MesaGLUT-7.10.1.tar.bz2
+bdbf3ffb2606d6aa8afabb6c6243b91b MesaGLUT-7.10.1.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+<p>This list is likely incomplete.</p>
+<ul>
+<li>Fix an off-by-one bug in a vsplit assertion.</li>
+<li>Fix incorrect handling of <tt>layout</tt> qualifier
+with <tt>in</tt>, <tt>out</tt>, <tt>attribute</tt>, and <tt>varying</tt>.</li>
+
+<li>Fix an i965 shader bug where the negative absolute value was generated instead of the absolute value of a negation.</li>
+
+<li>Fix numerous issues handling precision qualifiers in GLSL ES.</li>
+
+<li>Fixed a few GLX protocol encoder bugs (Julien Cristau)</li>
+
+<li>Assorted Gallium llvmpipe driver bug fixes</li>
+
+<li>Assorted Mesa/Gallium state tracker bug fixes</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26795">Bug 26795</a> - gl_FragCoord off by one in Gallium drivers.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29164">Bug 29164</a> - [GLSL 1.20] invariant variable shouldn't be used before declaration</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29823">Bug 29823</a> - GetUniform[if]v busted</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29927">Bug 29927</a> - [glsl2] fail to compile shader with constructor for array of struct type</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30156">Bug 30156</a> - [i965] After updating to Mesa 7.9, Civilization IV starts to show garbage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31923">Bug 31923</a> - [GLSL 1.20] allowing inconsistent centroid declaration between two vertex shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31925">Bug 31925</a> - [GLSL 1.20] "#pragma STDGL invariant(all)" fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32214">Bug 32214</a> - [gles2]no link error happens when missing vertex shader or frag shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32375">Bug 32375</a> - [gl gles2] Not able to get the attribute by function glGetVertexAttribfv</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32541">Bug 32541</a> - Segmentation Fault while running an HDR (high dynamic range) rendering demo</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32569">Bug 32569</a> - [gles2] glGetShaderPrecisionFormat not implemented yet</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32695">Bug 32695</a> - [glsl] SIGSEGV glcpp/glcpp-parse.y:833</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32831">Bug 32831</a> - [glsl] division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32910">Bug 32910</a> - Keywords 'in' and 'out' not handled properly for GLSL 1.20 shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33219">Bug 33219</a> -[GLSL bisected] implicit sized array triggers segfault in ir_to_mesa_visitor::copy_propagate</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33306">Bug 33306</a> - GLSL integer division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33308">Bug 33308</a> -[glsl] ast_to_hir.cpp:3016: virtual ir_rvalue* ast_jump_statement::hir(exec_list*, _mesa_glsl_parse_state*): Assertion `ret != __null' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33316">Bug 33316</a> - uniform array will be allocate one line more and initialize it when it was freed will abort</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33386">Bug 33386</a> - Dubious assembler in read_rgba_span_x86.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33388">Bug 33388</a> - Dubious assembler in xform4.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33433">Bug 33433</a> - Error in x86-64 API dispatch code.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33507">Bug 33507</a> - [glsl] GLSL preprocessor modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33508">Bug 33508</a> - [glsl] GLSL compiler modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33916">Bug 33916</a> - Compiler accepts reserved operators % and %=</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34030">Bug 34030</a> - [bisected] Starcraft 2: some effects are corrupted or too big</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34047">Bug 34047</a> - Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34114">Bug 34114</a> - Sun Studio build fails due to standard library functions not being in global namespace</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34179">Bug 34179</a> - Nouveau 3D driver: nv50_pc_emit.c:863 assertion error kills Compiz</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34198">Bug 34198</a> - [GLSL] implicit sized array with index 0 used gets assertion</li>
+
+<li><a href="https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653">Ubuntu bug 691653</a> - compiz crashes when using alt-tab (the radeon driver kills it) </li>
+
+<li><a href="https://bugs.meego.com/show_bug.cgi?id=13005">Meego bug 13005</a> - Graphics GLSL issue lead to camera preview fail on Pinetrail</li>
+
+<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
+
+</ul>
+
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-7.10..mesa-7.10.1
+</pre>
+
+<p>Alberto Milone (1):
+<ul>
+ <li>r600c: add evergreen ARL support.</li>
+</ul></p>
+
+<p>Brian Paul (21):
+<ul>
+ <li>draw: Fix an off-by-one bug in a vsplit assertion.</li>
+ <li>docs: add links to 7.9.1 and 7.10 release notes</li>
+ <li>docs: added news item for 7.9.1 and 7.10 release</li>
+ <li>gallivm: work around LLVM 2.6 bug when calling C functions</li>
+ <li>gallivm: fix copy&amp;paste error from previous commit</li>
+ <li>mesa: fix a few format table mistakes, assertions</li>
+ <li>mesa: fix num_draw_buffers==0 in fixed-function fragment program generation</li>
+ <li>mesa: don't assert in GetIntegerIndexed, etc</li>
+ <li>mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
+ <li>llvmpipe: make sure binning is active when we begin/end a query</li>
+ <li>st/mesa: fix incorrect fragcoord.x translation</li>
+ <li>softpipe: fix off-by-one error in setup_fragcoord_coeff()</li>
+ <li>cso: fix loop bound in cso_set_vertex_samplers()</li>
+ <li>st/mesa: fix incorrect glCopyPixels position on fallback path</li>
+ <li>st/mesa: set renderbuffer _BaseFormat in a few places</li>
+ <li>st/mesa: fix the default case in st_format_datatype()</li>
+ <li>st/mesa: need to translate clear color according to surface's base format</li>
+ <li>docs: update 7.9.2 release notes with Brian's cherry-picks</li>
+ <li>docs: add link to 7.10.1 release notes</li>
+ <li>mesa: implement glGetShaderPrecisionFormat()</li>
+ <li>docs: updated environment variable list</li>
+</ul></p>
+
+<p>Bryce Harrington (1):
+<ul>
+ <li>r300g: Null pointer check for buffer deref in gallium winsys</li>
+</ul></p>
+
+<p>Chad Versace (20):
+<ul>
+ <li>glsl: At link-time, check that globals have matching centroid qualifiers</li>
+ <li>glcpp: Fix segfault when validating macro redefinitions</li>
+ <li>glsl: Fix parser rule for type_specifier</li>
+ <li>glsl: Change default value of ast_type_specifier::precision</li>
+ <li>glsl: Add semantic checks for precision qualifiers</li>
+ <li>glsl: Add support for default precision statements</li>
+ <li>glsl: Remove redundant semantic check in parser</li>
+ <li>glsl: Fix semantic checks on precision qualifiers</li>
+ <li>glsl: Fix segfault due to missing printf argument</li>
+ <li>glsl: Mark 'in' variables at global scope as read-only</li>
+ <li>mesa: Refactor handling of extension strings</li>
+ <li>mesa: Add/remove extensions in extension string</li>
+ <li>mesa: Change dependencies of some OES extension strings</li>
+ <li>mesa: Change OES_point_sprite to depend on ARB_point_sprite</li>
+ <li>mesa: Change OES_standard_derivatives to be stand-alone extension</li>
+ <li>i915: Disable extension OES_standard_derivatives</li>
+ <li>glcpp: Raise error when modulus is zero</li>
+ <li>glsl: Set operators '%' and '%=' to be reserved when GLSL &lt 1.30</li>
+ <li>glsl: Reinstate constant-folding for division by zero</li>
+ <li>tnl: Add support for datatype GL_FIXED in vertex arrays</li>
+</ul></p>
+
+<p>Chia-I Wu (1):
+<ul>
+ <li>mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.</li>
+</ul></p>
+
+<p>Christoph Bumiller (1):
+<ul>
+ <li>nv50,nvc0: do not forget to apply sign mode to saved TGSI inputs</li>
+</ul></p>
+
+<p>Cyril Brulebois (1):
+<ul>
+ <li>Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org</li>
+</ul></p>
+
+<p>Dave Airlie (3):
+<ul>
+ <li>radeon/r200: fix fbo-clearmipmap + gen-teximage</li>
+ <li>radeon: calculate complete texture state inside TFP function</li>
+ <li>radeon: avoid segfault on 3D textures.</li>
+</ul></p>
+
+<p>Dimitry Andric (4):
+<ul>
+ <li>mesa: s/movzx/movzbl/</li>
+ <li>mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S</li>
+ <li>glapi: adding @ char before type specifier in glapi_x86.S</li>
+ <li>glapi: add @GOTPCREL relocation type</li>
+</ul></p>
+
+<p>Eric Anholt (16):
+<ul>
+ <li>glsl: Fix the lowering of variable array indexing to not lose write_masks.</li>
+ <li>i965/fs: When producing ir_unop_abs of an operand, strip negate.</li>
+ <li>i965/vs: When MOVing to produce ABS, strip negate of the operand.</li>
+ <li>i965/fs: Do flat shading when appropriate.</li>
+ <li>i965: Avoid double-negation of immediate values in the VS.</li>
+ <li>intel: Make renderbuffer tiling choice match texture tiling choice.</li>
+ <li>i965: Fix dead pointers to fp-&gt;Parameters-&gt;ParameterValues[] after realloc.</li>
+ <li>docs: Add a relnote for the Civ IV on i965.</li>
+ <li>glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add extension enable bit for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add actual support for glReleaseShaderCompiler from ES2.</li>
+ <li>mesa: Add support for glDepthRangef and glClearDepthf.</li>
+ <li>mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.</li>
+ <li>mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.</li>
+ <li>i965: Fix a bug in i965 compute-to-MRF.</li>
+ <li>i965/fs: Add a helper function for detecting math opcodes.</li>
+</ul></p>
+
+<p>Fredrik Höglund (1):
+<ul>
+ <li>st/mesa: fix a regression from cae2bb76</li>
+</ul></p>
+
+<p>Ian Romanick (42):
+<ul>
+ <li>docs: Add 7.10 md5sums</li>
+ <li>glsl: Support the 'invariant(all)' pragma</li>
+ <li>glcpp: Generate an error for division by zero</li>
+ <li>glsl: Add version_string containing properly formatted GLSL version</li>
+ <li>glsl &amp; glcpp: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Disallow 'in' and 'out' on globals in GLSL 1.20</li>
+ <li>glsl: Track variable usage, use that to enforce semantics</li>
+ <li>glsl: Allow 'in' and 'out' when 'layout' is also available</li>
+ <li>docs: Initial bits of 7.10.1 release notes</li>
+ <li>mesa: bump version to 7.10.1-devel</li>
+ <li>doc: Update 7.10.1 release notes</li>
+ <li>glsl: Emit errors or warnings when 'layout' is used with 'attribute' or 'varying'</li>
+ <li>docs: Update 7.10.1 release notes</li>
+ <li>glsl: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Don't assert when the value returned by a function has no rvalue</li>
+ <li>linker: Set sizes for non-global arrays as well</li>
+ <li>linker: Propagate max_array_access while linking functions</li>
+ <li>docs: Update 7.10.1 release notes</li>
+ <li>mesa: glGetUniform only returns a single element of an array</li>
+ <li>linker: Generate link errors when ES shaders are missing stages</li>
+ <li>mesa: Fix error checks in GetVertexAttrib functions</li>
+ <li>Use C-style system headers in C++ code to avoid issues with std:: namespace</li>
+ <li>docs: Update 7.10.1 release notes</li>
+ <li>glapi: Regenerate for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Connect glGetShaderPrecisionFormat into the dispatch table</li>
+ <li>i965: Set correct values for range/precision of fragment shader types</li>
+ <li>i915: Set correct values for range/precision of fragment shader types</li>
+ <li>intel: Fix typeos from 3d028024 and 790ff232</li>
+ <li>glsl: Ensure that all GLSL versions are supported in the stand-alone compiler</li>
+ <li>glsl: Reject shader versions not supported by the implementation</li>
+ <li>mesa: Initial size for secondary color array is 3</li>
+ <li>glsl: Finish out the reduce/reduce error fixes</li>
+ <li>glsl: Regenerate compiler and glcpp files from cherry picks</li>
+ <li>linker: Fix off-by-one error implicit array sizing</li>
+ <li>docs: update 7.10.1 release notes with Ian's recent cherry picks</li>
+ <li>i915: Only mark a register as available if all components are written</li>
+ <li>i915: Calculate partial result to temp register first</li>
+ <li>i915: Force lowering of all types of indirect array accesses in the FS</li>
+ <li>docs: Update 7.10.1 with (hopefully) the last of the cherry picks</li>
+ <li>docs: Clean up bug fixes list</li>
+ <li>intel: Remove driver date and related bits from renderer string</li>
+ <li>mesa: set version string to 7.10.1 (final)</li>
+</ul></p>
+
+<p>Jian Zhao (1):
+<ul>
+ <li>mesa: fix an error in uniform arrays in row calculating.</li>
+</ul></p>
+
+<p>Julien Cristau (3):
+<ul>
+ <li>glx: fix request lengths</li>
+ <li>glx: fix GLXChangeDrawableAttributesSGIX request</li>
+ <li>glx: fix length of GLXGetFBConfigsSGIX</li>
+</ul></p>
+
+<p>Keith Packard (1):
+<ul>
+ <li>glsl: Eliminate reduce/reduce conflicts in glsl grammar</li>
+</ul></p>
+
+<p>Kenneth Graunke (20):
+<ul>
+ <li>glsl: Expose a public glsl_type::void_type const pointer.</li>
+ <li>glsl: Don't bother unsetting a destructor that was never set.</li>
+ <li>glsl, i965: Remove unnecessary talloc includes.</li>
+ <li>glcpp: Remove use of talloc reference counting.</li>
+ <li>ralloc: Add a fake implementation of ralloc based on talloc.</li>
+ <li>Convert everything from the talloc API to the ralloc API.</li>
+ <li>ralloc: a new MIT-licensed recursive memory allocator.</li>
+ <li>Remove talloc from the make and automake build systems.</li>
+ <li>Remove talloc from the SCons build system.</li>
+ <li>Remove the talloc sources from the Mesa repository.</li>
+ <li>glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.</li>
+ <li>i965/fs: Apply source modifier workarounds to POW as well.</li>
+ <li>i965: Fix shaders that write to gl_PointSize on Sandybridge.</li>
+ <li>i965/fs: Avoid register coalescing away gen6 MATH workarounds.</li>
+ <li>i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.</li>
+ <li>i965: Increase Sandybridge point size clamp.</li>
+ <li>i965/fs: Refactor control flow stack handling.</li>
+ <li>i965: Increase Sandybridge point size clamp in the clip state.</li>
+ <li>glsl: Use reralloc instead of plain realloc.</li>
+ <li>Revert "i965/fs: Correctly set up gl_FragCoord.w on Sandybridge."</li>
+</ul></p>
+
+<p>Marek Olšák (4):
+<ul>
+ <li>docs: fix messed up names with special characters in relnotes-7.10</li>
+ <li>docs: fix messed up names with special characters in relnotes-7.9.1</li>
+ <li>mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2</li>
+ <li>st/dri: Track drawable context bindings</li>
+</ul></p>
+
+<p>Paulo Zanoni (1):
+<ul>
+ <li>dri_util: fail driCreateNewScreen if InitScreen is NULL</li>
+</ul></p>
+
+<p>Sam Hocevar (2):
+<ul>
+ <li>docs: add glsl info</li>
+ <li>docs: fix glsl_compiler name</li>
+</ul></p>
+
+<p>Tom Fogal (1):
+<ul>
+ <li>Regenerate gl_mangle.h.</li>
+</ul></p>
+
+<p>Tom Stellard (2):
+<ul>
+ <li>r300/compiler: Disable register rename pass on r500</li>
+ <li>r300/compiler: Don't erase sources when converting RGB-&gt;Alpha</li>
+</ul></p>
+
+<p>Vinson Lee (3):
+<ul>
+ <li>ralloc: Add missing va_end following va_copy.</li>
+ <li>mesa: Move declaration before code in extensions.c.</li>
+ <li>mesa: Move loop variable declarations outside for loop in extensions.c.</li>
+</ul></p>
+
+<p>nobled (1):
+<ul>
+ <li>glx: Put null check before use</li>
+</ul></p>
+
+</p>
+
+</body>
+</html>
diff --git a/mesalib/docs/relnotes-7.9.2.html b/mesalib/docs/relnotes-7.9.2.html
new file mode 100644
index 000000000..65929cc2a
--- /dev/null
+++ b/mesalib/docs/relnotes-7.9.2.html
@@ -0,0 +1,336 @@
+<HTML>
+
+<head>
+<TITLE>Mesa Release Notes</TITLE>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.9.2 Release Notes / TBD</H1>
+
+<p>
+Mesa 7.9.2 is a bug fix release which fixes bugs found since the 7.9.1 release.
+</p>
+<p>
+Mesa 7.9.2 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 hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+eb4ab8c1a03386def3ea34b1358e9cda MesaLib-7.9.2.tar.gz
+8f6d1474912787ce13bd35f3bae9938a MesaLib-7.9.2.tar.bz2
+427a81dd43ac97603768dc5c6af3df26 MesaLib-7.9.2.zip
+aacb8f4db997e346db40c6066942140a MesaGLUT-7.9.2.tar.gz
+18abe6cff4fad8ad4752c7b7ab548e5d MesaGLUT-7.9.2.tar.bz2
+3189e5732d636c71baf3d8bc23ce7b11 MesaGLUT-7.9.2.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+<p>This list is likely incomplete.</p>
+<ul>
+<li>Fix an off-by-one bug in a vsplit assertion.</li>
+<li>Fix incorrect handling of <tt>layout</tt> qualifier
+with <tt>in</tt>, <tt>out</tt>, <tt>attribute</tt>, and <tt>varying</tt>.</li>
+
+<li>Fix an i965 GPU hang in GLSL shaders that contain an unconditional <tt>discard</tt> statement.</li>
+
+<li>Fix an i965 shader bug where the negative absolute value was generated instead of the absolute value of a negation.</li>
+
+<li>Fix numerous issues handling precision qualifiers in GLSL ES.</li>
+
+<li>Fixed a few GLX protocol encoder bugs (Julien Cristau)</li>
+
+<li>Assorted Gallium llvmpipe driver bug fixes</li>
+
+<li>Assorted Mesa/Gallium state tracker bug fixes</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26795">Bug 26795</a> - gl_FragCoord off by one in Gallium drivers.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29164">Bug 29164</a> - [GLSL 1.20] invariant variable shouldn't be used before declaration</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29823">Bug 29823</a> - GetUniform[if]v busted</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29927">Bug 29927</a> - [glsl2] fail to compile shader with constructor for array of struct type</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30156">Bug 30156</a> - [i965] After updating to Mesa 7.9, Civilization IV starts to show garbage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31923">Bug 31923</a> - [GLSL 1.20] allowing inconsistent centroid declaration between two vertex shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31925">Bug 31925</a> - [GLSL 1.20] "#pragma STDGL invariant(all)" fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32214">Bug 32214</a> - [gles2]no link error happens when missing vertex shader or frag shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32375">Bug 32375</a> - [gl gles2] Not able to get the attribute by function glGetVertexAttribfv</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32541">Bug 32541</a> - Segmentation Fault while running an HDR (high dynamic range) rendering demo</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32569">Bug 32569</a> - [gles2] glGetShaderPrecisionFormat not implemented yet</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32695">Bug 32695</a> - [glsl] SIGSEGV glcpp/glcpp-parse.y:833</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32831">Bug 32831</a> - [glsl] division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32910">Bug 32910</a> - Keywords 'in' and 'out' not handled properly for GLSL 1.20 shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33219">Bug 33219</a> -[GLSL bisected] implicit sized array triggers segfault in ir_to_mesa_visitor::copy_propagate</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33306">Bug 33306</a> - GLSL integer division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33308">Bug 33308</a> -[glsl] ast_to_hir.cpp:3016: virtual ir_rvalue* ast_jump_statement::hir(exec_list*, _mesa_glsl_parse_state*): Assertion `ret != __null' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33316">Bug 33316</a> - uniform array will be allocate one line more and initialize it when it was freed will abort</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33386">Bug 33386</a> - Dubious assembler in read_rgba_span_x86.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33388">Bug 33388</a> - Dubious assembler in xform4.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33433">Bug 33433</a> - Error in x86-64 API dispatch code.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33507">Bug 33507</a> - [glsl] GLSL preprocessor modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33508">Bug 33508</a> - [glsl] GLSL compiler modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33916">Bug 33916</a> - Compiler accepts reserved operators % and %=</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34047">Bug 34047</a> - Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34114">Bug 34114</a> - Sun Studio build fails due to standard library functions not being in global namespace</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34198">Bug 34198</a> - [GLSL] implicit sized array with index 0 used gets assertion</li>
+
+<li><a href="https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653">Ubuntu bug 691653</a> - compiz crashes when using alt-tab (the radeon driver kills it) </li>
+
+<li><a href="https://bugs.meego.com/show_bug.cgi?id=13005">Meego bug 13005</a> - Graphics GLSL issue lead to camera preview fail on Pinetrail</li>
+
+<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
+
+</ul>
+
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-7.9.1..mesa-7.9.2
+</pre>
+
+<p>Alberto Milone (1):
+<ul>
+ <li>r600c: add evergreen ARL support.</li>
+</ul></p>
+
+<p>Brian Paul (19):
+<ul>
+ <li>draw: Fix an off-by-one bug in a vsplit assertion.</li>
+ <li>mesa: fix a few format table mistakes, assertions</li>
+ <li>mesa: fix num_draw_buffers==0 in fixed-function fragment program generation</li>
+ <li>mesa: don't assert in GetIntegerIndexed, etc</li>
+ <li>mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
+ <li>llvmpipe: make sure binning is active when we begin/end a query</li>
+ <li>st/mesa: fix incorrect fragcoord.x translation</li>
+ <li>softpipe: fix off-by-one error in setup_fragcoord_coeff()</li>
+ <li>cso: fix loop bound in cso_set_vertex_samplers()</li>
+ <li>st/mesa: set renderbuffer _BaseFormat in a few places</li>
+ <li>st/mesa: fix the default case in st_format_datatype()</li>
+ <li>st/mesa: need to translate clear color according to surface's base format</li>
+ <li>docs: update 7.9.2 release notes with Brian's cherry-picks</li>
+ <li>docs: add links to 7.9.1 and 7.9.2 release notes</li>
+ <li>mesa: include compiler.h for ASSERT macro</li>
+ <li>glsl: add ir_shader case in switch stmt to silence warning</li>
+ <li>glsl2: fix signed/unsigned comparison warning</li>
+ <li>mesa: implement glGetShaderPrecisionFormat()</li>
+ <li>docs: updated environment variable list</li>
+</ul></p>
+
+<p>Bryce Harrington (1):
+<ul>
+ <li>r300g: Null pointer check for buffer deref in gallium winsys</li>
+</ul></p>
+
+<p>Chad Versace (14):
+<ul>
+ <li>glsl: At link-time, check that globals have matching centroid qualifiers</li>
+ <li>glcpp: Fix segfault when validating macro redefinitions</li>
+ <li>glsl: Fix parser rule for type_specifier</li>
+ <li>glsl: Change default value of ast_type_specifier::precision</li>
+ <li>glsl: Add semantic checks for precision qualifiers</li>
+ <li>glsl: Add support for default precision statements</li>
+ <li>glsl: Remove redundant semantic check in parser</li>
+ <li>glsl: Fix semantic checks on precision qualifiers</li>
+ <li>glsl: Fix segfault due to missing printf argument</li>
+ <li>glsl: Mark 'in' variables at global scope as read-only</li>
+ <li>glcpp: Raise error when modulus is zero</li>
+ <li>glsl: Set operators '%' and '%=' to be reserved when GLSL &lt 1.30</li>
+ <li>glsl: Reinstate constant-folding for division by zero</li>
+ <li>tnl: Add support for datatype GL_FIXED in vertex arrays</li>
+</ul></p>
+
+<p>Chia-I Wu (1):
+<ul>
+ <li>mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.</li>
+</ul></p>
+
+<p>Chris Wilson (1):
+<ul>
+ <li>intel: Check for unsupported texture when finishing using as a render target</li>
+</ul></p>
+
+<p>Cyril Brulebois (1):
+<ul>
+ <li>Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org</li>
+</ul></p>
+
+<p>Dave Airlie (2):
+<ul>
+ <li>radeon/r200: fix fbo-clearmipmap + gen-teximage</li>
+ <li>radeon: avoid segfault on 3D textures.</li>
+</ul></p>
+
+<p>Dimitry Andric (4):
+<ul>
+ <li>mesa: s/movzx/movzbl/</li>
+ <li>mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S</li>
+ <li>glapi: adding @ char before type specifier in glapi_x86.S</li>
+ <li>glapi: add @GOTPCREL relocation type</li>
+</ul></p>
+
+<p>Eric Anholt (11):
+<ul>
+ <li>i965: Avoid double-negation of immediate values in the VS.</li>
+ <li>docs: Add a relnote for the Civ IV on i965.</li>
+ <li>i965/vs: When MOVing to produce ABS, strip negate of the operand.</li>
+ <li>glsl: Fix the lowering of variable array indexing to not lose write_masks.</li>
+ <li>intel: Make renderbuffer tiling choice match texture tiling choice.</li>
+ <li>glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add extension enable bit for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add actual support for glReleaseShaderCompiler from ES2.</li>
+ <li>mesa: Add support for glDepthRangef and glClearDepthf.</li>
+ <li>mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.</li>
+ <li>mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.</li>
+</ul></p>
+
+<p>Ian Romanick (42):
+<ul>
+ <li>docs: Add 7.9.1 md5sums</li>
+ <li>glsl: Support the 'invariant(all)' pragma</li>
+ <li>glcpp: Generate an error for division by zero</li>
+ <li>glsl: Add version_string containing properly formatted GLSL version</li>
+ <li>glsl &amp; glcpp: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Disallow 'in' and 'out' on globals in GLSL 1.20</li>
+ <li>glsl: Track variable usage, use that to enforce semantics</li>
+ <li>glsl: Allow 'in' and 'out' when 'layout' is also available</li>
+ <li>docs: Initial set of release notes for 7.9.2</li>
+ <li>mesa: bump version to 7.9.2-devel</li>
+ <li>docs: Update 7.9.2 release notes</li>
+ <li>i965: Make OPCODE_KIL_NV do its work in a temp, not the null reg!</li>
+ <li>glsl: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Don't assert when the value returned by a function has no rvalue</li>
+ <li>linker: Set sizes for non-global arrays as well</li>
+ <li>linker: Propagate max_array_access while linking functions</li>
+ <li>docs: Update 7.9.2 release notes</li>
+ <li>Use C-style system headers in C++ code to avoid issues with std:: namespace</li>
+ <li>mesa: glGetUniform only returns a single element of an array</li>
+ <li>linker: Generate link errors when ES shaders are missing stages</li>
+ <li>mesa: Fix error checks in GetVertexAttrib functions</li>
+ <li>docs: Update 7.9.2 release notes</li>
+ <li>mesa: Remove unsupported OES extensions</li>
+ <li>glapi: Regenerate for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Connect glGetShaderPrecisionFormat into the dispatch table</li>
+ <li>i965: Set correct values for range/precision of fragment shader types</li>
+ <li>i915: Set correct values for range/precision of fragment shader types</li>
+ <li>intel: Fix typeos from 3d028024 and 790ff232</li>
+ <li>glsl: Ensure that all GLSL versions are supported in the stand-alone compiler</li>
+ <li>glsl: Reject shader versions not supported by the implementation</li>
+ <li>mesa: Initial size for secondary color array is 3</li>
+ <li>glcpp: Regenerate files from recent cherry picks</li>
+ <li>glsl: Finish out the reduce/reduce error fixes</li>
+ <li>glsl: Regenerate compiler files from cherry picks</li>
+ <li>linker: Fix off-by-one error implicit array sizing</li>
+ <li>i915: Only mark a register as available if all components are written</li>
+ <li>i915: Calculate partial result to temp register first</li>
+ <li>i915: Force lowering of all types of indirect array accesses in the FS</li>
+ <li>docs: Update 7.9.2 release notes for recent cherry picks</li>
+ <li>docs: Clean up bug fixes list</li>
+ <li>intel: Remove driver date and related bits from renderer string</li>
+ <li>mesa: set version string to 7.9.2 (final)</li>
+</ul></p>
+
+<p>Jian Zhao (1):
+<ul>
+ <li>mesa: fix an error in uniform arrays in row calculating.</li>
+</ul></p>
+
+<p>Julien Cristau (3):
+<ul>
+ <li>glx: fix request lengths</li>
+ <li>glx: fix GLXChangeDrawableAttributesSGIX request</li>
+ <li>glx: fix length of GLXGetFBConfigsSGIX</li>
+</ul></p>
+
+<p>Keith Packard (1):
+<ul>
+ <li>glsl: Eliminate reduce/reduce conflicts in glsl grammar</li>
+</ul></p>
+
+<p>Kenneth Graunke (12):
+<ul>
+ <li>glsl: Expose a public glsl_type::void_type const pointer.</li>
+ <li>glsl: Don't bother unsetting a destructor that was never set.</li>
+ <li>glsl, i965: Remove unnecessary talloc includes.</li>
+ <li>glcpp: Remove use of talloc reference counting.</li>
+ <li>ralloc: Add a fake implementation of ralloc based on talloc.</li>
+ <li>Convert everything from the talloc API to the ralloc API.</li>
+ <li>ralloc: a new MIT-licensed recursive memory allocator.</li>
+ <li>Remove talloc from the make and automake build systems.</li>
+ <li>Remove talloc from the SCons build system.</li>
+ <li>Remove the talloc sources from the Mesa repository.</li>
+ <li>glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.</li>
+ <li>glsl: Use reralloc instead of plain realloc.</li>
+</ul></p>
+
+<p>Marek Olšák (3):
+<ul>
+ <li>docs: fix messed up names with special characters in relnotes-7.9.1</li>
+ <li>mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2</li>
+ <li>st/dri: Track drawable context bindings</li>
+</ul></p>
+
+<p>Paulo Zanoni (1):
+<ul>
+ <li>dri_util: fail driCreateNewScreen if InitScreen is NULL</li>
+</ul></p>
+
+<p>Sam Hocevar (2):
+<ul>
+ <li>docs: add glsl info</li>
+ <li>docs: fix glsl_compiler name</li>
+</ul></p>
+
+<p>Vinson Lee (1):
+<ul>
+ <li>ralloc: Add missing va_end following va_copy.</li>
+</ul></p>
+
+<p>nobled (1):
+<ul>
+ <li>glx: Put null check before use</li>
+</ul></p>
+</p>
+
+</body>
+</html>
diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html
index 07aa6ffba..9bbf768fb 100644
--- a/mesalib/docs/relnotes.html
+++ b/mesalib/docs/relnotes.html
@@ -14,7 +14,9 @@ The release notes summarize what's new or changed in each Mesa release.
<UL>
<LI><A HREF="relnotes-7.11.html">7.11 release notes</A>
+<LI><A HREF="relnotes-7.10.1.html">7.10.1 release notes</A>
<LI><A HREF="relnotes-7.10.html">7.10 release notes</A>
+<LI><A HREF="relnotes-7.9.2.html">7.9.2 release notes</A>
<LI><A HREF="relnotes-7.9.1.html">7.9.1 release notes</A>
<LI><A HREF="relnotes-7.9.html">7.9 release notes</A>
<LI><A HREF="relnotes-7.8.3.html">7.8.3 release notes</A>
diff --git a/mesalib/scons/custom.py b/mesalib/scons/custom.py
index 457a02011..1aaac8285 100644
--- a/mesalib/scons/custom.py
+++ b/mesalib/scons/custom.py
@@ -56,6 +56,8 @@ def quietCommandLines(env):
env['SHLINKCOMSTR'] = " Linking $TARGET ..."
env['LDMODULECOMSTR'] = " Linking $TARGET ..."
env['SWIGCOMSTR'] = " Generating $TARGET ..."
+ env['LEXCOMSTR'] = " Generating $TARGET ..."
+ env['YACCCOMSTR'] = " Generating $TARGET ..."
env['CODEGENCOMSTR'] = " Generating $TARGET ..."
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index c9c8856b2..a0c458683 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -598,6 +598,8 @@ def generate(env):
env.Append(LIBS = [])
# Load tools
+ env.Tool('lex')
+ env.Tool('yacc')
if env['llvm']:
env.Tool('llvm')
env.Tool('udis86')
diff --git a/mesalib/src/glsl/SConscript b/mesalib/src/glsl/SConscript
index 930148ee8..4cc50484b 100644
--- a/mesalib/src/glsl/SConscript
+++ b/mesalib/src/glsl/SConscript
@@ -14,10 +14,16 @@ env.Prepend(CPPPATH = [
'#src/glsl/glcpp',
])
+# Make glcpp/glcpp-parse.h and glsl_parser.h reacheable from the include path
+env.Append(CPPPATH = [Dir('.').abspath])
+
env.Append(YACCFLAGS = '-d')
-parser_env = env.Clone();
-parser_env.Append(YACCFLAGS = ['--defines=src/glsl/glsl_parser.h', '-p', '_mesa_glsl_'])
+parser_env = env.Clone()
+parser_env.Append(YACCFLAGS = [
+ '--defines=%s' % File('glsl_parser.h').abspath,
+ '-p', '_mesa_glsl_',
+])
glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l')
glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y')
@@ -107,6 +113,10 @@ else:
'#src/mesa/program/symbol_table.c'],
)
+ # SCons builtin dependency scanner doesn't detect that glsl_lexer.ll
+ # depends on glsl_parser.h
+ env.Depends(builtin_compiler, glsl_parser)
+
builtin_glsl_function = env.CodeGenerate(
target = 'builtin_function.cpp',
script = 'builtins/tools/generate_builtins.py',
@@ -129,6 +139,10 @@ glsl = env.ConvenienceLibrary(
source = sources,
)
+# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll depends on
+# glsl_parser.h
+env.Depends(glsl, glsl_parser)
+
Export('glsl')
# FIXME: We can't build the programs because there's a cyclic dependency between tis directory and src/mesa
diff --git a/mesalib/src/glsl/glcpp/Makefile.am b/mesalib/src/glsl/glcpp/Makefile.am
deleted file mode 100644
index 8a3e9b007..000000000
--- a/mesalib/src/glsl/glcpp/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright © 2010 Intel Corporation
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-# USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-noinst_LTLIBRARIES = libglcpp.la
-libglcpp_la_SOURCES = \
- glcpp-lex.l \
- glcpp-parse.y \
- glcpp.h \
- pp.c
-
-BUILT_SOURCES = glcpp-parse.h glcpp-parse.c glcpp-lex.c
-CLEANFILES = $(BUILT_SOURCES)
-
-glcpp-parse.h: glcpp-parse.c
-
-bin_PROGRAMS = glcpp
-glcpp_LDADD = libglcpp.la
-glcpp_LDFLAGS = @LDFLAGS@ $(talloc_LIBS)
-glcpp_SOURCES = glcpp.c
-
-.l.c:
- $(LEXCOMPILE) --outfile="$@" $<
-
-test: glcpp
- @(cd tests; ./glcpp-test)
diff --git a/mesalib/src/glsl/glcpp/glcpp-lex.l b/mesalib/src/glsl/glcpp/glcpp-lex.l
index 11b73aea8..576e53c44 100644
--- a/mesalib/src/glsl/glcpp/glcpp-lex.l
+++ b/mesalib/src/glsl/glcpp/glcpp-lex.l
@@ -1,325 +1,320 @@
-%{
-/*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "glcpp.h"
-#include "glcpp-parse.h"
-
-/* Flex annoyingly generates some functions without making them
- * static. Let's declare them here. */
-int glcpp_get_column (yyscan_t yyscanner);
-void glcpp_set_column (int column_no , yyscan_t yyscanner);
-
-#define YY_NO_INPUT
-
-#define YY_USER_ACTION \
- do { \
- yylloc->first_column = yycolumn + 1; \
- yylloc->first_line = yylineno; \
- yycolumn += yyleng; \
- } while(0);
-
-#define YY_USER_INIT \
- do { \
- yylineno = 1; \
- yycolumn = 1; \
- yylloc->source = 0; \
- } while(0)
-%}
-
-%option bison-bridge bison-locations reentrant noyywrap
-%option extra-type="glcpp_parser_t *"
-%option prefix="glcpp_"
-%option stack
-%option never-interactive
-
-%x DONE COMMENT UNREACHABLE
-
-SPACE [[:space:]]
-NONSPACE [^[:space:]]
-NEWLINE [\n]
-HSPACE [ \t]
-HASH ^{HSPACE}*#{HSPACE}*
-IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
-PUNCTUATION [][(){}.&*~!/%<>^|;,=+-]
-OTHER [^][(){}.&*~!/%<>^|;,=#[:space:]+-]+
-
-DIGITS [0-9][0-9]*
-DECIMAL_INTEGER [1-9][0-9]*[uU]?
-OCTAL_INTEGER 0[0-7]*[uU]?
-HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
-
-%%
-
- /* Single-line comments */
-"//"[^\n]* {
-}
-
- /* Multi-line comments */
-"/*" { yy_push_state(COMMENT, yyscanner); }
-<COMMENT>[^*\n]*
-<COMMENT>[^*\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; }
-<COMMENT>"*"+[^*/\n]*
-<COMMENT>"*"+[^*/\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; }
-<COMMENT>"*"+"/" {
- yy_pop_state(yyscanner);
- if (yyextra->space_tokens)
- return SPACE;
-}
-
-{HASH}version {
- yylval->str = ralloc_strdup (yyextra, yytext);
- yyextra->space_tokens = 0;
- return HASH_VERSION;
-}
-
- /* glcpp doesn't handle #extension, #version, or #pragma directives.
- * Simply pass them through to the main compiler's lexer/parser. */
-{HASH}(extension|pragma)[^\n]+ {
- yylval->str = ralloc_strdup (yyextra, yytext);
- yylineno++;
- yycolumn = 0;
- return OTHER;
-}
-
-{HASH}line{HSPACE}+{DIGITS}{HSPACE}+{DIGITS}{HSPACE}*$ {
- /* Eat characters until the first digit is
- * encountered
- */
- char *ptr = yytext;
- while (!isdigit(*ptr))
- ptr++;
-
- /* Subtract one from the line number because
- * yylineno is zero-based instead of
- * one-based.
- */
- yylineno = strtol(ptr, &ptr, 0) - 1;
- yylloc->source = strtol(ptr, NULL, 0);
-}
-
-{HASH}line{HSPACE}+{DIGITS}{HSPACE}*$ {
- /* Eat characters until the first digit is
- * encountered
- */
- char *ptr = yytext;
- while (!isdigit(*ptr))
- ptr++;
-
- /* Subtract one from the line number because
- * yylineno is zero-based instead of
- * one-based.
- */
- yylineno = strtol(ptr, &ptr, 0) - 1;
-}
-
-{HASH}ifdef/.*\n {
- yyextra->lexing_if = 1;
- yyextra->space_tokens = 0;
- return HASH_IFDEF;
-}
-
-{HASH}ifndef/.*\n {
- yyextra->lexing_if = 1;
- yyextra->space_tokens = 0;
- return HASH_IFNDEF;
-}
-
-{HASH}if/[^_a-zA-Z0-9].*\n {
- yyextra->lexing_if = 1;
- yyextra->space_tokens = 0;
- return HASH_IF;
-}
-
-{HASH}elif/.*\n {
- yyextra->lexing_if = 1;
- yyextra->space_tokens = 0;
- return HASH_ELIF;
-}
-
-{HASH}else/.*\n {
- yyextra->space_tokens = 0;
- return HASH_ELSE;
-}
-
-{HASH}endif/.*\n {
- yyextra->space_tokens = 0;
- return HASH_ENDIF;
-}
-
- /* When skipping (due to an #if 0 or similar) consume anything
- * up to a newline. We do this with less priority than any
- * #if-related directive (#if, #elif, #else, #endif), but with
- * more priority than any other directive or token to avoid
- * any side-effects from skipped content.
- *
- * We use the lexing_if flag to avoid skipping any part of an
- * if conditional expression. */
-[^\n]+/\n {
- /* Since this rule always matches, YY_USER_ACTION gets called for it,
- * wrongly incrementing yycolumn. We undo that effect here. */
- yycolumn -= yyleng;
- if (yyextra->lexing_if ||
- yyextra->skip_stack == NULL ||
- yyextra->skip_stack->type == SKIP_NO_SKIP)
- {
- REJECT;
- }
-}
-
-{HASH}error.* {
- char *p;
- for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */
- p += 5; /* skip "error" */
- glcpp_error(yylloc, yyextra, "#error%s", p);
-}
-
-{HASH}define{HSPACE}+/{IDENTIFIER}"(" {
- yyextra->space_tokens = 0;
- return HASH_DEFINE_FUNC;
-}
-
-{HASH}define {
- yyextra->space_tokens = 0;
- return HASH_DEFINE_OBJ;
-}
-
-{HASH}undef {
- yyextra->space_tokens = 0;
- return HASH_UNDEF;
-}
-
-{HASH} {
- yyextra->space_tokens = 0;
- return HASH;
-}
-
-{DECIMAL_INTEGER} {
- yylval->str = ralloc_strdup (yyextra, yytext);
- return INTEGER_STRING;
-}
-
-{OCTAL_INTEGER} {
- yylval->str = ralloc_strdup (yyextra, yytext);
- return INTEGER_STRING;
-}
-
-{HEXADECIMAL_INTEGER} {
- yylval->str = ralloc_strdup (yyextra, yytext);
- return INTEGER_STRING;
-}
-
-"<<" {
- return LEFT_SHIFT;
-}
-
-">>" {
- return RIGHT_SHIFT;
-}
-
-"<=" {
- return LESS_OR_EQUAL;
-}
-
-">=" {
- return GREATER_OR_EQUAL;
-}
-
-"==" {
- return EQUAL;
-}
-
-"!=" {
- return NOT_EQUAL;
-}
-
-"&&" {
- return AND;
-}
-
-"||" {
- return OR;
-}
-
-"##" {
- return PASTE;
-}
-
-"defined" {
- return DEFINED;
-}
-
-{IDENTIFIER} {
- yylval->str = ralloc_strdup (yyextra, yytext);
- return IDENTIFIER;
-}
-
-{PUNCTUATION} {
- return yytext[0];
-}
-
-{OTHER}+ {
- yylval->str = ralloc_strdup (yyextra, yytext);
- return OTHER;
-}
-
-{HSPACE}+ {
- if (yyextra->space_tokens) {
- return SPACE;
- }
-}
-
-\n {
- yyextra->lexing_if = 0;
- yylineno++;
- yycolumn = 0;
- return NEWLINE;
-}
-
- /* Handle missing newline at EOF. */
-<INITIAL><<EOF>> {
- BEGIN DONE; /* Don't keep matching this rule forever. */
- yyextra->lexing_if = 0;
- return NEWLINE;
-}
-
- /* We don't actually use the UNREACHABLE start condition. We
- only have this action here so that we can pretend to call some
- generated functions, (to avoid "defined but not used"
- warnings. */
-<UNREACHABLE>. {
- unput('.');
- yy_top_state(yyextra);
-}
-
-%%
-
-void
-glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader)
-{
- yy_scan_string(shader, parser->scanner);
-}
+%{
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "glcpp.h"
+#include "glcpp-parse.h"
+
+/* Flex annoyingly generates some functions without making them
+ * static. Let's declare them here. */
+int glcpp_get_column (yyscan_t yyscanner);
+void glcpp_set_column (int column_no , yyscan_t yyscanner);
+
+#define YY_NO_INPUT
+
+#define YY_USER_ACTION \
+ do { \
+ yylloc->first_column = yycolumn + 1; \
+ yylloc->first_line = yylineno; \
+ yycolumn += yyleng; \
+ } while(0);
+
+#define YY_USER_INIT \
+ do { \
+ yylineno = 1; \
+ yycolumn = 1; \
+ yylloc->source = 0; \
+ } while(0)
+%}
+
+%option bison-bridge bison-locations reentrant noyywrap
+%option extra-type="glcpp_parser_t *"
+%option prefix="glcpp_"
+%option stack
+%option never-interactive
+
+%x DONE COMMENT UNREACHABLE SKIP
+
+SPACE [[:space:]]
+NONSPACE [^[:space:]]
+NEWLINE [\n]
+HSPACE [ \t]
+HASH ^{HSPACE}*#{HSPACE}*
+IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
+PUNCTUATION [][(){}.&*~!/%<>^|;,=+-]
+OTHER [^][(){}.&*~!/%<>^|;,=#[:space:]+-]+
+
+DIGITS [0-9][0-9]*
+DECIMAL_INTEGER [1-9][0-9]*[uU]?
+OCTAL_INTEGER 0[0-7]*[uU]?
+HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
+
+%%
+ /* Implicitly switch between SKIP and INITIAL (non-skipping);
+ * don't switch if some other state was explicitly set.
+ */
+ glcpp_parser_t *parser = yyextra;
+ if (YY_START == 0 || YY_START == SKIP) {
+ if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) {
+ BEGIN 0;
+ } else {
+ BEGIN SKIP;
+ }
+ }
+
+ /* Single-line comments */
+"//"[^\n]* {
+}
+
+ /* Multi-line comments */
+"/*" { yy_push_state(COMMENT, yyscanner); }
+<COMMENT>[^*\n]*
+<COMMENT>[^*\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; }
+<COMMENT>"*"+[^*/\n]*
+<COMMENT>"*"+[^*/\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; }
+<COMMENT>"*"+"/" {
+ yy_pop_state(yyscanner);
+ if (yyextra->space_tokens)
+ return SPACE;
+}
+
+{HASH}version {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ yyextra->space_tokens = 0;
+ return HASH_VERSION;
+}
+
+ /* glcpp doesn't handle #extension, #version, or #pragma directives.
+ * Simply pass them through to the main compiler's lexer/parser. */
+{HASH}(extension|pragma)[^\n]+ {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ yylineno++;
+ yycolumn = 0;
+ return OTHER;
+}
+
+{HASH}line{HSPACE}+{DIGITS}{HSPACE}+{DIGITS}{HSPACE}*$ {
+ /* Eat characters until the first digit is
+ * encountered
+ */
+ char *ptr = yytext;
+ while (!isdigit(*ptr))
+ ptr++;
+
+ /* Subtract one from the line number because
+ * yylineno is zero-based instead of
+ * one-based.
+ */
+ yylineno = strtol(ptr, &ptr, 0) - 1;
+ yylloc->source = strtol(ptr, NULL, 0);
+}
+
+{HASH}line{HSPACE}+{DIGITS}{HSPACE}*$ {
+ /* Eat characters until the first digit is
+ * encountered
+ */
+ char *ptr = yytext;
+ while (!isdigit(*ptr))
+ ptr++;
+
+ /* Subtract one from the line number because
+ * yylineno is zero-based instead of
+ * one-based.
+ */
+ yylineno = strtol(ptr, &ptr, 0) - 1;
+}
+
+<SKIP,INITIAL>{
+{HASH}ifdef {
+ yyextra->lexing_if = 1;
+ yyextra->space_tokens = 0;
+ return HASH_IFDEF;
+}
+
+{HASH}ifndef {
+ yyextra->lexing_if = 1;
+ yyextra->space_tokens = 0;
+ return HASH_IFNDEF;
+}
+
+{HASH}if/[^_a-zA-Z0-9] {
+ yyextra->lexing_if = 1;
+ yyextra->space_tokens = 0;
+ return HASH_IF;
+}
+
+{HASH}elif {
+ yyextra->lexing_if = 1;
+ yyextra->space_tokens = 0;
+ return HASH_ELIF;
+}
+
+{HASH}else {
+ yyextra->space_tokens = 0;
+ return HASH_ELSE;
+}
+
+{HASH}endif {
+ yyextra->space_tokens = 0;
+ return HASH_ENDIF;
+}
+}
+
+<SKIP>[^\n] ;
+
+{HASH}error.* {
+ char *p;
+ for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */
+ p += 5; /* skip "error" */
+ glcpp_error(yylloc, yyextra, "#error%s", p);
+}
+
+{HASH}define{HSPACE}+/{IDENTIFIER}"(" {
+ yyextra->space_tokens = 0;
+ return HASH_DEFINE_FUNC;
+}
+
+{HASH}define {
+ yyextra->space_tokens = 0;
+ return HASH_DEFINE_OBJ;
+}
+
+{HASH}undef {
+ yyextra->space_tokens = 0;
+ return HASH_UNDEF;
+}
+
+{HASH} {
+ yyextra->space_tokens = 0;
+ return HASH;
+}
+
+{DECIMAL_INTEGER} {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return INTEGER_STRING;
+}
+
+{OCTAL_INTEGER} {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return INTEGER_STRING;
+}
+
+{HEXADECIMAL_INTEGER} {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return INTEGER_STRING;
+}
+
+"<<" {
+ return LEFT_SHIFT;
+}
+
+">>" {
+ return RIGHT_SHIFT;
+}
+
+"<=" {
+ return LESS_OR_EQUAL;
+}
+
+">=" {
+ return GREATER_OR_EQUAL;
+}
+
+"==" {
+ return EQUAL;
+}
+
+"!=" {
+ return NOT_EQUAL;
+}
+
+"&&" {
+ return AND;
+}
+
+"||" {
+ return OR;
+}
+
+"##" {
+ return PASTE;
+}
+
+"defined" {
+ return DEFINED;
+}
+
+{IDENTIFIER} {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return IDENTIFIER;
+}
+
+{PUNCTUATION} {
+ return yytext[0];
+}
+
+{OTHER}+ {
+ yylval->str = ralloc_strdup (yyextra, yytext);
+ return OTHER;
+}
+
+{HSPACE}+ {
+ if (yyextra->space_tokens) {
+ return SPACE;
+ }
+}
+
+<SKIP,INITIAL>\n {
+ yyextra->lexing_if = 0;
+ yylineno++;
+ yycolumn = 0;
+ return NEWLINE;
+}
+
+ /* Handle missing newline at EOF. */
+<INITIAL><<EOF>> {
+ BEGIN DONE; /* Don't keep matching this rule forever. */
+ yyextra->lexing_if = 0;
+ return NEWLINE;
+}
+
+ /* We don't actually use the UNREACHABLE start condition. We
+ only have this action here so that we can pretend to call some
+ generated functions, (to avoid "defined but not used"
+ warnings. */
+<UNREACHABLE>. {
+ unput('.');
+ yy_top_state(yyextra);
+}
+
+%%
+
+void
+glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader)
+{
+ yy_scan_string(shader, parser->scanner);
+}
diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript
index 55a28d746..dbd6ebe9d 100644
--- a/mesalib/src/mesa/SConscript
+++ b/mesalib/src/mesa/SConscript
@@ -218,6 +218,10 @@ env.Append(YACCFLAGS = '-d')
program_lex = env.CFile('program/lex.yy.c', 'program/program_lexer.l')
program_parse = env.CFile('program/program_parse.tab.c',
'program/program_parse.y')
+
+# Make program/program_parse.tab.h reacheable from the include path
+env.Append(CPPPATH = [Dir('.').abspath])
+
program_sources = [
'program/arbprogparse.c',
'program/hash_table.c',
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index cfb6b348b..8db8ed865 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -487,6 +487,7 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MaxEnvParams = MAX_PROGRAM_ENV_PARAMS;
prog->MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS;
prog->MaxUniformComponents = 4 * MAX_UNIFORMS;
+ prog->MaxAddressOffset = MAX_PROGRAM_LOCAL_PARAMS;
switch (type) {
case GL_VERTEX_PROGRAM_ARB:
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c
index a9e8de8af..9de4e56fe 100644
--- a/mesalib/src/mesa/main/framebuffer.c
+++ b/mesalib/src/mesa/main/framebuffer.c
@@ -799,7 +799,7 @@ update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
/* This is a user-created framebuffer.
* Completeness only matters for user-created framebuffers.
*/
- if (fb->_Status == 0) {
+ if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) {
_mesa_test_framebuffer_completeness(ctx, fb);
}
}
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 38fc99817..d50f69fdf 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2573,6 +2573,7 @@ struct gl_program_constants
GLuint MaxAttribs;
GLuint MaxTemps;
GLuint MaxAddressRegs;
+ GLuint MaxAddressOffset; /**< [-MaxAddressOffset, MaxAddressOffset-1] */
GLuint MaxParameters;
GLuint MaxLocalParams;
GLuint MaxEnvParams;
diff --git a/mesalib/src/mesa/program/prog_instruction.h b/mesalib/src/mesa/program/prog_instruction.h
index 0a88e0d70..11f2ac53e 100644
--- a/mesalib/src/mesa/program/prog_instruction.h
+++ b/mesalib/src/mesa/program/prog_instruction.h
@@ -247,7 +247,7 @@ typedef enum prog_opcode {
* Number of bits for the src/dst register Index field.
* This limits the size of temp/uniform register files.
*/
-#define INST_INDEX_BITS 11
+#define INST_INDEX_BITS 12
/**
diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c
index 8bd26d0d7..6c97787e8 100644
--- a/mesalib/src/mesa/program/program.c
+++ b/mesalib/src/mesa/program/program.c
@@ -71,6 +71,9 @@ _mesa_init_program(struct gl_context *ctx)
ASSERT(ctx->Const.VertexProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS);
ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS);
+ ASSERT(ctx->Const.VertexProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS));
+ ASSERT(ctx->Const.FragmentProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS));
+
/* If this fails, increase prog_instruction::TexSrcUnit size */
ASSERT(MAX_TEXTURE_UNITS < (1 << 5));
diff --git a/mesalib/src/mesa/program/program_parse.y b/mesalib/src/mesa/program/program_parse.y
index a85977e2e..e63a9f1e1 100644
--- a/mesalib/src/mesa/program/program_parse.y
+++ b/mesalib/src/mesa/program/program_parse.y
@@ -935,7 +935,7 @@ addrRegRelOffset: { $$ = 0; }
addrRegPosOffset: INTEGER
{
- if (($1 < 0) || ($1 > 4095)) {
+ if (($1 < 0) || ($1 > (state->limits->MaxAddressOffset - 1))) {
char s[100];
_mesa_snprintf(s, sizeof(s),
"relative address offset too large (%d)", $1);
@@ -949,7 +949,7 @@ addrRegPosOffset: INTEGER
addrRegNegOffset: INTEGER
{
- if (($1 < 0) || ($1 > 4096)) {
+ if (($1 < 0) || ($1 > state->limits->MaxAddressOffset)) {
char s[100];
_mesa_snprintf(s, sizeof(s),
"relative address offset too large (%d)", $1);
diff --git a/mesalib/src/mesa/vbo/vbo_save_api.c b/mesalib/src/mesa/vbo/vbo_save_api.c
index d10d44139..52418788d 100644
--- a/mesalib/src/mesa/vbo/vbo_save_api.c
+++ b/mesalib/src/mesa/vbo/vbo_save_api.c
@@ -633,7 +633,7 @@ static void _save_reset_vertex( struct gl_context *ctx )
-#define ERROR(err) _mesa_compile_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+#define ERROR(err) _mesa_compile_error( ctx, err, __FUNCTION__ );
/* Only one size for each attribute may be active at once. Eg. if