Re: [Mesa-dev] [PATCH 1/7] mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1

2015-05-14 Thread Tapani
On 05/13/2015 09:52 PM, Ian Romanick wrote: On 05/06/2015 03:19 AM, Tapani Pälli wrote: I've just noticed that this is wrong, sorry :/ We should to make a new section for some of the enums that are only in GL core and ES31, DRAW_INDIRECT_BUFFER_BINDING is one of these cases .. so this patch is b

Re: [Mesa-dev] Mesa (master): 57 new commits

2015-05-14 Thread Ilia Mirkin
On Thu, May 14, 2015 at 10:48 PM, Michel Dänzer wrote: > On 14.05.2015 22:52, fred...@kemper.freedesktop.org (Fredrik HXXglund) > wrote: >> >> URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b284f08ab399154ad10e2166440b44cbbdcb2c5 >> Author: Laura Ekstrand >> Date: Tue Feb 3 14:47:00 2

[Mesa-dev] CompressedTexImage3D spec bug?

2015-05-14 Thread Roland Scheidegger
Accidentally, I stumbled upon this bit in gl 4.5, chapter 8.7 "Compressed Texture Images": "An INVALID_OPERATION error is generated by CompressedTexImage3D if internalformat is one of the EAC, ETC2, or RGTC formats and either border is non-zero, or target is not TEXTURE_2D_ARRAY." This forbids TEXT

Re: [Mesa-dev] Mesa (master): 57 new commits

2015-05-14 Thread Michel Dänzer
On 14.05.2015 22:52, fred...@kemper.freedesktop.org (Fredrik HXXglund) wrote: > > URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b284f08ab399154ad10e2166440b44cbbdcb2c5 > Author: Laura Ekstrand > Date: Tue Feb 3 14:47:00 2015 -0800 > > main: _mesa_blit_framebuffer updates its arbit

Re: [Mesa-dev] [PATCH 5/6] egl/main: expose only core EGL functions statically

2015-05-14 Thread Mark Janes
Hi Emil, This patch prevents piglit from linking: [ 98%] CMakeFiles/ext_image_dma_buf_import-sample_rgb.dir/sample_common.c.o: In function `sample_and_destroy_img': piglit/tests/spec/ext_image_dma_buf_import/sample_common.c:107: undefined reference to `eglDestroyImageKHR' Is th

Re: [Mesa-dev] [PATCH 5/5] gallium/targets: Move api init into st code

2015-05-14 Thread Alexander von Gluck IV
Good evening Brian, Thanks, these were fixed. I just realized that I can drop os_thread.h from our C++ code as we no longer depend on it and not do the extern "C" there. (tested working) You ok with this changeset with the change above? (I'd hate to commit it, then undo it) Thanks! -- Ale

[Mesa-dev] [Bug 90457] New Account Request

2015-05-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90457 Carl Worth changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH 5/5] gallium/targets: Move api init into st code

2015-05-14 Thread Brian Paul
In the past, you used the prefix "target/haiku-softpipe:" on changes to this code. I'd suggest using that again here. With these changes, Reviewed-by: Brian Paul On 05/14/2015 04:39 PM, Alexander von Gluck IV wrote: We also reduce the amount of need-to-know information about st_api to requir

Re: [Mesa-dev] [PATCH 4/5] gallium/st: Move st_api creation to st and extern "C" it

2015-05-14 Thread Brian Paul
The prefix on this one should probably by "st/hgl:" On 05/14/2015 04:39 PM, Alexander von Gluck IV wrote: --- src/gallium/state_trackers/hgl/hgl.c | 16 src/gallium/state_trackers/hgl/hgl_context.h | 14 ++ 2 files changed, 22 insertions(+), 8 deleti

Re: [Mesa-dev] [PATCH 3/5] gallium/winsys: Add needed extern "C" to hgl winsys

2015-05-14 Thread Brian Paul
The prefix for this commit message should probably be "winsys/hgl:" On 05/14/2015 04:39 PM, Alexander von Gluck IV wrote: --- src/gallium/winsys/sw/hgl/hgl_sw_winsys.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.h b/

[Mesa-dev] [PATCH 4/5] gallium/st: Move st_api creation to st and extern "C" it

2015-05-14 Thread Alexander von Gluck IV
--- src/gallium/state_trackers/hgl/hgl.c | 16 src/gallium/state_trackers/hgl/hgl_context.h | 14 ++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/gallium/state_trackers/hgl/hgl.c b/src/gallium/state_trackers/hgl/hgl.c index 77f7c22..

[Mesa-dev] [PATCH 2/5] gallium/drivers: Add extern "C" wrappers to public entry

2015-05-14 Thread Alexander von Gluck IV
--- src/gallium/drivers/llvmpipe/lp_public.h |8 src/gallium/drivers/rbug/rbug_public.h |8 src/gallium/drivers/softpipe/sp_public.h |8 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_public.h b/src/gallium/

[Mesa-dev] [PATCH 1/5] gallium/aux: Add needed extern "C" wrappers

2015-05-14 Thread Alexander von Gluck IV
--- src/gallium/auxiliary/os/os_thread.h|7 +++ src/gallium/auxiliary/postprocess/postprocess.h |9 + src/gallium/auxiliary/util/u_tests.h|8 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/os/os_thread.

[Mesa-dev] [PATCH 5/5] gallium/targets: Move api init into st code

2015-05-14 Thread Alexander von Gluck IV
We also reduce the amount of need-to-know information about st_api to require one less extern "C" in st_manager.h --- .../targets/haiku-softpipe/GalliumContext.cpp | 23 +++ .../targets/haiku-softpipe/GalliumContext.h|5 +--- 2 files changed, 10 insertions(+), 18

[Mesa-dev] [PATCH 3/5] gallium/winsys: Add needed extern "C" to hgl winsys

2015-05-14 Thread Alexander von Gluck IV
--- src/gallium/winsys/sw/hgl/hgl_sw_winsys.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.h b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.h index bdcddfb..a81f890 100644 --- a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.h +++ b/sr

Re: [Mesa-dev] [PATCH 10/15] egl: add eglWaitSync

2015-05-14 Thread Emil Velikov
On 12/05/15 22:54, Marek Olšák wrote: > From: Marek Olšák > > --- > src/egl/main/eglapi.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c > index 60df297..544f7e4 100644 > --- a/src/egl/main/eglapi.c > +++ b/src/egl/main/eglap

[Mesa-dev] [Bug 90457] New Account Request

2015-05-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90457 Nanley Chery changed: What|Removed |Added CC||cwo...@cworth.org -- You are receiving t

[Mesa-dev] [Bug 90457] New Account Request

2015-05-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90457 --- Comment #1 from Nanley Chery --- Created attachment 115785 --> https://bugs.freedesktop.org/attachment.cgi?id=115785&action=edit Public PGP Key -- You are receiving this mail because: You are the QA Contact for the bug. You are the assign

[Mesa-dev] [Bug 90457] New Account Request

2015-05-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90457 Bug ID: 90457 Summary: New Account Request Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium

Re: [Mesa-dev] [PATCH 09/15] egl: add EGL 1.5 functions that don't need any changes from extensions

2015-05-14 Thread Emil Velikov
On 12/05/15 22:54, Marek Olšák wrote: > From: Marek Olšák > > Declare the functions without the suffix, so that the core names are exported. > --- > src/egl/main/eglapi.c | 20 > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/src/egl/main/eglapi.c b/src/e

Re: [Mesa-dev] [PATCH 06/15] egl: fix setting context flags

2015-05-14 Thread Emil Velikov
On 12/05/15 22:54, Marek Olšák wrote: > From: Marek Olšák > > --- > src/egl/main/eglcontext.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c > index 514b91a..e50b8fb 100644 > --- a/src/egl/main/eglcontext.c > +

Re: [Mesa-dev] [PATCH 2/2] egl/haiku: Drop extern "C". No longer needed

2015-05-14 Thread Alexander von Gluck IV
On , Brian Paul wrote: On 05/13/2015 04:14 PM, Alexander von Gluck IV wrote: --- src/egl/drivers/haiku/egl_haiku.cpp |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 4cf2ccb..4d9888d 100

Re: [Mesa-dev] [PATCH 04/15] egl: import headers from Khronos EGL registry

2015-05-14 Thread Emil Velikov
Hi Marek, On 12/05/15 22:54, Marek Olšák wrote: > From: Marek Olšák > > with the extension of keeping: > #define KHRONOS_APICALL __attribute__((visibility("default"))) > > And don't include mesa headers in egl.h. Can we do this more gradually (like below). It will ease the conflicts that thi

Re: [Mesa-dev] [PATCH 11/20] glapi: Remove static dispatch for functions that didn't exist in fglrx

2015-05-14 Thread Emil Velikov
On 13/05/15 19:44, Ian Romanick wrote: > From: Ian Romanick > > Comparing the output of > > nm -D arch/x86_64/usr/X11R6/lib64/fglrx/fglrx-libGL.so.1.2 |\ > grep ' T gl[^X]' | sed 's/.* T //' > > between Catalyst 14.6 Beta and this commit, the only change is a bunch > of functions th

Re: [Mesa-dev] [PATCH 00/20] glapi yak shaving and GLES 3.1 enabling

2015-05-14 Thread Emil Velikov
Hi Ian, On 13/05/15 19:44, Ian Romanick wrote: > We've known for a long time that having all those tags in the > entries in the XML is bad. For example, people cut-and-paste for > everything, and, as a result, we export a bunch of functions that we > should not. We also really want to just use

Re: [Mesa-dev] [PATCH] glsl: set the binding value regardless explicit_binding

2015-05-14 Thread Alejandro Piñeiro
On 14/05/15 20:38, Ian Romanick wrote: > On 05/14/2015 04:30 AM, Timothy Arceri wrote: >> On Wed, 2015-05-13 at 09:58 -0700, Ian Romanick wrote: >>> On 05/11/2015 03:37 AM, Alejandro Piñeiro wrote: Since commit c0cd5b var->data.binding was set only when explicit_binding was false, thas wa

Re: [Mesa-dev] [PATCH 02/20] mesa: Remove all vestiges of glFramebufferTextureFaceARB

2015-05-14 Thread Emil Velikov
On 13/05/15 19:44, Ian Romanick wrote: > From: Ian Romanick > > Mesa does not (and probably never will) support GL_ARB_geometry_shader4, > so this function will never exist. In the (very unlikely) event that we do support the extension, won't this change cause issues when mixing libGL/libglapi/dr

Re: [Mesa-dev] [PATCH] egl: Remove skeleton implementation of EGL_MESA_screen_surface

2015-05-14 Thread Emil Velikov
On 14/05/15 18:06, Jon TURNEY wrote: > On 01/05/2015 16:35, Adam Jackson wrote: >> No backend wires this up to anything, and the extension spec has been >> marked obsolete for 4+ years. >> >> Signed-off-by: Adam Jackson > [...] >> -/* EGL_MESA_screen extension >>> PRELIMINARY <<< */ >> -#ifndef E

Re: [Mesa-dev] [PATCH 44/57] mesa: Add ARB_direct_state_access checks in XFB functions

2015-05-14 Thread Ilia Mirkin
Don't you have to add the checks either way? And should these have just been if (ctx->API != CORE && (ctx->API != COMPAT || ctx->Version < 20)) { ... } And removing compat will just reduce these checks to if (ctx->API != CORE) ? Cheers, -ilia On Thu, May 14, 2015 at 2:55 PM, Ian Romanick

Re: [Mesa-dev] [PATCH] egl: remove remaining EGL_MESA_copy_context skeleton

2015-05-14 Thread Adam Jackson
On Thu, 2015-05-14 at 18:50 +, Emil Velikov wrote: > With earlier commit (7a58262e58d egl: Remove skeleton implementation > of > EGL_MESA_screen_surface) we've removed the skeleton implementation of > eglCopyContextMESA(). Just like EGL_MESA_screen_surface this > extension > was never impleme

Re: [Mesa-dev] [PATCH 4/7] i965: Add gen8 surface state debug info

2015-05-14 Thread Ben Widawsky
On Fri, Apr 24, 2015 at 08:47:41PM +0300, Pohjolainen, Topi wrote: > On Thu, Apr 23, 2015 at 04:50:00PM -0700, Ben Widawsky wrote: > > AFAICT, none of the old data was wrong (the gen7 decoder), but it wa > > smissing a > > bunch of stuff. > > > > Adds a tick (') to denote the beginning of the sur

Re: [Mesa-dev] [PATCH 44/57] mesa: Add ARB_direct_state_access checks in XFB functions

2015-05-14 Thread Ian Romanick
I am not a fan of adding a million extra extension checks. I understand that we can't enable the extension universally due to the OpenGL 2.0 requirement. Add this to the list of arguments for making this extension exclusive to core profile... which I have been saying since before a single line of

Re: [Mesa-dev] [PATCH] glsl: set the binding value regardless explicit_binding

2015-05-14 Thread Ian Romanick
On 05/14/2015 04:30 AM, Timothy Arceri wrote: > On Wed, 2015-05-13 at 09:58 -0700, Ian Romanick wrote: >> On 05/11/2015 03:37 AM, Alejandro Piñeiro wrote: >>> Since commit c0cd5b var->data.binding was set only when explicit_binding >>> was false, thas was wrong, should be a test to true. This preve

Re: [Mesa-dev] [PATCH] egl: Remove skeleton implementation of EGL_MESA_screen_surface

2015-05-14 Thread Jon TURNEY
On 01/05/2015 16:35, Adam Jackson wrote: No backend wires this up to anything, and the extension spec has been marked obsolete for 4+ years. Signed-off-by: Adam Jackson [...] -/* EGL_MESA_screen extension >>> PRELIMINARY <<< */ -#ifndef EGL_MESA_screen_surface -#define EGL_MESA_screen_surfac

[Mesa-dev] [PATCH] egl: remove remaining EGL_MESA_copy_context skeleton

2015-05-14 Thread Emil Velikov
With earlier commit (7a58262e58d egl: Remove skeleton implementation of EGL_MESA_screen_surface) we've removed the skeleton implementation of eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension was never implemented in mesa. Cc: Adam Jackson Signed-off-by: Emil Velikov --- in

[Mesa-dev] Problem with ___glapi_noop_table

2015-05-14 Thread Shervin Sharifi
Hi, I am trying to build Mesa for OpenGL ES (with llvmpipe) under windows with MSVC. I'm getting an error due to an unresolved external symbol (___glapi_noop_table). There is no definition of ___glapi_noop_table in the code. Am I missing something? Here is the configuration I'm using: LLVM=C

Re: [Mesa-dev] i965 implementation of the ARB_shader_image_load_store built-ins. (v2)

2015-05-14 Thread Francisco Jerez
Kenneth Graunke writes: > On Wednesday, May 13, 2015 07:33:22 PM Francisco Jerez wrote: >> - Nothing prevents you from "evaluating" the builder framework >>independent from the tiling and format conversion code. > [snip] > > I think you misunderstand - we all largely agree that the fs_builde

Re: [Mesa-dev] [PATCH 2/2] egl/haiku: Drop extern "C". No longer needed

2015-05-14 Thread Brian Paul
On 05/13/2015 04:14 PM, Alexander von Gluck IV wrote: --- src/egl/drivers/haiku/egl_haiku.cpp |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 4cf2ccb..4d9888d 100644 --- a/src/egl/drivers

Re: [Mesa-dev] [PATCH 07/25] i965/fs: Import array utils for the surface message builder.

2015-05-14 Thread Francisco Jerez
Jason Ekstrand writes: > On Tue, May 5, 2015 at 2:48 PM, Francisco Jerez wrote: >> Define a few transformations on register arrays which will be used >> frequently during the construction of typed and untyped surface >> message payloads. Their purpose is simple but the implementation is >> rath

[Mesa-dev] [PATCH 73/74] glsl: Consider active all elements of a shared/std140 block array

2015-05-14 Thread Iago Toral Quiroga
From: Antia Puentes Commmit 1ca25ab (glsl: Do not eliminate 'shared' or 'std140' blocks or block members) considers active 'shared' and 'std140' uniform blocks and uniform block arrays but did not include the block array elements. It was possible to have an active uniform block array without any

[Mesa-dev] [PATCH 24/74] glsl: Don't do constant variable on buffer variables

2015-05-14 Thread Iago Toral Quiroga
Since the backing storage for these is shared we cannot ensure that the value won't change by writes from other threads. --- src/glsl/opt_constant_variable.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp index

[Mesa-dev] [PATCH 65/74] glsl: Do not allow assignments to read-only variables

2015-05-14 Thread Iago Toral Quiroga
--- src/glsl/ast_to_hir.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index aef8dd5..46caffb 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -762,8 +762,15 @@ do_assignment(exec_list *instruct

[Mesa-dev] [PATCH 02/74] glsl: Add ir_var_buffer

2015-05-14 Thread Iago Toral Quiroga
From: Kristian Høgsberg This will be used to identify buffer variables inside shader storage buffer objects, which are very similar to uniforms except for a few differences, most important of which is that they are writable. Since buffer variables are so similar to uniforms, we will almost alway

[Mesa-dev] [PATCH 22/74] glsl: Do not do CSE for expressions involving SSBO loads

2015-05-14 Thread Iago Toral Quiroga
SSBOs are read/write and this CSE pass only handles read-only variables. --- src/glsl/opt_cse.cpp | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/glsl/opt_cse.cpp b/src/glsl/opt_cse.cpp index 4b8e9a0..a05ab46 100644 --- a/src/glsl/opt_cse.c

[Mesa-dev] [PATCH 28/74] glsl: Do constant folding on ir_ssbo_store

2015-05-14 Thread Iago Toral Quiroga
We have ir_rvalues for various fields within ir_ssbo_store, so we want constant folding to know about them. Specifically, the offset of the store operation can be computed as the addition of a constant offset and a constant base offset, so we want that constant addition replaced with its constant r

[Mesa-dev] [PATCH 25/74] glsl: Don't do copy propagation on buffer variables

2015-05-14 Thread Iago Toral Quiroga
Since the backing storage for these is shared we cannot ensure that the value won't change by writes from other threads. --- src/glsl/opt_copy_propagation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp

[Mesa-dev] [PATCH 74/74] i965/vec4: Skip dependency control for opcodes emitting multiple instructions

2015-05-14 Thread Iago Toral Quiroga
The same we did for the fragment shader with commit 7452f18b. --- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index d0c8108..f6e9402 100

[Mesa-dev] [PATCH 70/74] mesa: Add getters for the GL_ARB_shader_storage_buffer_object max constants

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py | 12 2 files changed, 13 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index c29dbfc..bb591f5 100644 --- a

[Mesa-dev] [PATCH 64/74] glsl: Allow memory layout qualifiers on shader storage buffer objects

2015-05-14 Thread Iago Toral Quiroga
Since memory qualifiers are also keywords we need to do the same trick we use for other keywords that can be used as layout qualifiers to handle alternate capitalizations in desktop GLSL, like row_major, etc. --- src/glsl/ast_to_hir.cpp | 31 src/glsl/glsl_parser.yy | 75 +

[Mesa-dev] [PATCH 67/74] main: Add SHADER_STORAGE_BLOCK and BUFFER_VARIABLE support for ARB_program_interface_query

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Including TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE queries. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ir_uniform.h| 5 + src/glsl/link_uniforms.cpp | 16 ++- src/glsl/linker.cpp | 10 +- src/mesa/main/program

[Mesa-dev] [PATCH 66/74] glsl: Do not allow reads from write-only variables

2015-05-14 Thread Iago Toral Quiroga
The error location won't be right, but fixing that would require to check for this as we process each type of AST node that can involve a variable read. --- src/glsl/ast_to_hir.cpp | 49 + 1 file changed, 49 insertions(+) diff --git a/src/glsl/ast_t

[Mesa-dev] [PATCH 61/74] glsl: fix UNIFORM_BUFFER_START or UNIFORM_BUFFER_SIZE query when no buffer object is bound

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez According to ARB_uniform_buffer_object spec: "If the parameter (starting offset or size) was not specified when the buffer object was bound (e.g. if bound with BindBufferBase), or if no buffer object is bound to , zero is returned." Signed-off-by: Samuel Iglesi

[Mesa-dev] [PATCH 68/74] main/tests: add ARB_shader_storage_buffer_object tokens to enum_strings

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/tests/enum_strings.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index dc5fe75..be11482 100644 --- a

[Mesa-dev] [PATCH 63/74] glsl: Apply memory qualifiers to buffer variables

2015-05-14 Thread Iago Toral Quiroga
--- src/glsl/ast_to_hir.cpp | 25 + src/glsl/glsl_types.h | 10 ++ 2 files changed, 35 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index f1f2546..e7d50e1 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -5496,

[Mesa-dev] [PATCH 62/74] glsl: Allow use of memory qualifiers with ARB_shader_storage_buffer_object.

2015-05-14 Thread Iago Toral Quiroga
--- src/glsl/glsl_lexer.ll | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index 845deeb..82ad245 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -404,11 +404,11 @@ image2DShadow KEYWORD(13

[Mesa-dev] [PATCH 71/74] i965: Enable ARB_shader_storage_buffer_object extension for gen7+

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index cafb774..75ea75e 10064

[Mesa-dev] [PATCH 72/74] docs: Mark ARB_shader_storage_buffer_object as done for i965.

2015-05-14 Thread Iago Toral Quiroga
--- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 5a15bc5..52adcc5 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -164,7 +164,7 @@ GL 4.3, GLSL 4.30: GL_ARB_program_interface_query DONE (all drivers)

[Mesa-dev] [PATCH 60/74] mesa: Add queries for GL_SHADER_STORAGE_BUFFER

2015-05-14 Thread Iago Toral Quiroga
These handle querying the buffer name attached to a giving binding point as well as the start offset and size of that buffer. --- src/mesa/main/get.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 09be715..0dc568

[Mesa-dev] [PATCH 69/74] glapi: add ARB_shader_storage_block_buffer_object

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- .../glapi/gen/ARB_shader_storage_buffer_object.xml | 36 ++ src/mapi/glapi/gen/GL4x.xml| 18 ++- src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/g

[Mesa-dev] [PATCH 55/74] glsl: Add atomic functions from ARB_shader_storage_buffer_object

2015-05-14 Thread Iago Toral Quiroga
--- src/glsl/builtin_functions.cpp | 185 + 1 file changed, 185 insertions(+) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index f220b86..63706b8 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cp

[Mesa-dev] [PATCH 59/74] mesa: add glShaderStorageBlockBinding()

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Defined in ARB_shader_storage_buffer_object extension. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/uniforms.c | 52 src/mesa/main/uniforms.h | 4 2 files changed, 56 insertions(+) diff --git

[Mesa-dev] [PATCH 52/74] i965: do not emit_bool_to_cond_code with ssbo load expressions

2015-05-14 Thread Iago Toral Quiroga
From: Kristian Høgsberg We do the same with ubo load expressions. --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 -- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

[Mesa-dev] [PATCH 49/74] i965/fs: Do not include the header with a pixel mask in untyped read messages

2015-05-14 Thread Iago Toral Quiroga
We need our reads to provide well-defined results for all enabled channels even for helper invocations, which means that we should not use a pixel mask with them. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 4 ++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 35 -

[Mesa-dev] [PATCH 51/74] i965/vec4: Implement SSBO reads

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 56 +- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 41ca007..a2aece6 100644 --- a/src/mesa/drivers/d

[Mesa-dev] [PATCH 46/74] glsl: number of active shader storage blocks must be within allowed limits

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Notice that we should differentiate betweeb shader storage blocks and uniform blocks, since they have different limits. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/linker.cpp | 43 +++ 1 file changed, 39 insertio

[Mesa-dev] [PATCH 53/74] glsl: atomic counters can be declared as buffer-qualified variables

2015-05-14 Thread Iago Toral Quiroga
From: Kristian Høgsberg --- src/glsl/ast_to_hir.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 3e64087..f1f2546 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2765,7 +2765,7 @@ apply_ty

[Mesa-dev] [PATCH 30/74] i965: Implement DriverFlags.NewShaderStorageBuffer

2015-05-14 Thread Iago Toral Quiroga
We use the same dirty state for SSBOs and UBOs because they share the same infrastructure. --- src/mesa/drivers/dri/i965/brw_state_upload.c | 1 + src/mesa/drivers/dri/i965/intel_buffer_objects.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.

[Mesa-dev] [PATCH 42/74] glsl: propagate interface packing information to arrays of scalars, vectors.

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Now std140 is not the only interface packing qualifier that can be used. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ast.h | 10 + src/glsl/ast_to_hir.cpp | 54 + src/glsl/glsl_types.cpp

[Mesa-dev] [PATCH 40/74] i965/wm: surfaces should have the API buffer size, not the drm buffer size

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez The returned drm buffer object has a size multiple of 4096 but that should not be exposed to the API user, which is working with a different size. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 ++-- 1 file chan

[Mesa-dev] [PATCH 37/74] i965/vec4: Implement unsized array's length calculation

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Notice that Skylake needs to include a header in the sampler message so it will need some tweaks to work there. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/lower_ubo_reference.cpp | 182 +++ src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 34/74] i965/fs: Do not split buffer variables

2015-05-14 Thread Iago Toral Quiroga
Buffer variables are the same as uniforms, only that read/write, so we want the same treatment. --- src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_ve

[Mesa-dev] [PATCH 31/74] i965: Set MaxShaderStorageBuffers for compute shaders

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6b2af70..a47012a 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context

[Mesa-dev] [PATCH 45/74] glsl: a shader storage buffer must be smaller than the maximum size allowed

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Otherwise, generate a link time error as per the ARB_shader_storage_buffer_object spec. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/glsl_types.cpp | 9 +++-- src/glsl/link_uniform_blocks.cpp | 17 + src/glsl/linker.cpp

[Mesa-dev] [PATCH 43/74] glsl: propagate std430 packing qualifier to struct's members and array of structs

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez When propagating std430 packing qualifier to the struct's members, new glsl_types need to be created because the existing ones are const. The new glsl_types are meant to replace the already defined one taking into account that the field names cannot have different

[Mesa-dev] [PATCH 44/74] glsl: add std430 interface packing support to ssbo writes and unsized array length

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/lower_ubo_reference.cpp | 65 ++-- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/src/glsl/lower_ubo_reference.cpp b/src/glsl/lower_ubo_reference.cpp index

[Mesa-dev] [PATCH 33/74] i965: handle visiting of ir_var_buffer variables

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 3 ++- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 9c82aa3..a3c10cb 1

[Mesa-dev] [PATCH 35/74] glsl: add support for unsized arrays in shader storage blocks

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez They only can be defined in the last position of the shader storage blocks. When an unsized array is used in different shaders, it might be converted in different sized arrays, avoid get a linker error in that case. Signed-off-by: Samuel Iglesias Gonsalvez ---

[Mesa-dev] [PATCH 57/74] i965/fs: Implement shader storage buffer object atomic intrinsics

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 108 +++ 2 files changed, 109 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 40b7ec2..5708420 100644 --- a/sr

[Mesa-dev] [PATCH 58/74] glsl: First argument to atomic functions must be a buffer variable

2015-05-14 Thread Iago Toral Quiroga
--- src/glsl/ast_function.cpp | 37 + 1 file changed, 37 insertions(+) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 7583613..2425b91 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -141,6 +141,31 @@ verify_i

[Mesa-dev] [PATCH 47/74] i965/fs: Implement SSBO writes

2015-05-14 Thread Iago Toral Quiroga
We use untyped messages for this. These messages include a pixel mask in the header that we need to set to implement correct behavior of helper invocations, since such invocations should not write to memory. --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 69 +++- 1 file

[Mesa-dev] [PATCH 50/74] i965/vec4: Implement SSBO writes

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 140 - 1 file changed, 138 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 5268582..41ca007 100644 --- a/src/mesa/drivers/

[Mesa-dev] [PATCH 41/74] glsl: Add parser/compiler support for std430 interface packing qualifier

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This commit also adds functions to calculate std430 base alignment and sizes Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 20 +-- src/glsl/ast_type.cpp| 1 + src/glsl

[Mesa-dev] [PATCH 54/74] glsl: Rename atomic counter functions

2015-05-14 Thread Iago Toral Quiroga
Shader Storage Buffer Object will add new atomic functions that are not associated with counters, so better have atomic counter-specific functions explicitly include the word "counter" in their names. --- src/glsl/builtin_functions.cpp | 30 +++--- 1 file changed, 15 insert

[Mesa-dev] [PATCH 56/74] i965/vec4: Implement shader storage buffer object atomic intrinsics

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 103 + 2 files changed, 104 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 3d3fcc7..2494ae0 100644 --

[Mesa-dev] [PATCH 48/74] i965/fs: Implement SSBO reads

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 70 +++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 7518b1f..e2624616 100644 --- a/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 29/74] i965: Use 16-byte offset alignment for shader storage buffers

2015-05-14 Thread Iago Toral Quiroga
This is the same we do for other things like uniforms because it ensures optimal performance. --- src/mesa/drivers/dri/i965/brw_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 673529a..6b2af70 10

[Mesa-dev] [PATCH 20/74] glsl: Don't do tree grafting on buffer variables

2015-05-14 Thread Iago Toral Quiroga
Otherwise we can lose writes into the buffers backing the variables. --- src/glsl/opt_tree_grafting.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp index d47613c..be34957 100644 --- a/src/glsl/opt_tree

[Mesa-dev] [PATCH 18/74] mesa: Implement _mesa_BindBufferBase for target GL_SHADER_STORAGE_BUFFER

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/main/bufferobj.c | 56 +++ 1 file changed, 56 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 70ac638..fb5331e 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -3092,6 +3092,37

[Mesa-dev] [PATCH 38/74] i965/fs: Implement unsized array's length calculation

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/brw_defines.h| 1 + src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs.h | 3 ++ .../dri/i965/brw_fs_channel_expressions.

[Mesa-dev] [PATCH 23/74] glsl: Don't do constant propagation on buffer variables

2015-05-14 Thread Iago Toral Quiroga
Since the backing storage for these is shared we cannot ensure that the value won't change by writes from other threads. --- src/glsl/opt_constant_propagation.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.

[Mesa-dev] [PATCH 39/74] i965/wm: emit null buffer surfaces when null buffers are attached

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Otherwise we can expect odd things to happen if, for example, we ask for the size of the attached buffer from shader code, since that might query this value from the surface we uploaded and get random results. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mes

[Mesa-dev] [PATCH 03/74] glsl: Implement parser support for 'buffer' qualifier

2015-05-14 Thread Iago Toral Quiroga
From: Kristian Høgsberg This is used to identify shader storage buffer interface blocks where buffer variables are declared. --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 14 ++ src/glsl/ast_type.cpp | 3 ++- src/glsl/glsl_lexer.ll

[Mesa-dev] [PATCH 27/74] glsl: Lower shader storage buffer object writes to ir_ssbo_store

2015-05-14 Thread Iago Toral Quiroga
Extend the existing lower_ubo_reference pass to also detect SSBO writes and lower them to ir_ssbo_store nodes. --- src/glsl/lower_ubo_reference.cpp | 412 +++ 1 file changed, 336 insertions(+), 76 deletions(-) diff --git a/src/glsl/lower_ubo_reference.cpp b/src

[Mesa-dev] [PATCH 32/74] i965: Upload Shader Storage Buffer Object surfaces

2015-05-14 Thread Iago Toral Quiroga
Since these are a special kind of UBOs we emit them together reusing the same infrastructure, however, we use a RAW surface so we can reuse existing untyped read/write/atomic messages which include a pixel mask header that we need to set to obtain correct behavior with helper invocations of the fra

[Mesa-dev] [PATCH 36/74] glsl: Add parser/compiler support for unsized array's length()

2015-05-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez It also creates unop and triop expressions to tell the driver to calculate the unsized array length. It is needed two expressions to do the calculation: * The unop expression saves the ir_rvalue* whose length should be calculated. * Afterwards, this unop is goi

[Mesa-dev] [PATCH 26/74] mesa: Add new IR node ir_ssbo_store

2015-05-14 Thread Iago Toral Quiroga
Shader storage buffer objects (SSBO) require special handling: when we detect writes to any channel of a shader buffer variable we need to emit the corresponding write to memory. We will later add a lowering pass that detects these writes and injects ir_ssbo_store nodes in the IR so drivers can ge

[Mesa-dev] [PATCH 17/74] mesa: Implement _mesa_BindBuffersRange for target GL_SHADER_STORAGE_BUFFER

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/main/bufferobj.c | 110 ++ 1 file changed, 110 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c8b29a7..70ac638 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -3579,6 +3579,1

[Mesa-dev] [PATCH 07/74] glsl: lower SSBO reads to ir_binop_ssbo_load expressions

2015-05-14 Thread Iago Toral Quiroga
From: Kristian Høgsberg The same we do for UBO loads with ir_binop_ubo_load. --- src/glsl/lower_ubo_reference.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/glsl/lower_ubo_reference.cpp b/src/glsl/lower_ubo_reference.cpp index 4ea4ccb..fb8a890 100644 --- a/src

[Mesa-dev] [PATCH 14/74] mesa: Initialize and free shader storage buffers

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/main/bufferobj.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c5d4ada..a528787 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -836,6 +836,9 @@ _mesa_init_buffer_objects(

[Mesa-dev] [PATCH 15/74] mesa: Implement _mesa_DeleteBuffers for target GL_SHADER_STORAGE_BUFFER

2015-05-14 Thread Iago Toral Quiroga
--- src/mesa/main/bufferobj.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index a528787..0e762df 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1264,6 +1264,17 @@ _mesa_DeleteBuffers(GLsizei n, c

  1   2   >