Re: [Mesa-dev] [PATCH 1/2] glsl: add subpass image type

2016-09-15 Thread Dave Airlie
On 16 September 2016 at 14:47, Jason Ekstrand wrote: > On Thu, Sep 15, 2016 at 1:23 AM, Dave Airlie wrote: >> >> From: Dave Airlie >> >> SPIR-V/Vulkan have a special image type for input attachments >> called the subpass type. It has different characteristics than >> other images types. >> >> Th

Re: [Mesa-dev] [PATCH 2/2] spirv: use subpass image type

2016-09-15 Thread Jason Ekstrand
On Thu, Sep 15, 2016 at 1:23 AM, Dave Airlie wrote: > From: Dave Airlie > > This adds support for the input attachments subpass type > to the SPIRV->NIR pass. > --- > src/compiler/spirv/spirv_to_nir.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/compiler/spirv

Re: [Mesa-dev] [PATCH 1/2] glsl: add subpass image type

2016-09-15 Thread Jason Ekstrand
On Thu, Sep 15, 2016 at 1:23 AM, Dave Airlie wrote: > From: Dave Airlie > > SPIR-V/Vulkan have a special image type for input attachments > called the subpass type. It has different characteristics than > other images types. > > The main one being it can only be an input image to fragment > shad

Re: [Mesa-dev] [PATCH 2/2] nir/spirv: Use a nop intrinsic for tagging the ends of blocks

2016-09-15 Thread Dave Airlie
On 16 September 2016 at 14:16, Jason Ekstrand wrote: > Previously, we were saving off the last nir_block in a vtn_block before > moving on so that we could find the nir_block again when it came time to > handle phi sources. Unfortunately, NIR's control flow modification code is > inconsistent whe

Re: [Mesa-dev] [PATCH 01/10] i965: use nir_lower_indirect_derefs() for GLSL Gen7+

2016-09-15 Thread Kenneth Graunke
On Friday, September 16, 2016 11:10:01 AM PDT Timothy Arceri wrote: > On Thu, 2016-09-15 at 17:55 -0700, Jason Ekstrand wrote: > > > On Sep 15, 2016 4:31 PM, "Timothy Arceri" > > > wrote: > > > On Thu, 2016-09-15 at 12:34 -0700, Jason Ekstrand wrote: > > > > > On Sep 15, 2016 12:05 AM, "Timothy A

[Mesa-dev] [PATCH 2/2] nir/spirv: Use a nop intrinsic for tagging the ends of blocks

2016-09-15 Thread Jason Ekstrand
Previously, we were saving off the last nir_block in a vtn_block before moving on so that we could find the nir_block again when it came time to handle phi sources. Unfortunately, NIR's control flow modification code is inconsistent when it comes to how it splits blocks so the block pointer we sav

[Mesa-dev] [PATCH 1/2] nir: Add a nop intrinsic

2016-09-15 Thread Jason Ekstrand
This intrinsic has no destination, no sources, no variables, and can be eliminated. In other words, it does nothing and will always get deleted by dead code elimination. However, it does provide a quick-and-easy way to temporarily tag a particular location in a NIR shader. Signed-off-by: Jason E

[Mesa-dev] [RFC 2/2] nir: When splitting blocks, always put the new block after the old

2016-09-15 Thread Jason Ekstrand
This makes block splitting happen a bit more deterministically. In particular, if using nir_builder to build a shader, it means that you can always save off nir_cursor_current_block and then add another CF node after that without fear that the nir_block pointer you just saved will get replaced out

[Mesa-dev] [RFC 1/2] glsl/list: Add an iteration helper that starts after the given node

2016-09-15 Thread Jason Ekstrand
--- src/compiler/glsl/list.h | 9 + 1 file changed, 9 insertions(+) diff --git a/src/compiler/glsl/list.h b/src/compiler/glsl/list.h index b5b5b36..8371519 100644 --- a/src/compiler/glsl/list.h +++ b/src/compiler/glsl/list.h @@ -714,6 +714,15 @@ inline void exec_node::insert_before(exec_l

Re: [Mesa-dev] [PATCH 10/10] i965: use nir unrolling for scalar backend Gen7+

2016-09-15 Thread Timothy Arceri
On Fri, 2016-09-16 at 12:17 +1000, Timothy Arceri wrote: > On Thu, 2016-09-15 at 21:22 -0400, Connor Abbott wrote: > > > > On Thu, Sep 15, 2016 at 9:06 PM, Timothy Arceri > > wrote: > > > > > > > > > On Thu, 2016-09-15 at 19:49 -0400, Connor Abbott wrote: > > > > > > > > > > > > This seems a

[Mesa-dev] [PATCH] nir/spirv: Bring back the spirv2nir helper binary

2016-09-15 Thread Jason Ekstrand
This was something that I wrote in the early days of the spirv_to_nir code but deleted once we had a real driver. However, in the absence of a shader_runner equivalent, it's extremely useful for debugging the spirv_to_nir code so let's bring it back. --- src/compiler/Makefile.nir.am | 17 ++

Re: [Mesa-dev] [PATCH 10/10] i965: use nir unrolling for scalar backend Gen7+

2016-09-15 Thread Timothy Arceri
On Thu, 2016-09-15 at 21:22 -0400, Connor Abbott wrote: > On Thu, Sep 15, 2016 at 9:06 PM, Timothy Arceri > wrote: > > > > On Thu, 2016-09-15 at 19:49 -0400, Connor Abbott wrote: > > > > > > This seems a little dubious... why restrict it to gen7+? > > > > Because if we don't switch to using nir

Re: [Mesa-dev] [PATCH 10/10] i965: use nir unrolling for scalar backend Gen7+

2016-09-15 Thread Connor Abbott
On Thu, Sep 15, 2016 at 9:06 PM, Timothy Arceri wrote: > On Thu, 2016-09-15 at 19:49 -0400, Connor Abbott wrote: >> This seems a little dubious... why restrict it to gen7+? > > Because if we don't switch to using nir_lower_indirect_derefs() then > lower_variable_index_to_cond_assign() makes a big

Re: [Mesa-dev] [PATCH 01/10] i965: use nir_lower_indirect_derefs() for GLSL Gen7+

2016-09-15 Thread Timothy Arceri
On Thu, 2016-09-15 at 17:55 -0700, Jason Ekstrand wrote: > > > On Sep 15, 2016 4:31 PM, "Timothy Arceri" wrote: > > > > > > On Thu, 2016-09-15 at 12:34 -0700, Jason Ekstrand wrote: > > > > > On Sep 15, 2016 12:05 AM, "Timothy Arceri" > > > com> wrote: > > > > > > > > > > This moves the nir

Re: [Mesa-dev] [PATCH 10/10] i965: use nir unrolling for scalar backend Gen7+

2016-09-15 Thread Timothy Arceri
On Thu, 2016-09-15 at 19:49 -0400, Connor Abbott wrote: > This seems a little dubious... why restrict it to gen7+? Because if we don't switch to using nir_lower_indirect_derefs() then lower_variable_index_to_cond_assign() makes a big mess before we get to unrolling. I was getting piglit regression

Re: [Mesa-dev] [PATCH 01/10] i965: use nir_lower_indirect_derefs() for GLSL Gen7+

2016-09-15 Thread Jason Ekstrand
On Sep 15, 2016 4:31 PM, "Timothy Arceri" wrote: > > On Thu, 2016-09-15 at 12:34 -0700, Jason Ekstrand wrote: > > On Sep 15, 2016 12:05 AM, "Timothy Arceri" > com> wrote: > > > > > > This moves the nir_lower_indirect_derefs() call into > > > brw_preprocess_nir() so thats is called by both OpenGL

Re: [Mesa-dev] [PATCH 10/10] i965: use nir unrolling for scalar backend Gen7+

2016-09-15 Thread Connor Abbott
This seems a little dubious... why restrict it to gen7+? And why only scalar? This pass assumes SSA, but so do many other passes in core NIR that we also run in nir_optimize(), so that shouldn't be a problem. On Thu, Sep 15, 2016 at 3:03 AM, Timothy Arceri wrote: > --- > src/compiler/glsl/glsl_p

Re: [Mesa-dev] V3 Loop unrolling in NIR

2016-09-15 Thread Timothy Arceri
On Thu, 2016-09-15 at 12:28 +0300, Eero Tamminen wrote: > Hi, > > Have you any plans for supporting partial unrolling? Not currently no although it shouldn't be too difficult to add this. > > I.e. if the loop count is too large to be completely unrolled, unroll > it  > few times (that still fit

Re: [Mesa-dev] [PATCH 01/10] i965: use nir_lower_indirect_derefs() for GLSL Gen7+

2016-09-15 Thread Timothy Arceri
On Thu, 2016-09-15 at 12:34 -0700, Jason Ekstrand wrote: > On Sep 15, 2016 12:05 AM, "Timothy Arceri" com> wrote: > > > > This moves the nir_lower_indirect_derefs() call into > > brw_preprocess_nir() so thats is called by both OpenGL and Vulkan > > and removes that call to the old GLSL IR pass > >

Re: [Mesa-dev] [PATCH 00/15] Compile GLSL to ir_builder

2016-09-15 Thread Ian Romanick
On 09/15/2016 03:12 PM, Ian Romanick wrote: > This series makes the stand-alone GLSL compiler useful for something. > It adds an option to generate C++ code that uses ir_builder to recreate > the compiled GLSL shader. I intend to use this for various lowering > code for GL_ARB_gpu_shader_int64 and

Re: [Mesa-dev] [PATCH] gallium/docs: document alpha_to_coverage and alpha_to_one blend state

2016-09-15 Thread Roland Scheidegger
A good question. I have no idea what d3d10 does there (since a conversion from alpha to coverage doesn't really make sense as the alpha values don't actually go from 0 to 1). I suppose they could be translated away in the state tracker as well since the combination doesn't make sense (albeit we don

[Mesa-dev] [PATCH 13/15] glsl: Add bit_xor builder

2016-09-15 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_builder.cpp | 6 ++ src/compiler/glsl/ir_builder.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/compiler/glsl/ir_builder.cpp b/src/compiler/glsl/ir_builder.cpp index d68647f..f430100 100644 --- a/src/comp

[Mesa-dev] [PATCH 14/15] glsl: Add a C++ code generator that uses ir_builder to rebuild a program

2016-09-15 Thread Ian Romanick
From: Ian Romanick This is only in libstandalone currently because it will only be used in the stand-alone compiler. Signed-off-by: Ian Romanick --- src/compiler/Makefile.sources | 2 + src/compiler/glsl/ir_builder_print_visitor.cpp | 753 + src/compi

[Mesa-dev] [PATCH 07/15] glsl/standalone: Use API_OPENGL_CORE if the GLSL version is >= 1.40

2016-09-15 Thread Ian Romanick
From: Ian Romanick Otherwise extensions to 1.40 that are only for core profile won't work. Signed-off-by: Ian Romanick --- src/compiler/glsl/standalone.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.c

[Mesa-dev] [PATCH 04/15] glsl: Modify dead function removal to only operate on built-in functions

2016-09-15 Thread Ian Romanick
From: Ian Romanick This will be used in the stand-alone compiler. Signed-off-by: Ian Romanick --- src/compiler/glsl/glsl_parser_extras.cpp | 2 +- src/compiler/glsl/ir_optimization.h | 2 +- src/compiler/glsl/opt_dead_functions.cpp | 11 +++ src/compiler/glsl/test_optpass.cpp

[Mesa-dev] [PATCH 03/15] glsl: Modify function inlining to only operate on built-in functions

2016-09-15 Thread Ian Romanick
From: Ian Romanick This will be used in the stand-alone compiler. Signed-off-by: Ian Romanick --- src/compiler/glsl/glsl_parser_extras.cpp| 2 +- src/compiler/glsl/ir_optimization.h | 2 +- src/compiler/glsl/opt_function_inlining.cpp | 12 +++- src/compiler/glsl/test_optp

[Mesa-dev] [PATCH 06/15] glsl/linker: Allow link_intrastage_shaders when there is no main()

2016-09-15 Thread Ian Romanick
From: Ian Romanick This enables a sort of par-linking. The primary use for this feature is resolving built-in functions in the stand-alone compiler. Signed-off-by: Ian Romanick --- src/compiler/glsl/linker.cpp | 28 +--- src/compiler/glsl/linker.h | 9 + 2 f

[Mesa-dev] [PATCH 11/15] glsl/standalone: Enable par-linking

2016-09-15 Thread Ian Romanick
From: Ian Romanick If the user did not request full linking, link the shader with the built-in functions, inline them, and eliminate them. Previous to this you'd see all these calls to "dot" and "max" in the output. This prevented a lot of expected optimizations and cluttered the output. This g

[Mesa-dev] [PATCH 05/15] glsl: Do some "post link" optimizations on just built-in functions

2016-09-15 Thread Ian Romanick
From: Ian Romanick This enables the support added by the previous two patches in do_common_optimization. This will be used by the stand-alone compiler. Signed-off-by: Ian Romanick --- src/compiler/glsl/glsl_parser_extras.cpp | 12 src/compiler/glsl/ir_optimization.h| 3

[Mesa-dev] [PATCH 09/15] glsl/standalone: Optimize add-of-neg to subtract

2016-09-15 Thread Ian Romanick
From: Ian Romanick This just makes the output of the standalone compiler a little more compact. Signed-off-by: Ian Romanick --- src/compiler/glsl/standalone.cpp | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/compiler/glsl/standalone.cpp b/src/compil

[Mesa-dev] [PATCH 00/15] Compile GLSL to ir_builder

2016-09-15 Thread Ian Romanick
This series makes the stand-alone GLSL compiler useful for something. It adds an option to generate C++ code that uses ir_builder to recreate the compiled GLSL shader. I intend to use this for various lowering code for GL_ARB_gpu_shader_int64 and GL_ARB_gpu_shader_fp64 (on platforms that don't act

[Mesa-dev] [PATCH 02/15] glsl: Update function parameter documentation for do_common_optimization

2016-09-15 Thread Ian Romanick
From: Ian Romanick max_unroll_iterations was moved into options a long, long time ago. Signed-off-by: Ian Romanick --- src/compiler/glsl/glsl_parser_extras.cpp | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/gl

[Mesa-dev] [PATCH 15/15] glsl/standalone: Add the ability to generate ir_builder code

2016-09-15 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/main.cpp | 1 + src/compiler/glsl/standalone.cpp | 12 src/compiler/glsl/standalone.h | 1 + 3 files changed, 14 insertions(+) diff --git a/src/compiler/glsl/main.cpp b/src/compiler/glsl/main.cpp index

[Mesa-dev] [PATCH 01/15] glsl: Fix cut-and-paste bug in hierarchical visitor ir_expression::accept

2016-09-15 Thread Ian Romanick
From: Ian Romanick At this point in the code, s must be visit_continue. If the child returned visit_stop, visit_stop is the only correct thing to return. Found by inspection. Signed-off-by: Ian Romanick Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/glsl/ir_hv_accept.cpp | 2 +- 1 fi

[Mesa-dev] [PATCH 10/15] glsl/standalone: Optimize dead variable declarations

2016-09-15 Thread Ian Romanick
From: Ian Romanick We didn't bother with this in the regular compiler because it doesn't change the generated code. In the stand-alone compiler, this can clutter the output with useless variables. It's especially bad after functions are inlined but the foo_retval declarations remain. Signed-of

[Mesa-dev] [PATCH 12/15] glsl: Generate strings that are the enum names without the ir_*op_ prefix

2016-09-15 Thread Ian Romanick
From: Ian Romanick For many expressions, this is different from the printable name. The printable name for ir_binop_add is "+", but we want "add". This is needed for ir_builder_print_visitor. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir.h | 1 + src/compiler/gls

[Mesa-dev] [PATCH 08/15] glsl/standalone: Enable GLSL 4.00 through 4.50

2016-09-15 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/standalone.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp index a7e6254..6b1c2ce 100644 --- a/src/compiler/glsl/standalone.cpp +++ b/sr

Re: [Mesa-dev] [PATCH] st/mesa: update comment in st_atom_msaa.c

2016-09-15 Thread Roland Scheidegger
Am 15.09.2016 um 23:32 schrieb Brian Paul: > The old comment was a copy and paste mistake. Indent another comment. > --- > src/mesa/state_tracker/st_atom_msaa.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/state_tracker/st_atom_msaa.c > b/src/mesa/state_

Re: [Mesa-dev] [PATCH] gallium/docs: document alpha_to_coverage and alpha_to_one blend state

2016-09-15 Thread Ilia Mirkin
What about integer RTs? I had to add a hack in nouveau to make it disable those when RT0 is an integer. It'd be more convenient if they were turned off in the first place. On Thu, Sep 15, 2016 at 5:34 PM, Brian Paul wrote: > The gallium interface defines these like DX10. Note that OpenGL ignores

[Mesa-dev] [PATCH] gallium/docs: document alpha_to_coverage and alpha_to_one blend state

2016-09-15 Thread Brian Paul
The gallium interface defines these like DX10. Note that OpenGL ignores these options if MSAA is disabled or the dest buffer doesn't support MSAA. --- src/gallium/docs/source/cso/blend.rst | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/docs/source/cso/blend.rst b/s

[Mesa-dev] [PATCH] st/mesa: update comment in st_atom_msaa.c

2016-09-15 Thread Brian Paul
The old comment was a copy and paste mistake. Indent another comment. --- src/mesa/state_tracker/st_atom_msaa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_msaa.c b/src/mesa/state_tracker/st_atom_msaa.c index 8442a28..69aea69 100644 ---

Re: [Mesa-dev] [PATCH] st/mesa: only enable MSAA coverage options when we have a MSAA buffer

2016-09-15 Thread Roland Scheidegger
Am 15.09.2016 um 23:20 schrieb Brian Paul: > Regardless of whether GL_MULTISAMPLE is enabled (it's enabled by default) > we should not set the alpha_to_coverage or alpha_to_one flags if the > current drawing buffer does not do MSAA. > > This fixes the new piglit gl-1.3-alpha_to_coverage_nop test.

[Mesa-dev] [PATCH] st/mesa: only enable MSAA coverage options when we have a MSAA buffer

2016-09-15 Thread Brian Paul
Regardless of whether GL_MULTISAMPLE is enabled (it's enabled by default) we should not set the alpha_to_coverage or alpha_to_one flags if the current drawing buffer does not do MSAA. This fixes the new piglit gl-1.3-alpha_to_coverage_nop test. --- src/mesa/state_tracker/st_atom_blend.c | 9 +

Re: [Mesa-dev] [PATCH] st/va: Make VAAPI_DISABLE_INTERLACE default true

2016-09-15 Thread Julien Isorce
On 15 September 2016 at 16:02, Leo Liu wrote: > > > On 09/15/2016 10:43 AM, Andy Furniss wrote: > >> Since bf901a2 >> st/va: also honors interlaced preference when providing a video format >> existing scripts and most use cases will need true. >> >> Signed-off-by: Andy Furniss >> --- >> src/gal

Re: [Mesa-dev] [PATCH 09/10] st/vdpau: implement the new DMA-buf based interop

2016-09-15 Thread Marek Olšák
On Thu, Sep 15, 2016 at 5:14 AM, Dave Airlie wrote: > On 15 September 2016 at 13:03, Ilia Mirkin wrote: >> On Wed, Sep 14, 2016 at 10:15 PM, Michel Dänzer wrote: No, the current impl is pretty radeon-specific (note - it doesn't work on nouveau, and no other drivers support the interfac

Re: [Mesa-dev] [PATCH 2/3] glsl: Skip "unsized arrays aren't allowed" check for TCS/TES vars.

2016-09-15 Thread Ilia Mirkin
On Thu, Sep 15, 2016 at 4:40 PM, Kenneth Graunke wrote: > On Thursday, September 15, 2016 3:35:27 PM PDT Ilia Mirkin wrote: >> On Thu, Sep 15, 2016 at 5:10 AM, Kenneth Graunke >> wrote: >> > Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and >> > ESEXT-CTS.texture_cube_map_arr

Re: [Mesa-dev] [PATCH 2/3] glsl: Skip "unsized arrays aren't allowed" check for TCS/TES vars.

2016-09-15 Thread Kenneth Graunke
On Thursday, September 15, 2016 3:35:27 PM PDT Ilia Mirkin wrote: > On Thu, Sep 15, 2016 at 5:10 AM, Kenneth Graunke > wrote: > > Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and > > ESEXT-CTS.texture_cube_map_array.texture_size_tesselation_con_sh. > > > > Signed-off-by: Kenn

Re: [Mesa-dev] Problem with RX 480 on Alien: Isolation and Dota 2

2016-09-15 Thread Marek Olšák
On Thu, Sep 15, 2016 at 5:04 AM, Romain Failliot wrote: > 2016-09-13 13:53 GMT-04:00 Marek Olšák : >> LLVM 32-bit: >> >> mkdir -p build32 >> cd build32 >> cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/llvm/i386-linux-gnu >> -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=ON >>

Re: [Mesa-dev] Problem with RX 480 on Alien: Isolation and Dota 2

2016-09-15 Thread Marek Olšák
On Thu, Sep 15, 2016 at 3:44 AM, Michel Dänzer wrote: > On 14/09/16 07:41 PM, Marek Olšák wrote: >> On Wed, Sep 14, 2016 at 5:26 AM, Michel Dänzer wrote: >>> On 14/09/16 02:53 AM, Marek Olšák wrote: cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/llvm/x86_64-linux-gnu -DLLVM_TARGETS_

Re: [Mesa-dev] [PATCH] Revert "st/vdpau: use linear layout for output surfaces"

2016-09-15 Thread Dave Airlie
On 15 September 2016 at 17:43, Christian König wrote: > Am 15.09.2016 um 06:00 schrieb Ilia Mirkin: >> >> On Wed, Sep 14, 2016 at 11:58 PM, Dave Airlie wrote: >>> >>> From: Dave Airlie >>> >>> This reverts commit d180de35320eafa3df3d76f0e82b332656530126. >>> >>> This is a radeon specific hack th

Re: [Mesa-dev] [PATCH 2/3] glsl: Skip "unsized arrays aren't allowed" check for TCS/TES vars.

2016-09-15 Thread Ilia Mirkin
On Thu, Sep 15, 2016 at 5:10 AM, Kenneth Graunke wrote: > Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and > ESEXT-CTS.texture_cube_map_array.texture_size_tesselation_con_sh. > > Signed-off-by: Kenneth Graunke > --- > src/compiler/glsl/ast_to_hir.cpp | 9 - > 1 file

Re: [Mesa-dev] [PATCH 01/10] i965: use nir_lower_indirect_derefs() for GLSL Gen7+

2016-09-15 Thread Jason Ekstrand
On Sep 15, 2016 12:05 AM, "Timothy Arceri" wrote: > > This moves the nir_lower_indirect_derefs() call into > brw_preprocess_nir() so thats is called by both OpenGL and Vulkan > and removes that call to the old GLSL IR pass > lower_variable_index_to_cond_assign() > > We want to do this pass in nir

Re: [Mesa-dev] [PATCH 1/4] i965/fs: Use sample interpolation for interpolateAtCentroid in persample mode

2016-09-15 Thread Kenneth Graunke
On Wednesday, September 14, 2016 10:45:24 AM PDT Jason Ekstrand wrote: > From the ARB_gpu_shader5 spec: > >The built-in functions interpolateAtCentroid() and interpolateAtSample() >will sample variables as though they were declared with the "centroid" >or "sample" qualifiers, respectiv

Re: [Mesa-dev] [PATCH 3/3] mesa: Move buffers-unmapped earlier in check_valid_to_render().

2016-09-15 Thread Mathias Fröhlich
Hi, On Thursday, 15 September 2016 02:10:24 CEST Kenneth Graunke wrote: > This needs to be above the switch on API, as that can return true > (valid to render) before this error check even had a chance to run. > > Fixes ESEXT-CTS.draw_elements_base_vertex_tests.invalid_mapped_bos, > which worked

Re: [Mesa-dev] [PATCH] mesa: check for no matrix change in _mesa_LoadMatrixf()

2016-09-15 Thread Charmaine Lee
Looks good. Reviewed-by: Charmaine Lee From: Brian Paul Sent: Thursday, September 15, 2016 8:34 AM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee Subject: [PATCH] mesa: check for no matrix change in _mesa_LoadMatrixf() Some apps issue redundant gl

Re: [Mesa-dev] [PATCH] mesa: check for no matrix change in _mesa_LoadMatrixf()

2016-09-15 Thread Kenneth Graunke
On Thursday, September 15, 2016 9:34:50 AM PDT Brian Paul wrote: > Some apps issue redundant glLoadMatrixf() calls with the same matrix. > Try to avoid setting dirty state in that situation. > > This reduces the number of constant buffer updates by about half in > ET Quake Wars. > > Tested with P

Re: [Mesa-dev] [PATCH] st/va: Make VAAPI_DISABLE_INTERLACE default true

2016-09-15 Thread Christian König
Am 15.09.2016 um 16:43 schrieb Andy Furniss: Since bf901a2 st/va: also honors interlaced preference when providing a video format existing scripts and most use cases will need true. Signed-off-by: Andy Furniss Reviewed-by: Christian König . --- src/gallium/state_trackers/va/surface.c | 2 +

[Mesa-dev] [PATCH v2] nvc0/ir: fix subops for IMAD

2016-09-15 Thread Samuel Pitoiset
Offset was wrong, it's at bit 8, not 4. Also, uses subr instead of sub when src2 has neg. Similar to GK110 now. Signed-off-by: Samuel Pitoiset Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 10 ++ 1 file changed, 6 insertions(+), 4 d

Re: [Mesa-dev] [PATCH] nvc0/ir: fix subops for IMAD

2016-09-15 Thread Samuel Pitoiset
On 09/15/2016 06:08 PM, Ilia Mirkin wrote: On Thu, Sep 15, 2016 at 12:07 PM, Samuel Pitoiset wrote: Offset was wrong, it's at bit 8, not 4. Also, uses subr instead of sub when src2 has neg. Similar to GK110 now. Signed-off-by: Samuel Pitoiset Cc: mesa-sta...@lists.freedesktop.org --- src/g

Re: [Mesa-dev] [PATCH] nvc0/ir: fix subops for IMAD

2016-09-15 Thread Ilia Mirkin
On Thu, Sep 15, 2016 at 12:07 PM, Samuel Pitoiset wrote: > Offset was wrong, it's at bit 8, not 4. Also, uses subr instead > of sub when src2 has neg. Similar to GK110 now. > > Signed-off-by: Samuel Pitoiset > Cc: mesa-sta...@lists.freedesktop.org > --- > src/gallium/drivers/nouveau/codegen/nv50

[Mesa-dev] [PATCH] nvc0/ir: fix subops for IMAD

2016-09-15 Thread Samuel Pitoiset
Offset was wrong, it's at bit 8, not 4. Also, uses subr instead of sub when src2 has neg. Similar to GK110 now. Signed-off-by: Samuel Pitoiset Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 10 ++ 1 file changed, 6 insertions(+), 4 d

[Mesa-dev] [PATCH] mesa: check for no matrix change in _mesa_LoadMatrixf()

2016-09-15 Thread Brian Paul
Some apps issue redundant glLoadMatrixf() calls with the same matrix. Try to avoid setting dirty state in that situation. This reduces the number of constant buffer updates by about half in ET Quake Wars. Tested with Piglit, ETQW, Sauerbraten, Google Earth, etc. --- src/mesa/main/matrix.c | 8 ++

Re: [Mesa-dev] [PATCH] st/va: Make VAAPI_DISABLE_INTERLACE default true

2016-09-15 Thread Leo Liu
On 09/15/2016 10:43 AM, Andy Furniss wrote: Since bf901a2 st/va: also honors interlaced preference when providing a video format existing scripts and most use cases will need true. Signed-off-by: Andy Furniss --- src/gallium/state_trackers/va/surface.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Mesa-dev] [PATCH] st/va: also honors interlaced preference when providing a video format

2016-09-15 Thread Andy Furniss
Leo Liu wrote: Hi Andy, On 09/13/2016 06:22 AM, Andy Furniss wrote: Zhang, Boyuan wrote: Hi Leo, Christian and Julien, I tested the patch with Vaapi Encoding and Transcoding, it seems working fine. We are using "VAAPI_DISABLE_INTERLACE" env, so interlaced is always disabled. Though I notice

[Mesa-dev] [Bug 97804] Later precision statement isn't overriding earlier one

2016-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97804 --- Comment #1 from Eero Tamminen --- GL 4.5 GLSL spec: https://www.opengl.org/registry/doc/GLSLangSpec.4.50.pdf Says the same in "4.7.3 Default Precision Qualifiers": "Multiple precision statements for the same basic type can appear inside th

[Mesa-dev] [PATCH] st/va: Make VAAPI_DISABLE_INTERLACE default true

2016-09-15 Thread Andy Furniss
Since bf901a2 st/va: also honors interlaced preference when providing a video format existing scripts and most use cases will need true. Signed-off-by: Andy Furniss --- src/gallium/state_trackers/va/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_

Re: [Mesa-dev] [PATCH 1/3] glx/glvnd: Don't modify the dummy slot in the dispatch table

2016-09-15 Thread Eric Engestrom
On Wed, Sep 14, 2016 at 02:06:18PM -0400, Adam Jackson wrote: > Signed-off-by: Adam Jackson The series is: Reviewed-by: Eric Engestrom BTW, I feel like these should be CC'ed to stable? I never know when a fix is stable-worthy. Cheers, Eric > --- > src/glx/glxglvnd.c | 3 +++ > 1 file chang

[Mesa-dev] [Bug 97804] Later precision statement isn't overriding earlier one

2016-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97804 Tapani Pälli changed: What|Removed |Added CC||lem...@gmail.com -- You are receiving th

Re: [Mesa-dev] [PATCH] direct-to-native-GL for GLX clients on Cygwin ("Windows-DRI")

2016-09-15 Thread Emil Velikov
On 18 July 2016 at 15:43, Jon Turney wrote: > Structurally, this is very similar to the existing Apple-DRI code, except I > have chosen to implement this using the __GLXDRIdisplay, etc. vtables (as > suggested originally in [1]), rather than a maze of ifdefs. This also means > that LIBGL_ALWAYS_S

Re: [Mesa-dev] [PATCH] clover: Fix build against clang SVN >= r273191

2016-09-15 Thread Timo Aaltonen
On 21.06.2016 02:17, Vedran Miletić wrote: > setLangDefaults() now requires PreprocessorOptions as an argument. > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.

Re: [Mesa-dev] [PATCH] st/vdpau: remove nouveau target

2016-09-15 Thread Ilia Mirkin
On Sep 15, 2016 6:41 AM, "Emil Velikov" wrote: > > On 15 September 2016 at 10:56, Emil Velikov wrote: > > On 15 September 2016 at 02:54, Ilia Mirkin wrote: > >> On Wed, Sep 14, 2016 at 9:52 PM, Ilia Mirkin wrote: > >>> Recent changes have been made to the VDPAU state tracker to make it > >>> un

Re: [Mesa-dev] [PATCH] st/va: also honors interlaced preference when providing a video format

2016-09-15 Thread Andy Furniss
Andy Furniss wrote: Leo Liu wrote: Hi Andy, On 09/13/2016 06:22 AM, Andy Furniss wrote: Zhang, Boyuan wrote: Hi Leo, Christian and Julien, I tested the patch with Vaapi Encoding and Transcoding, it seems working fine. We are using "VAAPI_DISABLE_INTERLACE" env, so interlaced is always disabl

Re: [Mesa-dev] [PATCH] st/vdpau: remove nouveau target

2016-09-15 Thread Emil Velikov
On 15 September 2016 at 10:56, Emil Velikov wrote: > On 15 September 2016 at 02:54, Ilia Mirkin wrote: >> On Wed, Sep 14, 2016 at 9:52 PM, Ilia Mirkin wrote: >>> Recent changes have been made to the VDPAU state tracker to make it >>> unusable with nouveau. Don't provide users with an awfully slo

[Mesa-dev] [ANNOUNCE] mesa 12.0.3

2016-09-15 Thread Emil Velikov
Hi all, Mesa 12.0.3 is now available. This is an emergency release addressing a number of regressions across all devices using the i965 driver. Emil Velikov (4): docs: add sha256 checksums for 12.0.2 Revert "i965/miptree: Stop multiplying cube depth by 6 in HiZ calculations" U

Re: [Mesa-dev] Possible memory leak with `glxMakeCurrent`?

2016-09-15 Thread Eero Tamminen
Hi, On 15.09.2016 11:00, Itai wrote: What I should have said is I have never written anything in Mesa. I tried making a small C program reproducing the problem, but I couldn't get the same result (Not entirely sure what the JRE is doing). I have run valgrind on the sample Java program, which pro

[Mesa-dev] [Bug 94925] Crash in egl_dri3_get_dri_context with Dolphin EGL/X11 in single-core mode

2016-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94925 Emil Velikov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH] st/vdpau: remove nouveau target

2016-09-15 Thread Emil Velikov
On 15 September 2016 at 02:54, Ilia Mirkin wrote: > On Wed, Sep 14, 2016 at 9:52 PM, Ilia Mirkin wrote: >> Recent changes have been made to the VDPAU state tracker to make it >> unusable with nouveau. Don't provide users with an awfully slow >> "hardware" decoding option. >> >> [To preemptively a

Re: [Mesa-dev] V3 Loop unrolling in NIR

2016-09-15 Thread Eero Tamminen
Hi, Have you any plans for supporting partial unrolling? I.e. if the loop count is too large to be completely unrolled, unroll it few times (that still fits into instruction cache) and then loop that. E.g. for a loop with 51 rounds, Mesa could unroll it 4 rounds, loop that 12 times and unrol

[Mesa-dev] [PATCH 3/3] mesa: Move buffers-unmapped earlier in check_valid_to_render().

2016-09-15 Thread Kenneth Graunke
This needs to be above the switch on API, as that can return true (valid to render) before this error check even had a chance to run. Fixes ESEXT-CTS.draw_elements_base_vertex_tests.invalid_mapped_bos, which worked before commit 72f1566f90c434c7752d8405193eec68d6743246. Signed-off-by: Kenneth Gra

[Mesa-dev] [PATCH 1/3] mesa: Expose GL_CONTEXT_FLAGS in ES 3.2.

2016-09-15 Thread Kenneth Graunke
Fixes four ES32-CTS.context_flags.* tests. Signed-off-by: Kenneth Graunke --- src/mesa/main/get_hash_params.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 1f63dc3..b2aef7b 100644 --- a/src/m

[Mesa-dev] [PATCH 2/3] glsl: Skip "unsized arrays aren't allowed" check for TCS/TES vars.

2016-09-15 Thread Kenneth Graunke
Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and ESEXT-CTS.texture_cube_map_array.texture_size_tesselation_con_sh. Signed-off-by: Kenneth Graunke --- src/compiler/glsl/ast_to_hir.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compiler/gls

[Mesa-dev] [Bug 97804] Later precision statement isn't overriding earlier one

2016-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97804 Eero Tamminen changed: What|Removed |Added Attachment #126514|Glmark2 shader triggering |Glmark2-es2 Jellyfish description

Re: [Mesa-dev] [PATCH] i965: enable ARB_ES3_2_compatibility on gen8+

2016-09-15 Thread Kenneth Graunke
On Tuesday, September 13, 2016 9:27:49 PM PDT Ilia Mirkin wrote: > Note that ASTC support is not actually mandated for this extension to be > exposed. > > Signed-off-by: Ilia Mirkin > --- > > Also note that it doesn't seem required for the driver to simultaneously be > exposing an actual ES 3.2

[Mesa-dev] [PATCH 2/2] spirv: use subpass image type

2016-09-15 Thread Dave Airlie
From: Dave Airlie This adds support for the input attachments subpass type to the SPIRV->NIR pass. --- src/compiler/spirv/spirv_to_nir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 7e7a026..45

[Mesa-dev] [PATCH 1/2] glsl: add subpass image type

2016-09-15 Thread Dave Airlie
From: Dave Airlie SPIR-V/Vulkan have a special image type for input attachments called the subpass type. It has different characteristics than other images types. The main one being it can only be an input image to fragment shaders and loads from it are relative to the frag coord. This adds sup

[Mesa-dev] [Bug 94925] Crash in egl_dri3_get_dri_context with Dolphin EGL/X11 in single-core mode

2016-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94925 Eero Tamminen changed: What|Removed |Added Component|Drivers/DRI/i965|EGL QA Contact|intel-3d-bugs@lis

Re: [Mesa-dev] [PATCH] Revert "st/vdpau: use linear layout for output surfaces"

2016-09-15 Thread Christian König
Am 15.09.2016 um 06:00 schrieb Ilia Mirkin: On Wed, Sep 14, 2016 at 11:58 PM, Dave Airlie wrote: From: Dave Airlie This reverts commit d180de35320eafa3df3d76f0e82b332656530126. This is a radeon specific hack that causes problems on nouveau when combined with the SHARED flag later. If radeons

Re: [Mesa-dev] [PATCH v2] st/vdpau: fix argument type to vlVdpOutputSurfaceDMABuf

2016-09-15 Thread Christian König
Am 15.09.2016 um 01:16 schrieb Ilia Mirkin: Signed-off-by: Ilia Mirkin Reviewed-by: Christian König . --- v1 -> v2: adjust typedef in vdpau_dmabuf.h, per Nayan src/gallium/include/state_tracker/vdpau_dmabuf.h | 2 +- src/gallium/state_trackers/vdpau/output.c| 2 +- 2 files chan

[Mesa-dev] [PATCH 10/10] i965: use nir unrolling for scalar backend Gen7+

2016-09-15 Thread Timothy Arceri
--- src/compiler/glsl/glsl_parser_extras.cpp | 12 + src/mesa/drivers/dri/i965/brw_compiler.c | 42 +++- src/mesa/drivers/dri/i965/brw_nir.c | 23 + 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/src/compiler/glsl/glsl_pars

[Mesa-dev] [PATCH 07/10] nir: add helper for cloning loops

2016-09-15 Thread Timothy Arceri
--- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_clone.c | 41 ++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index eb81955..9887432 100644 --- a/src/compiler/nir/nir.h +++ b/sr

[Mesa-dev] [PATCH 01/10] i965: use nir_lower_indirect_derefs() for GLSL Gen7+

2016-09-15 Thread Timothy Arceri
This moves the nir_lower_indirect_derefs() call into brw_preprocess_nir() so thats is called by both OpenGL and Vulkan and removes that call to the old GLSL IR pass lower_variable_index_to_cond_assign() We want to do this pass in nir to be able to move loop unrolling to nir. There is a increase o

[Mesa-dev] [PATCH 06/10] nir: create helper for fixing phi srcs when cloning

2016-09-15 Thread Timothy Arceri
This will be useful for fixing phi srcs when cloning a loop body during loop unrolling. --- src/compiler/nir/nir_clone.c | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index 0e39

[Mesa-dev] [PATCH 08/10] nir: add a loop unrolling pass

2016-09-15 Thread Timothy Arceri
V2: - tidy ups suggested by Connor. - tidy up cloning logic and handle copy propagation based of suggestion by Connor. - use nir_ssa_def_rewrite_uses to fix up lcssa phis suggested by Connor. - add support for complex loop unrolling (two terminators) - handle case were the ssa defs use outside t

[Mesa-dev] [PATCH 09/10] nir: pass compiler rather than devinfo to functions that call nir_optimize

2016-09-15 Thread Timothy Arceri
Later we will pass compiler to nir_optimise to be used by the loop unroll pass. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 10 -- src/mesa/drivers/dri/i965/brw_nir.c | 7 --- src/mesa/drivers/dri/i965/brw_nir.h | 4 ++-- src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 05/10] nir: don't count removal of lcssa_phi as progress

2016-09-15 Thread Timothy Arceri
--- src/compiler/nir/nir_opt_remove_phis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_remove_phis.c b/src/compiler/nir/nir_opt_remove_phis.c index acaa6e1..d4344b0 100644 --- a/src/compiler/nir/nir_opt_remove_phis.c +++ b/src/compiler/nir/nir_o

[Mesa-dev] [PATCH 02/10] nir: Add a loop analysis pass

2016-09-15 Thread Timothy Arceri
From: Thomas Helland This pass detects induction variables and calculates the trip count of loops to be used for loop unrolling. I've removed support for float induction values for now, for the simple reason that they don't appear in my shader-db collection, and so I don't see it as common enoug

[Mesa-dev] [PATCH 03/10] nir: add helpers to check if we can unroll loops

2016-09-15 Thread Timothy Arceri
This will be used by the loop unroll and lcssa passes. V2: - Check instruction count is not too large for unrolling - Add helper for complex loop unrolling --- src/compiler/nir/nir.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/

[Mesa-dev] [PATCH 04/10] nir: Add a LCSAA-pass

2016-09-15 Thread Timothy Arceri
From: Thomas Helland V2: Do a "depth first search" to convert to LCSSA V3: Small comment fixup V4: Rebase, adapt to removal of function overloads V5: Rebase, adapt to relocation of nir to compiler/nir Still need to adapt to potential if-uses Work around nir_validate issue V6 (Timothy)

[Mesa-dev] V3 Loop unrolling in NIR

2016-09-15 Thread Timothy Arceri
Big thanks to Connor for his feedback on previous versions, and to Jason for answering my all my nir questions. This series works on ssa defs so for now it's only enabled for the scalar backend on Gen7+. V3: - So called complex loop unrolling has been implemented. - An instruction limit and rules