aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-07 08:23:46 +0200
committermarha <marha@users.sourceforge.net>2013-10-07 08:23:46 +0200
commit81fd17c8678e89cea6610b8b2996b028b21eb5dc (patch)
treed2c201976b3cd000658870071ab7b533359de039 /mesalib
parent5593a3d2f370e3e12a043110bf2e395c938980d6 (diff)
downloadvcxsrv-81fd17c8678e89cea6610b8b2996b028b21eb5dc.tar.gz
vcxsrv-81fd17c8678e89cea6610b8b2996b028b21eb5dc.tar.bz2
vcxsrv-81fd17c8678e89cea6610b8b2996b028b21eb5dc.zip
xserver fontconfig libXdmcp mesa pixmand xkeyboard-config git update 7 oct 2013
xserver commit ccbe17b1c6da1ad9d085fc8133cdd15dc7004a4a xkeyboard-config commit c8326b7d12b20eccfd38d661b95d9b23d8a56e27 libXdmcp commit 089081dca4ba3598c6f9bf401c029378943b5854 pixman commit c89f4c826695dbb5df0817d84f845dbd3e28b7a7 fontconfig commit 604c2a683f1357fc65bad372b5d25a90099f827f mesa commit cfbfb50cb8d47b7f6975828b504936f9324f3b12
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/configure.ac1
-rw-r--r--mesalib/docs/GL3.txt10
-rw-r--r--mesalib/docs/index.html7
-rw-r--r--mesalib/docs/relnotes.html2
-rw-r--r--mesalib/docs/relnotes/9.1.7.html168
-rw-r--r--mesalib/docs/relnotes/9.2.1.html206
-rw-r--r--mesalib/docs/relnotes/9.3.html4
-rw-r--r--mesalib/scons/gallium.py2
-rw-r--r--mesalib/src/gallium/SConscript1
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c15
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_math.h52
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_pack_color.h8
-rw-r--r--mesalib/src/glsl/builtin_functions.cpp96
-rw-r--r--mesalib/src/glsl/glcpp/glcpp-parse.y3
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp1
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h2
-rw-r--r--mesalib/src/glsl/ir.cpp4
-rw-r--r--mesalib/src/glsl/ir.h7
-rw-r--r--mesalib/src/glsl/ir_clone.cpp5
-rw-r--r--mesalib/src/glsl/ir_constant_expression.cpp6
-rw-r--r--mesalib/src/glsl/ir_hv_accept.cpp7
-rw-r--r--mesalib/src/glsl/ir_print_visitor.cpp11
-rw-r--r--mesalib/src/glsl/ir_reader.cpp18
-rw-r--r--mesalib/src/glsl/ir_rvalue_visitor.cpp5
-rw-r--r--mesalib/src/glsl/link_uniforms.cpp4
-rw-r--r--mesalib/src/glsl/opt_tree_grafting.cpp6
-rw-r--r--mesalib/src/glsl/standalone_scaffolding.cpp1
-rw-r--r--mesalib/src/mesa/main/extensions.c1
-rw-r--r--mesalib/src/mesa/main/get_hash_params.py2
-rw-r--r--mesalib/src/mesa/main/mtypes.h1
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp3
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp3
32 files changed, 630 insertions, 32 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index e7c822338..954616318 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -1823,6 +1823,7 @@ if test "x$with_gallium_drivers" != x; then
if test "x$enable_dri" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
+ HAVE_COMMON_DRI=yes
fi
if test "x$enable_vdpau" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe"
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt
index b16ec6fdb..c269f19dd 100644
--- a/mesalib/docs/GL3.txt
+++ b/mesalib/docs/GL3.txt
@@ -100,7 +100,7 @@ GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe)
GL_ARB_draw_indirect started (Christoph)
GL_ARB_gpu_shader5 started
GL_ARB_gpu_shader_fp64 not started
-GL_ARB_sample_shading not started
+GL_ARB_sample_shading started (Anuj)
GL_ARB_shader_subroutine not started
GL_ARB_tessellation_shader not started
GL_ARB_texture_buffer_object_rgb32 DONE (i965, softpipe)
@@ -126,12 +126,12 @@ GL 4.2:
GLSL 4.2 not started
GL_ARB_texture_compression_bptc not started
GL_ARB_compressed_texture_pixel_storage not started
-GL_ARB_shader_atomic_counters not started
+GL_ARB_shader_atomic_counters in progress (Curro)
GL_ARB_texture_storage DONE (i965, r300, r600, swrast, gallium)
GL_ARB_transform_feedback_instanced DONE
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi)
GL_ARB_shader_image_load_store not started
-GL_ARB_conservative_depth DONE (softpipe)
+GL_ARB_conservative_depth DONE (i965, softpipe)
GL_ARB_shading_language_420pack DONE (i965, gallium)
GL_ARB_internalformat_query DONE (i965, gallium)
GL_ARB_map_buffer_alignment DONE (r300, r600, radeonsi)
@@ -145,7 +145,7 @@ ARB_ES3_compatibility DONE (i965)
ARB_clear_buffer_object not started
ARB_compute_shader started (gallium)
ARB_copy_image not started
-KHR_debug some work done (ARB_debug_output)
+KHR_debug DONE
ARB_explicit_uniform_location not started
ARB_fragment_layer_viewport not started
ARB_framebuffer_no_attachments not started
@@ -158,7 +158,7 @@ ARB_shader_image_size not started
ARB_shader_storage_buffer_object not started
ARB_stencil_texturing not started
ARB_texture_buffer_range DONE (nv50, nvc0)
-ARB_texture_query_levels not started
+ARB_texture_query_levels DONE (i965)
ARB_texture_storage_multisample DONE (i965)
ARB_texture_view not started
ARB_vertex_attrib_binding started (Fredrik)
diff --git a/mesalib/docs/index.html b/mesalib/docs/index.html
index 2f04335dc..3b9c4361c 100644
--- a/mesalib/docs/index.html
+++ b/mesalib/docs/index.html
@@ -16,6 +16,13 @@
<h1>News</h1>
+<h2>October 4, 2013</h2>
+<p>
+<a href="relnotes/9.2.1.html">Mesa 9.2.1</a> and
+<a href="relnotes/9.1.7.html">Mesa 9.1.7</a> are released,
+both bug-fix releases.
+</p>
+
<h2>August 27, 2013</h2>
<p>
<a href="relnotes/9.2.html">Mesa 9.2</a> is released.
diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html
index 7d6865ac3..5929359e0 100644
--- a/mesalib/docs/relnotes.html
+++ b/mesalib/docs/relnotes.html
@@ -22,7 +22,9 @@ The release notes summarize what's new or changed in each Mesa release.
<ul>
<li><a href="relnotes/9.3.html">9.3 release notes</a>
+<li><a href="relnotes/9.2.1.html">9.2.1 release notes</a>
<li><a href="relnotes/9.2.html">9.2 release notes</a>
+<li><a href="relnotes/9.1.7.html">9.1.7 release notes</a>
<li><a href="relnotes/9.1.6.html">9.1.6 release notes</a>
<li><a href="relnotes/9.1.5.html">9.1.5 release notes</a>
<li><a href="relnotes/9.1.4.html">9.1.4 release notes</a>
diff --git a/mesalib/docs/relnotes/9.1.7.html b/mesalib/docs/relnotes/9.1.7.html
new file mode 100644
index 000000000..36476977f
--- /dev/null
+++ b/mesalib/docs/relnotes/9.1.7.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Mesa Release Notes</title>
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+ <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 9.1.7 Release Notes / October 4, 2013</h1>
+
+<p>
+Mesa 9.1.7 is a bug fix release which fixes bugs found since the 9.1.6 release.
+</p>
+<p>
+Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.1. OpenGL
+3.1 is <strong>only</strong> available if requested at context creation
+because GL_ARB_compatibility is not supported.
+</p>
+
+<h2>MD5 checksums</h2>
+<pre>
+9e4abf7b7a6db762012c3c9917a8e8c7 MesaLib-9.1.7.tar.bz2
+f1d4d479d6ce12b9566fdb379960a912 MesaLib-9.1.7.tar.gz
+abd612bfc5dd478d04fcc630dd7672f2 MesaLib-9.1.7.zip
+</pre>
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+
+<p>This list is likely incomplete.</p>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55503">Bug 55503</a> - Constant vertex attributes broken</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61635">Bug 61635</a> - glVertexAttribPointer(id, GL_UNSIGNED_BYTE, GL_FALSE,...) does not work</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65958">Bug 65958</a> - GPU Lockup on Trinity 7500G</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66292">Bug 66292</a> - [SNB/IVB/HSW Bisected]Ogles3conform GL3Tests_depth24_depth24_basic.test fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67548">Bug 67548</a> - glGetAttribLocation seems to be broken</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68195">Bug 68195</a> - piglit tests vs-struct-pad and fs-struct-pad both fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68250">Bug 68250</a> - Automatic mipmap generation with texture compression produces borders that fade to black</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69525">Bug 69525</a> - [GM45, bisected] Piglit tex-shadow2drect fails</li>
+
+</ul>
+
+
+<h2>Changes</h2>
+
+<p>Alex Deucher (2):</p>
+<ul>
+ <li>r600g: disable GPUVM by default</li>
+ <li>radeon/winsys: pad IBs to a multiple of 8 DWs</li>
+</ul>
+
+<p>Andreas Boll (2):</p>
+<ul>
+ <li>docs: Fix a typo in the 9.1.6 release notes</li>
+ <li>mesa: Fix MESA_PATCH version</li>
+</ul>
+
+<p>Anuj Phogat (1):</p>
+<ul>
+ <li>meta: Fix blitting a framebuffer with renderbuffer attachment</li>
+</ul>
+
+<p>Carl Worth (5):</p>
+<ul>
+ <li>docs: Add 9.1.6 release md5sums</li>
+ <li>Use -Bsymbolic when linking libEGL.so</li>
+ <li>Update get-pick-list to look specifically for "9.1" in NOTE</li>
+ <li>cherry-ignore: Ignore last two patches in current get-pick-list output</li>
+ <li>Bump version to 9.1.7</li>
+</ul>
+
+<p>Chris Forbes (1):</p>
+<ul>
+ <li>i965/fs: Gen4: Zero out extra coordinates when using shadow compare</li>
+</ul>
+
+<p>Emil Velikov (2):</p>
+<ul>
+ <li>nv50: handle pure integer vertex attributes</li>
+ <li>nouveau: initialise the nouveau_transfer maps</li>
+</ul>
+
+<p>Eric Anholt (1):</p>
+<ul>
+ <li>i965/gen4: Fix fragment program rectangle texture shadow compares.</li>
+</ul>
+
+<p>Ian Romanick (11):</p>
+<ul>
+ <li>mesa: Remove stray debug printfs in attachment completeness code</li>
+ <li>mesa: Validate the layer selection of an array texture too</li>
+ <li>mesa/vbo: Fix handling of attribute 0 in non-compatibilty contexts</li>
+ <li>glsl: Add new overload of program_resource_visitor::visit_field method</li>
+ <li>glsl: Use alignment of container record for its first field</li>
+ <li>mesa: Remove all traces of GL_OES_matrix_get</li>
+ <li>mesa: Don't call driver RenderTexture for really broken textures</li>
+ <li>mesa: Don't call driver RenderTexture for invalid zoffset</li>
+ <li>mesa: Generate a renderbuffer wrapper even if the texture has no image</li>
+ <li>glsl: Move and refine test for unsized arrays in GLSL ES</li>
+ <li>mesa: Don't return any data for GL_SHADER_BINARY_FORMATS</li>
+</ul>
+
+<p>Ilia Mirkin (2):</p>
+<ul>
+ <li>nv30: U8_USCALED only works for size 4</li>
+ <li>nv30: remove no-longer-used formats from table</li>
+</ul>
+
+<p>Joakim Sindholt (1):</p>
+<ul>
+ <li>nvc0: fix blitctx memory leak</li>
+</ul>
+
+<p>Johannes Obermayr (1):</p>
+<ul>
+ <li>st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.</li>
+</ul>
+
+<p>Kenneth Graunke (1):</p>
+<ul>
+ <li>meta: Set correct viewport and projection in decompress_texture_image.</li>
+</ul>
+
+<p>Maarten Lankhorst (1):</p>
+<ul>
+ <li>nvc0: restore viewport after blit</li>
+</ul>
+
+<p>Rico Schüller (1):</p>
+<ul>
+ <li>glx: Initialize OpenGL version to 1.0</li>
+</ul>
+
+<p>Tiziano Bacocco (1):</p>
+<ul>
+ <li>nvc0/ir: fix use after free in texture barrier insertion pass</li>
+</ul>
+
+<p>Torsten Duwe (1):</p>
+<ul>
+ <li>wayland-egl.pc requires wayland-client.pc.</li>
+</ul>
+
+</div>
+</body>
+</html>
diff --git a/mesalib/docs/relnotes/9.2.1.html b/mesalib/docs/relnotes/9.2.1.html
new file mode 100644
index 000000000..f9909dd5c
--- /dev/null
+++ b/mesalib/docs/relnotes/9.2.1.html
@@ -0,0 +1,206 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Mesa Release Notes</title>
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+ <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 9.2.1 Release Notes / (October 4, 2013)</h1>
+
+<p>
+Mesa 9.2.1 is a bug fix release which fixes bugs found since the 9.2 release.
+</p>
+<p>
+Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.1. OpenGL
+3.1 is <strong>only</strong> available if requested at context creation
+because GL_ARB_compatibility is not supported.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+e6cdfa84dfddd86e3d36ec7ff4b6478a MesaLib-9.2.1.tar.gz
+dd4c82667d9c19c28a553b12eba3f8a0 MesaLib-9.2.1.tar.bz2
+d9af0f5607f7d275793d293057ca9ac6 MesaLib-9.2.1.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None</p>
+
+<h2>Bug fixes</h2>
+
+<p>This list is likely incomplete.</p>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66779">Bug 66779</a> - Use of uninitialized stack variable with brw_search_cache()</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68233">Bug 68233</a> - Valgrind errors in mesa</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68250">Bug 68250</a> - Automatic mipmap generation with texture compression produces borders that fade to black</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68637">Bug 68637</a> - [Bisected IVB/HSW]Unigine demo crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68753">Bug 68753</a> - [regression bisected] GLSL ES: structs members can't have precision qualifiers anymore in 9.2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69525">Bug 69525</a> - [GM45, bisected] Piglit tex-shadow2drect fails</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-9.2..mesa-9.2.1
+</pre>
+
+
+<p>Alex Deucher (1):</p>
+<ul>
+ <li>radeon/winsys: pad IBs to a multiple of 8 DWs</li>
+</ul>
+
+<p>Andreas Boll (1):</p>
+<ul>
+ <li>os: First check for __GLIBC__ and then for PIPE_OS_BSD</li>
+</ul>
+
+<p>Anuj Phogat (1):</p>
+<ul>
+ <li>glsl: Allow precision qualifiers for sampler types</li>
+</ul>
+
+<p>Brian Paul (2):</p>
+<ul>
+ <li>docs: minor fixes for 9.2 release notes</li>
+ <li>mesa: check for bufSize &gt; 0 in _mesa_GetSynciv()</li>
+</ul>
+
+<p>Carl Worth (3):</p>
+<ul>
+ <li>cherry-ignore: Ignore a commit which appeared twice on master</li>
+ <li>Use -Bsymbolic when linking libEGL.so</li>
+ <li>mesa: Bump version to 9.2.1</li>
+</ul>
+
+<p>Chris Forbes (3):</p>
+<ul>
+ <li>i965/fs: Gen4: Zero out extra coordinates when using shadow compare</li>
+ <li>i965: Fix cube array coordinate normalization</li>
+ <li>i965: fix bogus swizzle in brw_cubemap_normalize</li>
+</ul>
+
+<p>Christoph Bumiller (2):</p>
+<ul>
+ <li>nvc0/ir: add f32 long immediate cannot saturate</li>
+ <li>nvc0: delete compute object on screen destruction</li>
+</ul>
+
+<p>Dave Airlie (1):</p>
+<ul>
+ <li>st/mesa: don't dereference stObj-&gt;pt if NULL</li>
+</ul>
+
+<p>Dominik Behr (1):</p>
+<ul>
+ <li>glsl: propagate max_array_access through function calls</li>
+</ul>
+
+<p>Emil Velikov (1):</p>
+<ul>
+ <li>nouveau: initialise the nouveau_transfer maps</li>
+</ul>
+
+<p>Eric Anholt (4):</p>
+<ul>
+ <li>mesa: Rip out more extension checking from texformat.c.</li>
+ <li>mesa: Don't choose S3TC for generic compression if we can't compress.</li>
+ <li>i965/gen4: Fix fragment program rectangle texture shadow compares.</li>
+ <li>i965: Reenable glBitmap() after the sRGB winsys enabling.</li>
+</ul>
+
+<p>Ian Romanick (7):</p>
+<ul>
+ <li>docs: Add 9.2 release md5sums</li>
+ <li>Add .cherry-ignore file</li>
+ <li>mesa: Note that 89a665e should not be picked</li>
+ <li>glsl: Reallow precision qualifiers on structure members</li>
+ <li>mesa: Support GL_MAX_VERTEX_OUTPUT_COMPONENTS query with ES3</li>
+ <li>mesa: Remove all traces of GL_OES_matrix_get</li>
+ <li>mesa: Don't return any data for GL_SHADER_BINARY_FORMATS</li>
+</ul>
+
+<p>Ilia Mirkin (2):</p>
+<ul>
+ <li>nv30: find first unused texcoord rather than bailing if first is used</li>
+ <li>nv30: fix inconsistent setting of push-&gt;user_priv</li>
+</ul>
+
+<p>Joakim Sindholt (1):</p>
+<ul>
+ <li>nvc0: fix blitctx memory leak</li>
+</ul>
+
+<p>Johannes Obermayr (1):</p>
+<ul>
+ <li>st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.</li>
+</ul>
+
+<p>Kenneth Graunke (5):</p>
+<ul>
+ <li>i965/vs: Detect GRF sources in split_virtual_grfs send-from-GRF code.</li>
+ <li>i965/fs: Detect GRF sources in split_virtual_grfs send-from-GRF code.</li>
+ <li>i965/vec4: Only zero out unused message components when there are any.</li>
+ <li>i965: Fix brw_vs_prog_data_compare to actually check field members.</li>
+ <li>meta: Set correct viewport and projection in decompress_texture_image.</li>
+</ul>
+
+<p>Maarten Lankhorst (2):</p>
+<ul>
+ <li>st/dri: do not create a new context for msaa copy</li>
+ <li>nvc0: restore viewport after blit</li>
+</ul>
+
+<p>Marek Olšák (2):</p>
+<ul>
+ <li>r600g: fix constant buffer cache flushing</li>
+ <li>r600g: fix texture buffer object cache flushing</li>
+</ul>
+
+<p>Paul Berry (1):</p>
+<ul>
+ <li>i965: Initialize inout_offset parameter to brw_search_cache().</li>
+</ul>
+
+<p>Rico Schüller (1):</p>
+<ul>
+ <li>glx: Initialize OpenGL version to 1.0</li>
+</ul>
+
+<p>Tiziano Bacocco (1):</p>
+<ul>
+ <li>nvc0/ir: fix use after free in texture barrier insertion pass</li>
+</ul>
+
+<p>Torsten Duwe (1):</p>
+<ul>
+ <li>wayland-egl.pc requires wayland-client.pc.</li>
+</ul>
+
+</div>
+</body>
+</html>
diff --git a/mesalib/docs/relnotes/9.3.html b/mesalib/docs/relnotes/9.3.html
index 1b34a9a45..58a88b036 100644
--- a/mesalib/docs/relnotes/9.3.html
+++ b/mesalib/docs/relnotes/9.3.html
@@ -45,6 +45,10 @@ Note: some of the new features are only available with certain drivers.
<ul>
<li>GL_AMD_seamless_cubemap_per_texture on i965.</li>
+<li>GL_ARB_conservative_depth on i965.</li>
+<li>GL_ARB_texture_gather on i965.</li>
+<li>GL_ARB_texture_query_levels on i965.</li>
+<li>GL_KHR_debug</li>
</ul>
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index 2e341e99f..5b20f3ff6 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -506,6 +506,8 @@ def generate(env):
libs += ['m', 'pthread', 'dl']
if env['platform'] in ('linux',):
libs += ['rt']
+ if env['platform'] in ('haiku'):
+ libs += ['root', 'be', 'network']
env.Append(LIBS = libs)
# OpenMP
diff --git a/mesalib/src/gallium/SConscript b/mesalib/src/gallium/SConscript
index ca75f37f9..9a25ccafb 100644
--- a/mesalib/src/gallium/SConscript
+++ b/mesalib/src/gallium/SConscript
@@ -122,6 +122,7 @@ if not env['embedded']:
if env['platform'] == 'haiku':
SConscript([
'targets/haiku-softpipe/SConscript',
+ 'targets/libgl-haiku/SConscript',
])
if env['dri']:
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c
index be839d439..a51b9ef20 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c
@@ -528,9 +528,10 @@ static void blitter_restore_textures(struct blitter_context_priv *ctx)
unsigned i;
/* Fragment sampler states. */
- pipe->bind_fragment_sampler_states(pipe,
- ctx->base.saved_num_sampler_states,
- ctx->base.saved_sampler_states);
+ pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
+ ctx->base.saved_num_sampler_states,
+ ctx->base.saved_sampler_states);
+
ctx->base.saved_num_sampler_states = ~0;
/* Fragment sampler views. */
@@ -1309,7 +1310,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
views[1] = pipe->create_sampler_view(pipe, src->texture, &templ);
pipe->set_fragment_sampler_views(pipe, 2, views);
- pipe->bind_fragment_sampler_states(pipe, 2, samplers);
+ pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0, 2, samplers);
pipe_sampler_view_reference(&views[1], NULL);
} else if (blit_stencil) {
@@ -1324,12 +1325,14 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
view = pipe->create_sampler_view(pipe, src->texture, &templ);
pipe->set_fragment_sampler_views(pipe, 1, &view);
- pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state);
+ pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT,
+ 0, 1, &sampler_state);
pipe_sampler_view_reference(&view, NULL);
} else {
pipe->set_fragment_sampler_views(pipe, 1, &src);
- pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state);
+ pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT,
+ 0, 1, &sampler_state);
}
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h
index 702d4e9d4..478a4aa4d 100644
--- a/mesalib/src/gallium/auxiliary/util/u_math.h
+++ b/mesalib/src/gallium/auxiliary/util/u_math.h
@@ -162,7 +162,59 @@ float log2f(float f)
#endif
+#if __STDC_VERSION__ < 199901L && !defined(__cplusplus)
+static INLINE long int
+lrint(double d)
+{
+ long int rounded = (long int)(d + 0.5);
+
+ if (d - floor(d) == 0.5) {
+ if (rounded % 2 != 0)
+ rounded += (d > 0) ? -1 : 1;
+ }
+
+ return rounded;
+}
+
+static INLINE long int
+lrintf(float f)
+{
+ long int rounded = (long int)(f + 0.5f);
+
+ if (f - floorf(f) == 0.5f) {
+ if (rounded % 2 != 0)
+ rounded += (f > 0) ? -1 : 1;
+ }
+
+ return rounded;
+}
+static INLINE long long int
+llrint(double d)
+{
+ long long int rounded = (long long int)(d + 0.5);
+
+ if (d - floor(d) == 0.5) {
+ if (rounded % 2 != 0)
+ rounded += (d > 0) ? -1 : 1;
+ }
+
+ return rounded;
+}
+
+static INLINE long long int
+llrintf(float f)
+{
+ long long int rounded = (long long int)(f + 0.5f);
+
+ if (f - floorf(f) == 0.5f) {
+ if (rounded % 2 != 0)
+ rounded += (f > 0) ? -1 : 1;
+ }
+
+ return rounded;
+}
+#endif /* C99 */
#define POW2_TABLE_SIZE_LOG2 9
#define POW2_TABLE_SIZE (1 << POW2_TABLE_SIZE_LOG2)
diff --git a/mesalib/src/gallium/auxiliary/util/u_pack_color.h b/mesalib/src/gallium/auxiliary/util/u_pack_color.h
index 102ad6051..36252738d 100644
--- a/mesalib/src/gallium/auxiliary/util/u_pack_color.h
+++ b/mesalib/src/gallium/auxiliary/util/u_pack_color.h
@@ -528,12 +528,12 @@ util_pack_z(enum pipe_format format, double z)
case PIPE_FORMAT_Z16_UNORM:
if (z == 1.0)
return 0xffff;
- return (uint32_t) (z * 0xffff);
+ return (uint32_t) lrint(z * 0xffff);
case PIPE_FORMAT_Z32_UNORM:
/* special-case to avoid overflow */
if (z == 1.0)
return 0xffffffff;
- return (uint32_t) (z * 0xffffffff);
+ return (uint32_t) llrint(z * 0xffffffff);
case PIPE_FORMAT_Z32_FLOAT:
fui.f = (float)z;
return fui.ui;
@@ -541,12 +541,12 @@ util_pack_z(enum pipe_format format, double z)
case PIPE_FORMAT_Z24X8_UNORM:
if (z == 1.0)
return 0xffffff;
- return (uint32_t) (z * 0xffffff);
+ return (uint32_t) lrint(z * 0xffffff);
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
if (z == 1.0)
return 0xffffff00;
- return ((uint32_t) (z * 0xffffff)) << 8;
+ return ((uint32_t) lrint(z * 0xffffff)) << 8;
case PIPE_FORMAT_S8_UINT:
/* this case can get it via util_pack_z_stencil() */
return 0;
diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp
index df735ef31..b6451089c 100644
--- a/mesalib/src/glsl/builtin_functions.cpp
+++ b/mesalib/src/glsl/builtin_functions.cpp
@@ -256,6 +256,13 @@ texture_cube_map_array(const _mesa_glsl_parse_state *state)
}
static bool
+texture_query_levels(const _mesa_glsl_parse_state *state)
+{
+ return state->is_version(430, 0) ||
+ state->ARB_texture_query_levels_enable;
+}
+
+static bool
texture_query_lod(const _mesa_glsl_parse_state *state)
{
return state->target == fragment_shader &&
@@ -266,7 +273,8 @@ static bool
texture_gather(const _mesa_glsl_parse_state *state)
{
return state->is_version(400, 0) ||
- state->ARB_texture_gather_enable;
+ state->ARB_texture_gather_enable ||
+ state->ARB_gpu_shader5_enable;
}
/* Desktop GL or OES_standard_derivatives + fragment shader only */
@@ -486,6 +494,7 @@ private:
/** Flags to _texture() */
#define TEX_PROJECT 1
#define TEX_OFFSET 2
+#define TEX_COMPONENT 4
ir_function_signature *_texture(ir_texture_opcode opcode,
builtin_available_predicate avail,
@@ -504,6 +513,7 @@ private:
B0(EndPrimitive)
B2(textureQueryLod);
+ B1(textureQueryLevels);
B1(dFdx);
B1(dFdy);
B1(fwidth);
@@ -1603,6 +1613,39 @@ builtin_builder::create_builtins()
_textureQueryLod(glsl_type::samplerCubeArrayShadow_type, glsl_type::vec3_type),
NULL);
+ add_function("textureQueryLevels",
+ _textureQueryLevels(glsl_type::sampler1D_type),
+ _textureQueryLevels(glsl_type::sampler2D_type),
+ _textureQueryLevels(glsl_type::sampler3D_type),
+ _textureQueryLevels(glsl_type::samplerCube_type),
+ _textureQueryLevels(glsl_type::sampler1DArray_type),
+ _textureQueryLevels(glsl_type::sampler2DArray_type),
+ _textureQueryLevels(glsl_type::samplerCubeArray_type),
+ _textureQueryLevels(glsl_type::sampler1DShadow_type),
+ _textureQueryLevels(glsl_type::sampler2DShadow_type),
+ _textureQueryLevels(glsl_type::samplerCubeShadow_type),
+ _textureQueryLevels(glsl_type::sampler1DArrayShadow_type),
+ _textureQueryLevels(glsl_type::sampler2DArrayShadow_type),
+ _textureQueryLevels(glsl_type::samplerCubeArrayShadow_type),
+
+ _textureQueryLevels(glsl_type::isampler1D_type),
+ _textureQueryLevels(glsl_type::isampler2D_type),
+ _textureQueryLevels(glsl_type::isampler3D_type),
+ _textureQueryLevels(glsl_type::isamplerCube_type),
+ _textureQueryLevels(glsl_type::isampler1DArray_type),
+ _textureQueryLevels(glsl_type::isampler2DArray_type),
+ _textureQueryLevels(glsl_type::isamplerCubeArray_type),
+
+ _textureQueryLevels(glsl_type::usampler1D_type),
+ _textureQueryLevels(glsl_type::usampler2D_type),
+ _textureQueryLevels(glsl_type::usampler3D_type),
+ _textureQueryLevels(glsl_type::usamplerCube_type),
+ _textureQueryLevels(glsl_type::usampler1DArray_type),
+ _textureQueryLevels(glsl_type::usampler2DArray_type),
+ _textureQueryLevels(glsl_type::usamplerCubeArray_type),
+
+ NULL);
+
add_function("texture1D",
_texture(ir_tex, v110, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
_texture(ir_txb, v110_fs_only, glsl_type::vec4_type, glsl_type::sampler1D_type, glsl_type::float_type),
@@ -1828,6 +1871,10 @@ builtin_builder::create_builtins()
_texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type),
_texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type),
+ _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec2_type),
+ _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec2_type),
+ _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec2_type),
+
_texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type),
_texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type),
_texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type),
@@ -1839,6 +1886,26 @@ builtin_builder::create_builtins()
_texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type),
_texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type),
_texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type),
+
+ _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usampler2D_type, glsl_type::vec2_type, TEX_COMPONENT),
+
+ _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::sampler2DRect_type, glsl_type::vec2_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isampler2DRect_type, glsl_type::vec2_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usampler2DRect_type, glsl_type::vec2_type, TEX_COMPONENT),
+
+ _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::sampler2DArray_type, glsl_type::vec3_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isampler2DArray_type, glsl_type::vec3_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usampler2DArray_type, glsl_type::vec3_type, TEX_COMPONENT),
+
+ _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::samplerCube_type, glsl_type::vec3_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type, TEX_COMPONENT),
+
+ _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
+ _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
NULL);
add_function("textureGatherOffset",
@@ -3281,6 +3348,18 @@ builtin_builder::_texture(ir_texture_opcode opcode,
tex->offset = var_ref(offset);
}
+ if (opcode == ir_tg4) {
+ if (flags & TEX_COMPONENT) {
+ ir_variable *component =
+ new(mem_ctx) ir_variable(glsl_type::int_type, "comp", ir_var_const_in);
+ sig->parameters.push_tail(component);
+ tex->lod_info.component = var_ref(component);
+ }
+ else {
+ tex->lod_info.component = imm(0);
+ }
+ }
+
/* The "bias" parameter comes /after/ the "offset" parameter, which is
* inconsistent with both textureLodOffset and textureGradOffset.
*/
@@ -3393,6 +3472,21 @@ builtin_builder::_textureQueryLod(const glsl_type *sampler_type,
return sig;
}
+ir_function_signature *
+builtin_builder::_textureQueryLevels(const glsl_type *sampler_type)
+{
+ ir_variable *s = in_var(sampler_type, "sampler");
+ const glsl_type *return_type = glsl_type::int_type;
+ MAKE_SIG(return_type, texture_query_levels, 1, s);
+
+ ir_texture *tex = new(mem_ctx) ir_texture(ir_query_levels);
+ tex->set_sampler(var_ref(s), return_type);
+
+ body.emit(ret(tex));
+
+ return sig;
+}
+
UNOP(dFdx, ir_unop_dFdx, fs_oes_derivatives)
UNOP(dFdy, ir_unop_dFdy, fs_oes_derivatives)
diff --git a/mesalib/src/glsl/glcpp/glcpp-parse.y b/mesalib/src/glsl/glcpp/glcpp-parse.y
index c7ad3e958..02100ab0c 100644
--- a/mesalib/src/glsl/glcpp/glcpp-parse.y
+++ b/mesalib/src/glsl/glcpp/glcpp-parse.y
@@ -1234,6 +1234,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
if (extensions->ARB_texture_multisample)
add_builtin_define(parser, "GL_ARB_texture_multisample", 1);
+ if (extensions->ARB_texture_query_levels)
+ add_builtin_define(parser, "GL_ARB_texture_query_levels", 1);
+
if (extensions->ARB_texture_query_lod)
add_builtin_define(parser, "GL_ARB_texture_query_lod", 1);
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index 7368a7156..ad85db9e3 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -518,6 +518,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(ARB_shading_language_packing, true, false, ARB_shading_language_packing),
EXT(ARB_shading_language_420pack, true, false, ARB_shading_language_420pack),
EXT(ARB_texture_multisample, true, false, ARB_texture_multisample),
+ EXT(ARB_texture_query_levels, true, false, ARB_texture_query_levels),
EXT(ARB_texture_query_lod, true, false, ARB_texture_query_lod),
EXT(ARB_gpu_shader5, true, false, ARB_gpu_shader5),
EXT(AMD_vertex_shader_layer, true, false, AMD_vertex_shader_layer),
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 9c3e88721..dba1a35e5 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -304,6 +304,8 @@ struct _mesa_glsl_parse_state {
bool ARB_shading_language_packing_warn;
bool ARB_texture_multisample_enable;
bool ARB_texture_multisample_warn;
+ bool ARB_texture_query_levels_enable;
+ bool ARB_texture_query_levels_warn;
bool ARB_texture_query_lod_enable;
bool ARB_texture_query_lod_warn;
bool ARB_gpu_shader5_enable;
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index 81c6380ca..ae67d6bdd 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -1374,7 +1374,7 @@ ir_dereference::is_lvalue() const
}
-static const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txf_ms", "txs", "lod", "tg4" };
+static const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txf_ms", "txs", "lod", "tg4", "query_levels" };
const char *ir_texture::opcode_string()
{
@@ -1403,7 +1403,7 @@ ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type)
this->sampler = sampler;
this->type = type;
- if (this->op == ir_txs) {
+ if (this->op == ir_txs || this->op == ir_query_levels) {
assert(type->base_type == GLSL_TYPE_INT);
} else if (this->op == ir_lod) {
assert(type->vector_elements == 2);
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index 885837a7a..1a4a3a2e3 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -1560,7 +1560,8 @@ enum ir_texture_opcode {
ir_txf_ms, /**< Multisample texture fetch */
ir_txs, /**< Texture size */
ir_lod, /**< Texture lod query */
- ir_tg4 /**< Texture gather */
+ ir_tg4, /**< Texture gather */
+ ir_query_levels /**< Texture levels query */
};
@@ -1585,7 +1586,8 @@ enum ir_texture_opcode {
* <type> <sampler> <coordinate> <sample_index>)
* (txs <type> <sampler> <lod>)
* (lod <type> <sampler> <coordinate>)
- * (tg4 <type> <sampler> <coordinate> 0)
+ * (tg4 <type> <sampler> <coordinate> <offset> <component>)
+ * (query_levels <type> <sampler>)
*/
class ir_texture : public ir_rvalue {
public:
@@ -1653,6 +1655,7 @@ public:
ir_rvalue *lod; /**< Floating point LOD */
ir_rvalue *bias; /**< Floating point LOD bias */
ir_rvalue *sample_index; /**< MSAA sample index */
+ ir_rvalue *component; /**< Gather component selector */
struct {
ir_rvalue *dPdx; /**< Partial derivative of coordinate wrt X */
ir_rvalue *dPdy; /**< Partial derivative of coordinate wrt Y */
diff --git a/mesalib/src/glsl/ir_clone.cpp b/mesalib/src/glsl/ir_clone.cpp
index fe531a8e3..dde22e018 100644
--- a/mesalib/src/glsl/ir_clone.cpp
+++ b/mesalib/src/glsl/ir_clone.cpp
@@ -248,7 +248,7 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
switch (this->op) {
case ir_tex:
case ir_lod:
- case ir_tg4:
+ case ir_query_levels:
break;
case ir_txb:
new_tex->lod_info.bias = this->lod_info.bias->clone(mem_ctx, ht);
@@ -265,6 +265,9 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
new_tex->lod_info.grad.dPdx = this->lod_info.grad.dPdx->clone(mem_ctx, ht);
new_tex->lod_info.grad.dPdy = this->lod_info.grad.dPdy->clone(mem_ctx, ht);
break;
+ case ir_tg4:
+ new_tex->lod_info.component = this->lod_info.component->clone(mem_ctx, ht);
+ break;
}
return new_tex;
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index 12641e5df..0efd1d5b3 100644
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -45,6 +45,12 @@ static int isnormal(double x)
{
return _fpclass(x) == _FPCLASS_NN || _fpclass(x) == _FPCLASS_PN;
}
+#elif defined(__SUNPRO_CC)
+#include <ieeefp.h>
+static int isnormal(double x)
+{
+ return fpclass(x) == FP_NORMAL;
+}
#endif
#if defined(_MSC_VER)
diff --git a/mesalib/src/glsl/ir_hv_accept.cpp b/mesalib/src/glsl/ir_hv_accept.cpp
index 3877e721c..941b25e97 100644
--- a/mesalib/src/glsl/ir_hv_accept.cpp
+++ b/mesalib/src/glsl/ir_hv_accept.cpp
@@ -214,7 +214,7 @@ ir_texture::accept(ir_hierarchical_visitor *v)
switch (this->op) {
case ir_tex:
case ir_lod:
- case ir_tg4:
+ case ir_query_levels:
break;
case ir_txb:
s = this->lod_info.bias->accept(v);
@@ -242,6 +242,11 @@ ir_texture::accept(ir_hierarchical_visitor *v)
if (s != visit_continue)
return (s == visit_continue_with_parent) ? visit_continue : s;
break;
+ case ir_tg4:
+ s = this->lod_info.component->accept(v);
+ if (s != visit_continue)
+ return (s == visit_continue_with_parent) ? visit_continue : s;
+ break;
}
return (s == visit_stop) ? s : v->visit_leave(this);
diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp
index 2c06b95f6..f85e573c4 100644
--- a/mesalib/src/glsl/ir_print_visitor.cpp
+++ b/mesalib/src/glsl/ir_print_visitor.cpp
@@ -252,7 +252,7 @@ void ir_print_visitor::visit(ir_texture *ir)
ir->sampler->accept(this);
printf(" ");
- if (ir->op != ir_txs) {
+ if (ir->op != ir_txs && ir->op != ir_query_levels) {
ir->coordinate->accept(this);
printf(" ");
@@ -266,7 +266,9 @@ void ir_print_visitor::visit(ir_texture *ir)
printf(" ");
}
- if (ir->op != ir_txf && ir->op != ir_txf_ms && ir->op != ir_txs && ir->op != ir_tg4) {
+ if (ir->op != ir_txf && ir->op != ir_txf_ms &&
+ ir->op != ir_txs && ir->op != ir_tg4 &&
+ ir->op != ir_query_levels) {
if (ir->projector)
ir->projector->accept(this);
else
@@ -285,7 +287,7 @@ void ir_print_visitor::visit(ir_texture *ir)
{
case ir_tex:
case ir_lod:
- case ir_tg4:
+ case ir_query_levels:
break;
case ir_txb:
ir->lod_info.bias->accept(this);
@@ -305,6 +307,9 @@ void ir_print_visitor::visit(ir_texture *ir)
ir->lod_info.grad.dPdy->accept(this);
printf(")");
break;
+ case ir_tg4:
+ ir->lod_info.component->accept(this);
+ break;
};
printf(")");
}
diff --git a/mesalib/src/glsl/ir_reader.cpp b/mesalib/src/glsl/ir_reader.cpp
index 8038b8f5d..00e2db9a3 100644
--- a/mesalib/src/glsl/ir_reader.cpp
+++ b/mesalib/src/glsl/ir_reader.cpp
@@ -934,6 +934,7 @@ ir_reader::read_texture(s_expression *expr)
s_list *s_shadow = NULL;
s_expression *s_lod = NULL;
s_expression *s_sample_index = NULL;
+ s_expression *s_component = NULL;
ir_texture_opcode op = ir_tex; /* silence warning */
@@ -948,7 +949,9 @@ ir_reader::read_texture(s_expression *expr)
s_pattern txs_pattern[] =
{ "txs", s_type, s_sampler, s_lod };
s_pattern tg4_pattern[] =
- { "tg4", s_type, s_sampler, s_coord, s_offset };
+ { "tg4", s_type, s_sampler, s_coord, s_offset, s_component };
+ s_pattern query_levels_pattern[] =
+ { "query_levels", s_type, s_sampler };
s_pattern other_pattern[] =
{ tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod };
@@ -964,6 +967,8 @@ ir_reader::read_texture(s_expression *expr)
op = ir_txs;
} else if (MATCH(expr, tg4_pattern)) {
op = ir_tg4;
+ } else if (MATCH(expr, query_levels_pattern)) {
+ op = ir_query_levels;
} else if (MATCH(expr, other_pattern)) {
op = ir_texture::get_opcode(tag->value());
if (op == -1)
@@ -1014,7 +1019,9 @@ ir_reader::read_texture(s_expression *expr)
}
}
- if (op != ir_txf && op != ir_txf_ms && op != ir_txs && op != ir_lod && op != ir_tg4) {
+ if (op != ir_txf && op != ir_txf_ms &&
+ op != ir_txs && op != ir_lod && op != ir_tg4 &&
+ op != ir_query_levels) {
s_int *proj_as_int = SX_AS_INT(s_proj);
if (proj_as_int && proj_as_int->value() == 1) {
tex->projector = NULL;
@@ -1083,6 +1090,13 @@ ir_reader::read_texture(s_expression *expr)
}
break;
}
+ case ir_tg4:
+ tex->lod_info.component = read_rvalue(s_component);
+ if (tex->lod_info.component == NULL) {
+ ir_read_error(NULL, "when reading component in (tg4 ...)");
+ return NULL;
+ }
+ break;
default:
// tex and lod don't have any extra parameters.
break;
diff --git a/mesalib/src/glsl/ir_rvalue_visitor.cpp b/mesalib/src/glsl/ir_rvalue_visitor.cpp
index 4c3d81320..9d8ccd94a 100644
--- a/mesalib/src/glsl/ir_rvalue_visitor.cpp
+++ b/mesalib/src/glsl/ir_rvalue_visitor.cpp
@@ -57,7 +57,7 @@ ir_rvalue_base_visitor::rvalue_visit(ir_texture *ir)
switch (ir->op) {
case ir_tex:
case ir_lod:
- case ir_tg4:
+ case ir_query_levels:
break;
case ir_txb:
handle_rvalue(&ir->lod_info.bias);
@@ -74,6 +74,9 @@ ir_rvalue_base_visitor::rvalue_visit(ir_texture *ir)
handle_rvalue(&ir->lod_info.grad.dPdx);
handle_rvalue(&ir->lod_info.grad.dPdy);
break;
+ case ir_tg4:
+ handle_rvalue(&ir->lod_info.component);
+ break;
}
return visit_continue;
diff --git a/mesalib/src/glsl/link_uniforms.cpp b/mesalib/src/glsl/link_uniforms.cpp
index 03cbcd1ce..1cdd5a922 100644
--- a/mesalib/src/glsl/link_uniforms.cpp
+++ b/mesalib/src/glsl/link_uniforms.cpp
@@ -140,8 +140,8 @@ program_resource_visitor::recursion(const glsl_type *t, char **name,
/* Append the subscript to the current variable name */
ralloc_asprintf_rewrite_tail(name, &new_length, "[%u]", i);
- recursion(t->fields.array, name, new_length,
- t->fields.structure[i].row_major, record_type);
+ recursion(t->fields.array, name, new_length, row_major,
+ record_type);
/* Only the first leaf-field of the record gets called with the
* record type pointer.
diff --git a/mesalib/src/glsl/opt_tree_grafting.cpp b/mesalib/src/glsl/opt_tree_grafting.cpp
index 03b920d8a..46c06e6c4 100644
--- a/mesalib/src/glsl/opt_tree_grafting.cpp
+++ b/mesalib/src/glsl/opt_tree_grafting.cpp
@@ -275,7 +275,7 @@ ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
switch (ir->op) {
case ir_tex:
case ir_lod:
- case ir_tg4:
+ case ir_query_levels:
break;
case ir_txb:
if (do_graft(&ir->lod_info.bias))
@@ -296,6 +296,10 @@ ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
do_graft(&ir->lod_info.grad.dPdy))
return visit_stop;
break;
+ case ir_tg4:
+ if (do_graft(&ir->lod_info.component))
+ return visit_stop;
+ break;
}
return visit_continue;
diff --git a/mesalib/src/glsl/standalone_scaffolding.cpp b/mesalib/src/glsl/standalone_scaffolding.cpp
index b03734c06..3b64f2cfc 100644
--- a/mesalib/src/glsl/standalone_scaffolding.cpp
+++ b/mesalib/src/glsl/standalone_scaffolding.cpp
@@ -103,6 +103,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.OES_standard_derivatives = true;
ctx->Extensions.ARB_texture_cube_map_array = true;
ctx->Extensions.ARB_texture_multisample = true;
+ ctx->Extensions.ARB_texture_query_levels = true;
ctx->Extensions.ARB_texture_query_lod = true;
ctx->Extensions.ARB_gpu_shader5 = true;
ctx->Extensions.ARB_texture_gather = true;
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index c0f17c5fd..2507fdf34 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -146,6 +146,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_texture_mirrored_repeat", o(dummy_true), GLL, 2001 },
{ "GL_ARB_texture_multisample", o(ARB_texture_multisample), GL, 2009 },
{ "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), GL, 2003 },
+ { "GL_ARB_texture_query_levels", o(ARB_texture_query_levels), GL, 2012 },
{ "GL_ARB_texture_query_lod", o(ARB_texture_query_lod), GL, 2009 },
{ "GL_ARB_texture_rectangle", o(NV_texture_rectangle), GL, 2004 },
{ "GL_ARB_texture_rgb10_a2ui", o(ARB_texture_rgb10_a2ui), GL, 2009 },
diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py
index e80a23c11..9c54af094 100644
--- a/mesalib/src/mesa/main/get_hash_params.py
+++ b/mesalib/src/mesa/main/get_hash_params.py
@@ -303,7 +303,7 @@ descriptor=[
[ "MAX_VERTEX_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2" ],
[ "MAX_FRAGMENT_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2" ],
[ "NUM_SHADER_BINARY_FORMATS", "CONST(0), extra_ARB_ES2_compatibility_api_es2" ],
- [ "SHADER_BINARY_FORMATS", "CONST(0), extra_ARB_ES2_compatibility_api_es2" ],
+ [ "SHADER_BINARY_FORMATS", "LOC_CUSTOM, TYPE_INVALID, 0, extra_ARB_ES2_compatibility_api_es2" ],
# GL_ARB_get_program_binary / GL_OES_get_program_binary
[ "NUM_PROGRAM_BINARY_FORMATS", "CONST(0), NO_EXTRA" ],
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 514f81048..15893ecac 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -3220,6 +3220,7 @@ struct gl_extensions
GLboolean ARB_texture_gather;
GLboolean ARB_texture_multisample;
GLboolean ARB_texture_non_power_of_two;
+ GLboolean ARB_texture_query_levels;
GLboolean ARB_texture_query_lod;
GLboolean ARB_texture_rg;
GLboolean ARB_texture_rgb10_a2ui;
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index f180a7f64..6b22b5074 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -2069,6 +2069,9 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
case ir_tg4:
assert(!"Unexpected ir_tg4 opcode");
break;
+ case ir_query_levels:
+ assert(!"Unexpected ir_query_levels opcode");
+ break;
}
const glsl_type *sampler_type = ir->sampler->type;
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index a5d0b84e3..d1706ca27 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2788,6 +2788,9 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
case ir_lod:
assert(!"Unexpected ir_lod opcode");
break;
+ case ir_tg4:
+ assert(!"Unexpected ir_tg4 opcode");
+ break;
}
if (ir->projector) {