Re: [Mesa-dev] [PATCH] nir: fix bit_size in lower indirect derefs.

2019-04-25 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Apr 25, 2019 at 9:50 PM Dave Airlie wrote: > From: Dave Airlie > > This fixes a case where we are expecting 64-bit but generate > 32-bit consts and validate gets angry. > > Signed-off-by: Dave Airlie > --- > src/compiler/nir/nir_lower_indirect_derefs.c |

[Mesa-dev] [PATCH] nir: fix bit_size in lower indirect derefs.

2019-04-25 Thread Dave Airlie
From: Dave Airlie This fixes a case where we are expecting 64-bit but generate 32-bit consts and validate gets angry. Signed-off-by: Dave Airlie --- src/compiler/nir/nir_lower_indirect_derefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 1/2] nir: Add inverted bitwise ops

2019-04-25 Thread Alyssa Rosenzweig
> iand and ior are commutative, so you don't need both. --Wait, woaaah, the algebraic generator respects that? Super neat, thank you! > Especially without instruction count data (I'm assuming I won't be able to do shader-db on my hw at this point..) > For example, if the only use of

Re: [Mesa-dev] [PATCH 1/2] nir: Add inverted bitwise ops

2019-04-25 Thread Alyssa Rosenzweig
> We can support all of these with source modifiers because the above three > aren't really "dest invertable"... For us, they'd be > > ~src0 | ~src1 > ~src0 & ~src1 > ~src0 ^ ~src1 > > Is it really dest_invertable or both_srcs_invertable? :-) Sure, I wasn't sure how other drivers would want to

[Mesa-dev] [PATCH] st/mesa: fix assertion failure in st_tgsi_lower_yuv

2019-04-25 Thread Marek Olšák
From: Marek Olšák src/mesa/state_tracker/st_tgsi_lower_yuv.c:68: void reg_dst(struct tgsi_full_dst_register *, const struct tgsi_full_dst_register *, unsigned int): assertion "dst->Register.WriteMask" failed Cc: 19.0 --- src/mesa/state_tracker/st_tgsi_lower_yuv.c | 46 +-

[Mesa-dev] [PATCH] st/dri: decrease input lag by syncing sooner in SwapBuffers

2019-04-25 Thread Marek Olšák
From: Marek Olšák It's done by: - decrease the number of frames in flight by 1 - flush before throttling in SwapBuffers (instead of wait-then-flush, do flush-then-wait) The improvement is apparent with Unigine Heaven. Previously: draw frame 2 wait frame 0 flush frame 2

[Mesa-dev] [PATCH] radeonsi: don't ignore PIPE_FLUSH_ASYNC

2019-04-25 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c index 3d23597413c..ffda98d2834 100644 ---

Re: [Mesa-dev] [PATCH 1/2] nir: Add inverted bitwise ops

2019-04-25 Thread Ian Romanick
On 4/25/19 3:37 PM, Alyssa Rosenzweig wrote: > In addition to the familiar iand/ior/ixor, some architectures feature > destination-inverted versions inand/inor/inxor. Certain > architectures also have source-inverted forms, dubbed iandnot/iornot > here. Midgard has the all of these opcodes

Re: [Mesa-dev] [PATCH 1/2] nir: Add inverted bitwise ops

2019-04-25 Thread Jason Ekstrand
On Thu, Apr 25, 2019 at 5:37 PM Alyssa Rosenzweig wrote: > In addition to the familiar iand/ior/ixor, some architectures feature > destination-inverted versions inand/inor/inxor. Certain > architectures also have source-inverted forms, dubbed iandnot/iornot > here. Midgard has the all of these

Re: [Mesa-dev] [PATCH 0/2] Add inverted bitwise forms to NIR

2019-04-25 Thread Alyssa Rosenzweig
Alright, good to know, thank you! :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] nir: Add inverted bitwise ops

2019-04-25 Thread Rob Clark
On Thu, Apr 25, 2019 at 3:37 PM Alyssa Rosenzweig wrote: > > In addition to the familiar iand/ior/ixor, some architectures feature > destination-inverted versions inand/inor/inxor. Certain > architectures also have source-inverted forms, dubbed iandnot/iornot > here. Midgard has the all of these

Re: [Mesa-dev] [PATCH 0/2] Add inverted bitwise forms to NIR

2019-04-25 Thread Ilia Mirkin
On Thu, Apr 25, 2019 at 6:37 PM Alyssa Rosenzweig wrote: > Various combinations of these instructions are found on many > architectures. They appear directly as-is on Midgard; some of them > should be implementable on Intel Gen8+ via the source modifiers; I was > told over IRC that AMD/Nouveau

Re: [Mesa-dev] [PATCH] glsl: fix shader_storage_blocks_write_access for SSBO block arrays (v2)

2019-04-25 Thread Dave Airlie
I ran this via the intel-ci and it has 0 regressions, I've also looked at this before in v1. Reviewed-by: Dave Airlie On Tue, 23 Apr 2019 at 06:08, Marek Olšák wrote: > > Ping. Thanks. > > On Tue, Apr 16, 2019 at 10:16 AM Marek Olšák wrote: >> >> From: Marek Olšák >> >> This fixes

Re: [Mesa-dev] [PATCH] nir: fix nir_remove_unused_varyings()

2019-04-25 Thread Dylan Baker
Thanks! Quoting Timothy Arceri (2019-04-25 15:36:44) > On 26/4/19 6:50 am, Dylan Baker wrote: > > Hi Tim, > > > > I had to make a couple of small tweaks to get this to apply against 19.0 > > (namely > > that the glsl_type_is_struct -> glsl_type_is_struct_or_ifc doesn't exist in > > 19.0), could

Re: [Mesa-dev] [PATCH 2/3] radeonsi/gfx9: rework the gfx9 scissor bug workaround (v2)

2019-04-25 Thread Dylan Baker
Awesome, thanks. Quoting Marek Olšák (2019-04-25 14:50:52) > Thanks. It looks good. > > Marek > > On Thu, Apr 25, 2019, 5:17 PM Dylan Baker wrote: > > Hi Marek, > > I've tried to apply this to 19.0, I had to pull "radeonsi: add > si_debug_options > for convenient

[Mesa-dev] [PATCH 1/2] nir: Add inverted bitwise ops

2019-04-25 Thread Alyssa Rosenzweig
In addition to the familiar iand/ior/ixor, some architectures feature destination-inverted versions inand/inor/inxor. Certain architectures also have source-inverted forms, dubbed iandnot/iornot here. Midgard has the all of these opcodes natively. Many arches have comparible features to implement

[Mesa-dev] [PATCH 2/2] panfrost/midgard: Use inverted forms

2019-04-25 Thread Alyssa Rosenzweig
Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/midgard/midgard_compile.c | 5 + src/gallium/drivers/panfrost/midgard/midgard_compile.h | 5 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c

[Mesa-dev] [PATCH 0/2] Add inverted bitwise forms to NIR

2019-04-25 Thread Alyssa Rosenzweig
Various combinations of these instructions are found on many architectures. They appear directly as-is on Midgard; some of them should be implementable on Intel Gen8+ via the source modifiers; I was told over IRC that AMD/Nouveau might have some of these as well. Rather than forcing backends to

Re: [Mesa-dev] [PATCH] nir: fix nir_remove_unused_varyings()

2019-04-25 Thread Timothy Arceri
On 26/4/19 6:50 am, Dylan Baker wrote: Hi Tim, I had to make a couple of small tweaks to get this to apply against 19.0 (namely that the glsl_type_is_struct -> glsl_type_is_struct_or_ifc doesn't exist in 19.0), could you take a look at the patch in the staging/19.0 branch and let me know if it

Re: [Mesa-dev] [PATCH 2/3] radeonsi/gfx9: rework the gfx9 scissor bug workaround (v2)

2019-04-25 Thread Marek Olšák
Thanks. It looks good. Marek On Thu, Apr 25, 2019, 5:17 PM Dylan Baker wrote: > Hi Marek, > > I've tried to apply this to 19.0, I had to pull "radeonsi: add > si_debug_options > for convenient adding/removing of options", which is fine, but this patch > also > assumes your si compute-queue

[Mesa-dev] [Bug 107022] [RADV] The Witcher 3: Trembling of trees

2019-04-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107022 zefkerri...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH 2/3] radeonsi/gfx9: rework the gfx9 scissor bug workaround (v2)

2019-04-25 Thread Dylan Baker
Hi Marek, I've tried to apply this to 19.0, I had to pull "radeonsi: add si_debug_options for convenient adding/removing of options", which is fine, but this patch also assumes your si compute-queue only patches, which aren't present in 19.0. I've made a small change to get it compiling, but I'm

Re: [Mesa-dev] [PATCH] nir: fix nir_remove_unused_varyings()

2019-04-25 Thread Dylan Baker
Hi Tim, I had to make a couple of small tweaks to get this to apply against 19.0 (namely that the glsl_type_is_struct -> glsl_type_is_struct_or_ifc doesn't exist in 19.0), could you take a look at the patch in the staging/19.0 branch and let me know if it looks okay? Thanks, Dylan Quoting

[Mesa-dev] [Bug 110456] Land YCBCR extensions

2019-04-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110456 Bas Nieuwenhuizen changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 110439] [TRACKER] Mesa 19.1 feature tracker

2019-04-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110439 Bug 110439 depends on bug 110456, which changed state. Bug 110456 Summary: Land YCBCR extensions https://bugs.freedesktop.org/show_bug.cgi?id=110456 What|Removed |Added

[Mesa-dev] [Bug 110516] OpenGLCurveEvaluator does not return affine coordinates

2019-04-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110516 Volker Enderlein changed: What|Removed |Added Attachment #144094|0 |1 is obsolete|

Re: [Mesa-dev] [PATCH v2 1/3] llvmpipe: add lp_fence_timedwait() helper

2019-04-25 Thread Gustaw Smolarczyk
czw., 25 kwi 2019 o 20:11 Gustaw Smolarczyk napisał(a): > > czw., 25 kwi 2019 o 19:42 Emil Velikov napisał(a): > > > > The function is analogous to lp_fence_wait() while taking at timeout > > (ns) parameter, as needed for EGL fence/sync. > > > > v2: > > - use absolute UTC time, as per spec

[Mesa-dev] [Bug 110516] OpenGLCurveEvaluator does not return affine coordinates

2019-04-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110516 Bug ID: 110516 Summary: OpenGLCurveEvaluator does not return affine coordinates Product: Mesa Version: 19.0 Hardware: All OS: All Status: NEW

Re: [Mesa-dev] [PATCH v2 1/3] llvmpipe: add lp_fence_timedwait() helper

2019-04-25 Thread Gustaw Smolarczyk
czw., 25 kwi 2019 o 19:42 Emil Velikov napisał(a): > > The function is analogous to lp_fence_wait() while taking at timeout > (ns) parameter, as needed for EGL fence/sync. > > v2: > - use absolute UTC time, as per spec (Gustaw) > - bail out on cnd_timedwait() failure (Gustaw) > > Cc: Gustaw

[Mesa-dev] [Bug 110356] install_megadrivers.py creates new dangling symlink [bisected]

2019-04-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110356 --- Comment #5 from Fabio Pedretti --- Any plan to backport these (up to 5d310015) to 18.3 (I know it is EOL) and release a 18.3.7? See Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926857 -- You are receiving this mail

[Mesa-dev] [PATCH v2 2/3] llvmpipe: correctly handle waiting in llvmpipe_fence_finish

2019-04-25 Thread Emil Velikov
Currently if the timeout differs from 0, we'll end up with infinite wait... even if the user is perfectly clear they don't want that. Use the new lp_fence_timedwait() helper guarding both waits in an !lp_fence_signalled block like the rest of llvmpipe. Signed-off-by: Emil Velikov Reviewed-by:

[Mesa-dev] [PATCH v2 1/3] llvmpipe: add lp_fence_timedwait() helper

2019-04-25 Thread Emil Velikov
The function is analogous to lp_fence_wait() while taking at timeout (ns) parameter, as needed for EGL fence/sync. v2: - use absolute UTC time, as per spec (Gustaw) - bail out on cnd_timedwait() failure (Gustaw) Cc: Gustaw Smolarczyk Cc: Roland Scheidegger Signed-off-by: Emil Velikov

[Mesa-dev] [PATCH v2 3/3] llvmpipe: Always return some fence in flush (v2)

2019-04-25 Thread Emil Velikov
From: Tomasz Figa If there is no last fence, due to no rendering happening yet, just create a new signaled fence and return it, to match the expectations of the EGL sync fence API. Fixes random "Could not create sync fence 0x3003" assertion failures from Skia on Android, coming from the

Re: [Mesa-dev] [PATCH 1/3] llvmpipe: add lp_fence_timedwait() helper

2019-04-25 Thread Emil Velikov
On Tue, 16 Apr 2019 at 11:50, Gustaw Smolarczyk wrote: > > wt., 16 kwi 2019 o 12:11 Emil Velikov napisał(a): > > > > On Thu, 11 Apr 2019 at 17:55, Gustaw Smolarczyk > > wrote: > > > > > > czw., 11 kwi 2019 o 18:06 Emil Velikov > > > napisał(a): > > > > > > > > The function is analogous to

[Mesa-dev] [MR] glsl: Use default precision on struct/interface members when nothing specified

2019-04-25 Thread Neil Roberts
Mesa already keeps track of the GLES precision for variables and stores it in the ir_variable. When no precision is explicitly specified it takes the default precision for the corresponding type. However, when the variable is a struct or interface, the precision of each individual member is

[Mesa-dev] [PATCH 0/3] radeonsi: handle unaligned vertex buffers in hardware

2019-04-25 Thread Nicolai Hähnle
Hi all, the following patches contain code to implement all vertex fetches using plain, non-format loads plus explicit shader arithmetic for format conversion. This allows us to remove the software workaround for unaligned vertex buffers on SI, because we can just load individual bytes on the

[Mesa-dev] [PATCH 2/3] radeonsi: store sctx->vertex_elements in a local in si_shader_selector_key_vs

2019-04-25 Thread Nicolai Hähnle
From: Nicolai Hähnle Purely as a shorthand in the remainder of the function. --- src/gallium/drivers/radeonsi/si_state_shaders.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c

[Mesa-dev] [PATCH 3/3] radeonsi: overhaul the vertex fetch fixup mechanism

2019-04-25 Thread Nicolai Hähnle
From: Nicolai Hähnle The overall goal is to support unaligned loads from vertex buffers natively on SI. In the unaligned case, we fall back to the general case implementation in ac_build_opencoded_load_format. Since this function is fully general, we will also use it going forward for cases

[Mesa-dev] [PATCH 1/3] amd/common: add ac_build_opencoded_fetch_format

2019-04-25 Thread Nicolai Hähnle
From: Nicolai Hähnle Implement software emulation of buffer_load_format for all types required by vertex buffer fetches. --- src/amd/common/ac_llvm_build.c | 313 + src/amd/common/ac_llvm_build.h | 30 2 files changed, 343 insertions(+) diff --git

Re: [Mesa-dev] [PATCH v2] vulkan/wsi: check if the display_fd given is master

2019-04-25 Thread Bas Nieuwenhuizen
r-b On Thu, Apr 25, 2019 at 12:22 PM Emil Velikov wrote: > > On Fri, 19 Apr 2019 at 16:01, Emil Velikov wrote: > > > > From: Emil Velikov > > > > As effectively required by the extension, we need to ensure we're master > > > > Currently drivers employ vendor specific solutions, which check if

Re: [Mesa-dev] [PATCH] vulkan/wsi: don't use DUMB_CLOSE for normal GEM handles

2019-04-25 Thread Bas Nieuwenhuizen
r-b On Thu, Apr 25, 2019 at 12:22 PM Emil Velikov wrote: > > On Fri, 19 Apr 2019 at 16:03, Emil Velikov wrote: > > > > From: Emil Velikov > > > > Currently we get normal GEM handles from PrimeFDToHandle, yet we close > > then with DUMB_CLOSE. Use GEM_CLOSE instead. > > > > Cc: Keith Packard >

Re: [Mesa-dev] [PATCH 1/8] radeonsi: add si_debug_options for convenient adding/removing of options

2019-04-25 Thread Nicolai Hähnle
On 25.04.19 04:45, Marek Olšák wrote: [snip] -       bool                            clear_db_cache_before_clear;         bool                            has_msaa_sample_loc_bug;         bool                            has_ls_vgpr_init_bug;         bool                         

Re: [Mesa-dev] [PATCH v2] vulkan/wsi: check if the display_fd given is master

2019-04-25 Thread Emil Velikov
On Fri, 19 Apr 2019 at 16:01, Emil Velikov wrote: > > From: Emil Velikov > > As effectively required by the extension, we need to ensure we're master > > Currently drivers employ vendor specific solutions, which check if the > device behind the fd is capable*, yet none of them do the master

Re: [Mesa-dev] [PATCH] vulkan/wsi: don't use DUMB_CLOSE for normal GEM handles

2019-04-25 Thread Emil Velikov
On Fri, 19 Apr 2019 at 16:03, Emil Velikov wrote: > > From: Emil Velikov > > Currently we get normal GEM handles from PrimeFDToHandle, yet we close > then with DUMB_CLOSE. Use GEM_CLOSE instead. > > Cc: Keith Packard > Cc: Jason Ekstrand > Cc: Bas Nieuwenhuizen > Fixes: da997ebec92 ("vulkan:

Re: [Mesa-dev] Mesa (master): radeonsi: delay adding BOs at the beginning of IBs until the first draw

2019-04-25 Thread Michel Dänzer
On 2019-04-24 11:36 p.m., Marek Olšák wrote: > It should be fixed by the patch "radeonsi: add BOs after need_cs_space". Looks like that did the trick, thanks! -- Earthling Michel Dänzer | https://www.amd.com Libre software enthusiast | Mesa

Re: [Mesa-dev] [PATCH 0/6] Add support for NV12

2019-04-25 Thread Lucas Stach
Hi Christian, Am Mittwoch, den 24.04.2019, 08:36 +0200 schrieb Christian Gmeiner: > This patch series goes a complete different route then the one from > Lucas Stach. I am using the integrated YUV tiler instead of using > the 2D core for format conversion. I am reusing some patches from > Lucas

Re: [Mesa-dev] [PATCH] gpu/docs: Clarify what userspace means for gl

2019-04-25 Thread Daniel Vetter
On Thu, Apr 25, 2019 at 11:28:40AM +0800, zhoucm1 wrote: > > > On 2019年04月25日 03:22, Eric Anholt wrote: > > "Zhou, David(ChunMing)" writes: > > > > > Will linux be only mesa-linux? I thought linux is an open linux. > > > Which will impact our opengl/amdvlk(MIT open source), not sure Rocm: > >

[Mesa-dev] [PATCH 1/2] radeonsi/nir: create si_nir_opts() helper

2019-04-25 Thread Timothy Arceri
We will make use of this in the following commit. --- src/gallium/drivers/radeonsi/si_shader.h | 1 + src/gallium/drivers/radeonsi/si_shader_nir.c | 78 +++- 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.h

[Mesa-dev] [PATCH 2/2] radeonsi/nir: call radeonsi nir opts before the scan pass

2019-04-25 Thread Timothy Arceri
Some of the opts are not called in the general optimastion loop in the state trackers glsl -> nir conversion. We need to call the radeonsi specific optimisation once before scanning over the nir otherwise we can end up gathering info on code that is later removed. Fixes an assert in the piglit

Re: [Mesa-dev] [PATCH] nir: fix nir_remove_unused_varyings()

2019-04-25 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset Thanks fo the fix Tim! On 4/25/19 3:17 AM, Timothy Arceri wrote: We were only setting the used mask for the first component of a varying. Since the linking opts split vectors into scalars this has mostly worked ok. However this causes an issue where for example