[Mesa-dev] How about vulkan status in Mesa

2018-04-11 Thread Yuan, Feng
Hi, We have an image processing project libxcam (https://github.com/intel/libxcam/wiki) which has been based on OpenCL to support amount of features. Recently, we decide to porting kernels to GLES compute-shader language and based on Vulkan APIs. Certainly the driver is Mesa. There are my

Re: [Mesa-dev] [PATCH] vulkan: fix build issue on android (both anv/radv)

2018-04-11 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Wed, Apr 11, 2018 at 9:29 AM, Tapani Pälli wrote: > Fixes linking errors against: > >anv_GetPhysicalDeviceImageFormatProperties2KHR >radv_GetPhysicalDeviceImageFormatProperties2KHR > > Signed-off-by:

Re: [Mesa-dev] [PATCH] glsl: remove unreachable assert()

2018-04-11 Thread Ivan Kalvachev
On 4/11/18, Emil Velikov wrote: > On 10 April 2018 at 18:10, Jason Ekstrand wrote: >> On Tue, Apr 10, 2018 at 10:05 AM, Emil Velikov >> wrote: >>> >>> On 10 April 2018 at 17:53, Ivan Kalvachev

Re: [Mesa-dev] [PATCH] radv: advertise 8 bits of subpixel precision for viewports

2018-04-11 Thread Samuel Pitoiset
Agreed. Reviewed-by: Samuel Pitoiset On 04/11/2018 12:11 AM, Józef Kucia wrote: This is what radeonsi does. --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c

[Mesa-dev] [PATCH 5/5] radeonsi/nir: fix crash in test involving the sample mask

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 8c62d53e2ad..3e224b083e6 100644 ---

[Mesa-dev] [PATCH 0/5] glsl,radeonsi/nir: misc fixes

2018-04-11 Thread Nicolai Hähnle
Hi all, just a collection of random fixes I've accumulated over time, most of them stuff that I ran into while testing out NIR stuff. Please review! Thanks, Nicolai ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 4/5] radeonsi/nir: set FS properties only when scanning a fragment shader

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader_nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index c0e08c79a56..b4fba8b8812 100644

[Mesa-dev] [PATCH 1/5] glsl: prevent spurious Valgrind errors when serializing NIR

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle It looks as if the structure fields array is fully initialized below, but in fact at least gcc in debug builds will not actually overwrite the unused bits of bit fields. --- src/compiler/glsl_types.cpp | 6 -- 1 file changed, 4 insertions(+), 2

[Mesa-dev] [PATCH 3/5] ac/nir: fix atomic compare-and-swap

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle The LLVM instruction returns { i32, i1 }, where the i1 indicates success. We're only interested in the first part, which is the loaded value. Fixes dEQP-GLES31.functional.compute.shared_var.atomic.compswap.* --- src/amd/common/ac_nir_to_llvm.c | 1

[Mesa-dev] [PATCH 2/5] radeonsi: fix error paths of si_texture_transfer_map

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle trans is zero-initialized, but trans->resource is setup immediately so needs to be dereferenced. --- src/gallium/drivers/radeonsi/si_texture.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git

Re: [Mesa-dev] How about vulkan status in Mesa

2018-04-11 Thread Tapani Pälli
On 04/11/2018 10:04 AM, Yuan, Feng wrote: -Original Message- From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of Tapani Pälli On 04/11/2018 09:01 AM, Yuan, Feng wrote: Hi, We have an image processing project libxcam (https://github.com/intel/libxcam/wiki)

[Mesa-dev] [PATCH 5/5] amd/common: use the dimension-aware image intrinsics on LLVM 7+

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle Requires LLVM trunk r329166. --- src/amd/common/ac_llvm_build.c | 189 +++-- 1 file changed, 165 insertions(+), 24 deletions(-) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index

[Mesa-dev] [PATCH 2/5] amd/common: pass address components individually to ac_build_image_intrinsic

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle This is in preparation for the new image intrinsics. --- src/amd/common/ac_llvm_build.c | 101 +- src/amd/common/ac_llvm_build.h | 14 +- src/amd/common/ac_nir_to_llvm.c| 365

[Mesa-dev] [PATCH 4/5] ac/nir: use ac_build_image_opcode for image intrinsics

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle So that we'll use the dimension-aware intrinsics in the future. --- src/amd/common/ac_llvm_build.c | 22 - src/amd/common/ac_llvm_build.h | 6 -- src/amd/common/ac_nir_to_llvm.c | 190 +--- 3 files

[Mesa-dev] [PATCH 3/5] radeonsi: generate image load/store/atomic ops using ac_build_image_opcode

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle In preparation of dimension-aware LLVM image intrinsics. --- src/amd/common/ac_llvm_build.c | 105 +++--- src/amd/common/ac_llvm_build.h | 37 +++- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.h |

[Mesa-dev] [PATCH 1/5] amd/common: pass new enum ac_image_dim to ac_build_image_opcode

2018-04-11 Thread Nicolai Hähnle
From: Nicolai Hähnle This is in preparation for the new, dimension-aware LLVM image intrinsics. --- src/amd/common/ac_llvm_build.c| 10 - src/amd/common/ac_llvm_build.h| 13 +- src/amd/common/ac_nir_to_llvm.c

[Mesa-dev] [PATCH 0/5] amd/common: use dimension-aware image intrinsics for LLVM

2018-04-11 Thread Nicolai Hähnle
Hi all, one of the things I've been recently working on is a new set of image intrinsics in LLVM to have explicit parameters for all the different components of the address argument. This is motivated by the A16 feature in gfx9, which allows address components (coordinates, explicit derivatives)

[Mesa-dev] [PATCH] vulkan: fix build issue on android (both anv/radv)

2018-04-11 Thread Tapani Pälli
Fixes linking errors against: anv_GetPhysicalDeviceImageFormatProperties2KHR radv_GetPhysicalDeviceImageFormatProperties2KHR Signed-off-by: Tapani Pälli --- src/amd/vulkan/radv_android.c | 6 +++--- src/intel/vulkan/anv_android.c | 4 ++-- 2 files changed, 5

[Mesa-dev] [PATCH 02/11] intel/compiler: fix isign for 16-bit integers

2018-04-11 Thread Iago Toral Quiroga
We need to use 16-bit constants with 16-bit instructions, otherwise we get the following validation error: "Destination stride must be equal to the ratio of the sizes of the execution data type to the destination type" Because the execution data type is 4B due to the 32-bit integer constant.

[Mesa-dev] [PATCH 00/11] anv: add shaderInt16 support

2018-04-11 Thread Iago Toral Quiroga
This series implements support for the shaderInt16 capability, which allows Vulkan applications to use 16-bit integers in shaders. A branch with these patches can be found in the 'itoral/shaderInt16ForReview' branch of the Igalia mesa repository at https://github.com/Igalia/mesa.git A lot of the

[Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-11 Thread Iago Toral Quiroga
The hardware doesn't support 16-bit integer types, so we need to implement these using 32-bit integer instructions and then convert the result back to 16-bit. --- src/intel/Makefile.sources| 1 + src/intel/compiler/brw_nir.c | 2 +

[Mesa-dev] [PATCH 07/11] intel/compiler: implement nir_instr_type_load_const for 16-bit constants

2018-04-11 Thread Iago Toral Quiroga
From: Jose Maria Casanova Crespo --- src/intel/compiler/brw_fs_nir.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index ad31f7c82dc..822a1ac4227 100644 ---

[Mesa-dev] [PATCH 04/11] intel/compiler: implement conversion between float/int 16-bit types

2018-04-11 Thread Iago Toral Quiroga
--- src/intel/compiler/brw_fs_nir.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 5e0dd37eefd..5c414e45b61 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -791,10

[Mesa-dev] [PATCH 03/11] i965/compiler: handle conversion to smaller type in the lowering pass for that

2018-04-11 Thread Iago Toral Quiroga
The lowering pass was specialized to act on 64-bit to 32-bit conversions only, but the implementation is valid for other cases. --- src/intel/compiler/brw_fs_lower_conversions.cpp | 5 - src/intel/compiler/brw_fs_nir.cpp | 14 +++--- 2 files changed, 7 insertions(+), 12

[Mesa-dev] [PATCH 10/11] anv/pipeline: support SpvCapabilityInt16 in gen8+

2018-04-11 Thread Iago Toral Quiroga
--- src/intel/vulkan/anv_pipeline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index e64602d2844..be935363869 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -144,6 +144,7 @@

[Mesa-dev] [PATCH 05/11] intel/compiler: implement conversions from 16-bit int/float to bool

2018-04-11 Thread Iago Toral Quiroga
--- src/intel/compiler/brw_fs_nir.cpp | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 5c414e45b61..ad31f7c82dc 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++

[Mesa-dev] [PATCH 11/11] anv/device: expose shaderInt16 support in gen8+

2018-04-11 Thread Iago Toral Quiroga
--- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 7522b7865c2..306d5beff7d 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -759,7 +759,7 @@

[Mesa-dev] [PATCH 09/11] compiler/spirv: add implementation to check for SpvCapabilityInt16 support

2018-04-11 Thread Iago Toral Quiroga
--- src/compiler/shader_info.h| 1 + src/compiler/spirv/spirv_to_nir.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index ababe520b2d..15a8910c597 100644 --- a/src/compiler/shader_info.h +++

[Mesa-dev] [PATCH 08/11] intel/compiler: fix brw_negate_immediate for 16-bit types

2018-04-11 Thread Iago Toral Quiroga
From: Jose Maria Casanova Crespo 16-bit immediates are replicated in each word of a 32-bit value so we need to negate both. --- src/intel/compiler/brw_shader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw_shader.cpp

[Mesa-dev] [PATCH 06/11] nir/constant_folding: support 16-bit constants

2018-04-11 Thread Iago Toral Quiroga
From: Jose Maria Casanova Crespo --- src/compiler/nir/nir_opt_constant_folding.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_opt_constant_folding.c b/src/compiler/nir/nir_opt_constant_folding.c index d6be807b3dc..b63660ea4da 100644 ---

Re: [Mesa-dev] [PATCH] glsl: remove unreachable assert()

2018-04-11 Thread Emil Velikov
On 10 April 2018 at 18:10, Jason Ekstrand wrote: > On Tue, Apr 10, 2018 at 10:05 AM, Emil Velikov > wrote: >> >> On 10 April 2018 at 17:53, Ivan Kalvachev wrote: >> > On 3/28/18, Emil Velikov wrote:

Re: [Mesa-dev] [PATCH v2] dri3: Prevent multiple freeing of buffers.

2018-04-11 Thread Eero Tamminen
Hi, Tested on KBL GT2. Before the patch, there are few dozen compiz segfaults during ~3 hours of testing. With the patched version there are no segfaults. Tested-by: Eero Tamminen - Eero On 10.04.2018 10:44, Sergii Romantsov wrote: Commit 3160cb86aa92

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965/vec4: Fix null destination register in 3-source instructions

2018-04-11 Thread Tapani Pälli
On 04/11/2018 10:42 AM, Juan A. Suarez Romero wrote: On Fri, 2018-03-23 at 13:54 -0700, Ian Romanick wrote: From: Ian Romanick A recent commit (see below) triggered some cases where conditional modifier propagation and dead code elimination would cause a MAD

Re: [Mesa-dev] [Mesa-stable] [PATCH] egl/wayland: Make swrast display_sync the correct queue

2018-04-11 Thread Juan A. Suarez Romero
On Thu, 2018-03-22 at 16:45 +, Eric Engestrom wrote: > On Thursday, 2018-03-22 15:28:49 +, Daniel Stone wrote: > > On 22 March 2018 at 15:20, Derek Foreman wrote: > > > commit 03dd9a88b0be17ff0ce91e92f6902a9a85ba584a introduced per surface > > > queues, but the

Re: [Mesa-dev] [PATCH] ac/nir: Add workaround for GFX9 buffer views.

2018-04-11 Thread Bas Nieuwenhuizen
On Wed, Apr 4, 2018 at 10:19 PM, Bas Nieuwenhuizen wrote: > On GFX9 whether the buffer size is interpreted as elements or bytes > depends on whether IDXEN is enabled in the instruction. If the index > is a constant zero, LLVM optimizes IDXEN to 0. > > Now the size in

Re: [Mesa-dev] [PATCH] glsl: remove unreachable assert()

2018-04-11 Thread Ivan Kalvachev
On 4/11/18, Ivan Kalvachev wrote: > On 4/11/18, Emil Velikov wrote: >> On 10 April 2018 at 18:10, Jason Ekstrand wrote: >>> On Tue, Apr 10, 2018 at 10:05 AM, Emil Velikov >>> >>> wrote: On

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965/vec4: Fix null destination register in 3-source instructions

2018-04-11 Thread Juan A. Suarez Romero
On Fri, 2018-03-23 at 13:54 -0700, Ian Romanick wrote: > From: Ian Romanick > > A recent commit (see below) triggered some cases where conditional > modifier propagation and dead code elimination would cause a MAD > instruction like the following to be generated: > >

Re: [Mesa-dev] How about vulkan status in Mesa

2018-04-11 Thread Yuan, Feng
> -Original Message- > From: Palli, Tapani > Sent: Wednesday, April 11, 2018 3:15 PM > > On 04/11/2018 10:04 AM, Yuan, Feng wrote: > > > >> -Original Message- > >> From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On > >> Behalf Of Tapani Pälli > >> > >> On

Re: [Mesa-dev] [PATCH] radv: Enable RB+ on Raven.

2018-04-11 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset On 04/11/2018 01:37 AM, Bas Nieuwenhuizen wrote: --- src/amd/vulkan/radv_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965/vec4: Fix null destination register in 3-source instructions

2018-04-11 Thread Tapani Pälli
On 04/11/2018 11:02 AM, Tapani Pälli wrote: On 04/11/2018 10:42 AM, Juan A. Suarez Romero wrote: On Fri, 2018-03-23 at 13:54 -0700, Ian Romanick wrote: From: Ian Romanick A recent commit (see below) triggered some cases where conditional modifier propagation and

[Mesa-dev] [PATCH 2/3] nvc0: rewrite query buffer write macro to output 64-bit predicates

2018-04-11 Thread Rhys Perry
Signed-off-by: Rhys Perry --- src/gallium/drivers/nouveau/nvc0/mme/com9097.mme | 91 -- src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h | 64 --- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c | 76 +++--- 3 files

[Mesa-dev] [PATCH 1/3] nvc0: set current bufctx to nvc0->bufctx at the end of nvc0_draw_vbo()

2018-04-11 Thread Rhys Perry
It seems nvc0_hw_get_query_result_resource() expects nvc0->bufctx or nvc0->bufctx_* to be in effect. This is not guaranteed because nvc0_draw_vbo() previously set the current bufctx to NULL. Signed-off-by: Rhys Perry --- src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c | 2

[Mesa-dev] [PATCH 0/3] nvc0: Various improvements to nvc0_hw_get_query_result_resource

2018-04-11 Thread Rhys Perry
This patch set applies improvements related to the query buffer object functionality of the nvc0 driver. Rhys Perry (3): nvc0: set current bufctx to nvc0->bufctx at the end of nvc0_draw_vbo() nvc0: rewrite query buffer write macro to output 64-bit predicates nvc0: use a macro to write query

Re: [Mesa-dev] [PATCH 1/3] radv: add radv_init_dcc_control_reg() helper

2018-04-11 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Wed, Apr 11, 2018 at 2:09 PM, Samuel Pitoiset wrote: > And add some comments. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_device.c | 84

Re: [Mesa-dev] [PATCH] egl/x11: Handle both depth 30 formats for eglCreateImage(). (v2)

2018-04-11 Thread Emil Velikov
Hi Mario, Just a small suggestion: be that for now or later - your call. On 10 April 2018 at 08:43, Mario Kleiner wrote: > -dri3_format_for_depth(uint32_t depth) > +dri3_format_for_depth(struct dri2_egl_display *dri2_dpy, uint32_t depth) There is nothing DRI3

Re: [Mesa-dev] [PATCH] glsl: remove unreachable assert()

2018-04-11 Thread Timothy Arceri
On 11/04/18 20:50, Emil Velikov wrote: On 10 April 2018 at 18:10, Jason Ekstrand wrote: On Tue, Apr 10, 2018 at 10:05 AM, Emil Velikov wrote: On 10 April 2018 at 17:53, Ivan Kalvachev wrote: On 3/28/18, Emil Velikov

[Mesa-dev] [PATCH 1/3] radv: add radv_init_dcc_control_reg() helper

2018-04-11 Thread Samuel Pitoiset
And add some comments. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_device.c | 84 ++-- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index

[Mesa-dev] [PATCH 2/3] radv: add radv_decompress_resolve_{subpass}_src() helpers

2018-04-11 Thread Samuel Pitoiset
This helper shares common code before resolving using either a fragment or a compute shader. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta.h| 7 src/amd/vulkan/radv_meta_resolve.c| 58 +++

[Mesa-dev] [PATCH 3/3] radv: always initialize DCC metadata to 0xFFFFFFFF

2018-04-11 Thread Samuel Pitoiset
Not sure where the magic 0x20202020 value comes from but it's used since a while. AMDVLK also always initializes to 0x. When DCC for MSAA textures is enabled in my experimental branch, this appears to fix some CTS tests. No regressions on Polaris. Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH 3/3] nvc0: use a macro to write query result availability to a buffer

2018-04-11 Thread Rhys Perry
Both the availability and result paths shared a bit of code so they were marged. Signed-off-by: Rhys Perry --- src/gallium/drivers/nouveau/nvc0/mme/com9097.mme | 45 src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h | 34 ++

[Mesa-dev] [Bug 105567] meson/ninja: 1. mesa/vdpau incorrect symlinks in DESTDIR and 2. Ddri-drivers-path Dvdpau-libs-path overrides DESTDIR

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105567 --- Comment #12 from charlie --- Also, after the patch was applied, there was an odd behaviour when switching to an absolute path in my config. The install "remembered" my old config as if it used an old meson compiling

[Mesa-dev] [Bug 105567] meson/ninja: 1. mesa/vdpau incorrect symlinks in DESTDIR and 2. Ddri-drivers-path Dvdpau-libs-path overrides DESTDIR

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105567 --- Comment #13 from Emil Velikov --- No sane project should depend on the .la files - that's why distros/packaging tools remove them by default. The only instances that come to mind are ones that use the libtools DL

Re: [Mesa-dev] [Mesa-stable] [PATCH] meson: don't use compiler.has_header

2018-04-11 Thread Juan A. Suarez Romero
On Thu, 2018-03-29 at 11:20 -0700, Dylan Baker wrote: > This should be nominated for stable > Queued for next 18.0 stable release. J.A. > Quoting Dylan Baker (2018-03-12 11:23:23) > > Meson's compiler.has_header is completely useless, it only checks that a > > header exists, not

Re: [Mesa-dev] [Mesa-stable] [PATCH 3/3] ac: make use of if/loop build helpers

2018-04-11 Thread Juan A. Suarez Romero
On Tue, 2018-04-10 at 16:48 +0100, Alex Smith wrote: > On 10 April 2018 at 15:49, Juan A. Suarez Romero wrote: > > On Tue, 2018-04-03 at 10:58 +0100, Alex Smith wrote: > > > I don't know exactly what's causing it, no. I noticed the issue was fixed > > > on master so just

Re: [Mesa-dev] [Mesa-stable] [PATCH] ac/nir: Add workaround for GFX9 buffer views.

2018-04-11 Thread Juan A. Suarez Romero
Hi, Bas. Unfortunately, I can't apply this patch neither in next 17.3 release stable, nor in 18.0, as this patch does not apply cleanly, and it requires other different commits that didn't land in the stable branches. For 17.3 I think it is probably not worth to try to provide a specific

Re: [Mesa-dev] [PATCH 3/5] ac/nir: fix atomic compare-and-swap

2018-04-11 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset On 04/11/2018 12:56 PM, Nicolai Hähnle wrote: From: Nicolai Hähnle The LLVM instruction returns { i32, i1 }, where the i1 indicates success. We're only interested in the first part, which is the loaded value.

Re: [Mesa-dev] [PATCH 04/11] gallium: Use Array._DrawVAO in st_atom_array.c.

2018-04-11 Thread Brian Paul
Hmm, in my experience, interleaved arrays are fairly common. I still haven't had much time to look at Mathias's latest patches. And I haven't looked this code in the state tracker recently, but I seem to recall there was some difference between interleaved arrays (in one VBO) vs. separate

[Mesa-dev] [Bug 105567] meson/ninja: 1. mesa/vdpau incorrect symlinks in DESTDIR and 2. Ddri-drivers-path Dvdpau-libs-path overrides DESTDIR

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105567 --- Comment #11 from charlie --- "1-2-bin-install_megadrivers-fix-DESTDIR-and--D--path.patch" allows files to be installed to DESTDIR when using absolute paths in config options. No extra driver files are generated other

Re: [Mesa-dev] [PATCH v4 6/6] i965: gl_BaseVertex must be zero for non-indexed draw calls

2018-04-11 Thread Antia Puentes
On 10/04/18 18:26, Jason Ekstrand wrote: On Tue, Apr 10, 2018 at 1:28 AM, Antia Puentes > wrote: On 07/04/18 08:21, Jason Ekstrand wrote: On Fri, Apr 6, 2018 at 2:53 PM, Ian Romanick

Re: [Mesa-dev] [Mesa-stable] [PATCH] ac/nir: Add workaround for GFX9 buffer views.

2018-04-11 Thread Bas Nieuwenhuizen
On Wed, Apr 11, 2018 at 4:25 PM, Juan A. Suarez Romero wrote: > Hi, Bas. > > Unfortunately, I can't apply this patch neither in next 17.3 release stable, > nor > in 18.0, as this patch does not apply cleanly, and it requires other different > commits that didn't land in the

Re: [Mesa-dev] [Mesa-stable] [PATCH] meson: don't use compiler.has_header

2018-04-11 Thread Dylan Baker
Awesome, thanks Juan! Quoting Juan A. Suarez Romero (2018-04-11 06:47:24) > On Thu, 2018-03-29 at 11:20 -0700, Dylan Baker wrote: > > This should be nominated for stable > > > > Queued for next 18.0 stable release. > > J.A. > > > > > Quoting Dylan Baker (2018-03-12 11:23:23) > > >

[Mesa-dev] [Bug 105567] meson/ninja: 1. mesa/vdpau incorrect symlinks in DESTDIR and 2. Ddri-drivers-path Dvdpau-libs-path overrides DESTDIR

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105567 --- Comment #14 from Dylan Baker --- .la files are generated by libtool, meson doesn't use libtool so there will be no .la files. It's not a bug, it's actually a feature. As Emil said, projects should not be dependent

[Mesa-dev] [PATCH 1/3] gettextsubimage: verify zoffset and depth are correct

2018-04-11 Thread Juan A. Suarez Romero
According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"), relative to errors for GetTextureSubImage() function: "An INVALID_VALUE error is generated if the effective target is TEXTURE_1D and either yoffset is not zero, or height is not one. An INVALID_VALUE error is

[Mesa-dev] [PATCH 2/3] gettextureimage: verify cube map is complete

2018-04-11 Thread Juan A. Suarez Romero
According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"), relative to errors for GetTexImage, GetTextureImage, and GetnTexImage: "An INVALID_OPERATION error is generated by GetTextureImage if the effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY, and the texture

[Mesa-dev] [PATCH 3/3] getteximage: assume texture image is empty for non defined levels

2018-04-11 Thread Juan A. Suarez Romero
Current code is returning an INVALID_OPERATION when trying to use getTextureImage() on a level that has not been explicitly defined. That is, we define a mipmapped Texture2D with 3 levels, and try to use GetTextureImage() for the 4th levels, and INVALID_OPERATION is returned. Nevertheless, such

Re: [Mesa-dev] [PATCH 08/10] glsl: use NIR function inlining for drivers that use glsl_to_nir

2018-04-11 Thread Jason Ekstrand
On Tue, Apr 10, 2018 at 10:26 PM, Timothy Arceri wrote: > > On 11/04/18 15:05, Jason Ekstrand wrote: > >> If I understand correctly, this is because when running with minimal GLSL >> IR, opt_function_inlining doesn't acutally inline them all. Is that >> correct? If so,

[Mesa-dev] [PATCH 18/18] util: Just cut the hash in the pointer table

2018-04-11 Thread Thomas Helland
Meant for testing. Defeats some of the benefits of the implementation, however it still seems to be better than the current hash table, and the complexity is undeniably very low. --- src/util/pointer_map.c | 99 +- src/util/pointer_map.h | 1 - 2

[Mesa-dev] [PATCH 11/18] glsl: Use the pointer map in the glsl linker

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/linker.cpp | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index af09b7d03e..c549cac4b5 100644 --- a/src/compiler/glsl/linker.cpp +++

[Mesa-dev] [PATCH 14/18] nir: Migrate lower_vars_to_ssa to use pointer set

2018-04-11 Thread Thomas Helland
--- src/compiler/nir/nir_lower_vars_to_ssa.c | 35 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index 3dfe48d6d3..988936ece8 100644 ---

Re: [Mesa-dev] [PATCH 04/11] gallium: Use Array._DrawVAO in st_atom_array.c.

2018-04-11 Thread Marek Olšák
On Wed, Apr 11, 2018 at 10:23 AM, Brian Paul wrote: > Hmm, in my experience, interleaved arrays are fairly common. > In what kinds of apps are they common? Certainly not in Steam games. Marek ___ mesa-dev mailing list

[Mesa-dev] [RFC PATCH 5/5] i965/miptree: recurse to miptree_map for depth in map_depthstencil

2018-04-11 Thread Scott D Phillips
Call back to intel_miptree_map when mapping the separate depth miptree in map_depthstencil. This brings us back to the mapping method decision tree in miptree_map where we hopefully find the most performant mapping method for depth. --- Here's an idea for a replacement of patch 5. Squirreling the

[Mesa-dev] [Bug 105807] [Regression, bisected]: 3D Rendering not working correctly in Warhammer 40k: Dawn of War II

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105807 --- Comment #13 from b...@besd.de --- from mesa/main/version.c: (the one above is getstring.c) int _mesa_get_shading_language_version(const struct gl_context *ctx, int index,

[Mesa-dev] [PATCH 09/18] glsl: Change glsl_to_nir to user pointer map

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/glsl_to_nir.cpp | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 80eb15f1ab..310b678680 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++

[Mesa-dev] [PATCH 16/18] nir: Use pointer set in remove_dead_variable

2018-04-11 Thread Thomas Helland
This should simplify things, and cut the memory consumption of the set effectively in half. Cache locality should also be better. --- src/compiler/nir/nir_remove_dead_variables.c | 37 ++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git

[Mesa-dev] [PATCH 13/18] util: Add a pointer set implementation

2018-04-11 Thread Thomas Helland
This is a rework of our set for the common usecase of storing pointers. We are currently storing the hash, and comparing the hash of the key to the hash that is stored for the entry, plus comparing the key itself. Seeing as comparing a pointer is cheap, this means we are doubling the size of our

[Mesa-dev] [PATCH 15/18] glsl: Use pointer set in opt_copy_propagation

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/opt_copy_propagation.cpp | 47 +- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagation.cpp b/src/compiler/glsl/opt_copy_propagation.cpp index 7bcd8a090b..0195dc4e40 100644 ---

[Mesa-dev] [PATCH 17/18] nir: Use pointer_set in nir_propagate_invariant

2018-04-11 Thread Thomas Helland
Should cut memory consumption approximately in half, while giving us better cache locality and a simpler implementation. --- src/compiler/nir/nir_propagate_invariant.c | 33 +++--- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git

[Mesa-dev] [PATCH 06/18] nir: Change lower_vars_to_ssa to use pointer map

2018-04-11 Thread Thomas Helland
--- src/compiler/nir/nir_lower_vars_to_ssa.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index e8cfe308d2..3dfe48d6d3 100644 --- a/src/compiler/nir/nir_lower_vars_to_ssa.c

[Mesa-dev] [PATCH 07/18] glsl: Use pointer map in copy propagation

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/opt_copy_propagation.cpp | 48 ++ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagation.cpp b/src/compiler/glsl/opt_copy_propagation.cpp index 6220aa86da..7bcd8a090b 100644 ---

[Mesa-dev] [PATCH 10/18] util: Add a call_foreach function to the pointer map

2018-04-11 Thread Thomas Helland
--- src/util/pointer_map.h | 13 + 1 file changed, 13 insertions(+) diff --git a/src/util/pointer_map.h b/src/util/pointer_map.h index 4bfc306a5f..f92e67d40d 100644 --- a/src/util/pointer_map.h +++ b/src/util/pointer_map.h @@ -91,6 +91,19 @@ _mesa_pointer_map_next_entry(struct

[Mesa-dev] [PATCH 12/18] nir: Use pointer map in nir_from_ssa

2018-04-11 Thread Thomas Helland
--- src/compiler/nir/nir_from_ssa.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c index 1aa35509b1..e38c4fafd6 100644 --- a/src/compiler/nir/nir_from_ssa.c +++

[Mesa-dev] [Bug 105807] [Regression, bisected]: 3D Rendering not working correctly in Warhammer 40k: Dawn of War II

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105807 --- Comment #12 from b...@besd.de --- OpenGL core spec 4.5 page 4 specifies: "The core profile of OpenGL 4.5 is also guaranteed to support all previous ver- sions of the OpenGL Shading Language back to version 1.40. In some

Re: [Mesa-dev] openCL support on SI

2018-04-11 Thread Jan Vesely
Hi, if you're interested in mesa/clover, it should mostly work (ocl1.1), with the notable exception of image support. If you have an app that doesn't work, file a bug. progress is slow because few people care. some ocl1.2 features are implemented as well, but it'll take some time before ocl1.2

Re: [Mesa-dev] [PATCH v2 3/3] nir: simplify node matching code when lowering to SSA

2018-04-11 Thread Jason Ekstrand
I tweaked your commit messages a bit, added my R-B to this one, and pushed. And... Now I get to rebase my deref patches again. :-P --Jason On Tue, Apr 10, 2018 at 11:13 PM, Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > The matching code doesn't make real use of the return

[Mesa-dev] [Bug 105807] [Regression, bisected]: 3D Rendering not working correctly in Warhammer 40k: Dawn of War II

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105807 --- Comment #14 from b...@besd.de --- That would explain why a program gets a zero in return when requesting a shader language lower than the one hardcoded in comment 11. Which is exactly what happen in comment 8. Or at least

Re: [Mesa-dev] [PATCH 1/4] ac/surface: don't set the display flag for obviously unsupported cases (v2)

2018-04-11 Thread Marek Olšák
On Tue, Apr 10, 2018 at 7:46 PM, Bas Nieuwenhuizen wrote: > What is the addrlib assertion we are hitting? > 128bpp formats can't set "display = true" even though the tiling is always _D for 128bpp. Marek > > On Tue, Apr 10, 2018 at 11:44 AM, Michel Dänzer

[Mesa-dev] openCL support on SI

2018-04-11 Thread zz zz
Hi, I've been instructed to ask this here: Looking at the table from xorg.freedesktop, it says OpenCL for S.Islands is WIP.(work in progress) Does that mean I can hope it's just a matter of time, or could it still *never* arrive? (say, if the cards 'get old' and the devs drop support?)

[Mesa-dev] [PATCH] blorp: Silence unused function warnings

2018-04-11 Thread Nanley Chery
vulkan/genX_blorp_exec.c:69:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function] blorp_get_surface_base_address(struct blorp_batch *batch) ^~ In file included from vulkan/genX_blorp_exec.c:35:0: ./blorp/blorp_genX_exec.h:1249:1:

Re: [Mesa-dev] [PATCH] blorp: Silence unused function warnings

2018-04-11 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 11/04/18 11:00, Nanley Chery wrote: vulkan/genX_blorp_exec.c:69:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function] blorp_get_surface_base_address(struct blorp_batch *batch)

[Mesa-dev] [PATCH 05/18] glsl: Move ir_variable_refcount to using the pointer map

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/ir_variable_refcount.cpp | 13 ++--- src/compiler/glsl/ir_variable_refcount.h | 4 ++-- src/compiler/glsl/opt_dead_code.cpp| 6 +++--- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/compiler/glsl/ir_variable_refcount.cpp

[Mesa-dev] [PATCH 03/18] util: Add a pointer map clone function

2018-04-11 Thread Thomas Helland
--- src/util/pointer_map.c | 23 +++ src/util/pointer_map.h | 3 +++ 2 files changed, 26 insertions(+) diff --git a/src/util/pointer_map.c b/src/util/pointer_map.c index 8076bd827f..463fa19282 100644 --- a/src/util/pointer_map.c +++ b/src/util/pointer_map.c @@ -102,6 +102,29

[Mesa-dev] [PATCH 01/18] util: Add initial pointer map implementation

2018-04-11 Thread Thomas Helland
The motivation is that for the common case of pointers as keys the current hash table implementation has multiple disadvantages. It stores the hash, which means we get more memory usage than is strictly necessary. It also compares both the hash, and the pointer against the key when searching, when

[Mesa-dev] [PATCH 08/18] glsl: Use pointer map in opt_constant_variable

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/opt_constant_variable.cpp | 34 ++--- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/compiler/glsl/opt_constant_variable.cpp b/src/compiler/glsl/opt_constant_variable.cpp index 914b46004c..d1d315af7a 100644 ---

[Mesa-dev] [PATCH 02/18] glsl: Use pointer map in constant propagation

2018-04-11 Thread Thomas Helland
--- src/compiler/glsl/opt_constant_propagation.cpp | 47 -- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/compiler/glsl/opt_constant_propagation.cpp b/src/compiler/glsl/opt_constant_propagation.cpp index 05dc71efb7..8072bf4811 100644 ---

[Mesa-dev] [PATCH 00/18] [RFC] Pointer specific data structures

2018-04-11 Thread Thomas Helland
This series came about when I saw a talk online, while simultaneously being annoyd about the needless waste of memory in our set as reported by pahole. I have previously made some patches that changed our hash table from a reprobing one to a quadratic probing one, in the name of lower overhead and

[Mesa-dev] [PATCH 04/18] glsl: Port copy propagation elements to pointer map

2018-04-11 Thread Thomas Helland
--- .../glsl/opt_copy_propagation_elements.cpp | 96 +++--- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagation_elements.cpp b/src/compiler/glsl/opt_copy_propagation_elements.cpp index 8bae424a1d..8737fe27a5 100644 ---

[Mesa-dev] [Bug 105807] [Regression, bisected]: 3D Rendering not working correctly in Warhammer 40k: Dawn of War II

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105807 --- Comment #11 from b...@besd.de --- I think this function is the problem: /** * Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query. */ static const GLubyte * shading_language_version(struct gl_context

[Mesa-dev] [Bug 105567] meson/ninja: 1. mesa/vdpau incorrect symlinks in DESTDIR and 2. Ddri-drivers-path Dvdpau-libs-path overrides DESTDIR

2018-04-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105567 charlie changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Mesa-dev] [PATCH v3 4/9] i965: Add and use a single miptree aux_buf field

2018-04-11 Thread Nanley Chery
We want to add and use a function that accesses the auxiliary buffer's clear_color_bo and doesn't care if it has an MCS or HiZ buffer specifically. --- src/mesa/drivers/dri/i965/brw_blorp.c | 4 +- src/mesa/drivers/dri/i965/brw_clear.c | 4 +-

[Mesa-dev] [PATCH v3 8/9] i965/miptree: Extend the sRGB-blending WA to future platforms

2018-04-11 Thread Nanley Chery
The blending issue seems to be present on CNL as well. Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c

  1   2   >