Re: [Mesa-dev] [PATCH] RFC: Workaround for gen9 hw astc5x5 sampler bug

2017-12-06 Thread Rogovin, Kevin
>I'd have to think about it harder but even those are not likely to actually >get ASTC decode.  Maybe for some sort of decompression thing but if you're >doing > GetCompressedTexImage, it'll probably turn into a blorp_copy which will use > R32G32B32A32_UINT. I am thinking for the case where

[Mesa-dev] [Bug 101560] SPIR-V OpSwitch with int64 not supported even though shaderInt64 is true

2017-12-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101560 --- Comment #4 from Jason Ekstrand --- I have a branch for this now: https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/spirv-type-tracking -- You are receiving this mail because: You are the assignee for the

[Mesa-dev] [PATCH 2/2] r600/sb: start adding GDS support

2017-12-06 Thread Dave Airlie
From: Dave Airlie This adds support for GDS ops to sb backend. It seems to work for atomic counters on cayman, probably needs a lot more testing. --- src/gallium/drivers/r600/r600_isa.h| 2 +- src/gallium/drivers/r600/sb/sb_bc.h| 7 +

[Mesa-dev] [PATCH v2 0/9] anv: Push constant 16bit storage and push UBOs

2017-12-06 Thread Jason Ekstrand
This series is a combination of my push UBOs series, a patch I sent out this last week and the patch from Jose to enable 16bit storage for push constants. I haven't landed UBO pushing yet because I wanted to let Jose land 16bit storage. In order for UBO pushing to work now that 16bit storage is

[Mesa-dev] [PATCH 6/9] anv/cmd_buffer: Add support for pushing UBO ranges

2017-12-06 Thread Jason Ekstrand
In order to do this we have to modify push constant set up to handle ranges. We also have to tweak the way we handle dirty bits a bit so that we re-push whenever a descriptor set changes. Reviewed-by: Jordan Justen --- src/intel/vulkan/genX_cmd_buffer.c | 142

[Mesa-dev] [PATCH 8/9] i965/fs: Handle !supports_pull_constants and push UBOs properly

2017-12-06 Thread Jason Ekstrand
In Vulkan, we don't support classic pull constants and everything the client asks us to push, we push. However, for pushed UBOs, we still want to fall back to conventional pulls if we run out of space. --- src/intel/compiler/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 1/2] r600/sb: add compute initial state registers.

2017-12-06 Thread Dave Airlie
From: Dave Airlie This stops them being optimised out. --- src/gallium/drivers/r600/sb/sb_bc_parser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp index

[Mesa-dev] [PATCH 4/9] anv/cmd_buffer: Add some helpers for working with descriptor sets

2017-12-06 Thread Jason Ekstrand
Reviewed-by: Jordan Justen --- src/intel/vulkan/genX_cmd_buffer.c | 45 -- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index

[Mesa-dev] [PATCH 1/9] i965/fs: Rewrite assign_constant_locations

2017-12-06 Thread Jason Ekstrand
This rewires the logic for assigning uniform locations to work in terms of "complex alignments". The basic idea is that, as we walk the list of instructions, we keep track of the alignment and continuity requirements of each slot and assert that the alignments all match up. We then use those

[Mesa-dev] [PATCH 7/9] anv/device: Increase the UBO alignment requirement to 32

2017-12-06 Thread Jason Ekstrand
Push constants work in terms of 32-byte chunks so if we want to be able to push UBOs, every thing needs to be 32-byte aligned. Currently, we only require 16-byte which is too small. Reviewed-by: Jordan Justen --- src/intel/vulkan/anv_device.c | 12 ++-- 1

[Mesa-dev] [PATCH 9/9] anv: Enable UBO pushing

2017-12-06 Thread Jason Ekstrand
Push constants on Intel hardware are significantly more performant than pull constants. Since most Vulkan applications don't actively use push constants on Vulkan or at least don't use it heavily, we're pulling way more than we should be. By enabling pushing chunks of UBOs we can get rid of a

[Mesa-dev] [PATCH 5/9] anv/cmd_buffer: Add some stage asserts

2017-12-06 Thread Jason Ekstrand
There are several places where we look up opcodes in an array of stages. Assert that the we don't end up going out-of-bounds. Reviewed-by: Jordan Justen --- src/intel/vulkan/genX_cmd_buffer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [Mesa-dev] [PATCH] mesa: remove set_entry from forward type declarations

2017-12-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 06/12/17 21:38, Alejandro Piñeiro wrote: This type was used at gl_sync_object, but it is not used anymore. --- src/mesa/main/mtypes.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h

Re: [Mesa-dev] [PATCH v2 21/25] mesa: Add a reference to gl_shader_spirv_data to gl_linked_shader

2017-12-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 01/12/17 04:28, Eduardo Lima Mitev wrote: This is a reference to the spirv_data object stored in gl_shader, which stores shader SPIR-V data that is needed during linking too. --- src/mesa/main/mtypes.h| 8

Re: [Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Jason Ekstrand
On Wed, Dec 6, 2017 at 8:48 PM, Timothy Arceri wrote: > On 07/12/17 00:23, Alejandro Piñeiro wrote: > >> On 06/12/17 13:29, Pierre Moreau wrote: >> >>> Hello Alejandro, >>> >>> As far as I understand, nir_spirv_supported_capabilities is being >>> filled in by >>> the

Re: [Mesa-dev] [PATCH v2 19/25] mesa/glspirv: Add a _mesa_spirv_link_shaders() placeholder

2017-12-06 Thread Timothy Arceri
Please squash this with patch 22 tis is just code churn. On 01/12/17 04:28, Eduardo Lima Mitev wrote: This will be the equivalent to link_shaders() from src/compiler/glsl/linker.cpp, but for SPIR-V programs. --- src/mesa/main/glspirv.c | 10 ++ src/mesa/main/glspirv.h | 4 2

Re: [Mesa-dev] [PATCH 1/3] nir: Fix interaction of GL_CLAMP lowering with texture offsets.

2017-12-06 Thread Eric Anholt
Eric Anholt writes: > We want the clamping of the coordinate to apply after the offset, so we > need to do math to lower the offset out of the instruction. Fixes texwrap > offset cases for GL_CLAMP with GL_NEAREST on vc5. Still looking for a review on this series.

Re: [Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Timothy Arceri
On 07/12/17 00:23, Alejandro Piñeiro wrote: On 06/12/17 13:29, Pierre Moreau wrote: Hello Alejandro, As far as I understand, nir_spirv_supported_capabilities is being filled in by the driver and then fetched by the API entrypoint to check the capabilities required by the SPIR-V binary given as

Re: [Mesa-dev] [PATCH v2] glsl: get correct member type when processing xfb ifc arrays

2017-12-06 Thread Kenneth Graunke
On Wednesday, December 6, 2017 4:57:05 PM PST Timothy Arceri wrote: > This fixes a crash in: > > KHR-GL45.enhanced_layouts.xfb_block_stride > > Fixes: 0822517936d4 "glsl: add helper to process xfb qualifiers during > linking" > Cc: Kenneth Graunke Thanks a ton for

[Mesa-dev] [rfc] r600 sb improvements (compute/gds)

2017-12-06 Thread Dave Airlie
This is a first pass at adding GDS support to the r600/sb backend, along with a small compute shader fix. For compute shaders, LDS needs supporting as well. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 3/9] anv/pipeline: Translate vulkan_resource_index to a constant when possible

2017-12-06 Thread Jason Ekstrand
We want to call brw_nir_analyze_ubo_ranges immedately after anv_nir_apply_pipeline_layout and it badly wants constants. We could run an optimization step and let constant folding do it but that's way more expensive than needed. It's really easy to just handle constants in apply_pipeline_layout.

[Mesa-dev] [PATCH 2/9] anv: Enable VK_KHR_16bit_storage for push_constant

2017-12-06 Thread Jason Ekstrand
From: Chema Casanova Enables storagePushConstant16 feature of VK_KHR_16bit_storage for Gen8+. Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 23/23] docs: Update GL_ARB_get_program_binary docs to support 1 format

2017-12-06 Thread Tapani Pälli
Acked-by: Tapani Pälli On 11/29/2017 03:24 AM, Timothy Arceri wrote: From: Jordan Justen Signed-off-by: Jordan Justen --- docs/features.txt | 2 +- docs/relnotes/17.4.0.html | 1 + 2 files changed, 2

Re: [Mesa-dev] [PATCH 22/23] i965: Add ARB_get_program_binary support using nir_serialization

2017-12-06 Thread Tapani Pälli
LGTM Reviewed-by: Tapani Pälli On 11/29/2017 03:24 AM, Timothy Arceri wrote: From: Jordan Justen This resolves an apparent game bug described in 85564. The game doesn't properly handle ARB_get_program_binary with 0 supported formats. V2

Re: [Mesa-dev] [PATCH 1/6] radeonsi: allow DMABUF exports for local buffers

2017-12-06 Thread Marek Olšák
On Wed, Dec 6, 2017 at 5:08 PM, Emil Velikov wrote: > On 6 December 2017 at 15:52, Nicolai Hähnle wrote: >> On 06.12.2017 13:43, Marek Olšák wrote: >>> >>> >>> >>> On Dec 6, 2017 12:34 PM, "Nicolai Hähnle" >>

Re: [Mesa-dev] [PATCH] swr/scons: Fix another intermittent build failure

2017-12-06 Thread Cherniak, Bruce
Reviewed-by: Bruce Cherniak > On Dec 5, 2017, at 10:50 AM, George Kyriazis > wrote: > > gen_BackendPixelRate*.cpp depends on gen_ar_eventhandler.hpp. > Fix missing dependency. > --- > src/gallium/drivers/swr/SConscript | 1 + > 1 file

[Mesa-dev] [PATCH 1/2] radv: track different status of a command buffer

2017-12-06 Thread Samuel Pitoiset
RADV_CMD_BUFFER_STATUS_INVALID is not used for now, but I think it makes sense to declare it. Could be used later with better command buffer error handling. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 6 ++ src/amd/vulkan/radv_device.c

[Mesa-dev] [PATCH 2/2] radv: only reset command buffers that are not in the initial state

2017-12-06 Thread Samuel Pitoiset
dota2 always calls vkResetCommandBuffer() before vkBeginCommandBuffer() which is quite useless. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 02/29] anv/blorp: Rework image clear/resolve helpers

2017-12-06 Thread Nanley Chery
On Wed, Dec 06, 2017 at 09:40:25AM -0800, Nanley Chery wrote: > On Tue, Dec 05, 2017 at 03:48:45PM -0800, Nanley Chery wrote: > > On Mon, Nov 27, 2017 at 07:05:52PM -0800, Jason Ekstrand wrote: > > > This replaces image_fast_clear and ccs_resolve with two new helpers that > > > simply perform an

Re: [Mesa-dev] [PATCH 2/3] glx: Lift sending the MakeCurrent request to top-level code (v2)

2017-12-06 Thread Adam Jackson
On Wed, 2017-12-06 at 15:14 +, Emil Velikov wrote: > > - if (gc->vtable->bind(gc, oldGC, draw, read) != Success) { > > + if (gc->vtable->bind(gc, gc, draw, read) != Success) { > > __glXSetCurrentContextNull(); > > This line seems inconsistent/wrong. > > The

Re: [Mesa-dev] [PATCH 1/3] glx: Move vertex array protocol state into the indirect backend (v2)

2017-12-06 Thread Adam Jackson
On Wed, 2017-12-06 at 14:50 +, Emil Velikov wrote: > > + * have setup the context, as it needs to query server attributes. > > + * > > + * At the point this is called gc->currentDpy is not initialized > > + * nor is the thread's current context actually set. Hence the

Re: [Mesa-dev] [PATCH 1/2] radv: fix a case statement in GetMemoryFdPropertiesKHR

2017-12-06 Thread Fredrik Höglund
On Wednesday 06 December 2017, Emil Velikov wrote: > On 5 December 2017 at 20:51, Fredrik Höglund wrote: > > The handle type in the case statement is supposed to be VK_EXTERNAL_- > > MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT. > > > > Signed-off-by: Fredrik Höglund >

Re: [Mesa-dev] [PATCH 6/6] radeonsi: make const and stream uploaders allocate read-only memory

2017-12-06 Thread Dieter Nützel
For the series: Tested-by: Dieter Nützel Dieter Am 05.12.2017 20:05, schrieb Marek Olšák: From: Marek Olšák and anything that clones these uploaders, like u_threaded_context. --- src/gallium/drivers/radeon/r600_pipe_common.c | 7 +-- 1 file

Re: [Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition

2017-12-06 Thread Timothy Arceri
Can we get away with forward declaring this? There is a section at the top of mtypes you can add it to: * \name Some forward type declarations On 01/12/17 04:28, Eduardo Lima Mitev wrote: From: Alejandro Piñeiro Due gl_spirv we will use it on more places,

Re: [Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition

2017-12-06 Thread Alejandro Piñeiro
On 06/12/17 10:23, Timothy Arceri wrote: > Can we get away with forward declaring this? > > There is a section at the top of mtypes you can add it to: > >  * \name Some forward type declarations Yes, I realized that, and tried, but I still got several build errors. So that would not be enough.

Re: [Mesa-dev] [PATCH 1/2] radv: fix a case statement in GetMemoryFdPropertiesKHR

2017-12-06 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset On 12/05/2017 09:51 PM, Fredrik Höglund wrote: The handle type in the case statement is supposed to be VK_EXTERNAL_- MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT. Signed-off-by: Fredrik Höglund --- src/amd/vulkan/radv_device.c

Re: [Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition

2017-12-06 Thread Timothy Arceri
On 06/12/17 20:33, Alejandro Piñeiro wrote: On 06/12/17 10:23, Timothy Arceri wrote: Can we get away with forward declaring this? There is a section at the top of mtypes you can add it to:  * \name Some forward type declarations Yes, I realized that, and tried, but I still got several

Re: [Mesa-dev] [PATCH] egl/x11: Remove unneeded free() on always null string

2017-12-06 Thread Vadym Shovkoplias
Hi Eric, I used smatch (http://smatch.sourceforge.net/). It is mainly used for Linux kernel. On Mon, Dec 4, 2017 at 6:52 PM, Eric Engestrom wrote: > On Monday, 2017-12-04 12:48:55 +0200, Vadim Shovkoplias wrote: > > Hi Eric, > > Hey, sorry, I forgot to hit "send" on

Re: [Mesa-dev] [PATCH 1/1] nir: Use a freelist in nir_opt_dce to avoid spamming ralloc

2017-12-06 Thread Dieter Nützel
Tested-by: Dieter Nützel Dieter Am 02.12.2017 15:49, schrieb Thomas Helland: Also, allocate worklist_elem in groups of 20, to reduce the burden of allocation. Do not use rzalloc, as there is no need. This lets us drop the number of calls to ralloc from aproximately 10%

[Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Alejandro Piñeiro
Until now it was part of spirv_to_nir_options. But it will be used on the implementation of ARB_gl_spirv and ARB_spirv_extensions, and added to the OpenGL context, as a way to save what SPIR-V capabilities the current OpenGL implementation supports. --- We are sending this commit in advance of a

Re: [Mesa-dev] [PATCH v2 23/25] mesa/glspirv: Add a _mesa_spirv_to_nir() function

2017-12-06 Thread Timothy Arceri
On 01/12/17 04:28, Eduardo Lima Mitev wrote: This is basically a wrapper around spirv_to_nir() that includes arguments setup and post-conversion validation. v2: Rebase update (SpirVCapabilities not a pointer anymore) --- src/mesa/main/glspirv.c | 60

[Mesa-dev] [Bug 104141] include/c11/threads_posix.h:96: undefined reference to `pthread_once'

2017-12-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104141 Bug ID: 104141 Summary: include/c11/threads_posix.h:96: undefined reference to `pthread_once' Product: Mesa Version: git Hardware: x86-64 (AMD64) OS:

[Mesa-dev] [Bug 103909] anv_allocator.c:113:1: error: static declaration of ‘memfd_create’ follows non-static declaration

2017-12-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=103909 Vinson Lee changed: What|Removed |Added Resolution|--- |FIXED

Re: [Mesa-dev] [PATCH 2/2] radeonsi: always place sparse buffers in VRAM

2017-12-06 Thread Dieter Nützel
Hello Nicolai, any updates? Dieter Am 29.11.2017 02:57, schrieb Dieter Nützel: For the series: Tested-by: Dieter Nützel on RX580 with UH, UV, DiRT Rally, some Wine apps - LS2015/LS2017 Dieter Am 28.11.2017 14:44, schrieb Nicolai Hähnle: From: Nicolai Hähnle

Re: [Mesa-dev] [PATCH v2 23/25] mesa/glspirv: Add a _mesa_spirv_to_nir() function

2017-12-06 Thread Eduardo Lima Mitev
On 12/06/2017 10:13 AM, Timothy Arceri wrote: > > > On 01/12/17 04:28, Eduardo Lima Mitev wrote: >> This is basically a wrapper around spirv_to_nir() that includes >> arguments setup and post-conversion validation. >> >> v2: Rebase update (SpirVCapabilities not a pointer anymore) >> --- >>  

Re: [Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition

2017-12-06 Thread Alejandro Piñeiro
On 06/12/17 10:47, Timothy Arceri wrote: > > > On 06/12/17 20:33, Alejandro Piñeiro wrote: >> On 06/12/17 10:23, Timothy Arceri wrote: >>> Can we get away with forward declaring this? >>> >>> There is a section at the top of mtypes you can add it to: >>> >>>   * \name Some forward type

Re: [Mesa-dev] [PATCH v4 00/44] anv: SPV_KHR_16bit_storage/VK_KHR_16bit_storage for gen8+

2017-12-06 Thread Alejandro Piñeiro
On 06/12/17 01:19, Chema Casanova wrote: > On 05/12/17 18:31, Chema Casanova wrote: >> El 05/12/17 a las 06:16, Jason Ekstrand escribió: >>> A couple of notes: >>> >>>  1) I *think* I gave you enough reviews to land the UBO/SSBO part and >>> the optimizations in 26-28.  If reviews are still

Re: [Mesa-dev] [PATCH v2 25/25] i965: Don't call process_glsl_ir() for SPIR-V shaders

2017-12-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 01/12/17 04:28, Eduardo Lima Mitev wrote: v2: Use 'spirv_data' from gl_linked_shader instead, to check if shader is SPIR-V. (Timothy Arceri) --- src/mesa/drivers/dri/i965/brw_link.cpp | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition

2017-12-06 Thread Alejandro Piñeiro
On 06/12/17 10:33, Alejandro Piñeiro wrote: > On 06/12/17 10:23, Timothy Arceri wrote: >> Can we get away with forward declaring this? >> >> There is a section at the top of mtypes you can add it to: >> >>  * \name Some forward type declarations > Yes, I realized that, and tried, but I still got

Re: [Mesa-dev] [PATCH 1/2] i965/fs: Rewrite assign_constant_locations

2017-12-06 Thread Chema Casanova
I've tested this patch against the VK-CTS push constant 16-bit tests, and enabled storagePushConstant16 at VK_KHR_16bit_storage. All test pass without any extra modification. dEQP-VK.spirv_assembly.instruction.compute.16bit_storage.push_constant.*

Re: [Mesa-dev] [PATCH v2 10/25] mesa: add gl_constants::SpirVCapabilities

2017-12-06 Thread Timothy Arceri
If you can forward declare nir_spirv_supported_capabilities as per my comment on the last patch, and you add the forward declaration to this patch then this patch is: Reviewed-by: Timothy Arceri On 01/12/17 04:28, Eduardo Lima Mitev wrote: From: Nicolai Hähnle

Re: [Mesa-dev] [PATCH 1/2] radv: fix a case statement in GetMemoryFdPropertiesKHR

2017-12-06 Thread Emil Velikov
On 5 December 2017 at 20:51, Fredrik Höglund wrote: > The handle type in the case statement is supposed to be VK_EXTERNAL_- > MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT. > > Signed-off-by: Fredrik Höglund For the future please include a fixes tag if the commit is known.

Re: [Mesa-dev] [PATCH] nir/opcodes: Fix constant-folding of bitfield_insert

2017-12-06 Thread Matt Turner
On Wed, Dec 6, 2017 at 3:55 AM, James Legg wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104119 > CC: > CC: Samuel Pitoiset > --- > src/compiler/nir/nir_opcodes.py | 4 ++-- > 1 file

Re: [Mesa-dev] [PATCH 1/6] radeonsi: allow DMABUF exports for local buffers

2017-12-06 Thread Nicolai Hähnle
On 06.12.2017 13:43, Marek Olšák wrote: On Dec 6, 2017 12:34 PM, "Nicolai Hähnle" > wrote: On 05.12.2017 20:05, Marek Olšák wrote: From: Marek Olšák > Cc: 17.3

Re: [Mesa-dev] [PATCH 1/6] radeonsi: allow DMABUF exports for local buffers

2017-12-06 Thread Emil Velikov
On 6 December 2017 at 15:52, Nicolai Hähnle wrote: > On 06.12.2017 13:43, Marek Olšák wrote: >> >> >> >> On Dec 6, 2017 12:34 PM, "Nicolai Hähnle" > > wrote: >> >> On 05.12.2017 20:05, Marek Olšák wrote: >> >> From:

Re: [Mesa-dev] [PATCH] egl: remove unneeded _eglGetNativePlatform check

2017-12-06 Thread Emil Velikov
On 13 November 2017 at 14:04, Emil Velikov wrote: > From: Emil Velikov > > There's little point in calling _eglGetNativePlatform() in > eglCopyBuffers. The platform return is identical to the one already > stored in our _EGLDisplay. > >

[Mesa-dev] [PATCH] r600/sb: do not convert if-blocks that contain indirect array access

2017-12-06 Thread Gert Wollny
If an array is accessed within an if block, then currently it is not known whether the value in the address register is involved in the evaluation of the if condition, and converting the if condition may actually result in out-of-bounds array access. Consequently, if blocks that contain indirect

[Mesa-dev] [PATCH 1/2] radv: remove useless checks in radv_set_{color, depth}_clear_regs()

2017-12-06 Thread Samuel Pitoiset
Already checked by the respective callers. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index

[Mesa-dev] [PATCH] radv: only re-mit the index type when it changes

2017-12-06 Thread Samuel Pitoiset
dota2 binds a ton of index buffers but the type is always 16-bit. Note that we have to invalidate the type when switching from indexed draws to normal draws. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 33 +++--

[Mesa-dev] [PATCH 2/2] radv: remove useless check radv_set_dcc_need_cmask_elim_pred()

2017-12-06 Thread Samuel Pitoiset
emit_fast_color_clear() already checks that. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index

Re: [Mesa-dev] [PATCH mesa] meson: fix keyword argument in declare_dependency()

2017-12-06 Thread Dylan Baker
oops! Okay, I'm thinking I'm going to write a linter for meson to help catch these kind of mistakes because this isn't the first time that I've failed to catch these kind of errors in code that I don't build locally. Reviewed-by: Dylan Baker Quoting Eric Engestrom

Re: [Mesa-dev] [PATCH 02/29] anv/blorp: Rework image clear/resolve helpers

2017-12-06 Thread Nanley Chery
On Tue, Dec 05, 2017 at 03:48:45PM -0800, Nanley Chery wrote: > On Mon, Nov 27, 2017 at 07:05:52PM -0800, Jason Ekstrand wrote: > > This replaces image_fast_clear and ccs_resolve with two new helpers that > > simply perform an isl_aux_op whatever that may be on CCS or MCS. This > > is a bit

Re: [Mesa-dev] [Mesa-stable] [PATCH] glx: GLX_MESA_multithread_makecurrent is direct-only

2017-12-06 Thread Ian Romanick
On 12/06/2017 10:32 AM, Emil Velikov wrote: > On 5 December 2017 at 16:10, Adam Jackson wrote: >> This extension is not defined for indirect contexts. Marking it as >> "client only", as the old code did here, would make the extension >> available in indirect contexts, even though

Re: [Mesa-dev] testing for certain compiler options does not work

2017-12-06 Thread Ian Romanick
On 11/29/2017 08:16 AM, Marc Dietrich wrote: > Hi, > > just found that my gcc 'gcc (SUSE Linux) 7.2.1 20171020 [gcc-7-branch > revision > 253932]' does not warn when using the negative form of unsupported warning > options. So all the configure tests for such options erroneously succeed, e.g:

Re: [Mesa-dev] [PATCH] egl: remove unneeded _eglGetNativePlatform check

2017-12-06 Thread Ian Romanick
Do we have any tests at all that exercise this path? I don't know this code well enough to feel comfortable reviewing this (says everyone). :( On 11/13/2017 09:04 AM, Emil Velikov wrote: > From: Emil Velikov > > There's little point in calling

Re: [Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Ian Romanick
On 12/06/2017 07:29 AM, Pierre Moreau wrote: > Hello Alejandro, > > As far as I understand, nir_spirv_supported_capabilities is being filled in by > the driver and then fetched by the API entrypoint to check the capabilities > required by the SPIR-V binary given as input. And this is done

Re: [Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Ian Romanick
Reviewed-by: Ian Romanick On 12/06/2017 03:57 AM, Alejandro Piñeiro wrote: > Until now it was part of spirv_to_nir_options. But it will be used on > the implementation of ARB_gl_spirv and ARB_spirv_extensions, and added > to the OpenGL context, as a way to save what

Re: [Mesa-dev] [PATCH] drirc: add option to disable ARB_draw_indirect

2017-12-06 Thread Ian Romanick
On 12/05/2017 08:25 AM, Ilia Mirkin wrote: > On Tue, Dec 5, 2017 at 8:18 AM, Emil Velikov wrote: >> Hi Rob, >> >> On 5 December 2017 at 12:54, Rob Clark wrote: >>> This is a bit sad/annoying. But with current GPU firmware (at least on >>> a5xx) we

[Mesa-dev] [PATCH 3/2] intel/fs: Teach instruction scheduler about GRF bank conflict cycles.

2017-12-06 Thread Francisco Jerez
This should allow the post-RA scheduler to do a slightly better job at hiding latency in presence of instructions incurring bank conflicts. The main purpuse of this patch is not to improve performance though, but to get conflict cycles to show up in shader-db statistics in order to make sure that

Re: [Mesa-dev] [PATCH 1/2] intel/fs: Implement GRF bank conflict mitigation pass.

2017-12-06 Thread Francisco Jerez
This series (which is ready for production and improves the cycle count of over 46k shaders) has been sitting here for nearly half a year. I'm planning to self-review it and land it (along with PATCH 3/2 I just sent to make sure we keep regressions under control) if nobody else does in the next

Re: [Mesa-dev] [PATCH 3/3] glx: Implement GLX_EXT_no_config_context (v4)

2017-12-06 Thread Kyle Brenneman
On 12/05/2017 02:22 PM, Adam Jackson wrote: This more or less ports EGL_KHR_no_config_context to GLX. v2: Enable the extension only for those backends that support it. v3: Fix glvnd path and dri2_convert_glx_attribs() v4: Screeching signedness correctness, and disable a now inappropriate

Re: [Mesa-dev] [PATCH 2/2] spirv: fix bug when OpSpecConstantOp calls a conversion

2017-12-06 Thread Ian Romanick
On 11/29/2017 02:17 AM, Samuel Iglesias Gonsálvez wrote: > On Tue, 2017-11-28 at 13:13 -0800, Ian Romanick wrote: >> On 11/20/2017 10:25 PM, Samuel Iglesias Gonsálvez wrote: >>> In that case, nir_eval_const_opcode() will evaluate the conversion >>> but as it was using destination's bit_size, the

Re: [Mesa-dev] [Mesa-stable] [PATCH] glx: GLX_MESA_multithread_makecurrent is direct-only

2017-12-06 Thread Adam Jackson
On Wed, 2017-12-06 at 15:01 -0500, Ian Romanick wrote: > On 12/06/2017 10:32 AM, Emil Velikov wrote: > > On 5 December 2017 at 16:10, Adam Jackson wrote: > > > This extension is not defined for indirect contexts. Marking it as > > > "client only", as the old code did here, would

Re: [Mesa-dev] [PATCH] glx: GLX_MESA_multithread_makecurrent is direct-only

2017-12-06 Thread Nicolai Hähnle
On 05.12.2017 17:10, Adam Jackson wrote: This extension is not defined for indirect contexts. Marking it as "client only", as the old code did here, would make the extension available in indirect contexts, even though the server would certainly not have it in its extension list. Cc:

[Mesa-dev] [PATCH] radv: Add LLVM version to the device name string

2017-12-06 Thread Alex Smith
Allows apps to determine the LLVM version so that they can decide whether or not to enable workarounds for LLVM issues. Signed-off-by: Alex Smith Cc: "17.2 17.3" --- src/amd/vulkan/radv_device.c | 61

[Mesa-dev] [PATCH] radv/winsys: implement query_value()

2017-12-06 Thread Samuel Pitoiset
Might be useful to know the VRAM/GTT usage, the number of VRAM CPU page faults, etc. Nothing is currently using that new interface, but it's a first step. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_radeon_winsys.h | 16 +++

Re: [Mesa-dev] [PATCH 1/6] radeonsi: allow DMABUF exports for local buffers

2017-12-06 Thread Nicolai Hähnle
On 05.12.2017 20:05, Marek Olšák wrote: From: Marek Olšák Cc: 17.3 --- src/gallium/drivers/radeon/r600_texture.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c

[Mesa-dev] [PATCH] nir/opcodes: Fix constant-folding of bitfield_insert

2017-12-06 Thread James Legg
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104119 CC: CC: Samuel Pitoiset --- src/compiler/nir/nir_opcodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_opcodes.py

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Nicolai Hähnle
On 06.12.2017 08:07, James Jones wrote: [snip] So lets say you have a setup where both display and GPU supported FOO/tiled, but only GPU supported compressed (FOO/CC) and cached (FOO/cached).  But the GPU supported the following transitions:     trans_a: FOO/CC -> null     trans_b: FOO/cached

[Mesa-dev] [Bug 104119] radv: OpBitFieldInsert produces 0 with a loop counter for Insert

2017-12-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=104119 --- Comment #6 from James Legg --- I've submitted another patch that fixes the constant folding that was going wrong: https://patchwork.freedesktop.org/patch/191977/ -- You are receiving this mail because: You are

Re: [Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition

2017-12-06 Thread Alejandro Piñeiro
On 06/12/17 10:47, Timothy Arceri wrote: > > > On 06/12/17 20:33, Alejandro Piñeiro wrote: >> On 06/12/17 10:23, Timothy Arceri wrote: >>> Can we get away with forward declaring this? >>> >>> There is a section at the top of mtypes you can add it to: >>> >>>   * \name Some forward type

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Nicolai Hähnle
On 06.12.2017 08:01, James Jones wrote: On 12/01/2017 10:34 AM, Nicolai Hähnle wrote: On 01.12.2017 18:09, Nicolai Hähnle wrote: [snip] As for the actual transition API, I accept that some metadata may be required, and the metadata probably needs to depend on the memory layout, which is

[Mesa-dev] [PATCH] mesa: remove set_entry from forward type declarations

2017-12-06 Thread Alejandro Piñeiro
This type was used at gl_sync_object, but it is not used anymore. --- src/mesa/main/mtypes.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b478f6158e2..4c90f58ef5a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -99,7

Re: [Mesa-dev] [PATCH 6/6] radeonsi: make const and stream uploaders allocate read-only memory

2017-12-06 Thread Nicolai Hähnle
Except for the comment on patch 1, this series is: Reviewed-by: Nicolai Hähnle On 05.12.2017 20:05, Marek Olšák wrote: From: Marek Olšák and anything that clones these uploaders, like u_threaded_context. ---

Re: [Mesa-dev] [PATCH] radv: Add LLVM version to the device name string

2017-12-06 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset On 12/06/2017 11:32 AM, Alex Smith wrote: Allows apps to determine the LLVM version so that they can decide whether or not to enable workarounds for LLVM issues. Signed-off-by: Alex Smith Cc: "17.2 17.3"

Re: [Mesa-dev] [PATCH 1/2] gallium/util: add u_transfer_helper

2017-12-06 Thread Eric Anholt
Rob Clark writes: > Add a new helper that drivers can use to emulate various things that > need special handling in particular in transfer_map: > > 1) z32_s8x24.. gl/gallium treats this as a single buffer with depth > and stencil interleaved but hardware frequently

Re: [Mesa-dev] [PATCH 1/2] gallium/util: add u_transfer_helper

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 4:48 PM, Eric Anholt wrote: > Rob Clark writes: > >> Add a new helper that drivers can use to emulate various things that >> need special handling in particular in transfer_map: >> >> 1) z32_s8x24.. gl/gallium treats this as a single

Re: [Mesa-dev] [PATCH] drirc: add option to disable ARB_draw_indirect

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 3:31 PM, Ian Romanick wrote: > On 12/05/2017 08:25 AM, Ilia Mirkin wrote: >> On Tue, Dec 5, 2017 at 8:18 AM, Emil Velikov >> wrote: >>> Hi Rob, >>> >>> On 5 December 2017 at 12:54, Rob Clark wrote:

Re: [Mesa-dev] [PATCH] egl/x11: Remove unneeded free() on always null string

2017-12-06 Thread Vadim Shovkoplias
Hi Eric, I used smatch (http://smatch.sourceforge.net/). It is mainly used for Linux kernel. 2017-12-04 18:52 GMT+02:00 Eric Engestrom : > On Monday, 2017-12-04 12:48:55 +0200, Vadim Shovkoplias wrote: > > Hi Eric, > > Hey, sorry, I forgot to hit "send" on the reply I

Re: [Mesa-dev] [PATCH 1/2] radv: enable lowering of nir_op_bitfield_insert

2017-12-06 Thread James Legg
On Tue, 2017-12-05 at 14:24 -0500, Connor Abbott wrote: > lower_bitfield_insert lowers nir_op_bitfield_insert to DX10-style > nir_op_bfi and nir_op_bfm, both of which aren't handled by > ac_nir_to_llvm, so unless I'm missing something this will just break > them even harder. We probably should use

Re: [Mesa-dev] [PATCH 1/6] radeonsi: allow DMABUF exports for local buffers

2017-12-06 Thread Marek Olšák
On Dec 6, 2017 12:34 PM, "Nicolai Hähnle" wrote: On 05.12.2017 20:05, Marek Olšák wrote: > From: Marek Olšák > > Cc: 17.3 > --- > src/gallium/drivers/radeon/r600_texture.c | 6 +- > 1 file changed, 5

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 12:52 AM, James Jones wrote: > On 11/30/2017 10:48 AM, Rob Clark wrote: >> >> On Thu, Nov 30, 2017 at 1:28 AM, James Jones wrote: >>> >>> On 11/29/2017 01:10 PM, Rob Clark wrote: On Wed, Nov 29, 2017 at 12:33 PM, Jason

Re: [Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Alejandro Piñeiro
On 06/12/17 13:29, Pierre Moreau wrote: > Hello Alejandro, > > As far as I understand, nir_spirv_supported_capabilities is being filled in by > the driver and then fetched by the API entrypoint to check the capabilities > required by the SPIR-V binary given as input. And this is done regardless of

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 2:07 AM, James Jones wrote: > On 12/01/2017 01:52 PM, Miguel Angel Vico wrote: >> >> >> >> On Fri, 1 Dec 2017 13:38:41 -0500 >> Rob Clark wrote: >> >>> >>> sure, this was just a hypothetical example. But to take this case as >>>

[Mesa-dev] [PATCH mesa] meson: fix keyword argument in declare_dependency()

2017-12-06 Thread Eric Engestrom
`declare_dependency()` takes `compile_args`, not `c_args`. It was correct in all the other `declare_dependency()` from that commit. Fixes: 0bbecc5a8548883f76a71 "meson: define driver dependencies" Cc: Dylan Baker Signed-off-by: Eric Engestrom ---

Re: [Mesa-dev] [PATCH 6/6] glx: Implement GLX_EXT_no_config_context (v3)

2017-12-06 Thread Emil Velikov
On 5 December 2017 at 20:03, Adam Jackson wrote: > On Thu, 2017-11-30 at 16:10 +, Emil Velikov wrote: >> On 14 November 2017 at 20:13, Adam Jackson wrote: >> >> > @@ -562,6 +562,10 @@ dri2_convert_glx_attribs(unsigned num_attribs, >> > const uint32_t

Re: [Mesa-dev] GBM and the Device Memory Allocator Proposals

2017-12-06 Thread Rob Clark
On Wed, Dec 6, 2017 at 6:25 AM, Nicolai Hähnle wrote: > On 06.12.2017 08:07, James Jones wrote: > [snip] > >> So lets say you have a setup where both display and GPU supported >> FOO/tiled, but only GPU supported compressed (FOO/CC) and cached >> (FOO/cached). But

Re: [Mesa-dev] [PATCH] mesa: define nir_spirv_supported_capabilities

2017-12-06 Thread Pierre Moreau
Hello Alejandro, As far as I understand, nir_spirv_supported_capabilities is being filled in by the driver and then fetched by the API entrypoint to check the capabilities required by the SPIR-V binary given as input. And this is done regardless of the input IR used by the driver, be it NIR, LLVM

Re: [Mesa-dev] [PATCH 1/2] radv: enable lowering of nir_op_bitfield_insert

2017-12-06 Thread Samuel Pitoiset
On 12/06/2017 01:04 PM, James Legg wrote: On Tue, 2017-12-05 at 14:24 -0500, Connor Abbott wrote: lower_bitfield_insert lowers nir_op_bitfield_insert to DX10-style nir_op_bfi and nir_op_bfm, both of which aren't handled by ac_nir_to_llvm, so unless I'm missing something this will just break

Re: [Mesa-dev] [RFC] r600/evergreen compute shader + glsl 4.30 support

2017-12-06 Thread Dave Airlie
On 30 November 2017 at 22:06, Gert Wollny wrote: > Am Donnerstag, den 30.11.2017, 17:56 +1000 schrieb Dave Airlie: >> On 30 November 2017 at 17:20, Gert Wollny >> wrote: >> > Am Donnerstag, den 30.11.2017, 09:30 +1000 schrieb Dave Airlie: >> > > On 29

  1   2   >