Re: [Mesa-dev] [PATCH 07/16] nvc0: fix queries which use multiple MP counters on Fermi

2015-10-16 Thread Samuel Pitoiset
On 10/16/2015 07:32 PM, Ilia Mirkin wrote: Other than the missing * (1 << c), what was wrong with the old logic? MP counters were always configured starting from slot 0 to cfg->num_src. So, if you monitored two hardware events at the same time, the first one was overwritten by the second

Re: [Mesa-dev] [PATCH 07/16] nvc0: fix queries which use multiple MP counters on Fermi

2015-10-16 Thread Ilia Mirkin
Other than the missing * (1 << c), what was wrong with the old logic? On Fri, Oct 16, 2015 at 1:22 PM, Samuel Pitoiset wrote: > Queries which use more than one MP counters was misconfigured and > computing the final result was also wrong because sources need to > be

Re: [Mesa-dev] [PATCH 16/16] nvc0: add a note about MP counters on GF100/GF110

2015-10-16 Thread Ilia Mirkin
Series is Reviewed-by: Ilia Mirkin I had a couple of very minor comments that you can feel free to accept or ignore. On Fri, Oct 16, 2015 at 1:22 PM, Samuel Pitoiset wrote: > MP counters on GF100/GF110 (compute capability 2.0) are buggy >

Re: [Mesa-dev] [PATCH 15/16] nvc0: add MP counters variants for GF100/GF110

2015-10-16 Thread Ilia Mirkin
Minor preferences for naming things SM20/SM21 when referring to compute capabilities, but your call. On Fri, Oct 16, 2015 at 1:22 PM, Samuel Pitoiset wrote: > GF100 and GF110 chipsets are compute capability 2.0, while the other > Fermi chipsets are compute capability

Re: [Mesa-dev] [PATCH 10/16] nvc0: store the number of GPCs to nvc0_screen

2015-10-16 Thread Ilia Mirkin
On Fri, Oct 16, 2015 at 1:22 PM, Samuel Pitoiset wrote: > NOUVEAU_GETPARAM_GRAPH_UNITS param returns the number of GPCs, the total > number of TPCs and the number of ROP units. Note that when the DRM > version is too old the default number of GPCs is fixed to 4. > >

Re: [Mesa-dev] [PATCH 16/16] nvc0: add a note about MP counters on GF100/GF110

2015-10-16 Thread Samuel Pitoiset
On 10/16/2015 07:50 PM, Ilia Mirkin wrote: Series is Reviewed-by: Ilia Mirkin I had a couple of very minor comments that you can feel free to accept or ignore. Thank you for this review Ilia, and I think I'll accept all of your changes. :) On Fri, Oct 16, 2015 at

[Mesa-dev] [PATCH 00/16] nvc0: improve MP counters support on Fermi

2015-10-16 Thread Samuel Pitoiset
Hello, This series fixes some issues related to MP performance counters on Fermi. MP counters for GF100/GF110 have also been improved because they are compute capability 2.0 while the other Fermi chipsets are 2.1 and some HW events are different. Compute support is now enabled by default on

[Mesa-dev] [PATCH 12/16] nvc0: allow only one active query for the MP counters group

2015-10-16 Thread Samuel Pitoiset
Because we can't expose the number of hardware counters needed for each different query, we don't want to allow more than one active query simultaneously to avoid failure when the maximum number of counters is reached. Note that these groups of GPU counters are currently only used by

[Mesa-dev] [PATCH 16/16] nvc0: add a note about MP counters on GF100/GF110

2015-10-16 Thread Samuel Pitoiset
MP counters on GF100/GF110 (compute capability 2.0) are buggy because there is a context-switch problem that we need to fix. Results might be wrong sometimes, be careful! Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c | 5 +

[Mesa-dev] [PATCH 15/16] nvc0: add MP counters variants for GF100/GF110

2015-10-16 Thread Samuel Pitoiset
GF100 and GF110 chipsets are compute capability 2.0, while the other Fermi chipsets are compute capability 2.1. That's why, some MP counters are different between these chipsets and we need to handle variants. Signed-off-by: Samuel Pitoiet ---

[Mesa-dev] [PATCH 11/16] nvc0: read MP counters of all GPCs on Fermi

2015-10-16 Thread Samuel Pitoiset
When a card has more than one GPC, the grid used by the compute kernel which reads MP performance counters seems to be too small. The consequence is that the kernel is not launched on all TPCs. Increasing the grid size using the number of GPCs now launches enough blocks and we can read MP

[Mesa-dev] [PATCH 14/16] nvc0: move SW/HW queries info to their respective files

2015-10-16 Thread Samuel Pitoiset
This will help for handling HW SM queries variants on Fermi. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 185 + src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c | 14 ++

[Mesa-dev] [PATCH 06/16] nvc0: allow to use 8 MP counters on Fermi

2015-10-16 Thread Samuel Pitoiset
On Fermi, we have one domain of 8 MP counters while we have two domains of 4 MP counters on Kepler. Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c| 30 +- .../drivers/nouveau/nvc0/nvc0_query_hw_sm.h|

[Mesa-dev] [PATCH 02/16] nvc0: split out begin_query() hook used by MP counters

2015-10-16 Thread Samuel Pitoiset
The way we configure MP performance counters is going to pretty different between Fermi and Kepler. Having two separate functions is much better. Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c| 108 - 1 file

[Mesa-dev] [PATCH 08/16] nvc0: fix monitoring multiple MP counters queries on Fermi

2015-10-16 Thread Samuel Pitoiset
For strange reasons, the signal id depends on the slot selected on Fermi but not on Kepler. Fortunately, the signal ids are just offseted by the slot id! Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c| 147 +++--

[Mesa-dev] [PATCH 13/16] nvc0: enable compute support by default on Fermi

2015-10-16 Thread Samuel Pitoiset
Compute support was not enabled by default because weird effects on 3D state happened, but I can't reproduce them anymore. This also enables MP performance counters by default on Fermi. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c

[Mesa-dev] [PATCH 05/16] nvc0: fix sequence field init for MP counters on Fermi

2015-10-16 Thread Samuel Pitoiset
Sequence fields are located at MP[i] + 0x20 in the buffer object. This is used to check if result is available for MP[i]. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[Mesa-dev] [PATCH 07/16] nvc0: fix queries which use multiple MP counters on Fermi

2015-10-16 Thread Samuel Pitoiset
Queries which use more than one MP counters was misconfigured and computing the final result was also wrong because sources need to be configured on different hardware counters instead. According to the blob, computing the result is now as follows: FOR i..n val += ctr[i] * pow(2, i)

[Mesa-dev] [PATCH 01/16] nvc0: remove useless call to query_get_cfg() in nvc0_hw_sm_query_end()

2015-10-16 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c

[Mesa-dev] [PATCH 04/16] nvc0: correctly enable the MP counters' multiplexer on Fermi

2015-10-16 Thread Samuel Pitoiset
Writing 0x408000 to 0x419e00 (like on Kepler) has no effect on Fermi because we only have one domain of 8 counters. Instead, we have to write 0x8000. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c | 5 + 1 file changed,

[Mesa-dev] [PATCH 03/16] nvc0: rip off the kepler MP-enabling logic from the Fermi codepath

2015-10-16 Thread Samuel Pitoiset
Writing 0x1fcb to 0x419eac is definitely not related to MP counters and has no effect on Fermi (although this enables MP counters on Kepler). Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c | 8 +--- 1 file changed, 1

[Mesa-dev] [PATCH 09/16] nvc0: fix unaligned mem access when reading MP counters on Fermi

2015-10-16 Thread Samuel Pitoiset
Memory access have to be aligned to 128-bits. Note that this doesn't happen when the card only has TPC. This patch fixes the following dmesg fail: gr: GPC0/TPC1/MP trap: global 0004 [MULTIPLE_WARP_ERRORS] warp 000f [UNALIGNED_MEM_ACCESS] Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH 10/16] nvc0: store the number of GPCs to nvc0_screen

2015-10-16 Thread Samuel Pitoiset
NOUVEAU_GETPARAM_GRAPH_UNITS param returns the number of GPCs, the total number of TPCs and the number of ROP units. Note that when the DRM version is too old the default number of GPCs is fixed to 4. This will be used to launch the compute kernel which is used to read MP performance counters

Re: [Mesa-dev] [PATCH 10/16] nvc0: store the number of GPCs to nvc0_screen

2015-10-16 Thread Samuel Pitoiset
On 10/16/2015 07:24 PM, Ilia Mirkin wrote: On Fri, Oct 16, 2015 at 1:22 PM, Samuel Pitoiset wrote: NOUVEAU_GETPARAM_GRAPH_UNITS param returns the number of GPCs, the total number of TPCs and the number of ROP units. Note that when the DRM version is too old the

Re: [Mesa-dev] [PATCH 1/5] main: Use NumUniformBlocks to count UBOs

2015-10-16 Thread Kristian Høgsberg
On Fri, Oct 16, 2015 at 2:58 AM, Iago Toral Quiroga wrote: > Now that we have separate index spaces for UBOs and SSBOs we do not need > to iterate through BufferInterfaceBlocks any more, we can just take the > UBO count directly from NumUniformBlocks. Nice cleanup, all five

Re: [Mesa-dev] [PATCH] nvc0: add support for performance monitoring metrics on Fermi

2015-10-16 Thread Samuel Pitoiset
On 10/16/2015 11:57 PM, Ilia Mirkin wrote: On Fri, Oct 16, 2015 at 5:35 PM, Samuel Pitoiset wrote: On 10/16/2015 11:22 PM, Ilia Mirkin wrote: On Fri, Oct 16, 2015 at 5:29 PM, Samuel Pitoiset wrote: As explained in the CUDA toolkit

Re: [Mesa-dev] [PATCH 2/2] mesa: fix incorrect opcode in save_BlendFunci()

2015-10-16 Thread Jose Fonseca
On 15/10/15 15:51, Brian Paul wrote: Fixes assertion failure with new piglit arb_draw_buffers_blend-state_set_get test. Cc: mesa-sta...@lists.freedesktop.org --- src/mesa/main/dlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/dlist.c

Re: [Mesa-dev] [PATCH] nvc0: add support for performance monitoring metrics on Fermi

2015-10-16 Thread Samuel Pitoiset
On 10/16/2015 11:22 PM, Ilia Mirkin wrote: On Fri, Oct 16, 2015 at 5:29 PM, Samuel Pitoiset wrote: As explained in the CUDA toolkit documentation, "a metric is a characteristic of an application that is calculated from one or more event values." Signed-off-by:

Re: [Mesa-dev] [PATCH] nvc0: add support for performance monitoring metrics on Fermi

2015-10-16 Thread Ilia Mirkin
On Fri, Oct 16, 2015 at 5:29 PM, Samuel Pitoiset wrote: > As explained in the CUDA toolkit documentation, "a metric is a > characteristic of an application that is calculated from one or more > event values." > > Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH 04/10] vbo: replace the comment on vbo_copy_vertices()

2015-10-16 Thread Brian Paul
--- src/mesa/vbo/vbo_exec_draw.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 174cbc3..781991b 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -64,9 +64,13 @@

[Mesa-dev] [PATCH 01/10] tnl: add some comments in render_line_loop code

2015-10-16 Thread Brian Paul
And remove '(void) flags' line which is not needed. --- src/mesa/tnl/t_vb_rendertmp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h index 44dee76..26a1695 100644 --- a/src/mesa/tnl/t_vb_rendertmp.h +++

[Mesa-dev] [PATCH 09/10] vbo: fix GL_LINE_LOOP stray line bug

2015-10-16 Thread Brian Paul
When long GL_LINE_LOOP primitives don't fit in one vertex buffer they have to be split across buffers. The code to do this was basically correct but drivers had to pay special attention to the _mesa_prim::begin,end flags in order to draw the sections of the line loop properly. Apparently, the

[Mesa-dev] [PATCH 05/10] vbo: simplify some code in vbo_exec_wrap_buffers()

2015-10-16 Thread Brian Paul
Use a new 'last_prim' pointer to simplify things. --- src/mesa/vbo/vbo_exec_api.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index c1f2146..2a78eac 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++

[Mesa-dev] [PATCH 07/10] vbo: simplify some code in vbo_exec_End()

2015-10-16 Thread Brian Paul
--- src/mesa/vbo/vbo_exec_api.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 2a78eac..903aa42 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -823,11 +823,10 @@ static void

[Mesa-dev] [PATCH 08/10] vbo: add new vbo_compute_max_verts() helper function

2015-10-16 Thread Brian Paul
--- src/mesa/vbo/vbo_context.h | 14 ++ src/mesa/vbo/vbo_exec_api.c | 3 +-- src/mesa/vbo/vbo_exec_draw.c | 3 +-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h index a376efe..1e85335 100644 ---

[Mesa-dev] [PATCH 03/10] vbo: make vbo_exec_vtx_wrap() static

2015-10-16 Thread Brian Paul
--- src/mesa/vbo/vbo_exec.h | 2 -- src/mesa/vbo/vbo_exec_api.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h index 00378eb..a80b2c9 100644 --- a/src/mesa/vbo/vbo_exec.h +++ b/src/mesa/vbo/vbo_exec.h @@ -160,8 +160,6

[Mesa-dev] [PATCH 06/10] vbo: simplify some code in vbo_exec_debug_verts()

2015-10-16 Thread Brian Paul
As before, use a new 'last_prim' pointer to simplify things. Plus, add some const qualifiers. --- src/mesa/vbo/vbo_exec_draw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 781991b..412ebb6

[Mesa-dev] [PATCH 02/10] vbo: remove unneeded ctx parameter for merge_prims()

2015-10-16 Thread Brian Paul
--- src/mesa/vbo/vbo_save_api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index fdc677f..6688ba0 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -330,8 +330,7 @@

Re: [Mesa-dev] [PATCH] nvc0: add support for performance monitoring metrics on Fermi

2015-10-16 Thread Ilia Mirkin
On Fri, Oct 16, 2015 at 5:35 PM, Samuel Pitoiset wrote: > > > On 10/16/2015 11:22 PM, Ilia Mirkin wrote: >> >> On Fri, Oct 16, 2015 at 5:29 PM, Samuel Pitoiset >> wrote: >>> >>> As explained in the CUDA toolkit documentation, "a metric is a

[Mesa-dev] [PATCH] nvc0: add support for performance monitoring metrics on Fermi

2015-10-16 Thread Samuel Pitoiset
As explained in the CUDA toolkit documentation, "a metric is a characteristic of an application that is calculated from one or more event values." Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/Makefile.sources | 2 +

[Mesa-dev] [PATCH 10/10] vbo: convert display list GL_LINE_LOOP prims to GL_LINE_STRIP

2015-10-16 Thread Brian Paul
When a long GL_LINE_LOOP prim was split across primitives we drew stray lines. See previous commit for details. This patch converts GL_LINE_LOOP prims into GL_LINE_STRIP prims so that drivers don't have to worry about the _mesa_prim::begin/end flags. Bugzilla:

[Mesa-dev] [Bug 81174] Gallium: GL_LINE_LOOP broken with more than 512 points

2015-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=81174 --- Comment #16 from Brian Paul --- I'm digging into this bug because it pertains to an issue with a particular app and the VMware gallium driver. The VBO code for splitting GL_LINE_LOOP is actually correct, I believe, but

Re: [Mesa-dev] [PATCH 2/7] nir: add atomic lowering support for AoA

2015-10-16 Thread Jason Ekstrand
On Oct 15, 2015 16:29, "Timothy Arceri" wrote: > > Cc: Francisco Jerez > Cc: Jason Ekstrand > --- > src/glsl/nir/nir_lower_atomics.c | 22 -- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff

[Mesa-dev] [PATCH] glsl: fix check SSBOs support for builtin functions

2015-10-16 Thread Samuel Iglesias Gonsalvez
has_shader_storage_buffer_objects() returns true also if the OpenGL context is 4.30 or ES 3.1. Previously, we were saying that all atomic*() GLSL builtin functions for SSBOs were not available when OpenGL ES 3.1 context was in use. Fixes 48 dEQP-GLES31 tests:

Re: [Mesa-dev] Mesa (master): mesa: remove FLUSH_VERTICES() in _mesa_MatrixMode()

2015-10-16 Thread Michel Dänzer
Hi Brian, On 15.10.2015 22:23, Brian Paul wrote: > Module: Mesa > Branch: master > Commit: 0de5e0f3fb0f3671a3ecec6ab4473f9131ecd0ae > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=0de5e0f3fb0f3671a3ecec6ab4473f9131ecd0ae > > Author: Brian Paul > Date: Wed

[Mesa-dev] [PATCH v2] mesa: Set api prefix to version string when overriding version

2015-10-16 Thread Tapani Pälli
Otherwise there are problems when user overrides version and application such as Piglit wants to detect used api with glGetString(GL_VERSION). This makes it currently impossible to run glslparsertest tests for OpenGL ES when using version override. Below is example when using

[Mesa-dev] [PATCH 2/2] vc4: Use nir_foreach_variable

2015-10-16 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/vc4/vc4_nir_lower_blend.c | 2 +- src/gallium/drivers/vc4/vc4_nir_lower_io.c| 4 ++-- src/gallium/drivers/vc4/vc4_program.c | 8 3 files changed, 7 insertions(+), 7 deletions(-) diff --git

[Mesa-dev] [PATCH 1/2] freedreno_ir3: Use nir_foreach_variable

2015-10-16 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index

Re: [Mesa-dev] [PATCH v2 12/17] i965/vs: Rework vs_emit to take a nir_shader and a brw_compiler

2015-10-16 Thread Pohjolainen, Topi
On Thu, Oct 15, 2015 at 07:29:31AM -0700, Jason Ekstrand wrote: >On Oct 14, 2015 10:48 PM, "Pohjolainen, Topi" >wrote: >> >> On Wed, Oct 14, 2015 at 11:53:37AM -0700, Jason Ekstrand wrote: >> > On Wed, Oct 14, 2015 at 1:41 AM, Pohjolainen, Topi >

Re: [Mesa-dev] [PATCH] glsl: fix check SSBOs support for builtin functions

2015-10-16 Thread Iago Toral
On Fri, 2015-10-16 at 09:10 +0200, Samuel Iglesias Gonsalvez wrote: > has_shader_storage_buffer_objects() returns true also if the OpenGL > context is 4.30 or ES 3.1. > > Previously, we were saying that all atomic*() GLSL builtin functions > for SSBOs were not available when OpenGL ES 3.1 context

Re: [Mesa-dev] [PATCH 2/3] i965: Implement a new type_size_4x() function.

2015-10-16 Thread Jason Ekstrand
On Oct 15, 2015 16:14, "Connor Abbott" wrote: > > On Thu, Oct 15, 2015 at 6:17 PM, Kenneth Graunke wrote: > > Often, shader inputs/outputs are required to be aligned to vec4 slots > > for one reason or another. When working with the scalar backend, we

[Mesa-dev] [PATCH] st/mesa: convert programs to gl_program *

2015-10-16 Thread Boyan Ding
Fixes following warnings: state_tracker/st_cb_program.c: In function ‘st_new_program’: state_tracker/st_cb_program.c:108:36: warning: passing argument 1 of ‘_mesa_init_gl_program’ from incompatible pointer type [-Wincompatible-pointer-types] return _mesa_init_gl_program(>Base, target, id);

Re: [Mesa-dev] [PATCH 15/17] i965/fs: Move some of the prog_data setup into brw_wm_emit

2015-10-16 Thread Pohjolainen, Topi
On Fri, Oct 09, 2015 at 05:50:22AM -0700, Jason Ekstrand wrote: > On Fri, Oct 9, 2015 at 12:10 AM, Pohjolainen, Topi > wrote: > > On Thu, Oct 08, 2015 at 05:22:47PM -0700, Jason Ekstrand wrote: > >> This commit moves the common/modern stuff. Some legacy stuff such as

Re: [Mesa-dev] [PATCH] glsl: fix check SSBOs support for builtin functions

2015-10-16 Thread Samuel Iglesias Gonsálvez
On 16/10/15 09:36, Iago Toral wrote: > On Fri, 2015-10-16 at 09:10 +0200, Samuel Iglesias Gonsalvez wrote: >> has_shader_storage_buffer_objects() returns true also if the OpenGL >> context is 4.30 or ES 3.1. >> >> Previously, we were saying that all atomic*() GLSL builtin functions >> for SSBOs

Re: [Mesa-dev] [PATCH] glsl: fix check SSBOs support for builtin functions

2015-10-16 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 10/16/2015 10:10 AM, Samuel Iglesias Gonsalvez wrote: has_shader_storage_buffer_objects() returns true also if the OpenGL context is 4.30 or ES 3.1. Previously, we were saying that all atomic*() GLSL builtin functions for SSBOs were not

Re: [Mesa-dev] [PATCH 1/3] i965/nir: Switch on shader stage in nir_lower_outputs().

2015-10-16 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Oct 15, 2015 15:17, "Kenneth Graunke" wrote: > VS, GS, and FS continue doing the same thing they did before. We can > simplify the FS code a bit because it is always scalar. > > Compute shaders now assert that

Re: [Mesa-dev] [PATCH 3/3] i965: Fix scalar VS float[] and vec2[] output arrays.

2015-10-16 Thread Jason Ekstrand
On Oct 15, 2015 15:17, "Kenneth Graunke" wrote: > > The scalar VS backend has never handled float[] and vec2[] outputs > correctly (my original code was broken). Outputs need to be padded > out to vec4 slots. > > In fs_visitor::nir_setup_outputs(), we tried to process each

[Mesa-dev] [Bug 92278] Black screen in War Thunder

2015-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92278 --- Comment #2 from Tapani Pälli --- On quick glance at the trace it looks like one issue here is that Mesa does not expose EXT variants for TextureParameteri and TextureParameterfv but exposing those won't fix this as there

Re: [Mesa-dev] [PATCH v2] mesa: Set api prefix to version string when overriding version

2015-10-16 Thread Boyan Ding
2015-10-16 14:36 GMT+08:00 Tapani Pälli : > Otherwise there are problems when user overrides version and application > such as Piglit wants to detect used api with glGetString(GL_VERSION). > > This makes it currently impossible to run glslparsertest tests for > OpenGL ES

[Mesa-dev] [Bug 92361] [BSW SKL] Regression: glx@glx-copy-sub-buffer failed

2015-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92361 --- Comment #3 from cprigent --- New result with last setup (Mesa 11.0.3).: glx@glx-copy-sub-buffer Not run glx@glx-copy-sub-buffer samples=2 Fail glx@glx-copy-sub-buffer samples=4 Fail glx@glx-copy-sub-buffer

[Mesa-dev] [PATCH 2/5] main: GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH is about UBOS, not SSBOs

2015-10-16 Thread Iago Toral Quiroga
--- src/mesa/main/shaderapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 26995ad..18e463d 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -713,10 +713,10 @@ get_programiv(struct

[Mesa-dev] [PATCH 5/5] glsl_to_tgsi: Use {Num}UniformBlocks instead of {Num}BufferInterfaceBlocks

2015-10-16 Thread Iago Toral Quiroga
The latter holds both UBOs and SSBOs, but here we only want UBOs. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 06f510d..f481e89

[Mesa-dev] [PATCH 4/5] st/mesa: Use {Num}UniformBlocks instead of {Num}BufferInterfaceBlocks

2015-10-16 Thread Iago Toral Quiroga
The latter holds both UBOs and SSBOs, but here we only want UBOs. --- src/mesa/state_tracker/st_atom_constbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 69e26cb..acaa85d

[Mesa-dev] [PATCH 3/5] i965: Do not use NumBufferInterfaceBlocks

2015-10-16 Thread Iago Toral Quiroga
This is the only place in the driver where we use this. Since we now work with separate index spaces, always use NumUniformBlocks and NumShaderStorageBlocks instead of NumBufferInterfaceBlocks to be more consistent with the rest of the code. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |

Re: [Mesa-dev] [PATCH v2] mesa: Set api prefix to version string when overriding version

2015-10-16 Thread Iago Toral
On Fri, 2015-10-16 at 09:36 +0300, Tapani Pälli wrote: > Otherwise there are problems when user overrides version and application > such as Piglit wants to detect used api with glGetString(GL_VERSION). > > This makes it currently impossible to run glslparsertest tests for > OpenGL ES when using

[Mesa-dev] [PATCH 1/5] main: Use NumUniformBlocks to count UBOs

2015-10-16 Thread Iago Toral Quiroga
Now that we have separate index spaces for UBOs and SSBOs we do not need to iterate through BufferInterfaceBlocks any more, we can just take the UBO count directly from NumUniformBlocks. --- src/mesa/main/shaderapi.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 0/4] i965: skip control-flow aware liveness analysis if we only have 1 block

2015-10-16 Thread Iago Toral
On Wed, 2015-10-14 at 21:40 +0300, Francisco Jerez wrote: > Jordan Justen writes: > > > On 2015-10-13 22:49:08, Iago Toral wrote: > >> On Tue, 2015-10-13 at 09:44 -0700, Jordan Justen wrote: > >> > On 2015-10-13 05:17:37, Francisco Jerez wrote: > >> > > Iago Toral

Re: [Mesa-dev] [PATCH] i965: Fix is-renderable check in intel_image_target_renderbuffer_storage

2015-10-16 Thread Tapani Pälli
Tested-by: Tapani Pälli On 10/16/2015 12:01 AM, Ian Romanick wrote: From: Ian Romanick Previously we could create a renderbuffer with format MESA_FORMAT_R8G8B8A8_UNORM, convert that renderbuffer to an EGLImage, then FAIL to convert the

Re: [Mesa-dev] [RFC 1/2] gallium: add renderonly driver

2015-10-16 Thread Thierry Reding
On Fri, Oct 16, 2015 at 12:09:52AM +0100, Emil Velikov wrote: > Hi Christian, > > I'm glad to see Thierry's work revived. Hopefully this will soon be > the basis of many more drivers. > > On 11 October 2015 at 16:09, Christian Gmeiner > wrote: > > This commit adds a

Re: [Mesa-dev] [RFC 1/2] gallium: add renderonly driver

2015-10-16 Thread Thierry Reding
Hi Christian, First off, thanks for reviving this effort. It's been one of the things that I've had nagging at me for much too long and I think it needs to be solved. So I'm hopeful that the more people we get looking at this the more likely it will be to come up with a solution that works well

Re: [Mesa-dev] [PATCH] st/mesa: convert programs to gl_program *

2015-10-16 Thread Brian Paul
On 10/16/2015 01:16 AM, Boyan Ding wrote: Fixes following warnings: state_tracker/st_cb_program.c: In function ‘st_new_program’: state_tracker/st_cb_program.c:108:36: warning: passing argument 1 of ‘_mesa_init_gl_program’ from incompatible pointer type [-Wincompatible-pointer-types]

Re: [Mesa-dev] Mesa (master): mesa: remove FLUSH_VERTICES() in _mesa_MatrixMode()

2015-10-16 Thread Brian Paul
On 10/16/2015 08:17 AM, Brian Paul wrote: On 10/16/2015 12:36 AM, Michel Dänzer wrote: Hi Brian, On 15.10.2015 22:23, Brian Paul wrote: Module: Mesa Branch: master Commit: 0de5e0f3fb0f3671a3ecec6ab4473f9131ecd0ae URL:

Re: [Mesa-dev] [PATCH] i965/vs: Move URB entry_size and read_length calculations to compile_vs

2015-10-16 Thread Jason Ekstrand
Topi, Seeing as you're on a roll reviewing my move-the-code patches, mind one more? --Jason On Thu, Oct 15, 2015 at 12:06 PM, Jason Ekstrand wrote: > This patch applies on top of my previous series to shuffle a bunch of > the compiler code around. > > On Thu, Oct 15, 2015

Re: [Mesa-dev] [PATCH 15/17] i965/fs: Move some of the prog_data setup into brw_wm_emit

2015-10-16 Thread Jason Ekstrand
On Fri, Oct 16, 2015 at 12:35 AM, Pohjolainen, Topi wrote: > On Fri, Oct 09, 2015 at 05:50:22AM -0700, Jason Ekstrand wrote: >> On Fri, Oct 9, 2015 at 12:10 AM, Pohjolainen, Topi >> wrote: >> > On Thu, Oct 08, 2015 at 05:22:47PM -0700,

[Mesa-dev] [PATCH 2/2] Added support for NV12 to IYUV conversion in vlVaGetImage

2015-10-16 Thread Christian König
From: Indrajit Das Reviewed-by: Christian König --- src/gallium/state_trackers/va/image.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/va/image.c

[Mesa-dev] [PATCH 1/2] Used correct parameter to derive the value of the "h" variable in vlVaCreateImage

2015-10-16 Thread Christian König
From: Indrajit Das Reviewed-by: Christian König --- src/gallium/state_trackers/va/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c

Re: [Mesa-dev] Mesa (master): mesa: remove FLUSH_VERTICES() in _mesa_MatrixMode()

2015-10-16 Thread Brian Paul
On 10/16/2015 12:36 AM, Michel Dänzer wrote: Hi Brian, On 15.10.2015 22:23, Brian Paul wrote: Module: Mesa Branch: master Commit: 0de5e0f3fb0f3671a3ecec6ab4473f9131ecd0ae URL:

Re: [Mesa-dev] [PATCH 2/2] Added support for NV12 to IYUV conversion in vlVaGetImage

2015-10-16 Thread Emil Velikov
Hi guys, Out of curiosity - do you know off-hand about any users of IYUV/I420 ? I was under the impression that everyone is doing nv12/nv21/yv12 in 99% of the cases. On 16 October 2015 at 15:53, Christian König wrote: > From: Indrajit Das >

Re: [Mesa-dev] [PATCH 1/2] Used correct parameter to derive the value of the "h" variable in vlVaCreateImage

2015-10-16 Thread Emil Velikov
On 16 October 2015 at 15:53, Christian König wrote: > From: Indrajit Das > > Reviewed-by: Christian König Nicely spotted ! For the future use correct prefix for the summary ("st/va:" here, but git log will show you

[Mesa-dev] [PATCH 4/7] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-16 Thread Julien Isorce
Inspired from http://cgit.freedesktop.org/vaapi/intel-driver/tree/src/i965_drv_video.c Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c| 5 +- src/gallium/state_trackers/va/surface.c| 288 -

[Mesa-dev] [PATCH 0/7] st/va: VPP, dmabuf import and headless.

2015-10-16 Thread Julien Isorce
This patch serie adds initial support for Video Post Processing. It also implements VaCreateSurfaces2 for common purpose and also to import a dmabuf. Finally it adds support for headless mode, i.e. using DRM instead of X11 for device setup. Julien Isorce (7): nvc0: fix crash when

Re: [Mesa-dev] [PATCH 08/10] i965/meta: Assert fast clears and rep clears never overlap

2015-10-16 Thread Chad Versace
On Tue 13 Oct 2015, Ben Widawsky wrote: > There is nothing wrong with the code today, but as one modifies the code it > turns out to be not too difficult to mess up the code, and this easy assertion > should catch such driver implementation failures quickly. > > Cc: Kristian Høgsberg

[Mesa-dev] [PATCH 3/7] st/va: in VaPutImage only destroy previous buffer if pipe->create_video_buffer succeeds

2015-10-16 Thread Julien Isorce
If formats are not the same it seems to re-create the video buffer with the right format. But if the creation of this new video buffer fails the surface loose its video buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce ---

[Mesa-dev] [PATCH 2/7] st/va: properly defines VAImageFormat formats and improve VaCreateImage

2015-10-16 Thread Julien Isorce
Also add RGBA, RGBX and BGRX. Also extend ChromaToPipe and implement PipeToYCbCr. Note that gstreamer-vaapi check all the VAImageFormat fields. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/image.c | 10 ++--

Re: [Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-10-16 Thread Ilia Mirkin
On Fri, Oct 16, 2015 at 6:13 PM, Julien Isorce wrote: > > > On 18 September 2015 at 21:34, Ilia Mirkin wrote: >> >> On Fri, Sep 18, 2015 at 4:29 PM, Julien Isorce >> wrote: >> > >> > >> > On 17 September 2015 at 17:52, Ilia

Re: [Mesa-dev] [PATCH 01/10] tnl: add some comments in render_line_loop code

2015-10-16 Thread Brian Paul
On 10/16/2015 04:14 PM, Matt Turner wrote: On Fri, Oct 16, 2015 at 2:25 PM, Brian Paul wrote: And remove '(void) flags' line which is not needed. --- src/mesa/tnl/t_vb_rendertmp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 2/4] st/mesa: check of out-of-memory in st_DrawPixels()

2015-10-16 Thread Brian Paul
On 10/16/2015 04:11 PM, Jose Fonseca wrote: On 15/10/15 20:01, Brian Paul wrote: Before, if make_texture() or st_create_texture_sampler_view() failed we silently no-op'd the glDrawPixels. Now, set GL_OUT_OF_MEMORY. This also allows us to un-nest a bunch of code. ---

[Mesa-dev] [PATCH 7/7] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-16 Thread Julien Isorce
This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/Makefile.am | 9 ++ src/gallium/state_trackers/va/context.c | 49 +++

[Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-16 Thread Julien Isorce
Improve following functions to support VA_PROFILE_NONE profile (vpp): vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Add VADriverVTableVPP and improve following functions to support vpp: vlVaCreateContext vlVaDestroyContext vlVaBeginPicture

Re: [Mesa-dev] [PATCH 01/10] i965/gen8+: Remove redundant zeroing of surface state

2015-10-16 Thread Chad Versace
On Tue 13 Oct 2015, Ben Widawsky wrote: > The allocate_surface_state already zeroes out the surface state, and doing it > later in the function is destructive for what we want to accomplish when we > split out support for gen9 fast clears (next patch). > > NOTE: Only dword 12 actually needed to

[Mesa-dev] [PATCH 5/7] st/va: implement dmabuf import for VaCreateSurfaces2

2015-10-16 Thread Julien Isorce
For now it is limited to RGBA, BGRA, RGBX, BGRX surfaces. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c| 90 +- src/gallium/state_trackers/va/va_private.h | 1 + 2 files changed, 90 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 1/7] nvc0: fix crash when nv50_miptree_from_handle fails

2015-10-16 Thread Julien Isorce
Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c index

Re: [Mesa-dev] [PATCH] st/mesa: check for out-of-memory in st_DrawPixels()

2015-10-16 Thread Jose Fonseca
On 16/10/15 23:24, Brian Paul wrote: Before, if make_texture() or st_create_texture_sampler_view() failed we silently no-op'd the glDrawPixels. Now, set GL_OUT_OF_MEMORY. This also allows us to un-nest a bunch of code. v2: also check if allocation of sv[1] fails, per Jose. ---

Re: [Mesa-dev] [PATCH 4/4] st/mesa: optimize 4-component ubyte glDrawPixels

2015-10-16 Thread Jose Fonseca
On 15/10/15 20:01, Brian Paul wrote: If we didn't find a gallium surface format that exactly matched the glDrawPixels format/type combination, we used some other 32-bit packed RGBA format and swizzled the whole image in the mesa texstore/format code. That slow path can be avoided in some common

Re: [Mesa-dev] [PATCH 03/10] i965/skl: Enable fast color clears on SKL

2015-10-16 Thread Chad Versace
But this patch doesn't enable fast clears! The reverts in pathches 6 and 7 need to be folded into this patch, otherwise the patch does not do what it claims. Also, you can't enable fast clears before patches 4 and 5 without introducing regressions. Patches 4 and 5 must precede this patch. On Tue

Re: [Mesa-dev] [PATCH 2/4] st/mesa: check of out-of-memory in st_DrawPixels()

2015-10-16 Thread Jose Fonseca
On 15/10/15 20:01, Brian Paul wrote: Before, if make_texture() or st_create_texture_sampler_view() failed we silently no-op'd the glDrawPixels. Now, set GL_OUT_OF_MEMORY. This also allows us to un-nest a bunch of code. --- src/mesa/state_tracker/st_cb_drawpixels.c | 74

Re: [Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-10-16 Thread Julien Isorce
On 18 September 2015 at 21:34, Ilia Mirkin wrote: > On Fri, Sep 18, 2015 at 4:29 PM, Julien Isorce > wrote: > > > > > > On 17 September 2015 at 17:52, Ilia Mirkin wrote: > >> > >> On Wed, Sep 16, 2015 at 8:22 AM, Julien

[Mesa-dev] [PATCH] st/mesa: check for out-of-memory in st_DrawPixels()

2015-10-16 Thread Brian Paul
Before, if make_texture() or st_create_texture_sampler_view() failed we silently no-op'd the glDrawPixels. Now, set GL_OUT_OF_MEMORY. This also allows us to un-nest a bunch of code. v2: also check if allocation of sv[1] fails, per Jose. --- src/mesa/state_tracker/st_cb_drawpixels.c | 76

[Mesa-dev] [PATCH] r600g: Pass conservative depth parameters to hw

2015-10-16 Thread Glenn Kennard
Supported on R700 and up. Signed-off-by: Glenn Kennard --- Not exactly a commonly used extension, but might as well set the hardware registers rather than just dropping the hint on the floor. src/gallium/drivers/r600/evergreen_state.c | 13 +

Re: [Mesa-dev] [PATCH 3/4] mesa: make memcpy_texture() non-static

2015-10-16 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Thu, Oct 15, 2015 at 01:01:42PM -0600, Brian Paul wrote: > So that we can use it directly from the mesa/gallium state tracker. > --- > src/mesa/main/texstore.c | 40 > src/mesa/main/texstore.h | 11

  1   2   >