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

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Notice that we should differentiate between shader storage blocks and uniform blocks, since they have different limits. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- src/glsl/linker.cpp | 43 +++

[Mesa-dev] [PATCH v5 24/70] glsl: allow default qualifiers for shader storage block definitions

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This kind of definitions: layout(xxx) buffer; was not supported by commit 84fc5fece006. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/glsl_parser.yy | 46 - src/glsl/glsl_parser_extras.cpp | 20 ++

[Mesa-dev] [PATCH v5 19/70] i965/wm: emit null buffer surfaces when null buffers are attached

2015-09-10 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 Reviewed-by:

[Mesa-dev] [PATCH v5 18/70] i965/fs/nir: implement nir_intrinsic_get_buffer_size

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 25 + 1 file changed, 25 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index a6c6a2f

[Mesa-dev] [PATCH v5 28/70] glsl: add std430 interface packing support to ssbo related operations

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez v2: - Get interface packing information from interface's type, not the variable type. - Simplify is_std430 condition in emit_access() for readability (Jordan) - Add a commment explaing why array of three-component vector case is different in std430 than the rest

[Mesa-dev] [PATCH v5 26/70] glsl: Add parser/compiler support for std430 interface packing qualifier

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez v2: - Fix a missing check in has_layout() Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 20 src/glsl/ast_type.cpp| 2 ++ src/

[Mesa-dev] [PATCH v5 05/70] i965: Set MaxShaderStorageBuffers for compute shaders

2015-09-10 Thread Iago Toral Quiroga
v2: - Set it after the driver's MaxShaderStorageBuffers value assignment. Reviewed-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 9982049

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

2015-09-10 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. As far as I can see this problem is only visible in the calculation of the length of unsized arrays used in SSBOs, as

[Mesa-dev] [PATCH v5 15/70] i965/vec4/nir: implement nir_intrinsic_get_buffer_size

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index

[Mesa-dev] [PATCH v5 12/70] glsl: implement unsized array length

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez v2: - Reduce the number of lines over 80 character line width limit. (Thomas Hellan) v3: - Inject the formula to compute the array length in the IR, backends only need to provide the buffer size (Curro) - Create an auxiliary function to simplify code (Jordan J

[Mesa-dev] [PATCH v5 08/70] i965/fs: Do not split buffer variables

2015-09-10 Thread Iago Toral Quiroga
Buffer variables are the same as uniforms, only that read/write, so we want the same treatment. Reviewed-by: Jordan Justen --- 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/me

[Mesa-dev] [PATCH v5 13/70] nir: Implement ir_unop_get_buffer_size

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This is how backends provide the buffer size required to compute the size of unsized arrays in the previous patch Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/nir/glsl_to_nir.cpp | 10 ++ src/glsl/nir/nir_intrinsics.h | 7 +++ 2 files chan

[Mesa-dev] [PATCH v5 02/70] i965: Use 16-byte offset alignment for shader storage buffers

2015-09-10 Thread Iago Toral Quiroga
This is the same we do for other things like uniforms because it ensures optimal performance. Reviewed-by: Jordan Justen --- 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_contex

[Mesa-dev] [PATCH v5 23/70] glsl: refactor parser processing of an interface block definition

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez --- src/glsl/ast.h | 5 ++ src/glsl/glsl_parser.yy | 127 +--- src/glsl/glsl_parser_extras.cpp | 122 ++ 3 files changed, 128 insertions(+), 126 deletions(-) diff -

[Mesa-dev] [PATCH v5 09/70] glsl: return error if unsized arrays are found in OpenGL ES

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ast_to_hir.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 72c6459..b67ae70 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl

[Mesa-dev] [PATCH v5 17/70] i965/fs: Implement FS_OPCODE_GET_BUFFER_SIZE

2015-09-10 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 ++ src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 47

[Mesa-dev] [PATCH v5 16/70] i965/vec4: Implement ir_unop_get_buffer_size

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH v5 14/70] i965/vec4: Implement VS_OPCODE_GET_BUFFER_SIZE

2015-09-10 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/mesa/drivers/dri/i965/brw_defines.h | 3 +++ src/mesa/drivers/dri/i965/brw_shader.cpp

[Mesa-dev] [PATCH v5 03/70] i965: Implement DriverFlags.NewShaderStorageBuffer

2015-09-10 Thread Iago Toral Quiroga
We use the same dirty state for SSBOs and UBOs because they share the same infrastructure. Reviewed-by: Jordan Justen --- 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/drive

[Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This patch sets the same value used for uniform buffers. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index b35031d..69acd7

[Mesa-dev] [PATCH v5 07/70] i965: handle visiting of ir_var_shader_storage variables

2015-09-10 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 +++-- 1 file changed, 3 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 f6e59ce..ec41262 100644 --- a/src/mesa/driv

Re: [Mesa-dev] [PATCH v2 3/3] glsl/cs: Initialize gl_GlobalInvocationID in main()

2015-09-10 Thread Alejandro Piñeiro
Not a full review, but a comment. See inline. On 23/08/15 09:09, Jordan Justen wrote: > We initialize gl_GlobalInvocationID based on the extension spec > formula: > > gl_GlobalInvocationID = > gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID > > https://www.opengl.org/registry/

Re: [Mesa-dev] [PATCH 1/5] nir: Don't insert a fake link if unnecessary.

2015-09-10 Thread Connor Abbott
On Wed, Sep 9, 2015 at 1:37 AM, Kenneth Graunke wrote: > On Saturday, September 05, 2015 11:10:58 AM Connor Abbott wrote: >> On Sat, Sep 5, 2015 at 2:31 AM, Kenneth Graunke >> wrote: >> > On Friday, September 04, 2015 11:56:29 AM Connor Abbott wrote: >> >> I'm confused as to how this can happen.

Re: [Mesa-dev] [PATCH] ralloc: Use __attribute__((destructor)) instead of atexit(3)

2015-09-10 Thread Jose Fonseca
On 10/09/15 02:54, Ian Romanick wrote: On 09/07/2015 06:54 AM, Jose Fonseca wrote: On 07/09/15 10:17, Jean-Sébastien Pédron wrote: On 04.09.2015 01:37, Matt Turner wrote: You need to test for this support in configure.ac. It's as simple as adding a call to AX_GCC_FUNC_ATTRIBUTE in the existing

[Mesa-dev] [PATCH v2 03/10] softpipe: Split compute_lambda_lod into two functions

2015-09-10 Thread Krzesimir Nowak
textureQueryLod returns a vec2 with a mipmap information and a LOD. The latter needs to be not clamped. v2: - changed the "not_clamped" part to "unclamped" - corrected "clamp into" to "clamp to" - splitted too long lines Reviewed-by: Brian Paul --- src/gallium/drivers/softpipe/sp_tex_samp

[Mesa-dev] [PATCH v2 09/10] softpipe: Implement and enable textureQueryLod

2015-09-10 Thread Krzesimir Nowak
Passes the shader piglit tests and introduces no regressions. This commit finally makes use of the refactoring in previous commits. v2: - adapted the code to changes in previous commits (renames, need_cube_convert stuff) - splitted too long lines Reviewed-by: Brian Paul --- src/gallium

[Mesa-dev] [PATCH v2 01/10] tgsi: Remove trailing backslash in comment

2015-09-10 Thread Krzesimir Nowak
It clearly is here by accident. Reviewed-by: Brian Paul --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 75cd0d5..9544623 100644 --- a/src/gallium/

[Mesa-dev] [PATCH v2 02/10] softpipe: Fix textureLod with nonzero GL_TEXTURE_LOD_BIAS value

2015-09-10 Thread Krzesimir Nowak
The level-of-detail bias wasn't simply added in the explicit LOD case. This case seems to be tested only in piglit's fs-texturequerylod-nearest-biased test, which is currently skipped, as softpipe does not support textureQueryLod at the moment. Reviewed-by: Brian Paul --- src/gallium/drivers/sof

[Mesa-dev] [PATCH v2 07/10] softpipe: Add functions for computing relative mipmap level

2015-09-10 Thread Krzesimir Nowak
These functions will be used by textureQueryLod. v2: - renamed mip_level_* funcs to mip_rel_level_* to indicate that these functions return mip level relative to base level and documented them - renamed a level member in sp_filter_funcs struct to relative_level - changed mip_rel_lev

[Mesa-dev] [PATCH v2 05/10] softpipe: Split code getting a filter into separate function

2015-09-10 Thread Krzesimir Nowak
This function will be later used by textureQueryLod. The img_filter_func are optional, because textureQueryLod will not need them. v2: - adapted to changes in previous commit (renames) - simplified conditions a bit - updated docs - splitted too long lines Reviewed-by: Brian Paul --- src

[Mesa-dev] [PATCH v2 08/10] tgsi: Add code for handling lodq opcode

2015-09-10 Thread Krzesimir Nowak
This introduces new vfunc in tgsi_sampler just for this opcode. I decided against extending get_samples vfunc to return the mipmap level and LOD - the function's prototype is already too scary and doing the sampling for textureQueryLod would be a waste of time. v2: - splitted too long lines Rev

[Mesa-dev] [PATCH v2 10/10] docs: Update wrt. textureQueryLod on softpipe

2015-09-10 Thread Krzesimir Nowak
--- docs/GL3.txt | 2 +- docs/relnotes/11.1.0.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 561f204..8ad1aac 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -116,7 +116,7 @@ GL 4.0, GLSL 4.00 --- all DONE: nvc0, radeonsi

[Mesa-dev] [PATCH v2 04/10] softpipe: Put mip_filter_func inside a struct

2015-09-10 Thread Krzesimir Nowak
Putting this function pointer into a struct enables grouping of several related functions in a single place. For now it is just a single function, but the struct will be later extended with a mip_level_func for returning relative mip level. v2: - renamed sp_mip struct to sp_filter_funcs - rena

[Mesa-dev] [PATCH v2 06/10] softpipe: Split 3D to 2D coords conversion into separate function

2015-09-10 Thread Krzesimir Nowak
This is to avoid tying the conversion to the sampling - textureQueryLod will need to do the conversion too, but it does not do any sampling. So instead of a "get_samples" vfunc, there is just a bool saying whether the conversion is needed or not. This solution keeps a nice property of not adding a

[Mesa-dev] [PATCH v2 00/10] Reroll of textureQueryLod in softpipe

2015-09-10 Thread Krzesimir Nowak
I tried to address most of the issues and nitpicks you had in previous version. Please see updated commit messages to see what has changed. I also added another commit updating the release notes and the GL3.txt. Krzesimir Nowak (10): tgsi: Remove trailing backslash in comment softpipe: Fix te

Re: [Mesa-dev] [PATCH 2/7] vbo: Add a predraw resolve callback

2015-09-10 Thread Marek Olšák
Hi Chris, Instead of the nop functions, could you just do: if (vbo_context(ctx)->resolve) vbo_context(ctx)->resolve(ctx); Marek On Wed, Sep 9, 2015 at 3:38 PM, Chris Wilson wrote: > A common problem with using HiZ and multisampling is that surfaces need > to resolved prior to use. Currently

Re: [Mesa-dev] [PATCH 9/9] softpipe: Implement and enable textureQueryLod

2015-09-10 Thread Krzesimir Nowak
On Wed, Sep 9, 2015 at 5:26 PM, Brian Paul wrote: > On 09/09/2015 04:35 AM, Krzesimir Nowak wrote: > >> Passes the shader piglit tests and introduces no regressions. >> >> This commit finally makes use of the refactoring in previous >> commits. >> --- >> src/gallium/drivers/softpipe/sp_screen.c

Re: [Mesa-dev] [PATCH 8/9] tgsi: Add code for handling lodq opcode

2015-09-10 Thread Krzesimir Nowak
On Wed, Sep 9, 2015 at 5:26 PM, Brian Paul wrote: > On 09/09/2015 04:35 AM, Krzesimir Nowak wrote: > >> This introduces new vfunc in tgsi_sampler just for this opcode. I >> decided against extending get_samples vfunc to return the mipmap level >> and LOD - the function's prototype is already too

Re: [Mesa-dev] [PATCH 7/9] softpipe: Add functions for computing mipmap level

2015-09-10 Thread Krzesimir Nowak
On Wed, Sep 9, 2015 at 8:19 PM, Ilia Mirkin wrote: > On Wed, Sep 9, 2015 at 2:17 PM, Roland Scheidegger > wrote: > > Am 09.09.2015 um 12:35 schrieb Krzesimir Nowak: > >> These functions will be used by textureQueryLod. > >> --- > >> src/gallium/drivers/softpipe/sp_tex_sample.c | 100 > +

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #9 from Albert Freeman --- When I said "bug in the game", I meant "bug with the game". Can you upload another trace (please try to reproduce the bug as fast as possible (since parts of the trace can't be skipped since the game could

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #8 from Albert Freeman --- Created attachment 118184 --> https://bugs.freedesktop.org/attachment.cgi?id=118184&action=edit Warning messages from apitrace replay before "export MESA_EXTENSION_OVERRIDE=GL_ARB_gpu_shader5" -- You are

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #7 from Albert Freeman --- *with the replay -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] mesa: Match MESA_FORMAT_B5G6R5 for a shallow pixel format of GL_RGB

2015-09-10 Thread Erik Faye-Lund
On Wed, Sep 9, 2015 at 12:41 PM, Chris Wilson wrote: > On Wed, Sep 09, 2015 at 12:09:40PM +0200, Erik Faye-Lund wrote: >> On Wed, Sep 9, 2015 at 11:25 AM, Chris Wilson >> wrote: >> > On Wed, Sep 09, 2015 at 11:11:59AM +0200, Erik Faye-Lund wrote: >> >> On Thu, Sep 3, 2015 at 6:05 PM, Chris Wilso

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #6 from Albert Freeman --- I even get the same visual corruption with an Intel Sandybridge laptop with mesa git drivers. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. _

[Mesa-dev] [Bug 91889] Planetary Anihilation: Titans display content of other processes buffers

2015-09-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91889 --- Comment #5 from Albert Freeman --- The GPU has its own physical ram that is managed with a completely different system than system ram. There are actually two issues here. One is the bug in the game causing strange behavior. The other is the

Re: [Mesa-dev] [PATCH 2/3] glsl: Use hash tables for brw_fs_vector_splitting().

2015-09-10 Thread Kenneth Graunke
On Saturday, September 05, 2015 08:39:22 PM Timothy Arceri wrote: > On Sat, 2015-09-05 at 02:21 -0700, Kenneth Graunke wrote: > > Cuts compile/link time of the fragment shader in #91857 by 25% > > (21.64 -> 16.28). > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91857 > > Signed-off

Re: [Mesa-dev] [PATCH 2/7] vbo: Add a predraw resolve callback

2015-09-10 Thread Chris Wilson
On Wed, Sep 09, 2015 at 10:19:10AM -0700, Ian Romanick wrote: > On 09/09/2015 10:10 AM, Kenneth Graunke wrote: > > On Wednesday, September 09, 2015 02:38:56 PM Chris Wilson wrote: > >> A common problem with using HiZ and multisampling is that surfaces need > >> to resolved prior to use. Currently i

<    1   2   3