Re: [Mesa-dev] [PATCH 00/21] nir: Functions!

2016-02-13 Thread Jordan Justen
On 2016-02-13 18:14:17, Jason Ekstrand wrote: > This patch series adds actual function support to NIR. Previously all NIR > usage relied on GLSL to have lowered functions away entirely. As a result, > any support for functions that was there was dead code and not really > tested. With SPIR-V on

Re: [Mesa-dev] [PATCH 03/21] nir: Add a helper for creating a "bare" nir_function_impl

2016-02-13 Thread Jason Ekstrand
On Sat, Feb 13, 2016 at 8:43 PM, Jordan Justen wrote: > On 2016-02-13 18:14:20, Jason Ekstrand wrote: > > --- > > src/compiler/nir/nir.c | 32 ++-- > > src/compiler/nir/nir.h | 2 ++ > > 2 files changed, 24 insertions(+), 10 deletions(-) > > > > diff --git a/src/comp

Re: [Mesa-dev] [PATCH] mesa: allow multisampled format info to be returned on GLES 3.1

2016-02-13 Thread Ilia Mirkin
Marta, perhaps you can have a look? It's pretty similar to your commit b6d014f0b (mesa/es3.1: Pass sample count check for multisampled textures). On Thu, Feb 11, 2016 at 3:04 PM, Ilia Mirkin wrote: > The restriction on multisampled integer texture formats only applies to > GLES 3.0, so don't appl

Re: [Mesa-dev] [PATCH 03/21] nir: Add a helper for creating a "bare" nir_function_impl

2016-02-13 Thread Jordan Justen
On 2016-02-13 18:14:20, Jason Ekstrand wrote: > --- > src/compiler/nir/nir.c | 32 ++-- > src/compiler/nir/nir.h | 2 ++ > 2 files changed, 24 insertions(+), 10 deletions(-) > > diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c > index acb2692..0e4d981 1006

Re: [Mesa-dev] [PATCH] mesa: default FixedSampleLocations to true when using a dummy image

2016-02-13 Thread Chris Forbes
Reviewed-by: Chris Forbes On Fri, Feb 12, 2016 at 9:31 AM, Ilia Mirkin wrote: > GL_ARB_texture_multisample and GLES 3.1 expect the initial value to be > GL_TRUE. This fixes > > > dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample_array.fixed_sample_locations_integer > > and

Re: [Mesa-dev] [PATCH] glsl: reject invalid input layout qualifiers

2016-02-13 Thread Timothy Arceri
On Sat, 2016-02-13 at 16:47 +1100, Timothy Arceri wrote: > Global in validation is already handled, this will do the validation > for variables, blocks and block members. > > This fixes some CTS tests for the new enhanced layouts transform > feedback qualifiers. > --- Please ignore this I shouldn

Re: [Mesa-dev] [PATCH 01/21] nir/glsl: Remove dead function parameter handling code

2016-02-13 Thread Jordan Justen
On 2016-02-13 18:14:18, Jason Ekstrand wrote: > NIR has never been used on IR where we haven't already done function > inlining so this code has been dead from the beginning. Let's just get rid > of it for now. We can alwasy put it back in if we decide to use NIR for typo: always Reviewed-by: J

[Mesa-dev] [PATCH] nv50, nvc0: enable/disable seamless cubemap texturing as requested

2016-02-13 Thread Ilia Mirkin
In a situation where the seamless setting isn't available on a per-texture basis (G200+ Teslas, and all Fermis), assume that all samplers will have it identically set, and enable accordingly. This fixes arb_seamless_cubemap piglit test on Fermi and Tesla. Signed-off-by: Ilia Mirkin --- src/gall

Re: [Mesa-dev] [PATCH] [v2] i965/bxt: Production thread counts

2016-02-13 Thread Jason Ekstrand
Assuming the URB sizes mean the sensible thing (didn't we just clean that up?): Reviewed-by: Jason Ekstrand I'm a little wary of the URB size since the bspec actually gives a range. Might be better to drop it to 128 just to be safe. I guess if we find a problem, we can always push a patch to st

Re: [Mesa-dev] [PATCH] [v2] i965/bxt: Production thread counts

2016-02-13 Thread Mark Janes
Reviewed-by: Mark Janes Ben Widawsky writes: > v2: Forgot to squash in the comment removal > > Signed-off-by: Ben Widawsky > --- > src/mesa/drivers/dri/i965/brw_device_info.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > > diff --git a/src/mesa/drivers/dri/i96

Re: [Mesa-dev] [PATCH] glsl: Fix overflow of ImageAccess[] array.

2016-02-13 Thread Jordan Justen
Reviewed-by: Jordan Justen And for IVB: Tested-by: Jordan Justen For me, this fixed the error message from arb_shader_image_load_store-max-images, subtest "Compute shader max image uniforms test": Before: Failed to link: error: Too many compute shader image uniforms (35002 > 32) After: F

[Mesa-dev] [PATCH 13/21] nir: Add a pass to repair SSA form

2016-02-13 Thread Jason Ekstrand
--- src/compiler/Makefile.sources | 1 + src/compiler/nir/Makefile.sources | 1 + src/compiler/nir/nir.h| 3 + src/compiler/nir/nir_repair_ssa.c | 157 ++ 4 files changed, 162 insertions(+) create mode 100644 src/compiler/nir/nir_repair_ss

[Mesa-dev] [PATCH 16/21] nir/cf: Make extracting or re-inserting nothing a no-op

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir_control_flow.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/compiler/nir/nir_control_flow.c b/src/compiler/nir/nir_control_flow.c index ecd9cbd..33b06d0 100644 --- a/src/compiler/nir/nir_control_flow.c +++ b/src/compiler/nir/nir_control_flow.c @@ -749,

[Mesa-dev] [PATCH 18/21] nir: Add a cursor helper for getting a cursor after any phi nodes

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir.h | 16 1 file changed, 16 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index c856b83..e28070b 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1871,6 +1871,22 @@ nir_after_cf_node(nir_cf_node *node) }

[Mesa-dev] [PATCH 21/21] nir: Add a pass to inline functions

2016-02-13 Thread Jason Ekstrand
This commit adds a new NIR pass that lowers all function calls away by inlining the functions. --- src/compiler/Makefile.sources | 1 + src/compiler/nir/Makefile.sources | 1 + src/compiler/nir/nir.h | 2 + src/compiler/nir/nir_inline_functions.c | 270 ++

[Mesa-dev] [PATCH 20/21] nir/builder: Add helpers for easily inserting copy_var intrinsics

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir_builder.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index d131259..18894da 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -349,6 +349,29

[Mesa-dev] [PATCH 07/21] nir/validate: Better function validation

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir_validate.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 24094f6..0c9d816 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.

[Mesa-dev] [PATCH 11/21] nir/vars_to_ssa: Use the new nir_phi_builder helper

2016-02-13 Thread Jason Ekstrand
The efficiency should be approximately the same. We do a little more work per phi node because we have to sort the predecessors. However, we no longer have to walk the blocks a second time to pop things off the stack. The bigger advantage, however, is that we can now re-use the phi placement and

[Mesa-dev] [PATCH 19/21] nir: Add return lowering pass

2016-02-13 Thread Jason Ekstrand
This commit adds a NIR pass for lowering away returns in functions. If the return is in a loop, it is lowered to a break. If it is not in a loop, it's lowered away by moving/deleting code as needed. --- src/compiler/Makefile.sources| 1 + src/compiler/nir/Makefile.sources| 1 + s

[Mesa-dev] [PATCH 15/21] nir: Add a function for comparing cursors

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir.c | 63 ++ src/compiler/nir/nir.h | 2 ++ 2 files changed, 65 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index cd78475..468065a 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.

[Mesa-dev] [PATCH 17/21] nir/builder: Add a helper for inserting jump instructions

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir_builder.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index d546e41..d131259 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -361,4 +361,11 @@ nir_load_system

[Mesa-dev] [PATCH 06/21] nir/print: Better function argument printing

2016-02-13 Thread Jason Ekstrand
Since we aren't going to put the function parameters or the return variable in the list of locals, it won't get a proper declaration. This changes nir_print to print the type along with each parameter or return variable. --- src/compiler/nir/nir_print.c | 12 ++-- 1 file changed, 10 inser

[Mesa-dev] [PATCH 08/21] nir/clone: Add support for cloning a single function_impl

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_clone.c | 112 ++- 2 files changed, 81 insertions(+), 32 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ff09075..ae57e5f 100644 --- a/src/compiler/nir/nir.h +++

[Mesa-dev] [PATCH 05/21] nir/print: Factor variable name lookup into a helper

2016-02-13 Thread Jason Ekstrand
Otherwise, we have a problem when we go to print functions with arguments because their names get added to the hash table during declaration which happens after we print the prototype. --- src/compiler/nir/nir_print.c | 66 1 file changed, 36 insertions

[Mesa-dev] [PATCH 00/21] nir: Functions!

2016-02-13 Thread Jason Ekstrand
This patch series adds actual function support to NIR. Previously all NIR usage relied on GLSL to have lowered functions away entirely. As a result, any support for functions that was there was dead code and not really tested. With SPIR-V on the horizon, NIR will need real function support. The

[Mesa-dev] [PATCH 04/21] nir: Create function parameters in function_impl_create

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir.c | 16 1 file changed, 16 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 0e4d981..cd78475 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -304,6 +304,22 @@ nir_function_impl_create(nir_function *funct

[Mesa-dev] [PATCH 09/21] nir: Add a phi node placement helper

2016-02-13 Thread Jason Ekstrand
Right now, we have phi placement code in two places and there are other places where it would be nice to be able to do this analysis. Instead of repeating it all over the place, this commit adds a helper for placing all of the needed phi nodes for a value. --- src/compiler/Makefile.sources |

[Mesa-dev] [PATCH 01/21] nir/glsl: Remove dead function parameter handling code

2016-02-13 Thread Jason Ekstrand
NIR has never been used on IR where we haven't already done function inlining so this code has been dead from the beginning. Let's just get rid of it for now. We can alwasy put it back in if we decide to use NIR for function inlining at some point in the future. --- src/compiler/nir/glsl_to_nir.

[Mesa-dev] [PATCH 03/21] nir: Add a helper for creating a "bare" nir_function_impl

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir.c | 32 ++-- src/compiler/nir/nir.h | 2 ++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index acb2692..0e4d981 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c

[Mesa-dev] [PATCH 02/21] nir: Add a new "param" variable mode for parameters and return variables

2016-02-13 Thread Jason Ekstrand
--- src/compiler/nir/nir.c | 4 src/compiler/nir/nir.h | 9 - src/compiler/nir/nir_validate.c | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index df40a55..acb2692 100644 --- a/src/compiler/nir/

[Mesa-dev] [PATCH 14/21] nir/cf: Handle relinking top-level blocks

2016-02-13 Thread Jason Ekstrand
This can happen if a function ends in a return instruction and you remove the return. --- src/compiler/nir/nir_control_flow.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_control_flow.c b/src/compiler/nir/nir_control_flow.c index 96395a4..ecd9cbd

[Mesa-dev] [PATCH 10/21] nir/dominance: Handle unreachable blocks

2016-02-13 Thread Jason Ekstrand
Previously, nir_dominance.c didn't properly handle unreachable blocks. This can happen if, for instance, you have something like this: loop { if (...) { break; } else { break; } } In this case, the block right after the if statement will be unreachable. This commit makes two

[Mesa-dev] [PATCH 12/21] util/bitset: Allow iterating over const bitsets

2016-02-13 Thread Jason Ekstrand
--- src/util/bitset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/bitset.h b/src/util/bitset.h index c452819..2404ce7 100644 --- a/src/util/bitset.h +++ b/src/util/bitset.h @@ -98,7 +98,7 @@ __bitset_ffs(const BITSET_WORD *x, int n) static inline unsigned __bit

[Mesa-dev] [PATCH] nir: Add a pass for lower indirect variable dereferences

2016-02-13 Thread Jason Ekstrand
This new pass lowers load/store_var intrinsics that act on indirect derefs to if-ladder of direct load/store_var intrinsics. The if-ladders perform a simple binary search on the indirect. --- src/compiler/Makefile.sources| 1 + src/compiler/nir/Makefile.sources| 1

Re: [Mesa-dev] [PATCH 6/7] glx: remove incorrect refcounting of DRIdrawable

2016-02-13 Thread Ian Romanick
On 02/11/2016 12:58 PM, Miklós Máté wrote: > On 02/09/2016 05:02 PM, Ian Romanick wrote: >> On 02/08/2016 05:11 PM, Ian Romanick wrote: >>> On 02/05/2016 01:11 PM, Miklós Máté wrote: dri drawables must never be released when unbound from a context as long as their corresponding glx object

Re: [Mesa-dev] [PATCH] glsl: Fix overflow of ImageAccess[] array.

2016-02-13 Thread Timothy Arceri
On Sat, 2016-02-13 at 17:27 -0800, Kenneth Graunke wrote: > The ImageAccess array is statically sized to MAX_IMAGE_UNIFORMS: > >    GLenum ImageAccess[MAX_IMAGE_UNIFORMS]; > > There was no bounds checking ensuring we don't overflow.  Passing in > a > shader with too many uniforms would cause writ

Re: [Mesa-dev] [PATCH] glsl: Fix overflow of ImageAccess[] array.

2016-02-13 Thread Kenneth Graunke
On Saturday, February 13, 2016 8:30:51 PM PST Ilia Mirkin wrote: > On Sat, Feb 13, 2016 at 8:27 PM, Kenneth Graunke wrote: > > The ImageAccess array is statically sized to MAX_IMAGE_UNIFORMS: > > > >GLenum ImageAccess[MAX_IMAGE_UNIFORMS]; > > > > There was no bounds checking ensuring we don't

Re: [Mesa-dev] [PATCH] glsl: Fix overflow of ImageAccess[] array.

2016-02-13 Thread Ilia Mirkin
On Sat, Feb 13, 2016 at 8:27 PM, Kenneth Graunke wrote: > The ImageAccess array is statically sized to MAX_IMAGE_UNIFORMS: > >GLenum ImageAccess[MAX_IMAGE_UNIFORMS]; > > There was no bounds checking ensuring we don't overflow. Passing in a > shader with too many uniforms would cause writes to

[Mesa-dev] [PATCH] glsl: Fix overflow of ImageAccess[] array.

2016-02-13 Thread Kenneth Graunke
The ImageAccess array is statically sized to MAX_IMAGE_UNIFORMS: GLenum ImageAccess[MAX_IMAGE_UNIFORMS]; There was no bounds checking ensuring we don't overflow. Passing in a shader with too many uniforms would cause writes to extend into other fields, such as sh->NumImages. Later linker che

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2016-02-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Bug 77449 depends on bug 87389, which changed state. Bug 87389 Summary: [ILK] HL2 & CS:Source water shader broken https://bugs.freedesktop.org/show_bug.cgi?id=87389 What|Removed |Added --

Re: [Mesa-dev] [PATCH] st/mesa: empty buffer binding if the buffer's not really there

2016-02-13 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset On 02/14/2016 01:25 AM, Ilia Mirkin wrote: This can happen with 0-sized buffers. Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_atomicbuf.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_atom

Re: [Mesa-dev] [PATCH 2/3] i965: Lower min/max after optimization on Gen4/5.

2016-02-13 Thread Matt Turner
On Sat, Feb 13, 2016 at 3:30 PM, Francisco Jerez wrote: > Matt Turner writes: > >> On Sat, Feb 13, 2016 at 2:02 PM, Francisco Jerez >> wrote: >>> Matt Turner writes: >>> On Thu, Feb 11, 2016 at 4:41 PM, Matt Turner wrote: > Gen4/5's SEL instruction cannot use conditional modifiers, s

[Mesa-dev] [PATCH] st/mesa: empty buffer binding if the buffer's not really there

2016-02-13 Thread Ilia Mirkin
This can happen with 0-sized buffers. Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_atomicbuf.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_atomicbuf.c b/src/mesa/state_tracker/st_atom_atomicbuf.c index d83c396..a27d

[Mesa-dev] [PATCH v2 8/9] st/mesa: convert GLSL image intrinsics into TGSI

2016-02-13 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie --- src/mesa/main/mtypes.h | 1 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 214 - 2 files changed, 211 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtyp

[Mesa-dev] [PATCH v2 9/9] st/mesa: enable GL image extensions when backend supports them

2016-02-13 Thread Ilia Mirkin
This enables ARB_shader_image_load_store and ARB_shader_image_size when the backend claims support for these. It will also implicitly enable the image component of ARB_shader_texture_image_samples. Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/mesa/state_

[Mesa-dev] [PATCH v2 7/9] st/mesa: allow st_format.h to be included from C++ files

2016-02-13 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/mesa/state_tracker/st_format.h | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h index 90e00e8..3e10aa6 100644 --- a/src/mesa/s

[Mesa-dev] [PATCH v2 0/9] st/mesa: add shader image support

2016-02-13 Thread Ilia Mirkin
OK... v2 is here, rebased across the recent compute support and Dave's AoA changes (and probably other stuff). No significant changes to the patches themselves. Dave, your R-b was conditional on addressing your feedback re writability of surfaces, but I believe you later decided it was OK as-is, a

[Mesa-dev] [PATCH v2 5/9] st/mesa: call st_finalize_texture from image atoms

2016-02-13 Thread Ilia Mirkin
From: Nicolai Hähnle Reviewed-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_image.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index 1025725..ff36537 100644 --- a/src/mesa/state_t

[Mesa-dev] [PATCH v2 1/9] gallium: make image views non-persistent objects

2016-02-13 Thread Ilia Mirkin
Make them akin to shader buffers, with no refcounting/etc. Just used to pass data about the bound image in ->set_shader_images. Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie Reviewed-by: Marek Olšák --- src/gallium/auxiliary/util/u_inlines.h| 11 --- src/gallium/drivers/d

[Mesa-dev] [PATCH v2 6/9] st/mesa: set pipe_image_view layers correctly for 3D textures

2016-02-13 Thread Ilia Mirkin
From: Nicolai Hähnle Reviewed-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_image.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index ff36537..4b48bc3 100644 -

[Mesa-dev] [PATCH v2 2/9] gallium: add PIPE_SHADER_CAP_MAX_SHADER_IMAGES

2016-02-13 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/gallium/auxiliary/gallivm/lp_bld_limits.h| 1 + src/gallium/auxiliary/tgsi/tgsi_exec.h | 1 + src/gallium/docs/source/screen.rst | 1 + src/gallium/drivers/freedreno/freedreno_screen

[Mesa-dev] [PATCH v2 4/9] st/mesa: add an image atom for shader images

2016-02-13 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/mesa/Makefile.sources | 1 + src/mesa/state_tracker/st_atom.c | 6 + src/mesa/state_tracker/st_atom.h | 6 + src/mesa/state_tracker/st_atom_image.c | 222 +

[Mesa-dev] [PATCH v2 3/9] tgsi: show textual format representation

2016-02-13 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_dump.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_text.c | 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/s

Re: [Mesa-dev] [PATCH 3/3] nvc0: enable compute support on GK110+ with an envvar

2016-02-13 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Sat, Feb 13, 2016 at 6:31 PM, Samuel Pitoiset wrote: > Without this NVF0_COMPUTE environment variable, compute support is > initialized by default and this is not what we want for now because > it might break 3D. Compute will be enabled by default on GK110+ once > we

Re: [Mesa-dev] [PATCH v3] clover: fix build failure since bfd695e

2016-02-13 Thread Francisco Jerez
Serge Martin writes: > --- > src/gallium/state_trackers/clover/core/kernel.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp > b/src/gallium/state_trackers/clover/core/kernel.cpp > index 41b3852..8396be9 100644 >

Re: [Mesa-dev] [PATCH 2/3] nvc0: add compute support for GM107

2016-02-13 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Sat, Feb 13, 2016 at 6:31 PM, Samuel Pitoiset wrote: > Fortunately, compute support on GM107 is very close to GK110, except > the GK110_COMPUTE.UNK02C4 which is invalid and should not be used. > > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/nouveau/nv

Re: [Mesa-dev] [PATCH 1/3] nvc0: fix compute state initialization on GK110+

2016-02-13 Thread Ilia Mirkin
On Sat, Feb 13, 2016 at 6:31 PM, Samuel Pitoiset wrote: > For some unknown reasons, the command 0x518, which is FIRMWARE[0x6] Please make a note that the blob calls it, along with the args passed in (usually via scratch regs iirc). It's probably one of the context register modifiers. Our firmware

[Mesa-dev] [PATCH 1/3] nvc0: fix compute state initialization on GK110+

2016-02-13 Thread Samuel Pitoiset
For some unknown reasons, the command 0x518, which is FIRMWARE[0x6] from rnndb, totally hangs the GPU, and a reboot is needed. With that removed, I can succesfully launch compute shaders and so the compute support seems to work as expected. Tested on GK208 and GM107. Signed-off-by: Samuel Pitoise

[Mesa-dev] [PATCH 2/3] nvc0: add compute support for GM107

2016-02-13 Thread Samuel Pitoiset
Fortunately, compute support on GM107 is very close to GK110, except the GK110_COMPUTE.UNK02C4 which is invalid and should not be used. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nv_object.xml.h | 1 + src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 5 - 2 files cha

[Mesa-dev] [PATCH 3/3] nvc0: enable compute support on GK110+ with an envvar

2016-02-13 Thread Samuel Pitoiset
Without this NVF0_COMPUTE environment variable, compute support is initialized by default and this is not what we want for now because it might break 3D. Compute will be enabled by default on GK110+ once we are sure that it won't break anything else. Signed-off-by: Samuel Pitoiset --- src/galliu

Re: [Mesa-dev] [PATCH 2/3] i965: Lower min/max after optimization on Gen4/5.

2016-02-13 Thread Francisco Jerez
Matt Turner writes: > On Sat, Feb 13, 2016 at 2:02 PM, Francisco Jerez > wrote: >> Matt Turner writes: >> >>> On Thu, Feb 11, 2016 at 4:41 PM, Matt Turner wrote: Gen4/5's SEL instruction cannot use conditional modifiers, so min/max are implemented as CMP + SEL. Handling that after o

Re: [Mesa-dev] [PATCH v3] clover: fix build failure since bfd695e

2016-02-13 Thread eocallaghan
Thanks kindly. Reviewed-by: Edward O'Callaghan On 2016-02-14 09:39, Serge Martin wrote: --- src/gallium/state_trackers/clover/core/kernel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_tracker

Re: [Mesa-dev] [PATCH v3] clover: fix build failure since bfd695e

2016-02-13 Thread Ilia Mirkin
Assuming this compiles, this is Reviewed-by: Ilia Mirkin On Sat, Feb 13, 2016 at 5:39 PM, Serge Martin wrote: > --- > src/gallium/state_trackers/clover/core/kernel.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/core/kernel.c

Re: [Mesa-dev] [PATCH 2/3] i965: Lower min/max after optimization on Gen4/5.

2016-02-13 Thread Matt Turner
On Sat, Feb 13, 2016 at 2:02 PM, Francisco Jerez wrote: > Matt Turner writes: > >> On Thu, Feb 11, 2016 at 4:41 PM, Matt Turner wrote: >>> Gen4/5's SEL instruction cannot use conditional modifiers, so min/max >>> are implemented as CMP + SEL. Handling that after optimization lets us >>> CSE more

[Mesa-dev] [PATCH] glsl: remove duplicate interpolation_string() function

2016-02-13 Thread Timothy Arceri
We already have one in the IR code that can be used everywhere its needed in the AST code so remove the one from the AST. --- src/compiler/glsl/ast.h | 12 src/compiler/glsl/ast_to_hir.cpp | 7 ++- src/compiler/glsl/ast_type.cpp | 13 - 3 files changed, 2 i

[Mesa-dev] [Bug 94088] [llvmpipe] SIGFPE pthread_barrier_destroy.c:40

2016-02-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94088 Vinson Lee changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Mesa-dev] [PATCH v3] clover: fix build failure since bfd695e

2016-02-13 Thread Serge Martin
--- src/gallium/state_trackers/clover/core/kernel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp index 41b3852..8396be9 100644 --- a/src/gallium/state_trackers/clov

Re: [Mesa-dev] [PATCH] mesa: Initialize ctx->Const.MaxComputeSharedMemorySize to a default.

2016-02-13 Thread Timothy Arceri
On Sat, 2016-02-13 at 13:55 -0800, Kenneth Graunke wrote: > Commit be27f772e8b97031bf5177 added ctx- > >Const.MaxComputeSharedMemorySize, > and added a line to initialize it to a default value of 32768 in the > standalone GLSL compiler, but didn't initialize a default value in > real > GL contexts.

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Samuel Pitoiset
On 02/13/2016 11:18 PM, Jordan Justen wrote: On 2016-02-13 13:57:17, Samuel Pitoiset wrote: On 02/13/2016 10:55 PM, Jordan Justen wrote: On 2016-02-13 13:49:37, Samuel Pitoiset wrote: MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression introduced in be27f77 (mesa: do not

Re: [Mesa-dev] [PATCH] clover: fix build failure since bfd695e

2016-02-13 Thread Francisco Jerez
Ilia Mirkin writes: > On Sat, Feb 13, 2016 at 4:45 PM, Francisco Jerez > wrote: >> Ilia Mirkin writes: >> >>> On Sat, Feb 13, 2016 at 12:01 PM, Serge Martin wrote: --- src/gallium/state_trackers/clover/core/kernel.cpp | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Jordan Justen
On 2016-02-13 13:57:17, Samuel Pitoiset wrote: > > On 02/13/2016 10:55 PM, Jordan Justen wrote: > > On 2016-02-13 13:49:37, Samuel Pitoiset wrote: > >> MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression > >> introduced in be27f77 (mesa: do not use a constant for > >> MAX_COMPU

Re: [Mesa-dev] [PATCH] clover: fix build failure since bfd695e

2016-02-13 Thread Ilia Mirkin
On Sat, Feb 13, 2016 at 4:45 PM, Francisco Jerez wrote: > Ilia Mirkin writes: > >> On Sat, Feb 13, 2016 at 12:01 PM, Serge Martin wrote: >>> --- >>> src/gallium/state_trackers/clover/core/kernel.cpp | 7 --- >>> 1 file changed, 4 insertions(+), 3 deletions(-) >>> >>> diff --git a/src/galliu

Re: [Mesa-dev] [PATCH 4/4] st/mesa: rename attr variable in st_DrawTex()

2016-02-13 Thread Jose Fonseca
On 12/02/16 15:45, Brian Paul wrote: Rename to 'tex_attr' to be a bit more clear. --- src/mesa/state_tracker/st_cb_drawtex.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex

Re: [Mesa-dev] [PATCH 1/7] cso: add new cso_save/restore_state() functions

2016-02-13 Thread Jose Fonseca
On 12/02/16 15:44, Brian Paul wrote: cso_save_state() takes a bitmask of state items to save. Calling cso_restore_state() restores those states. --- src/gallium/auxiliary/cso_cache/cso_context.c | 109 ++ src/gallium/auxiliary/cso_cache/cso_context.h | 24 ++ 2 f

[Mesa-dev] [PATCH v7 5/7] clover: override ret_object

2016-02-13 Thread Serge Martin
Return an API object from an intrusive reference to a Clover object, incrementing the reference count of the object. Reviewed-by: Francisco Jerez --- src/gallium/state_trackers/clover/api/util.hpp | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/state_trackers/clover

[Mesa-dev] [PATCH v7 7/7] clover: add -create-library option support

2016-02-13 Thread Serge Martin
--- .../state_trackers/clover/llvm/invocation.cpp | 87 -- .../state_trackers/clover/llvm/ir_compiler.cpp | 46 +--- .../state_trackers/clover/llvm/ir_compiler.hpp | 4 +- 3 files changed, 85 insertions(+), 52 deletions(-) diff --git a/src/gallium/state_t

[Mesa-dev] [PATCH v7 0/7] add clLinkProgram

2016-02-13 Thread Serge Martin
This serie add clLinkProgram function needed for CL 1.2. However, it lacks the binary type part that is mandatory for input validation and also for CL_PROGRAM_BINARY_TYPE query. This will be adressed in another serie once we agree on the way to store it. Serge Martin (7): clover: add a LLVM comp

[Mesa-dev] [PATCH v7 4/7] clover: separate compilation and link stages

2016-02-13 Thread Serge Martin
--- src/gallium/state_trackers/clover/api/program.cpp | 19 -- .../state_trackers/clover/core/compiler.hpp| 7 +- src/gallium/state_trackers/clover/core/error.hpp | 7 ++ src/gallium/state_trackers/clover/core/program.cpp | 38 ++- src/gallium/state_trackers/clover/core/pr

[Mesa-dev] [PATCH v7 1/7] clover: add a LLVM compiler class

2016-02-13 Thread Serge Martin
--- src/gallium/state_trackers/clover/Makefile.sources | 3 +- .../state_trackers/clover/llvm/ir_compiler.cpp | 282 + .../state_trackers/clover/llvm/ir_compiler.hpp | 59 + 3 files changed, 343 insertions(+), 1 deletion(-) create mode 100644 src/gallium/state_t

[Mesa-dev] [PATCH v7 2/7] clover: make use of llvm_ir_compiler

2016-02-13 Thread Serge Martin
--- .../state_trackers/clover/llvm/invocation.cpp | 234 ++--- 1 file changed, 23 insertions(+), 211 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 4d11c24..d3347de 100644 --- a/sr

[Mesa-dev] [PATCH v7 3/7] clover: program::build change opts to std::string

2016-02-13 Thread Serge Martin
--- src/gallium/state_trackers/clover/core/program.cpp | 4 ++-- src/gallium/state_trackers/clover/core/program.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/program.cpp index

[Mesa-dev] [PATCH v7 6/7] clover: add clLinkProgram (CL 1.2)

2016-02-13 Thread Serge Martin
Reviewed-by: Francisco Jerez --- src/gallium/state_trackers/clover/api/program.cpp | 31 +++--- src/gallium/state_trackers/clover/core/program.hpp | 4 +-- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/ga

Re: [Mesa-dev] [PATCH 1/3] i965/vec4: Initialize force_writemask_all in vec4_builder().

2016-02-13 Thread Francisco Jerez
Matt Turner writes: > --- > src/mesa/drivers/dri/i965/brw_vec4_builder.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_builder.h > b/src/mesa/drivers/dri/i965/brw_vec4_builder.h > index be1427c..5d4b452 100644 > --- a/src/mesa/driv

Re: [Mesa-dev] [PATCH 2/3] i965: Lower min/max after optimization on Gen4/5.

2016-02-13 Thread Francisco Jerez
Matt Turner writes: > On Thu, Feb 11, 2016 at 4:41 PM, Matt Turner wrote: >> Gen4/5's SEL instruction cannot use conditional modifiers, so min/max >> are implemented as CMP + SEL. Handling that after optimization lets us >> CSE more. >> >> On Ironlake: >> >>total instructions in shared progr

Re: [Mesa-dev] [PATCH 2/7] st/mesa: use new cso_save/restore_state() functions

2016-02-13 Thread Jose Fonseca
On 12/02/16 15:44, Brian Paul wrote: --- src/mesa/state_tracker/st_cb_bitmap.c | 36 src/mesa/state_tracker/st_cb_clear.c | 46 +++ src/mesa/state_tracker/st_cb_drawpixels.c | 46 +++ src/mesa/state_tra

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Samuel Pitoiset
On 02/13/2016 10:57 PM, Kenneth Graunke wrote: On Saturday, February 13, 2016 10:49:37 PM PST Samuel Pitoiset wrote: MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression introduced in be27f77 (mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE). Signed-off-by: Samuel P

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Samuel Pitoiset
On 02/13/2016 10:55 PM, Jordan Justen wrote: On 2016-02-13 13:49:37, Samuel Pitoiset wrote: MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression introduced in be27f77 (mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE). Signed-off-by: Samuel Pitoiset Cc: Mark Janes

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Kenneth Graunke
On Saturday, February 13, 2016 10:49:37 PM PST Samuel Pitoiset wrote: > MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression > introduced in be27f77 (mesa: do not use a constant for > MAX_COMPUTE_SHARED_SIZE). > > Signed-off-by: Samuel Pitoiset > Cc: Mark Janes > --- > > This

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Ilia Mirkin
On Sat, Feb 13, 2016 at 4:49 PM, Samuel Pitoiset wrote: > MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression > introduced in be27f77 (mesa: do not use a constant for > MAX_COMPUTE_SHARED_SIZE). > > Signed-off-by: Samuel Pitoiset > Cc: Mark Janes Reviewed-by: Ilia Mirkin P

[Mesa-dev] [PATCH] mesa: Initialize ctx->Const.MaxComputeSharedMemorySize to a default.

2016-02-13 Thread Kenneth Graunke
Commit be27f772e8b97031bf5177 added ctx->Const.MaxComputeSharedMemorySize, and added a line to initialize it to a default value of 32768 in the standalone GLSL compiler, but didn't initialize a default value in real GL contexts. This regressed arb_compute_shader-minmax on i965, as the value of the

Re: [Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Jordan Justen
On 2016-02-13 13:49:37, Samuel Pitoiset wrote: > MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression > introduced in be27f77 (mesa: do not use a constant for > MAX_COMPUTE_SHARED_SIZE). > > Signed-off-by: Samuel Pitoiset > Cc: Mark Janes > --- > > This patch is untested beca

[Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

2016-02-13 Thread Samuel Pitoiset
MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression introduced in be27f77 (mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE). Signed-off-by: Samuel Pitoiset Cc: Mark Janes --- This patch is untested because I don't have any Intel GPUs. src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH 6/6] st/mesa: use new cso_set_viewport_dims() helper

2016-02-13 Thread Jose Fonseca
On 12/02/16 15:43, Brian Paul wrote: --- src/mesa/state_tracker/st_cb_bitmap.c | 16 +++- src/mesa/state_tracker/st_cb_clear.c | 13 ++--- src/mesa/state_tracker/st_cb_drawpixels.c | 14 ++ 3 files changed, 7 insertions(+), 36 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] clover: fix build failure since bfd695e

2016-02-13 Thread Francisco Jerez
Ilia Mirkin writes: > On Sat, Feb 13, 2016 at 12:01 PM, Serge Martin wrote: >> --- >> src/gallium/state_trackers/clover/core/kernel.cpp | 7 --- >> 1 file changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp >> b/src/gallium/state_tr

Re: [Mesa-dev] AppVeyor: Build failed: mesa 58

2016-02-13 Thread Jose Fonseca
Per http://help.appveyor.com/discussions/problems/3801-builds-failing-without-generating-any-log this was a transitory issue. And in fact I never saw it again. Builds have been going reliably, so I've just re-enabled notification emails to this list. Is there any admin here that could help

Re: [Mesa-dev] [PATCH 2/3] i965: Lower min/max after optimization on Gen4/5.

2016-02-13 Thread Matt Turner
On Thu, Feb 11, 2016 at 4:41 PM, Matt Turner wrote: > Gen4/5's SEL instruction cannot use conditional modifiers, so min/max > are implemented as CMP + SEL. Handling that after optimization lets us > CSE more. > > On Ironlake: > >total instructions in shared programs: 6426035 -> 6422753 (-0.05%

[Mesa-dev] [PATCH] docs: Document VC4_DEBUG envvar

2016-02-13 Thread Rhys Kidd
Signed-off-by: Rhys Kidd --- docs/envvars.html | 19 +++ 1 file changed, 19 insertions(+) diff --git a/docs/envvars.html b/docs/envvars.html index ba83335..c0007a6 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -245,6 +245,25 @@ for details. +VC4 driver environme

Re: [Mesa-dev] [PATCH] i965: Fix gl_DrawID in the vec4 backend.

2016-02-13 Thread Kristian Høgsberg
On Sat, Feb 13, 2016 at 12:45 PM, Kenneth Graunke wrote: > brw_draw_upload.c uploads VertexID/InstanceID first, then DrawID. > So we need to assign the attribute mapping in that order as well. > > Fixes the following Pigit tests with the vec4 backend: > - arb_shader_draw_parameters-drawid vertexid

[Mesa-dev] [PATCH] i965: Fix gl_DrawID in the vec4 backend.

2016-02-13 Thread Kenneth Graunke
brw_draw_upload.c uploads VertexID/InstanceID first, then DrawID. So we need to assign the attribute mapping in that order as well. Fixes the following Pigit tests with the vec4 backend: - arb_shader_draw_parameters-drawid vertexid - arb_shader_draw_parameters-drawid-indirect basevertex Signed-of

[Mesa-dev] [PATCH] docs: Correct typo in LLVMpipe envvar description

2016-02-13 Thread Rhys Kidd
Signed-off-by: Rhys Kidd --- docs/envvars.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/envvars.html b/docs/envvars.html index ba83335..d7697e3 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -224,7 +224,7 @@ See src/mesa/state_tracker/st_debug.c for othe

  1   2   >