[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #9 from Natanael Copa --- I don't think musl libc intend to implement the special handling for mesa as described in http://www.redhat.com/archives/phil-list/2003-February/msg00077.html I think they intend to implement gnu2 tls dialec

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 Alexander Monakov changed: What|Removed |Added CC||amona...@gmail.com --- Comment #10 f

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #11 from Natanael Copa --- (In reply to comment #10) > Nowadays nVidia- and AMD-supplied libGL.so's use initial-exec TLS as well > (at least on 32-bit x86). the closed source libGL.sos are linked to GNU libc and is not really expecte

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #12 from Natanael Copa --- Created attachment 92975 --> https://bugs.freedesktop.org/attachment.cgi?id=92975&action=edit gltest.c testcase. To reproduce, dlopen ./gltest.so and call gltest(). -- You are receiving this mail becaus

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #13 from Natanael Copa --- Created attachment 92976 --> https://bugs.freedesktop.org/attachment.cgi?id=92976&action=edit app.c app that call gltest() in a dlopened gltest.so -- You are receiving this mail because: You are the ass

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #14 from Natanael Copa --- Created attachment 92977 --> https://bugs.freedesktop.org/attachment.cgi?id=92977&action=edit Makefile Makefile for app.c and gltest.c -- You are receiving this mail because: You are the assignee for th

[Mesa-dev] [PATCH] R600/SI: Fix fneg for 0.0

2014-01-29 Thread Michel Dänzer
From: Michel Dänzer V_ADD_F32 with source modifier does not produce -0.0 for this. Just manipulate the sign bit directly instead. Also add a pattern for (fneg (fabs ...)). Fixes a bunch of bit encoding piglit tests with radeonsi. Signed-off-by: Michel Dänzer --- lib/Target/R600/SIInstruction

[Mesa-dev] [PATCH 01/10] glsl: memory_writer helper class for data serialization

2014-01-29 Thread Tapani Pälli
Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_writer.h | 188 +++ 1 file changed, 188 insertions(+) create mode 100644 src/glsl/memory_writer.h diff --git a/src/glsl/memory_writer.h b/sr

[Mesa-dev] [PATCH 05/10] glsl: export populate_symbol_table function

2014-01-29 Thread Tapani Pälli
Binary shader cache needs this to allocate and fill gl_shader symbol table. Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 2 +- src/glsl/linker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 93b4754..dfe431d 1006

[Mesa-dev] [PATCH 04/10] glsl: add MESA_SHADER_CACHE_MAGIC string for shader binary cache

2014-01-29 Thread Tapani Pälli
Patch adds a string that can be used by binary cache to identify that shader binaries were generated with exact same Mesa library. Signed-off-by: Tapani Pälli --- src/glsl/shader_cache_magic.h | 36 1 file changed, 36 insertions(+) create mode 100644 src/gls

[Mesa-dev] [PATCH 00/10] GL_OES_get_program_binary extension

2014-01-29 Thread Tapani Pälli
Hi; Here's the binary shader patch-set, I've fixed issues Paul found in the review earlier. There are lots of little changes but mainly: - more validation done when reading, also a special validation structure is introduced to bail out early if things do not seem to match, reading checks that

[Mesa-dev] [PATCH 03/10] glsl: memory_map helper class for data deserialization

2014-01-29 Thread Tapani Pälli
Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/memory_map.h | 171 ++ 1 file changed, 171 insertions(+) create mode 100644 src/glsl/memory_map.h diff --git a/src/glsl/memory_map.h b/src/glsl

[Mesa-dev] [PATCH 02/10] glsl: serialize methods for IR instructions

2014-01-29 Thread Tapani Pälli
Patch adds a new virtual function for ir_instruction base class which has to be implemented by each instruction. This data will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/Makefile.sources | 1 + src/glsl/ir.h | 45 + src/glsl/ir

[Mesa-dev] [PATCH 06/10] glsl: add MAX_NUM_STATE_SLOTS and check against builtin uniform variables

2014-01-29 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/glsl/builtin_variables.cpp | 3 +++ src/mesa/main/config.h | 4 2 files changed, 7 insertions(+) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index d6bc3c0..3e660af 100644 --- a/src/glsl/builtin_variables.cpp +++ b/

[Mesa-dev] [PATCH 09/10] glsl: functions to serialize gl_shader and gl_shader_program

2014-01-29 Thread Tapani Pälli
These utility functions can be used to (de)serialize gl_shader and gl_shader_program structures. This makes it possible to implement a shader compiler cache for individual shaders and functionality required by OES_get_program_binary and ARB_get_program_binary extensions. Signed-off-by: Tapani Päll

[Mesa-dev] [PATCH 07/10] glsl: ir_deserializer class for the binary shader cache

2014-01-29 Thread Tapani Pälli
ir_deserializer fills existing gl_shader structure's ir exec_list from binary data, this will be used by shader binary cache implementation. Signed-off-by: Tapani Pälli --- src/glsl/Makefile.sources| 1 + src/glsl/ir_deserializer.cpp | 910 +++ src/g

[Mesa-dev] [PATCH 08/10] mesa: iterate method for string_to_uint_map

2014-01-29 Thread Tapani Pälli
Shader binary cache requires this to be able to cache hash data from the gl_shader_program structure. Signed-off-by: Tapani Pälli --- src/mesa/program/hash_table.h | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h index e95f

[Mesa-dev] [PATCH 10/10] mesa: OES_get_program_binary extension functionality

2014-01-29 Thread Tapani Pälli
Signed-off-by: Tapani Pälli --- src/mesa/main/shaderapi.c | 47 +-- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 61ac0e3..582dfe2 100644 --- a/src/mesa/main/shaderapi.c +++ b/

[Mesa-dev] [PATCH] st/dri: Allow creating OpenGL 3.3. core contexts

2014-01-29 Thread Michel Dänzer
From: Michel Dänzer Enables OpenGL 3.3 piglit tests. Signed-off-by: Michel Dänzer --- src/gallium/state_trackers/dri/common/dri_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/comm

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #15 from Rich Felker --- Hi. I'm the maintainer of musl and I'd like to confirm that we don't have plans to work around this on our side. musl aims to support extremely minimal thread stacks if desired by the application, and reservin

[Mesa-dev] [PATCH v2] R600/SI: Fix fneg for 0.0

2014-01-29 Thread Michel Dänzer
From: Michel Dänzer V_ADD_F32 with source modifier does not produce -0.0 for this. Just manipulate the sign bit directly instead. Also add a pattern for (fneg (fabs ...)). Fixes a bunch of bit encoding piglit tests with radeonsi. Signed-off-by: Michel Dänzer --- v2: Fix up lit tests. lib/T

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #16 from Natanael Copa --- (In reply to comment #15) > Note that, at least as I understand > it, the current approach that "works" with glibc is already fragile; if > another library with large TLS needs gets loaded via dlopen before

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 --- Comment #17 from Natanael Copa --- Created attachment 92987 --> https://bugs.freedesktop.org/attachment.cgi?id=92987&action=edit dso.c test dso that allocates big enough TLS variable. -- You are receiving this mail because: You are the a

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 Natanael Copa changed: What|Removed |Added Attachment #92976|0 |1 is obsolete|

[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35268 Natanael Copa changed: What|Removed |Added Attachment #92977|0 |1 is obsolete|

Re: [Mesa-dev] [PATCH] st/dri: Allow creating OpenGL 3.3. core contexts

2014-01-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Wed, Jan 29, 2014 at 10:27 AM, Michel Dänzer wrote: > From: Michel Dänzer > > Enables OpenGL 3.3 piglit tests. > > Signed-off-by: Michel Dänzer > --- > src/gallium/state_trackers/dri/common/dri_screen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH] configure: Enable large file support for the 32-bit platforms

2014-01-29 Thread Lauri Kasanen
On Tue, 14 Jan 2014 11:55:05 +0200 Lauri Kasanen wrote: > 32-bit use is on the increase due to Steam; avoid any surprises > and make Mesa LFS-aware. > > CC: "10.0" > Signed-off-by: Lauri Kasanen > --- > configure.ac | 1 + > 1 file changed, 1 insertion(+) > Ping. Having this done in autocon

[Mesa-dev] "dri2: Trust our own driver name lookup over the server's." breaks r600

2014-01-29 Thread Lauri Kasanen
Hi, Current master is broken for me starting from commit 7bd95ec437a5b1052fa17780a9d66677ec1fdc35 Author: Eric Anholt Date: Thu Jan 23 10:21:09 2014 -0800 dri2: Trust our own driver name lookup over the server's. I build without libudev, so it falls back to the kernel driver name "radeon

Re: [Mesa-dev] [PATCH] r600g: Removed unnecessary positivity check for unsigned int variable.

2014-01-29 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Dec 12, 2013 at 3:58 PM, Siavash Eliasi wrote: > --- > src/gallium/drivers/r600/r600_asm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/r600/r600_asm.c > b/src/gallium/drivers/r600/r600_asm.c > index 86f79e

Re: [Mesa-dev] [PATCH] gallivm: fix opcode and function nesting

2014-01-29 Thread Roland Scheidegger
Am 28.01.2014 23:08, schrieb Zack Rusin: > gallivm soa code supported only a single level of nesting for > control flow opcodes (if, switch, loops...) but the d3d10 spec > clearly states that those are nested within functions. To support > nesting of conditionals inside functions we need to store t

[Mesa-dev] [PATCH] nv30: report the correct max varying limit

2014-01-29 Thread Ilia Mirkin
nvfx_fragprog_assign_generic only allows for up to 10/8 texcoords for nv40/nv30. This fixes compilation of the varying-packing tests (although they still fail). Signed-off-by: Ilia Mirkin Cc: 9.1 9.2 10.0 --- src/gallium/drivers/nouveau/nv30/nv30_screen.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Mesa-dev] [PATCH] egl/glx: Remove egl_glx driver

2014-01-29 Thread Kenneth Graunke
On 01/29/2014 09:25 AM, Chad Versace wrote: > Mesa now has a real, feature-rich EGL implementation on X11 via xcb. > Therefore I believe there is no longer a practical need for the egl_glx > driver. > > Furthermore, egl_glx appears to be unmaintained. The most recent > nontrivial commit driver wa

[Mesa-dev] [PATCH] dir-locals.el: Set indent-tabs-mode true for makefile-mode

2014-01-29 Thread Kristian Høgsberg
Makefiles need hard tabs, let's not make that harder than it needs to be. Signed-off-by: Kristian Høgsberg --- .dir-locals.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.dir-locals.el b/.dir-locals.el index 4f0ad7a..04a1a2c 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -8,4 +8,5 @

Re: [Mesa-dev] [PATCH] dir-locals.el: Set indent-tabs-mode true for makefile-mode

2014-01-29 Thread Matt Turner
On Wed, Jan 29, 2014 at 10:30 AM, Kristian Høgsberg wrote: > Makefiles need hard tabs, let's not make that harder than it needs to be. > > Signed-off-by: Kristian Høgsberg > --- > .dir-locals.el | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.dir-locals.el b/.dir-locals.el > index 4f0a

Re: [Mesa-dev] [PATCH 1/2] glcpp: Allow integer expression for #line directive.

2014-01-29 Thread Carl Worth
Matt Turner writes: >> -| LINE_EXPANDED integer_constant integer_constant NEWLINE { >> +| LINE_EXPANDED expression integer_constant NEWLINE { > > shouldn't this should be > > LINE_EXPANDED expression expression NEWLINE Yes. Thanks for the catch. I'll expand the testing and follow up wit

Re: [Mesa-dev] [PATCH] gallivm: fix opcode and function nesting

2014-01-29 Thread Zack Rusin
- Original Message - > Am 28.01.2014 23:08, schrieb Zack Rusin: > > gallivm soa code supported only a single level of nesting for > > control flow opcodes (if, switch, loops...) but the d3d10 spec > > clearly states that those are nested within functions. To support > > nesting of condition

Re: [Mesa-dev] What use do swap interval > 1 and OML_sync_control divisor and remainder have?

2014-01-29 Thread Stéphane Marchesin
On Fri, Jan 24, 2014 at 4:32 AM, Pekka Paalanen wrote: > Hi, > > I am investigating what kind of Wayland protocol extensions would be > needed to support proper presentation timing. Looking at existing > works, I am wondering about two things whether they have any real use. > > Where is swap inte

[Mesa-dev] [PATCH] build: Share the all-local rule for linking libraries into the build dir

2014-01-29 Thread Kristian Høgsberg
This consolidates how we link the libraries. It only works for lib_LTLIBRARIES, ie not for custom shared libraries like DRI drivers or gallium state trackers. Signed-off-by: Kristian Høgsberg --- We could do something like this to avoid the problem in the future. Kristian install-lib-links.m

Re: [Mesa-dev] [PATCH] build: Share the all-local rule for linking libraries into the build dir

2014-01-29 Thread Matt Turner
On Wed, Jan 29, 2014 at 11:50 AM, Kristian Høgsberg wrote: > This consolidates how we link the libraries. It only works for > lib_LTLIBRARIES, ie not for custom shared libraries like DRI drivers or > gallium state trackers. > > Signed-off-by: Kristian Høgsberg > --- > > We could do something lik

[Mesa-dev] [PATCH] egl/dri2/android: free driver_name in dri2_initialize_android error path

2014-01-29 Thread Emil Velikov
v2: Cleanup driver name if dri2_load_driver() fails. Spotted by Chad Signed-off-by: Emil Velikov --- Hmm... I swear I had that hunk in mind when writing the patch. Or maybe I was day dreaming. Thanks Chad -Emil src/egl/drivers/dri2/platform_android.c | 4 +++- 1 file changed, 3 insertions(+

Re: [Mesa-dev] [PATCH] egl/glx: Remove egl_glx driver

2014-01-29 Thread Matt Turner
On Wed, Jan 29, 2014 at 9:25 AM, Chad Versace wrote: > Mesa now has a real, feature-rich EGL implementation on X11 via xcb. > Therefore I believe there is no longer a practical need for the egl_glx > driver. > > Furthermore, egl_glx appears to be unmaintained. The most recent > nontrivial commit

[Mesa-dev] [PATCH 6/8] opencl: do not link against libudev

2014-01-29 Thread Emil Velikov
Previously the linking was required due to dependency of udev in the pipe-loader. Now this is no longer the case, as we dlopen the library. Signed-off-by: Emil Velikov --- src/gallium/targets/opencl/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/targe

[Mesa-dev] [PATCH 7/8] gbm: drop unneeded dependency of libudev

2014-01-29 Thread Emil Velikov
As of recently we dlopen the library, additionally the only code that is including the libudev.h header, is the loader. Signed-off-by: Emil Velikov --- src/gallium/targets/gbm/Makefile.am | 2 -- src/gbm/Makefile.am | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/galliu

[Mesa-dev] [PATCH 8/8] configure: cleanup libudev handling

2014-01-29 Thread Emil Velikov
Add the explicit note about the required version during configure. Require the same version (151) of udev when building the pipe-loader. Mention the udev version requirement in GBM Requires.private. Signed-off-by: Emil Velikov --- configure.ac | 11 ++- 1 file changed, 6 insertions(+), 5

[Mesa-dev] [PATCH 3/8] egl_dri2: remove LIBUDEV_CFLAGS from Makefile.am

2014-01-29 Thread Emil Velikov
None of the code within builds or (explicitly) requires udev. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am index 6a9ae50..a95cfa4 100644 --- a/src/egl/driver

[Mesa-dev] [PATCH 0/8] Cleanup usage of libudev CFLAGS and linking

2014-01-29 Thread Emil Velikov
Hello list, Now that everything libudev related is moved to src/loader and we handle the library by dlopen-ing it, we can cleanup a few includes, CFLAGS and LIBS that were behind. The final commit adds explicit version check for udev, where is was missing. It should not cause any issues, but wort

[Mesa-dev] [PATCH 1/8] pipe-loader: drop obsolete libudev.h include

2014-01-29 Thread Emil Velikov
All the udev code is in the loader, so there is no reason for us to include this header. Signed-off-by: Emil Velikov --- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxil

[Mesa-dev] [PATCH 5/8] gallium/tests: do not link against libudev

2014-01-29 Thread Emil Velikov
Previously the linking was required due to dependency of udev in the pipe-loader. Now this is no longer the case, as we dlopen the library. Signed-off-by: Emil Velikov --- src/gallium/tests/trivial/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/tests/trivial/Makefile.

[Mesa-dev] [PATCH 4/8] egl-static: stop linking against libudev

2014-01-29 Thread Emil Velikov
No longer required since all the udev code is in the loader. Signed-off-by: Emil Velikov --- src/gallium/targets/egl-static/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am index 73bb795..166e9

[Mesa-dev] [PATCH 2/8] configure: drop LIBUDEV_CFLAGS from X11_INCLUDES

2014-01-29 Thread Emil Velikov
The cflags are explicitly included in the only Makefile that handles udev dependant code. Signed-off-by: Emil Velikov --- configure.ac | 5 - 1 file changed, 5 deletions(-) diff --git a/configure.ac b/configure.ac index ba158e8..994b3b2 100644 --- a/configure.ac +++ b/configure.ac @@ -856,1

Re: [Mesa-dev] [PATCH 8/8] configure: cleanup libudev handling

2014-01-29 Thread Ilia Mirkin
On Wed, Jan 29, 2014 at 3:23 PM, Emil Velikov wrote: > Add the explicit note about the required version during configure. > Require the same version (151) of udev when building the pipe-loader. > Mention the udev version requirement in GBM Requires.private. > > Signed-off-by: Emil Velikov > --- >

Re: [Mesa-dev] [PATCH 8/8] configure: cleanup libudev handling

2014-01-29 Thread Emil Velikov
On 29/01/14 20:25, Ilia Mirkin wrote: > On Wed, Jan 29, 2014 at 3:23 PM, Emil Velikov > wrote: >> Add the explicit note about the required version during configure. >> Require the same version (151) of udev when building the pipe-loader. >> Mention the udev version requirement in GBM Requires.pri

[Mesa-dev] [PATCH] glcpp: Reject #version after the version has been resolved.

2014-01-29 Thread Matt Turner
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74166 --- src/glsl/glcpp/glcpp-parse.y | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 17bc649..4dba051 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/

Re: [Mesa-dev] [PATCH 8/8] configure: cleanup libudev handling

2014-01-29 Thread Ilia Mirkin
On Wed, Jan 29, 2014 at 3:23 PM, Emil Velikov wrote: > Add the explicit note about the required version during configure. > Require the same version (151) of udev when building the pipe-loader. > Mention the udev version requirement in GBM Requires.private. > > Signed-off-by: Emil Velikov > --- >

[Mesa-dev] [Bug 74166] piglit CorrectVersion1.V110 regression regression

2014-01-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=74166 Matt Turner changed: What|Removed |Added Assignee|mesa-dev@lists.freedesktop. |matts...@gmail.com |org

[Mesa-dev] [PATCH 01/35] mesa: Make target_enum_to_index available outside texobj.c

2014-01-29 Thread Ian Romanick
From: Ian Romanick The next patch will use this function in another file. Signed-off-by: Ian Romanick --- src/mesa/main/texobj.c | 6 +++--- src/mesa/main/texobj.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 24ff

[Mesa-dev] [PATCH 21/35] meta: Use common vertex setup code for _mesa_meta_Bitmap too

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 48 +++--- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 2f87d0d..a987fd7 100644 --- a/

[Mesa-dev] [PATCH 27/35] meta: Use GLSL to decompress 2D-array textures

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72582 --- src/mesa/drivers/common/meta.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drive

[Mesa-dev] [PATCH 02/35] mesa: Use common _mesa_target_enum_to_index in tex param code

2014-01-29 Thread Ian Romanick
From: Ian Romanick TEXTURE_BUFFER_INDEX has to be specially called out because it is not allowed in any of the glTexParameter or glGetTexParameter functions. Signed-off-by: Ian Romanick --- src/mesa/main/texparam.c | 66 ++-- 1 file changed, 8 insert

[Mesa-dev] [PATCH 18/35] meta: Clean up stray binding calls

2014-01-29 Thread Ian Romanick
From: Ian Romanick Clean up a few stray calls to _mesa_BindVertexArray and _mesa_BindBuffer that are no longer necessary after the previous refactor. Note: This should get squashed in with the previous commit when the series is pushed. --- src/mesa/drivers/common/meta.c | 21 ---

[Mesa-dev] [PATCH 31/35] meta: Enable cubemap array texture support to decompress_texture_image

2014-01-29 Thread Ian Romanick
From: Ian Romanick Fixed piglit test getteximage-targets S3TC CUBE_ARRAY on systems that don't have libtxc_dxtn installed. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/common/

[Mesa-dev] [PATCH 05/35] meta: Release resources used by _mesa_meta_DrawPixels

2014-01-29 Thread Ian Romanick
From: Ian Romanick _mesa_meta_DrawPixels creates a VAO and (potentially) two fragment programs, but none of them are ever released. Leaking piles of memory is generally frowned upon. Signed-off-by: Ian Romanick Cc: "9.1 9.2 10.0" --- src/mesa/drivers/common/meta.c | 19 +++ 1

[Mesa-dev] [PATCH 11/35] meta: Expand the vertex structure for the BlitFramebuffer paths

2014-01-29 Thread Ian Romanick
From: Ian Romanick This is the first of several steps leading to some code sharing. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 66 +++--- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/s

[Mesa-dev] [PATCH 15/35] meta: Expand the vertex structure for the GenerateMipmap and decompress paths

2014-01-29 Thread Ian Romanick
From: Ian Romanick Final intermediate step leading to some code sharing. Note that the new GemerateMipmap and decompress vertex structures are the same as the new vertex structure in BlitFramebuffer and the others. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 29 ++

[Mesa-dev] [PATCH 26/35] meta: Use common GLSL code for blits

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 108 + 1 file changed, 13 insertions(+), 95 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 380ee32..363b1ac 100644 --- a/

[Mesa-dev] [PATCH 06/35] meta: Fallback to software for GetTexImage of compressed GL_TEXTURE_CUBE_MAP_ARRAY

2014-01-29 Thread Ian Romanick
From: Ian Romanick The hardware decompression path isn't even close to being able to handle this. This converts the crash (assertion failure) in "EXT_texture_compression_s3tc/getteximage-targets S3TC CUBE_ARRAY" to a plain old failure. Signed-off-by: Ian Romanick Cc: "9.1 9.2 10.0" --- src/m

[Mesa-dev] [PATCH 03/35] !UPSTREAM: Disable non-meta paths

2014-01-29 Thread Ian Romanick
From: Ian Romanick This is a temporary commit so that i965 will hit the paths in meta that are modified by later patches in this series. --- src/mesa/drivers/dri/i965/brw_clear.c| 3 ++- src/mesa/drivers/dri/i965/intel_fbo.c| 3 +++ src/mesa/drivers/dri/i965/intel_pixel_copy.c |

[Mesa-dev] [PATCH 13/35] meta: Expand the vertex structure for the Clear paths

2014-01-29 Thread Ian Romanick
From: Ian Romanick Another step leading to some code sharing. Note that the new Clear vertex structure is the same as the new BlitFramebuffer and CopyPixels vertex structure. The "sizeof(float) * 7" hack is temporary. It will magically disappear in a just a couple more patches. Signed-off-by:

[Mesa-dev] [PATCH 34/35] mesa: Fix extension dependency for half-float TexBOs

2014-01-29 Thread Ian Romanick
From: Ian Romanick Half-float TexBOs should require both GL_ARB_half_float_pixel and GL_ARB_texture_float. This doesn't matter much in practice. Every driver that supports GL_ARB_texture_buffer_object already supports GL_ARB_half_float_pixel. We only expose the TexBO extension in core profiles

[Mesa-dev] [PATCH 22/35] meta: Refactor the table of glsl_sampler structures

2014-01-29 Thread Ian Romanick
From: Ian Romanick This will allow the same table of shader-per-sampler-type to be used for paths in meta other than just mipmap generation. This is also the reason the declarations of the structures was moved towards the top of the file. Signed-off-by: Ian Romanick --- src/mesa/drivers/commo

[Mesa-dev] [PATCH 04/35] meta: Release resources used by decompress_texture_image

2014-01-29 Thread Ian Romanick
From: Ian Romanick decompress_texture_image creates an FBO, an RBO, a VBO, a VAO, and a sampler object, but none of them are ever released. Later patches will add program objects, exacerbating the problem. Leaking piles of memory is generally frowned upon. Signed-off-by: Ian Romanick Cc: "9.1

[Mesa-dev] [PATCH 28/35] meta: Expand texture coordinate from vec3 to vec4

2014-01-29 Thread Ian Romanick
From: Ian Romanick This will be necessary to support cubemap array textures because they use all four components. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b

[Mesa-dev] [PATCH 30/35] meta: Add cubemap array support to generic blit shader code

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 6723263..500311d 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/d

[Mesa-dev] [PATCH 16/35] meta: Track the _mesa_meta_DrawPixels VBO just like the others

2014-01-29 Thread Ian Romanick
From: Ian Romanick All of the other meta routines have a particular pattern for creating and tracking the VAO and VBO. This one function deviated from that pattern for no apparent reason. Almost all of the code added in this patch will be removed shortly. Signed-off-by: Ian Romanick --- src/

[Mesa-dev] [PATCH 10/35] meta: Silence several 'unused parameter' warnings

2014-01-29 Thread Ian Romanick
From: Ian Romanick Silences many GCC warnings of the form: drivers/common/meta.c: In function 'cleanup_temp_texture': drivers/common/meta.c:1208:41: warning: unused parameter 'ctx' [-Wunused-parameter] drivers/common/meta.c: In function 'setup_ff_blit_framebuffer': drivers/common/meta.c:1453:46

[Mesa-dev] [PATCH 23/35] meta: Refactor shader generation code out of mipmap generation path

2014-01-29 Thread Ian Romanick
From: Ian Romanick This is quite like code we want for blits. Pull it out so that it can be shared by other paths. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 169 ++--- 1 file changed, 91 insertions(+), 78 deletions(-) diff --git a/sr

[Mesa-dev] [PATCH 35/35] mesa: GL_ARB_half_float_pixel is not optional

2014-01-29 Thread Ian Romanick
From: Ian Romanick Almost every driver already supported it. All current and future Gallium drivers always support it, and most existing classic drivers support it. This only changes radeon and nouveau. This extension only adds data types that can be passed to, for example, glTexImage2D. It d

[Mesa-dev] [PATCH 14/35] meta: Expand the vertex structure for the DrawPixels paths

2014-01-29 Thread Ian Romanick
From: Ian Romanick Another step leading to some code sharing. Note that the new DrawPixels vertex structure is the same as the new vertex structure in BlitFramebuffer and the others. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 23 +-- 1 file changed, 1

[Mesa-dev] [PATCH 08/35] meta: Use NDC in decompress_texture_image

2014-01-29 Thread Ian Romanick
From: Ian Romanick There is no need to use pixel coordinates, and using NDC directly will simplify the GLSL paths. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/common/meta.c

[Mesa-dev] [PATCH 17/35] meta: Refactor common VAO and VBO initialization code

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 309 + 1 file changed, 97 insertions(+), 212 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 6718680..3661173 100644 --- a

[Mesa-dev] [PATCH 12/35] meta: Expand the vertex structure for the CopyPixels paths

2014-01-29 Thread Ian Romanick
From: Ian Romanick Another step leading to some code sharing. Note that the new CopyPixels vertex structure is the same as the new BlitFramebuffer vertex structure. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 23 +-- 1 file changed, 13 insertions(+), 1

[Mesa-dev] [PATCH 24/35] meta: Add rectangle textures to the shader-per-sampler-type table

2014-01-29 Thread Ian Romanick
From: Ian Romanick Rectangle textures were not necessary for mipmap generation (because they cannot have mipmaps), but all of the future users of this common code will need to support rectangle textures. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 8 1 file change

[Mesa-dev] [PATCH 29/35] meta: Get the correct info log

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 9e82132..6723263 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa

[Mesa-dev] [PATCH 09/35] meta: Don't use fixed-function to decompress array textures

2014-01-29 Thread Ian Romanick
From: Ian Romanick Array textures can't be used with fixed-function, so don't. Instead, just drop the decompress request on the floor. This is no worse than what was done previously because generating the GL error (in _mesa_set_enable) broke everything anyway. A later patch will get GL_TEXTURE

[Mesa-dev] [PATCH 20/35] meta: Add storage to the vertex structure for R, G, B, and A

2014-01-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index d4987ca..2f87d0d 100644 --- a/src/mesa/drivers/common/meta.

[Mesa-dev] [PATCH 19/35] meta: Use common routine to configure fixed-function TNL state

2014-01-29 Thread Ian Romanick
From: Ian Romanick Also... glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0) *is* the identity matrix, so drop the unnecessary call to _mesa_Ortho. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff

[Mesa-dev] [PATCH 32/35] meta: Silence unused parameter warning in setup_drawpix_texture

2014-01-29 Thread Ian Romanick
From: Ian Romanick drivers/common/meta.c: In function 'setup_drawpix_texture': drivers/common/meta.c:1572:30: warning: unused parameter 'texIntFormat' [-Wunused-parameter] setup_drawpix_texture has never used this paramater. Before the refactor commit 04f8193aa it was used in several locations

[Mesa-dev] [PATCH 07/35] meta: Consistenly use non-Apple VAO functions

2014-01-29 Thread Ian Romanick
From: Ian Romanick For these objects, meta was already using the non-Apple function to delete the objects. Everywhere else in the file uses _mesa_GenVertexArrays and _mesa_BindVertexArrays. Signed-off-by: Ian Romanick Cc: "9.1 9.2 10.0" --- src/mesa/drivers/common/meta.c | 8 1 file

[Mesa-dev] [PATCH 25/35] meta: Improve GLSL version check

2014-01-29 Thread Ian Romanick
From: Ian Romanick We want to use the GLSL 1.30-ish path for OpenGL ES 3.0. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index e7154df..38

[Mesa-dev] [PATCH 33/35] meta: Silence unused parameter warning in _mesa_meta_CopyTexSubImage

2014-01-29 Thread Ian Romanick
From: Ian Romanick drivers/common/meta.c: In function '_mesa_meta_CopyTexSubImage': drivers/common/meta.c:3744:52: warning: unused parameter 'rb' [-Wunused-parameter] Unfortunately, the parameter can't just be removed because it is part of the dd_function_table::CopyTexSubImage interface. Sign

[Mesa-dev] [PATCH 2/2] glcpp: Add "make check" test for comment-parsing bug

2014-01-29 Thread Carl Worth
This is the innocent-looking but killer test case to verify the bug fixed in the preceding commit. --- src/glsl/glcpp/tests/121-comment-bug-72686.c | 2 ++ src/glsl/glcpp/tests/121-comment-bug-72686.c.expected | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 src/glsl/glcpp/te

[Mesa-dev] [PATCH 1/2] glcpp: Don't enter lexer's NEWLINE_CATCHUP start state for single-line comments

2014-01-29 Thread Carl Worth
In commit 6005e9cb28 a new start state of NEWLINE_CATCHUP was added to the lexer. This start state is used whenever the lexer is emitting a NEWLINE token to emit additional NEWLINE tokens for any newline characters that were skipped by an immediately preceding multi-line comment. However, that com

Re: [Mesa-dev] [PATCH 1/2] glcpp: Allow integer expression for #line directive.

2014-01-29 Thread Carl Worth
Carl Worth writes: > Matt Turner writes: >> >> LINE_EXPANDED expression expression NEWLINE > > Yes. Thanks for the catch. I'll expand the testing and follow up with a > new set of patches. Except that that's totally bogus. We can't parse two adjacent expressions with no intervening separator (as

[Mesa-dev] [PATCH 2/3] i965: Use brw_bo_map() in intel_texsubimage_tiled_memcpy().

2014-01-29 Thread Kenneth Graunke
This additionally measures the time stalled, while also simplifying the code. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_tex_subimage.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/dr

[Mesa-dev] [PATCH 3/3] i965: Use brw_bo_map[_gtt]() in intel_miptree_map_raw().

2014-01-29 Thread Kenneth Graunke
This moves the intel_batchbuffer_flush before the drm_intel_bo_busy call, so it isn't entirely equivalent, but I think that should be fine. This code is strange anyway; the typical paradigm is to check whether the batch references the buffer, flush it if so, and then check whether it's busy. Sign

[Mesa-dev] [PATCH 1/3] i965: Create drm_intel_bo_map wrappers with performance warnings.

2014-01-29 Thread Kenneth Graunke
Mapping a buffer is a common place where we could stall the CPU. In a few places, we've added special code to check whether a buffer is busy and log the stall as a performance warning. Most of these give no indication of the severity of the stall, though, since measuring the time is a small hassl

[Mesa-dev] [PATCH 1/3] i965: Fix Gen8+ disassembly of half float subregister numbers.

2014-01-29 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen8_disasm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/gen8_disasm.c b/src/mesa/drivers/dri/i965/gen8_disasm.c index 0ea5e73..387bb71 100644 --- a/src/mesa/drivers/dri/i965/gen8_disasm.c +++ b/src/m

[Mesa-dev] [PATCH 2/3] i965: Drop bogus F32TO16/F16TO32 instructions on Broadwell - use MOV.

2014-01-29 Thread Kenneth Graunke
Broadwell removed the F32TO16 and F16TO32 instructions. However, it has actual support for HF values, so they're actually just MOV. Fixes vs-packHalf2x16 and vs-unpackHalf2x16 tests (both the ARB extension and ES 3.0 variants). Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen8_

[Mesa-dev] [PATCH 3/3] i965/fs: Implement FS_OPCODE_[UN]PACK_HALF_2x16_SPLIT[_XY] opcodes.

2014-01-29 Thread Kenneth Graunke
I'd neglected to port these to Broadwell. Most of this code is copy and pasted from Gen7, but instead of using F32TO16/F16TO32, we just use MOV with HF register types. Fixes fs-packHalf2x16 and fs-unpackHalf2x16 tests (both the ARB extension and ES 3.0 variants). Signed-off-by: Kenneth Graunke

Re: [Mesa-dev] [PATCH 4/7] dri2: Trust our own driver name lookup over the server's.

2014-01-29 Thread Stéphane Marchesin
On Tue, Jan 28, 2014 at 2:13 PM, Ian Romanick wrote: > On 01/28/2014 02:51 PM, Mark Mueller wrote: > > This patch could cause the i965 driver to not load if Mesa was built on > > a system without libudev devel present. For example on Fedora one should > > install systemd-devel before configuring

  1   2   >