[Mesa-dev] undefined behaviour in spirv_to_nir.c

2019-05-16 Thread Dave Airlie
Coverity gave me this: mesa-19.1.0-rc2/src/compiler/spirv/spirv_to_nir.c:1987: overlapping_assignment: Assigning "src[1][i].u8" to "src[1][i].u32", which have overlapping memory locations and different types. and the following lines, I think it's actually undefined behaviour wrt the C spec.

[Mesa-dev] [PATCH 1/4] glsl: init packed in more constructors.

2019-05-16 Thread Dave Airlie
From: Dave Airlie src/compiler/glsl_types.cpp:577: uninit_member: Non-static class member "packed" is not initialized in this constructor nor in any functions that it calls. from Coverity. Fixes: 659f333b3a4 (glsl: add packed for struct types) --- src/compiler/glsl_types.cpp | 12

[Mesa-dev] [PATCH 4/4] glsl/nir: init non-static class member.

2019-05-16 Thread Dave Airlie
From: Dave Airlie glsl_to_nir.cpp:276: uninit_member: Non-static class member "sig" is not initialized in this constructor nor in any functions that it calls. Reported by coverity --- src/compiler/glsl/glsl_to_nir.cpp | 1 + 1 file changed, 1 insertion(+) diff --git

[Mesa-dev] [PATCH 3/4] imgui: fix undefined behaviour bitshift.

2019-05-16 Thread Dave Airlie
From: Dave Airlie imgui_draw.cpp:1781: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour Reported by coverity --- src/imgui/imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imgui/imgui_draw.cpp

[Mesa-dev] [PATCH 2/4] glsl: init non-static class member in link uniforms.

2019-05-16 Thread Dave Airlie
From: Dave Airlie link_uniforms.cpp:477: uninit_member: Non-static class member "shader_storage_blocks_write_access" is not initialized in this constructor nor in any functions that it calls. Reported by coverity. --- src/compiler/glsl/link_uniforms.cpp | 3 ++- 1 file changed, 2

Re: [Mesa-dev] undefined behaviour in spirv_to_nir.c

2019-05-16 Thread Jason Ekstrand
I think it's fine but I'm not at my computer right now. --Jason On May 16, 2019 20:58:03 Dave Airlie wrote: Coverity gave me this: mesa-19.1.0-rc2/src/compiler/spirv/spirv_to_nir.c:1987: overlapping_assignment: Assigning "src[1][i].u8" to "src[1][i].u32", which have overlapping memory

Re: [Mesa-dev] [PATCH 1/2] radeonsi: always use compute rings for clover on CI and newer (v2)

2019-05-16 Thread Jan Vesely
On Tue, 2019-02-12 at 13:12 -0500, Marek Olšák wrote: > From: Marek Olšák > > initialize all non-compute context functions to NULL. > > v2: fix SI > --- > src/gallium/drivers/radeonsi/si_blit.c| 14 ++- > src/gallium/drivers/radeonsi/si_clear.c | 7 +- >

[Mesa-dev] possibly incorrect cut-n-paste in ac_llvm_build.c

2019-05-16 Thread Dave Airlie
mesa-19.1.0-rc2/src/amd/common/ac_llvm_build.c:4019: copy_paste_error: "result_exclusive" in "ws->result_exclusive" looks like a copy-paste error. + if (ws->enable_inclusive) + ws->result_inclusive = ac_build_alu_op(ctx, ws->result_exclusive, ws->src, ws->op); + if

Re: [Mesa-dev] [PATCH 8/8] egl: add EGL_platform_device support

2019-05-16 Thread Marek Olšák
Acked-by: Marek Olšák Marek On Thu, May 16, 2019 at 1:03 PM Emil Velikov wrote: > This new 'platform' is added by default with no guards. > > It is effectively a copy of the surfaceless one, with updated function > names and brand new probe function. > > Due to the reuse, some of the ifdef

[Mesa-dev] [Review Request (master branch)] draw: fix memory leak introduced 7720ce32a

2019-05-16 Thread Neha Bhende
We need to free memory allocation PrimitiveOffsets in draw_gs_destroy(). This fixes memory leak found while running piglit on windows. Fixes: 7720ce32a ("draw: add support to tgsi paths for geometry streams. (v2)") Tested with piglit Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee ---

Re: [Mesa-dev] [Review Request (master branch)] draw: fix memory leak introduced 7720ce32a

2019-05-16 Thread Dave Airlie
On Fri, 17 May 2019 at 07:42, Neha Bhende wrote: > > We need to free memory allocation PrimitiveOffsets in draw_gs_destroy(). > This fixes memory leak found while running piglit on windows. Reviewed-by: Dave Airlie > > Fixes: 7720ce32a ("draw: add support to tgsi paths for geometry streams. >

Re: [Mesa-dev] [PATCH 1/2] radeonsi: always use compute rings for clover on CI and newer (v2)

2019-05-16 Thread Marek Olšák
There is a fix for queries on the mailing list somewhere. Marek Marek On Thu, May 16, 2019, 7:08 PM Jan Vesely wrote: > On Tue, 2019-02-12 at 13:12 -0500, Marek Olšák wrote: > > From: Marek Olšák > > > > initialize all non-compute context functions to NULL. > > > > v2: fix SI > > --- > >

[Mesa-dev] [PATCH] util: add missing include to build_id.h

2019-05-16 Thread Timothy Arceri
Required to use uint8_t --- src/util/build_id.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/build_id.h b/src/util/build_id.h index 86d611d8db7..1872ca5c7e5 100644 --- a/src/util/build_id.h +++ b/src/util/build_id.h @@ -26,6 +26,8 @@ #ifdef HAVE_DL_ITERATE_PHDR +#include +

Re: [Mesa-dev] [PATCH 2/4] glsl: init non-static class member in link uniforms.

2019-05-16 Thread Ilia Mirkin
On Thu, May 16, 2019 at 10:22 PM Dave Airlie wrote: > > From: Dave Airlie > > link_uniforms.cpp:477: uninit_member: Non-static class member > "shader_storage_blocks_write_access" is not initialized in this constructor > nor in any functions that it calls. > > Reported by coverity. > --- >

[Mesa-dev] [Bug 110699] Shader-based MJPEG decoding

2019-05-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110699 Bug ID: 110699 Summary: Shader-based MJPEG decoding Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: enhancement

Re: [Mesa-dev] [PATCH 7/8] egl: keep the software device at the end of the list

2019-05-16 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, May 16, 2019 at 1:03 PM Emil Velikov wrote: > From: Emil Velikov > > By default, the user is likely to pick the first device so it should > not be the least performant (aka software) one. > > v2: Drop odd comment (Marek) > > Suggested-by: Marek Olšák >

Re: [Mesa-dev] [Mesa-stable] [PATCH 6/8] egl/dri: flesh out and use dri2_create_drawable()

2019-05-16 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, May 16, 2019 at 1:03 PM Emil Velikov wrote: > From: Emil Velikov > > Wrap the loader->createNewDrawable() dance into a helper and use it > throughout the codebase. > > This addresses a cases like surfaceless (SL) on swrast (SL on kms_swrast > is fine)

Re: [Mesa-dev] [PATCH] docs: advice to resolve discussion on gitlab MR doc

2019-05-16 Thread apinheiro
On 16/5/19 13:35, Eric Engestrom wrote: On Thursday, 2019-05-16 13:14:46 +0200, Connor Abbott wrote: Some grammar nits: - "Resolve Discussion" goes before "button" as it modifies it. - It's either "This way..." or "In this manner...", not "In this way...", although the latter is a little too

Re: [Mesa-dev] Move adriconf to mesa repositories

2019-05-16 Thread Emil Velikov
On Thu, 16 May 2019 at 10:59, Jean Hertel wrote: > > On 8th May you Wrote: > >Hi Emil, > > > >>This is the tricky part - wish I could find my notes they have better > >>brain-dump. > >>It's OK to have the library as both front (config tool) and backend > >>(used by mesa) although: > >> - special

Re: [Mesa-dev] [PATCH] docs: advice to resolve discussion on gitlab MR doc

2019-05-16 Thread Eric Engestrom
On Thursday, 2019-05-16 13:14:46 +0200, Connor Abbott wrote: > Some grammar nits: > > - "Resolve Discussion" goes before "button" as it modifies it. > - It's either "This way..." or "In this manner...", not "In this > way...", although the latter is a little too stilted/over-formal here. > - This

Re: [Mesa-dev] Move adriconf to mesa repositories

2019-05-16 Thread Jean Hertel
On 8th May you Wrote: >Hi Emil, > >>This is the tricky part - wish I could find my notes they have better >>brain-dump. >>It's OK to have the library as both front (config tool) and backend >>(used by mesa) although: >> - special care on splitting and annotating the API is needed >> - handling

Re: [Mesa-dev] [PATCH] docs: advice to resolve discussion on gitlab MR doc

2019-05-16 Thread Connor Abbott
Some grammar nits: - "Resolve Discussion" goes before "button" as it modifies it. - It's either "This way..." or "In this manner...", not "In this way...", although the latter is a little too stilted/over-formal here. - This isn't a hypothetical or another situation where "would know..." is

[Mesa-dev] [PATCH 4/5] pipebuffer, winsys/svga: Add functionality to update pb_validate_entry flags

2019-05-16 Thread Thomas Hellstrom
In order to be able to add access modes to a pb_validate_entry, update the pb_validate_add_buffer function to take a pointer hash table and also to return whether the buffer was already on the validate list. Update the svga winsys accordingly. Signed-off-by: Thomas Hellstrom Reviewed-by:

[Mesa-dev] [PATCH 3/5] svga: Set the rendered-to flag for dma transfers to surfaces

2019-05-16 Thread Thomas Hellstrom
The rendered-to flag indicates that the HW surface content is more recent than the content of the mob. That's the case after a SurfaceDMA transfer to the surface. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee ---

[Mesa-dev] [PATCH 1/5] svga: Remove the surface_invalidate winsys function

2019-05-16 Thread Thomas Hellstrom
Instead unconditionally call SVGA3D_InvalidateGBSurface() since it's needed also for Linux for dirty buffers and operation without SurfaceDMA. For non-guest-backed operation, remove the surface cache surface invalidation altogether. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul

[Mesa-dev] [PATCH 5/5] svga: Add an environment variable to force coherent surface memory

2019-05-16 Thread Thomas Hellstrom
The vmwgfx driver supports emulated coherent surface memory as of version 2.16. Add en environtment variable to enable this functionality for texture- and buffer maps: SVGA_FORCE_COHERENT. This environment variable should be used for testing only. Signed-off-by: Thomas Hellstrom Reviewed-by:

[Mesa-dev] [PATCH 2/5] winsys/svga: Fix RELOC_INTERNAL mob GPU access

2019-05-16 Thread Thomas Hellstrom
SVGA_RELOC_INTERNAL indicates a transfer between surface and backing mob. This means that if the GPU for example reads from the surface it writes to the backing mob. But since the buffer mapping code allows for simultaneous gpu- and cpu read access, a read from the surface to the mob will not

[Mesa-dev] [PATCH] radv: decompress FMASK before performing a MSAA decompress using FMASK

2019-05-16 Thread Samuel Pitoiset
This fixes some CTS failures related to VK_EXT_sample_locations. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index

[Mesa-dev] [PATCH 4/4] radv: fix the sample max distance value for 8x

2019-05-16 Thread Samuel Pitoiset
It should be 7, not 8. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/si_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index 9f6f92a42be..c73c6ecd65c 100644 --- a/src/amd/vulkan/si_cmd_buffer.c

[Mesa-dev] [PATCH 1/4] radv: remove remaining code related to 16 samples

2019-05-16 Thread Samuel Pitoiset
The driver only supports up to 8 samples. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_private.h | 1 - src/amd/vulkan/si_cmd_buffer.c | 50 -- 2 files changed, 51 deletions(-) diff --git a/src/amd/vulkan/radv_private.h

[Mesa-dev] [PATCH 3/4] radv: emit correct centroid priority based on the number of samples

2019-05-16 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/si_cmd_buffer.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index 56d7a9a3682..9f6f92a42be 100644 --- a/src/amd/vulkan/si_cmd_buffer.c

[Mesa-dev] [PATCH 2/4] radv: clean up the sample locations codebase

2019-05-16 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- src/amd/vulkan/radv_pipeline.c | 2 +- src/amd/vulkan/radv_private.h| 4 +- src/amd/vulkan/si_cmd_buffer.c | 166 ++- 4 files changed, 76 insertions(+), 98 deletions(-) diff

[Mesa-dev] [PATCH] docs: advice to resolve discussion on gitlab MR doc

2019-05-16 Thread Alejandro Piñeiro
For newcomers to gitlab, it is not evident that it is better to press the "Resolve Discussion" button when you update your branch handling feedback. --- As the commit message says, it is not always evident. I was pointed to do that when I started to use gitlab, and just today I mentioned it to

[Mesa-dev] [PATCH v2] radv: implement VK_EXT_sample_locations

2019-05-16 Thread Samuel Pitoiset
Basically, this extension allows applications to use custom sample locations. It doesn't support variable sample locations during subpass. Note that we don't have to upload the user sample locations because the spec doesn't allow this. Only enabled on VI+ because it's untested on older chips.

Re: [Mesa-dev] [PATCH] docs/features: don't list EXT extensions in a list for KHR/ARB/OES extensions

2019-05-16 Thread Gert Wollny
On Mi, 2019-05-15 at 14:56 -0400, Marek Olšák wrote: > That sounds OK, but then the number of EXT extensions is pretty high. IMHO, if we limit this to extension that mesa supports, and that do not have an equivalent within the standards or are superseted by another ARB, OES or KHR extension then

Re: [Mesa-dev] [PATCH] docs/features: don't list EXT extensions in a list for KHR/ARB/OES extensions

2019-05-16 Thread Ian Romanick
On 5/15/19 7:39 AM, Gert Wollny wrote: > How about moving these extensions to another (new) section? I think it > is nice to have a one-stop place to find out what is supported. Given the existence of mesamatrix.net, is that useful? When we started this file, the purpose was to track work that

[Mesa-dev] [Bug 110539] radv: OBS video capture broken by anti-aliasing in Vulkan games after upgrade to Mesa 19

2019-05-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=110539 --- Comment #3 from Kon --- Thanks for getting back to me. The problem seems to occur when using Xcomposite window capture mode. XShm capture mode renders correctly in both OBS and SimpleScreenRecorder. XShm captures the entire desktop. I

[Mesa-dev] [PATCH 2/8] egl: handle the full attrib list in display::options

2019-05-16 Thread Emil Velikov
From: Adam Jackson Earlier spec is vague, although EGL 1.5 makes it clear: Multiple calls made to eglGetPlatformDisplay with the same parameters will return the same EGLDisplay handle. With this commit we store and compare the full attrib list. v2 (Emil): - Split into separate

[Mesa-dev] [PATCH 1/8] egl: flesh out a _eglNumAttribs() helper

2019-05-16 Thread Emil Velikov
From: Emil Velikov Reviewed-by: Mathias Fröhlich Reviewed-by: Marek Olšák Signed-off-by: Emil Velikov --- src/egl/main/eglapi.c | 12 +++- src/egl/main/egldisplay.h | 13 + 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/egl/main/eglapi.c

[Mesa-dev] [PATCH 5/8] egl: fold X11 attrib handling like other platforms

2019-05-16 Thread Emil Velikov
From: Emil Velikov Since we no longer need special handling for X11, refactor the code to follow the style used by all other platforms. Reviewed-by: Mathias Fröhlich Reviewed-by: Marek Olšák Signed-off-by: Emil Velikov --- src/egl/main/egldisplay.c | 45

[Mesa-dev] [PATCH 4/8] egl: remove Options::Platform handling

2019-05-16 Thread Emil Velikov
From: Adam Jackson The full set of attributes is already handled with previous patches. Thus all this is not dead code. v2 (Emil) - split from a larger patch. Reviewed-by: Mathias Fröhlich Reviewed-by: Marek Olšák Signed-off-by: Emil Velikov --- src/egl/main/egldisplay.c | 13 -

[Mesa-dev] [PATCH 6/8] egl/dri: flesh out and use dri2_create_drawable()

2019-05-16 Thread Emil Velikov
From: Emil Velikov Wrap the loader->createNewDrawable() dance into a helper and use it throughout the codebase. This addresses a cases like surfaceless (SL) on swrast (SL on kms_swrast is fine) where we'd attempt using the wrong driver and crash out. v2: fixup quirky GBM (Mathias) Cc:

[Mesa-dev] [PATCH 3/8] egl/x11: pick the user requested screen

2019-05-16 Thread Emil Velikov
From: Adam Jackson At the moment the user will pass the screen number via attribs, yet we would throw that away. Reason being that the int *screen passed to xcb_connect() is output only. v2 (Emil): - split from a larger patch - use xcb_connect() returned screen, as fallback - use helper

[Mesa-dev] [PATCH 8/8] egl: add EGL_platform_device support

2019-05-16 Thread Emil Velikov
This new 'platform' is added by default with no guards. It is effectively a copy of the surfaceless one, with updated function names and brand new probe function. Due to the reuse, some of the ifdef HAVE_SURFACELESS_PLATFORM guards have been dropped. A worthy mention are the changes in

[Mesa-dev] [PATCH 7/8] egl: keep the software device at the end of the list

2019-05-16 Thread Emil Velikov
From: Emil Velikov By default, the user is likely to pick the first device so it should not be the least performant (aka software) one. v2: Drop odd comment (Marek) Suggested-by: Marek Olšák Reviewed-by: Mathias Fröhlich (v1) Reviewed-by: Marek Olšák (v1) Signed-off-by: Emil Velikov ---