Re: [Mesa-dev] [PATCH v2 1/6] vulkan: Fix Wayland uninitialised registry

2017-05-19 Thread Daniel Stone
Hi Lionel, On 19 May 2017 at 02:31, Lionel Landwerlin wrote: > Thanks for doing this. > Although you seem to have a multithreaded scenario in mind, this will > probably help single threaded stacks like Clutter/Cogl & Mesa all using the > same event queue. Right

[Mesa-dev] [PATCH 4/6] etnaviv: don't read back resource if transfer discards contents

2017-05-19 Thread Lucas Stach
Reduces bandwidth usage of transfers which discard the buffer contents, as well as skipping unnecessary command stream flushes and CPU/GPU synchronization. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 4 +++- 1 file changed, 3

[Mesa-dev] [PATCH 5/6] etnaviv: simplify transfer tiling handling

2017-05-19 Thread Lucas Stach
There is no need to special case compressed resources, as they are already marked as linear on allocation. With that out of the way, there is room to cut down on the number of if clauses used. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_transfer.c

[Mesa-dev] [PATCH 2/6] etnaviv: slim down resource waiting

2017-05-19 Thread Lucas Stach
cpu_prep() already does all the required waiting, so the only thing that needs to be done is flushing the commandstream, if a GPU write is pending. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 5 +++--

[Mesa-dev] [PATCH 0/6] etnaviv transfer handling improvements

2017-05-19 Thread Lucas Stach
Hi guys! So I've looked a bit at our transfer functions, as they are causing significant CPU/GPU syncs in some workloads, which I would like to kill. This patch series is the first step in that direction. It fixes one bug, cleans up the code a bit, to make it easier to follow and implements some

[Mesa-dev] [PATCH 6/6] etnaviv: upgrade DISCARD_RANGE to DISCARD_WHOLE_RESOURCE if possible

2017-05-19 Thread Lucas Stach
Stolen from VC4. As we don't do any fancy reallocation tricks yet, it's possible to upgrade also coherent mappings and shared resources. Signed-off-by: Lucas Stach --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 14 ++ 1 file changed, 14 insertions(+)

[Mesa-dev] [PATCH] android: add -Wl, --build-id=sha1 to LDFLAGS for libvulkan_intel

2017-05-19 Thread Tapani Pälli
Just like is done on desktop and what is expected by the build-id code. Signed-off-by: Tapani Pälli --- Jason, I commented before that this did not work but it seems I had other changes when testing that screwed up things, sorry for that, this works just fine!

[Mesa-dev] [PATCH v13 21/36] i965: Restructure CCS disabling

2017-05-19 Thread Daniel Stone
From: Ben Widawsky Make the code only disable CCS when it has to, unlike before where it disabled CCS and enabled it when it could. This is much more inline with how it should work in a few patches, where we have fewer restrictions as to when we disable CCS. v2: Change CCS

[Mesa-dev] [PATCH v13 19/36] i965/miptree: Add a helper function for image creation

2017-05-19 Thread Daniel Stone
From: Ben Widawsky This provides a common function or creating miptrees when there is an existing DRIimage to use. That provides an easy way to add CCS allocation. v2: Make the new function assume there are always no layout flags. This will be adjusted later. Signed-off-by:

[Mesa-dev] [PATCH v13 24/36] i965/miptree: Add a return for updating of winsys

2017-05-19 Thread Daniel Stone
From: Ben Widawsky There is nothing particularly useful to do currently if the update fails, but there is no point carrying on either. As a result, this has a behavior change. v2: Make the return type a bool (Topi) v3: Don't leak the bo if update_winsys_renderbuffer fails.

[Mesa-dev] [PATCH v13 30/36] i965: Use partial resolves for CCS buffers being scanned out

2017-05-19 Thread Daniel Stone
From: Ben Widawsky On Gen9 hardware, the display engine is able to scanout a compressed framebuffer by providing an offset to auxiliary compression information. Unfortunately, the hardware is incapable of doing the same thing for the fast clear color. To mitigate this, the

[Mesa-dev] [PATCH v13 27/36] i965: Change resolve flags to enum

2017-05-19 Thread Daniel Stone
From: Ben Widawsky In the foreseeable future it doesn't seem to make sense to have multiple resolve flags. What does make sense is to have the caller give an indication to the lower layers what it things should be done for resolve. The enum change distinguishes this binary

[Mesa-dev] [PATCH v13 35/36] i965: Support dmabuf import with modifiers

2017-05-19 Thread Daniel Stone
From: Varad Gautam Add support for createImageFromDmaBufs2, adding a modifier to the original. Signed-off-by: Varad Gautam Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 ++

[Mesa-dev] [PATCH v13 20/36] i965/miptree: Allocate mcs_buf for an image's CCS_E

2017-05-19 Thread Daniel Stone
From: Ben Widawsky This code will disable actually creating these buffers for the scanout, but it puts the allocation in place. Primarily this patch is split out for review, it can be squashed in later if preferred. v2: assert(mt->offset == 0) in ccs creation (as requested

[Mesa-dev] [PATCH v13 14/36] gallium: introduce format modifier querying

2017-05-19 Thread Daniel Stone
From: Varad Gautam format modifiers tokens are driver specific, and hence, need to come in from the driver. this allows drivers to be queried for supported format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: drivers must return

[Mesa-dev] [PATCH v13 34/36] i965: Add tiling mode to BO import

2017-05-19 Thread Daniel Stone
When importing a dmabuf, verify that the tiling mode matches what was expected. Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 12 ++-- src/mesa/drivers/dri/i965/brw_bufmgr.h | 3 ++- src/mesa/drivers/dri/i965/intel_screen.c | 5

[Mesa-dev] [PATCH v13 11/36] st/dri: implement createImageWithModifiers in DRIimage

2017-05-19 Thread Daniel Stone
From: Varad Gautam adds a pscreen->resource_create_with_modifiers() to create textures with modifier. Signed-off-by: Varad Gautam Signed-off-by: Daniel Stone --- src/gallium/include/pipe/p_screen.h | 18

[Mesa-dev] [PATCH v13 22/36] i965: Allocate tile aligned height

2017-05-19 Thread Daniel Stone
From: Ben Widawsky This patch shouldn't actually do anything because the libdrm function should already do this alignment. However, it preps us for a future patch where we add in the CCS AUX size, and in the process it serves as a good place to find bisectable issues if libdrm

[Mesa-dev] [PATCH 3/6] etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flag

2017-05-19 Thread Lucas Stach
This gets rid of quite a bit of CPU/GPU sync on frequent vertex buffer uploads and I haven't seen any of the issues mentioned in the comment, so this one seems stale. Ignore the flag if there exists a temporary resource, as those ones are never busy. Signed-off-by: Lucas Stach

[Mesa-dev] [PATCH v13 15/36] st/dri: support format modifier queries

2017-05-19 Thread Daniel Stone
From: Varad Gautam ask the driver for supported modifiers for a given format. bump __DRIimageExtension to 16. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. Signed-off-by:

[Mesa-dev] [PATCH v13 04/36] egl/dri2: Create EGLImages with dmabuf modifiers

2017-05-19 Thread Daniel Stone
From: Varad Gautam Allow creating EGLImages with dmabuf format modifiers when target is EGL_LINUX_DMA_BUF_EXT for EGL_EXT_image_dma_buf_import_modifiers. v2: - clear modifier assembling and error label name (Eric Engestrom) v3: - remove goto jumps within

[Mesa-dev] [PATCH v13 07/36] egl: implement eglQueryDmaBufModifiersEXT

2017-05-19 Thread Daniel Stone
From: Varad Gautam query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: move format check to the driver instead of making format queries here and then checking. v3: Check DRIimageExtension version before query (Daniel

[Mesa-dev] [PATCH v13 26/36] i965: Pretend that CCS modified images are two planes

2017-05-19 Thread Daniel Stone
From: Ben Widawsky v2: move is_aux into if block. (Jason) Use else block instead of goto (Jason) v3: Fix up logic for is_aux (Ben) Fix up size calculations and add FIXME (Ben) Cc: Jason Ekstrand Signed-off-by: Ben Widawsky Acked-by:

[Mesa-dev] [PATCH v13 03/36] dri: support DRIimage creation from dmabufs with modifiers

2017-05-19 Thread Daniel Stone
From: Pekka Paalanen add createImageFromDmaBufs2 function which accepts per-plane dmabuf format modifiers. Signed-off-by: Pekka Paalanen Signed-off-by: Varad Gautam Reviewed-by: Daniel Stone

[Mesa-dev] [PATCH 1/6] etnaviv: always do cpu_fini in transfer_unmap

2017-05-19 Thread Lucas Stach
The cpu_fini() call pushes the buffer back into the GPU domain, which needs to be done for all buffers, not just the ones with CPU written content. The etnaviv kernel driver currently doesn't validate this, but may start to do so at a later point in time. If there is a temporary resource the fini

[Mesa-dev] [PATCH v13 05/36] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

2017-05-19 Thread Daniel Stone
From: Varad Gautam these allow querying the driver for supported dmabuf formats and modifiers. v2: move to __DRIimageExtension version 16. v3: return GLBoolean for error reporting, document params better. Signed-off-by: Varad Gautam

[Mesa-dev] [PATCH v13 28/36] i965: Plumb resolve hints from miptrees to blorp

2017-05-19 Thread Daniel Stone
From: Ben Widawsky Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/brw_blorp.c |

[Mesa-dev] [PATCH v13 16/36] i965: Remove same-FD restriction for imports

2017-05-19 Thread Daniel Stone
Intel hardware requires that all planes of an image come from the same buffer, which is currently implemented by testing that all FDs are numerically the same. However, when going through a winsys (e.g.) or anything which transits FDs individually, the FDs may be different even if the underlying

[Mesa-dev] [PATCH v13 13/36] st/dri: support format queries

2017-05-19 Thread Daniel Stone
From: Varad Gautam ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. v4: use pscreen->is_format_supported instead of adding a new query. (Lucas Stach) Signed-off-by: Varad Gautam

[Mesa-dev] [PATCH v13 25/36] i965/miptree: Allocate mt earlier in update winsys

2017-05-19 Thread Daniel Stone
From: Ben Widawsky Allows us to continue utilizing common miptree creation using __DRIimage without creating a new DRIimage (for the intel_process_dri2_buffer() case). This is a bit ugly, but I think it's the best one can do. v2: This patch let's us remove the temporary

[Mesa-dev] [PATCH v13 08/36] egl: advertise EGL_EXT_image_dma_buf_import_modifiers

2017-05-19 Thread Daniel Stone
From: Varad Gautam Signed-off-by: Varad Gautam Reviewed-by: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/drivers/dri2/egl_dri2.c | 6 ++ src/egl/main/eglapi.c | 1 + 2

[Mesa-dev] [PATCH v13 06/36] egl: implement eglQueryDmaBufFormatsEXT

2017-05-19 Thread Daniel Stone
From: Varad Gautam allow egl clients to query the dmabuf formats supported on this platform. v2: return EGLBoolean. v3: Check DRIimageExtension version before querying (Daniel Stone) Signed-off-by: Louis-Francis Ratté-Boulianne Signed-off-by:

[Mesa-dev] [PATCH v13 23/36] i965: Add logic for allocating BO with CCS

2017-05-19 Thread Daniel Stone
From: Ben Widawsky This patch provides the support (and comments) for allocating the BO with space for the CCS buffer just underneath it. This patch was originally titled: "i965: Create correctly sized mcs for an image" In order to make things more bisectable, reviewable,

[Mesa-dev] [PATCH v13 10/36] st/dri: enable DRIimage modifier queries

2017-05-19 Thread Daniel Stone
From: Varad Gautam introduce modifier field in DRIimage and set it to DRM_FORMAT_MOD_INVALID for now. support DRIimage modifier queries. Suggested-by: Daniel Stone Signed-off-by: Varad Gautam Signed-off-by: Daniel

[Mesa-dev] [PATCH v13 29/36] i965: Add new resolve hints full and partial

2017-05-19 Thread Daniel Stone
From: Ben Widawsky Upper layers of the code will have the need to specify full or partial resolves (more on this in the next patch). This code simply adds the new enums and plumbs it in as minimally as necessary. Signed-off-by: Ben Widawsky Acked-by:

[Mesa-dev] [PATCH v13 32/36] i965: Remove scanout restriction from lossless compression

2017-05-19 Thread Daniel Stone
From: Ben Widawsky v2: Try to keep the assert as recommended by Topi. This requires modifying the num_samples check to be <= 1 because internally created buffers set num_samples = 0. v3: Buffers are proactively marked as scanout, often, and so checking is_scanout in whether

[Mesa-dev] [PATCH v13 33/36] i965: Handle compression modifier

2017-05-19 Thread Daniel Stone
From: Ben Widawsky v2: Rename modifier to be more smart (Jason) FINISHME: Use the kernel's final choice for the fb modifier bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube none Read bandwidth: 603.91 MiB/s Write bandwidth: 615.28

[Mesa-dev] [PATCH v13 12/36] st/dri: implement DRIimage creation from dmabufs with modifiers

2017-05-19 Thread Daniel Stone
From: Varad Gautam support importing dmabufs into DRIimage while taking format modifiers in account, as per DRIimage extension version 15. bump __DRIimageExtension to 15. v2: initialize winsys modifier to DRM_FORMAT_MOD_INVALID (Daniel Stone) Signed-off-by: Varad

[Mesa-dev] [PATCH v13 36/36] i965: Add format/modifier advertising

2017-05-19 Thread Daniel Stone
From: Varad Gautam v2: Rebase and reuse tiling/modifier map. (Daniel Stone) Signed-off-by: Varad Gautam Signed-off-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_screen.c | 59 +--- 1 file

[Mesa-dev] [PATCH v13 17/36] i965: Invert image modifier/tiling inference

2017-05-19 Thread Daniel Stone
When allocating images, we record a tiling mode and then work backwards to infer the modifier. Unfortunately this is the wrong way around, since it is a one:many mapping (e.g. TILING_Y can be plain Y-tiling, or Y-tiling with CCS). Invert the mapping, so we record a modifier first and then map

[Mesa-dev] [PATCH shader-db] run: use setenv() for setting GALLIUM_THREAD=0

2017-05-19 Thread Samuel Pitoiset
When GALLIUM_THREAD is already set in the environment, addenv() will end up by setting GALLIUM_THREAD="0,0" which mesa doesn't understand for some obvious reasons. Instead, use setenv() because we want to force this behaviour in all situations. Signed-off-by: Samuel Pitoiset

Re: [Mesa-dev] [PATCH shader-db] run: use setenv() for setting GALLIUM_THREAD=0

2017-05-19 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, May 19, 2017 at 11:47 AM, Samuel Pitoiset wrote: > When GALLIUM_THREAD is already set in the environment, addenv() > will end up by setting GALLIUM_THREAD="0,0" which mesa doesn't > understand for some

[Mesa-dev] [Bug 98471] [TRACKER] Mesa 13.0 release tracker

2017-05-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98471 Bug 98471 depends on bug 98833, which changed state. Bug 98833 Summary: [REGRESSION, bisected] Wayland revert commit breaks non-Vsync fullscreen frame updates https://bugs.freedesktop.org/show_bug.cgi?id=98833 What|Removed

[Mesa-dev] [Bug 98833] [REGRESSION, bisected] Wayland revert commit breaks non-Vsync fullscreen frame updates

2017-05-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98833 Daniel Stone changed: What|Removed |Added Status|NEW |RESOLVED

[Mesa-dev] [PATCH v13 31/36] i965/miptree: Remove dead code assertion

2017-05-19 Thread Daniel Stone
From: Ben Widawsky We no longer allocate a miptree for the mcs_buf, so this is not a useful assertion. While here, move the CCS disabling so that we only conditionally shut it off. This helps us dtrt later when CCS is used in more places. Recommended-by: Topi Pohjolainen

[Mesa-dev] [PATCH v13 00/36] EGL dmabuf modifiers import & i915 CCS

2017-05-19 Thread Daniel Stone
Hi, This series is an amalgamation of two series: Varad's EGL_EXT_image_dma_buf_import_modifiers support (last seen at v3), and Ben's i915 CCS support (last seen at v12). I've fairly heavily rebased them, fixed up the Intel paths, and Varad had also fixed up the Gallium/pipe parts from Lucas's

[Mesa-dev] [PATCH v13 09/36] st/dri: refactor multi-planar YUV import path

2017-05-19 Thread Daniel Stone
From: Varad Gautam we currently ignore the plane count when converting from __DRI_IMAGE_FORMAT* tokens to __DRI_IMAGE_FOURCC* for multiplanar images, and only return the first plane's simplified fourcc. this adds a fourcc to __DRI_IMAGE_FORMAT_* mapping to dri,

[Mesa-dev] [PATCH v13 01/36] egl: introduce DMA_BUF_MAX_PLANES

2017-05-19 Thread Daniel Stone
From: Pekka Paalanen Rather than hardcoding 3, use a #define. Makes it easier to bump this later to 4. Signed-off-by: Pekka Paalanen Signed-off-by: Varad Gautam Reviewed-by: Eric Engestrom

[Mesa-dev] [PATCH v13 02/36] egl/main: add support for fourth plane tokens

2017-05-19 Thread Daniel Stone
From: Pekka Paalanen The EGL_EXT_dma_buf_import_modifiers extension adds support for a fourth plane, just like DRM KMS API does. Bump maximum dma_buf plane count to four. v2: prevent attribute tokens from being parsed if EXT_image_dma_buf_import_modifiers is

Re: [Mesa-dev] [PATCH V2 3/3] st/mesa: don't mark the program as in cache_fallback when there is cache miss

2017-05-19 Thread Nicolai Hähnle
On 19.05.2017 03:02, Timothy Arceri wrote: When we fallback currently the gl_program objects are re-allocated. This is likely to change when the i965 cache lands, but for now this fixes a crash when using MESA_GLSL=cache_fb. This env var simulates the fallback path taken when a tgsi cache item

[Mesa-dev] [PATCH v13 18/36] i965: Support images with offset aux buffers

2017-05-19 Thread Daniel Stone
From: Ben Widawsky Previously our aux buffers (MCS, and HiZ) never had an offset because they were in their own buffer object. When using the CCS lossless compression feature, it's desirable to store the data at an offset from the main framebuffer, ie. share a buffer object.

Re: [Mesa-dev] [PATCH V2 3/3] st/mesa: don't mark the program as in cache_fallback when there is cache miss

2017-05-19 Thread Timothy Arceri
On 19/05/17 19:37, Nicolai Hähnle wrote: On 19.05.2017 03:02, Timothy Arceri wrote: When we fallback currently the gl_program objects are re-allocated. This is likely to change when the i965 cache lands, but for now this fixes a crash when using MESA_GLSL=cache_fb. This env var simulates the

Re: [Mesa-dev] [PATCH 2/2] gallium: Add renderonly-based support for pl111+vc4.

2017-05-19 Thread Emil Velikov
On 17 May 2017 at 20:13, Emil Velikov wrote: > On 17 May 2017 at 18:53, Eric Anholt wrote: >> Emil Velikov writes: >> >>> Hi Eric, >>> >>> On 11 May 2017 at 00:06, Eric Anholt wrote: This follows the

Re: [Mesa-dev] [PATCH] radeonsi/gfx9: compile shaders with +xnack

2017-05-19 Thread Nicolai Hähnle
On 18.05.2017 22:46, Marek Olšák wrote: From: Marek Olšák so that LLVM doesn't allocate SGPRs where XNACK is. Reviewed-by: Nicolai Hähnle Cc: 17.1 --- src/gallium/drivers/radeonsi/si_pipe.c | 13

Re: [Mesa-dev] [PATCH 1/9] mesa: Handle common extension checks with more compact code

2017-05-19 Thread Nanley Chery
On Fri, May 19, 2017 at 05:32:07PM -0700, Ian Romanick wrote: > On 05/19/2017 05:07 PM, Ilia Mirkin wrote: > > On Fri, May 19, 2017 at 7:29 PM, Ian Romanick wrote: > >> I missed that glsl_parser_extras.cpp has its own implementation of the > >> has_XXX_foo() functions that

Re: [Mesa-dev] [PATCH 1/9] mesa: Handle common extension checks with more compact code

2017-05-19 Thread Ilia Mirkin
On Fri, May 19, 2017 at 7:29 PM, Ian Romanick wrote: > I missed that glsl_parser_extras.cpp has its own implementation of the > has_XXX_foo() functions that take the API and version as explicit > parameters. Your patch predates that change. There's room for some > modest

[Mesa-dev] [Bug 101110] Build failure in GNOME Continuous

2017-05-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101110 --- Comment #4 from Emil Velikov --- Correction - needs the following brown paper bag commit 48cd1919ff1 ("configure.ac: s/xcb-fixes/xcb-xfixes/") -- You are receiving this mail because: You are the assignee for the

[Mesa-dev] [Bug 101110] Build failure in GNOME Continuous

2017-05-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101110 --- Comment #3 from Dieter Nützel --- Hello Emil, shouldn't this look like this: diff --git a/configure.ac b/configure.ac index b788137d51..06883a9667 100644 --- a/configure.ac +++ b/configure.ac @@ -1723,7 +1723,7 @@ fi

Re: [Mesa-dev] [PATCH 04/16] anv: Handle transitioning depth from UNDEFINED to other layouts

2017-05-19 Thread Jason Ekstrand
On Fri, May 19, 2017 at 4:51 PM, Nanley Chery wrote: > On Thu, May 18, 2017 at 02:00:51PM -0700, Jason Ekstrand wrote: > > --- > > src/intel/vulkan/anv_image.c | 12 ++-- > > src/intel/vulkan/genX_cmd_buffer.c | 9 + > > 2 files changed, 11

Re: [Mesa-dev] [PATCH] i965: Add RGBX8888 and RGBA8888 to EGL configure and reorder the list

2017-05-19 Thread Rob Herring
On Fri, May 19, 2017 at 12:57 PM, Emil Velikov wrote: > On 18 May 2017 at 23:01, Rob Herring wrote: >> On Thu, May 18, 2017 at 5:25 AM, Emil Velikov >> wrote: >>> On 18 May 2017 at 05:10, Chih-Wei Huang

Re: [Mesa-dev] [PATCH 04/16] anv: Handle transitioning depth from UNDEFINED to other layouts

2017-05-19 Thread Nanley Chery
On Fri, May 19, 2017 at 05:18:12PM -0700, Jason Ekstrand wrote: > On Fri, May 19, 2017 at 4:51 PM, Nanley Chery wrote: > > > On Thu, May 18, 2017 at 02:00:51PM -0700, Jason Ekstrand wrote: > > > --- > > > src/intel/vulkan/anv_image.c | 12 ++-- > > >

[Mesa-dev] [PATCH 1/2] util/disk_cache: add new driver_flags param to cache keys

2017-05-19 Thread Timothy Arceri
This will be used for things such as adding driver specific environment variables to the key. Allowing us to set environment vars that change the shader and not have the driver ignore them if it finds existing shaders in the cache. --- src/compiler/glsl/tests/cache_test.c | 20

[Mesa-dev] [PATCH] etnaviv: Don't try to use the index buffer if size is zero

2017-05-19 Thread Tomeu Vizoso
If info->index_size is zero, info->index will point to uninitialized memory. Fatal signal 11 (SIGSEGV), code 2, fault addr 0xab5d07a3 in tid 20456 (surfaceflinger) Signed-off-by: Tomeu Vizoso Cc: etna...@lists.freedesktop.org Cc: Marek Olšák

[Mesa-dev] [PATCH 2/2] radeon: pass flags that can change shaders to disk_cache_create()

2017-05-19 Thread Timothy Arceri
I wasn't sure if I should filter the flags so that we only use flags that actually change the shader output. To avoid manual updates we just pass in everything for now. --- src/gallium/drivers/radeon/r600_pipe_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH] glsl: set mask via initialization list rather than in constructor body

2017-05-19 Thread Timothy Arceri
Potentially more efficient as is may avoid the struct being initialised twice. --- src/compiler/glsl/ir.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 123de99..e55635b 100644 --- a/src/compiler/glsl/ir.cpp +++

Re: [Mesa-dev] [PATCH 1/9] mesa: Handle common extension checks with more compact code

2017-05-19 Thread Ian Romanick
On 05/19/2017 05:07 PM, Ilia Mirkin wrote: > On Fri, May 19, 2017 at 7:29 PM, Ian Romanick wrote: >> I missed that glsl_parser_extras.cpp has its own implementation of the >> has_XXX_foo() functions that take the API and version as explicit >> parameters. Your patch

[Mesa-dev] [PATCH 5/9] mesa: Minor clean ups in set_combiner_scale

2017-05-19 Thread Ian Romanick
From: Ian Romanick textdata bss dec hex filename 7034243 235248 37280 7306771 6f7e13 32-bit i965_dri.so before 7034211 235248 37280 7306739 6f7df3 32-bit i965_dri.so after 6676047 303400 50608 7030055 6b4527 64-bit i965_dri.so before

[Mesa-dev] [PATCH 7/9] mesa: GL_ARB_shader_subroutine is not optional in core profile

2017-05-19 Thread Ian Romanick
From: Ian Romanick textdata bss dec hex filename 7034211 235248 37280 7306739 6f7df3 32-bit i965_dri.so before 7034051 235248 37280 7306579 6f7d53 32-bit i965_dri.so after 6676031 303400 50608 7030039 6b4517 64-bit i965_dri.so before

[Mesa-dev] [PATCH 6/9] mesa: Minor clean ups in set_env_mode

2017-05-19 Thread Ian Romanick
From: Ian Romanick No change measured by size. Signed-off-by: Ian Romanick --- src/mesa/main/texenv.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index

[Mesa-dev] [PATCH 8/9] nouveau: Move contents of nv04_surface to nouveau_surface

2017-05-19 Thread Ian Romanick
From: Ian Romanick All of these functions are also used by the NV10 and NV20 drivers. It makes sense for them to be in the common file and have the common names (next patch). Signed-off-by: Ian Romanick Cc: Ilia Mirkin

[Mesa-dev] [PATCH 3/9] mesa: Minor clean ups in set_combiner_source

2017-05-19 Thread Ian Romanick
From: Ian Romanick textdata bss dec hex filename 7034307 235248 37280 7306835 6f7e53 32-bit i965_dri.so before 7034243 235248 37280 7306771 6f7e13 32-bit i965_dri.so after 6676127 303400 50608 7030135 6b4577 64-bit i965_dri.so before

[Mesa-dev] [PATCH 4/9] mesa: Minor clean ups in set_combiner_operand

2017-05-19 Thread Ian Romanick
From: Ian Romanick textdata bss dec hex filename 7034243 235248 37280 7306771 6f7e13 32-bit i965_dri.so before 7034243 235248 37280 7306771 6f7e13 32-bit i965_dri.so after 6676063 303400 50608 7030071 6b4537 64-bit i965_dri.so before

[Mesa-dev] [PATCH 9/9] nouveau: s/nv04_surface_/nouveau_surface_/

2017-05-19 Thread Ian Romanick
From: Ian Romanick After moving the contents of nv04_surface.c to nouveau_surface.c, rename all the functions. Signed-off-by: Ian Romanick Cc: Ilia Mirkin --- src/mesa/drivers/dri/nouveau/nouveau_surface.c | 60

[Mesa-dev] [PATCH 1/9] mesa: Handle common extension checks with more compact code

2017-05-19 Thread Ian Romanick
From: Ian Romanick The previous code handled everything with the general case. I noticed that every time I converted an open-coded check to use a _mesa_has_EXT_foo() function, the text size of the driver increased. Almost all extensions only care what the current

[Mesa-dev] [PATCH 2/9] mesa: Minor clean ups in set_combiner_mode

2017-05-19 Thread Ian Romanick
From: Ian Romanick textdata bss dec hex filename 7034307 235248 37280 7306835 6f7e53 32-bit i965_dri.so before 7034307 235248 37280 7306835 6f7e53 32-bit i965_dri.so after 6676143 303400 50608 7030151 6b4587 64-bit i965_dri.so before

[Mesa-dev] [Bug 101071] compiling glsl fails with undefined reference to `pthread_create'

2017-05-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101071 --- Comment #6 from Emil Velikov --- (In reply to warpme from comment #5) > Emil, > One thing: > > in configure I see: > > checking for the pthreads library -lpthreads... no > checking whether pthreads work without

Re: [Mesa-dev] [PATCH v13 13/36] st/dri: support format queries

2017-05-19 Thread Lucas Stach
Am Freitag, den 19.05.2017, 10:37 +0100 schrieb Daniel Stone: > From: Varad Gautam > > ask the driver for supported dmabuf formats > > v2: rebase to master. > v3: return false on failure. > v4: use pscreen->is_format_supported instead of adding a new query. >

Re: [Mesa-dev] [PATCH v13 11/36] st/dri: implement createImageWithModifiers in DRIimage

2017-05-19 Thread Lucas Stach
Am Freitag, den 19.05.2017, 10:37 +0100 schrieb Daniel Stone: > From: Varad Gautam > > adds a pscreen->resource_create_with_modifiers() to create textures > with modifier. > > Signed-off-by: Varad Gautam > Signed-off-by: Daniel Stone

Re: [Mesa-dev] [PATCH v13 15/36] st/dri: support format modifier queries

2017-05-19 Thread Lucas Stach
Am Freitag, den 19.05.2017, 10:37 +0100 schrieb Daniel Stone: > From: Varad Gautam > > ask the driver for supported modifiers for a given format. > bump __DRIimageExtension to 16. > > v2: move to __DRIimageExtension v16. > v3: fail if the supplied format is not

Re: [Mesa-dev] [PATCH v13 12/36] st/dri: implement DRIimage creation from dmabufs with modifiers

2017-05-19 Thread Lucas Stach
Am Freitag, den 19.05.2017, 10:37 +0100 schrieb Daniel Stone: > From: Varad Gautam > > support importing dmabufs into DRIimage while taking format modifiers > in account, as per DRIimage extension version 15. > > bump __DRIimageExtension to 15. > > v2: initialize

Re: [Mesa-dev] [PATCH 7/9] mesa: GL_ARB_shader_subroutine is not optional in core profile

2017-05-19 Thread Ilia Mirkin
On Fri, May 19, 2017 at 9:38 AM, Ian Romanick wrote: > diff --git a/src/mesa/main/get_hash_params.py > b/src/mesa/main/get_hash_params.py > index 58d428d..850ce7d 100644 > --- a/src/mesa/main/get_hash_params.py > +++ b/src/mesa/main/get_hash_params.py > @@ -957,8 +957,8 @@

Re: [Mesa-dev] [PATCH 9/9] nouveau: s/nv04_surface_/nouveau_surface_/

2017-05-19 Thread Ilia Mirkin
I kinda see it both ways - yeah, the functions are the same and it's all shared, so your patch makes sense. OTOH, all of these functions (which do anything) have a nv04/nv10/nv20 prefix, which makes it easier to separate stuff out by generation if need be. So I think in a perfect world, the actual

Re: [Mesa-dev] [PATCH v13 10/36] st/dri: enable DRIimage modifier queries

2017-05-19 Thread Lucas Stach
Am Freitag, den 19.05.2017, 10:37 +0100 schrieb Daniel Stone: > From: Varad Gautam > > introduce modifier field in DRIimage and set it to > DRM_FORMAT_MOD_INVALID for now. support DRIimage modifier > queries. > > Suggested-by: Daniel Stone >

[Mesa-dev] [RFC PATCH 30/65] tgsi: add new Bindless flag to tgsi_instruction_memory

2017-05-19 Thread Samuel Pitoiset
Old-style images are identified using TGSI_FILE_IMAGE, but bindless images can be TGSI_FILE_CONSTANT or TGSI_FILE_TEMPORARY. To avoid backend compilers to be confused, this adds a new flag that will only be set for bindless images. Signed-off-by: Samuel Pitoiset ---

[Mesa-dev] [RFC PATCH 35/65] st/glsl_to_tgsi: teach the DCE pass about bindless samplers/images

2017-05-19 Thread Samuel Pitoiset
When a texture (or an image) instruction uses a bindless sampler (respectively a bindless image), make sure the DCE pass won't remove code when the resource is a temporary variable. Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 15

[Mesa-dev] [RFC PATCH 21/65] mesa: associate uniform storage to bindless samplers/images

2017-05-19 Thread Samuel Pitoiset
When a bindless sampler/image is bound to a texture/image unit, we have to overwrite the constant value by the resident handle directly in the constant buffer before the next draw. One solution is to keep track of a pointer to the data. Signed-off-by: Samuel Pitoiset

[Mesa-dev] [RFC PATCH 23/65] mesa: get rid of a workaround for bindless in _mesa_get_uniform()

2017-05-19 Thread Samuel Pitoiset
The ARB_bindless_texture spec says: "When a sampler or image uniform's value is queried via any of the GetUniform* commands, the returned value will reflect the most recently set value through either UniformHandle* or Uniform1i*, converted to the requested type." Signed-off-by:

[Mesa-dev] [RFC PATCH 09/65] mesa: keep track of the current variable in add_uniform_to_shader

2017-05-19 Thread Samuel Pitoiset
Bindless samplers are considered PROGRAM_UNIFORM but add_uniform_to_shader::visit_field() is based on glsl_type. Because only ir_variable knows if the uniform variable is bindless via ir_variable::bindless, store it instead of adding a new parameter to visit_field(). Signed-off-by: Samuel

[Mesa-dev] [RFC PATCH 16/65] glsl: add ir_variable::is_bindless()

2017-05-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/ir.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h index 91e665cc1b..c816a327c1 100644 --- a/src/compiler/glsl/ir.h +++ b/src/compiler/glsl/ir.h @@

[Mesa-dev] [RFC PATCH 11/65] mesa: add infrastructure for bindless samplers/images bound to units

2017-05-19 Thread Samuel Pitoiset
Yes, ARB_bindless_texture allows to do this. In other words, in a situation like: layout (bindless_sampler) uniform sampler2D tex; The 'tex' sampler uniform can be either set with glUniform1() (old-style bound samplers) or with glUniformHandleui() (resident handles). When glUniform1() is used,

[Mesa-dev] [RFC PATCH 19/65] mesa: update textures for bindless samplers bound to texture units

2017-05-19 Thread Samuel Pitoiset
This is analogous to the existing SamplerUnits and SamplerTargets, but it loops over bindless samplers bound to texture units. Signed-off-by: Samuel Pitoiset --- src/mesa/main/texstate.c | 18 +- src/mesa/main/uniforms.c | 17 - 2 files

[Mesa-dev] [RFC PATCH 15/65] glsl: set the explicit binding value for bindless samplers/images

2017-05-19 Thread Samuel Pitoiset
This handles a situation like: layout (bindless_sampler, binding = 7) uniform sampler2D; Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/link_uniform_initializers.cpp | 35 - 1 file changed, 29 insertions(+), 6 deletions(-) diff --git

[Mesa-dev] [RFC PATCH 13/65] glsl: process uniform images declared bindless

2017-05-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/link_uniforms.cpp | 74 - src/compiler/glsl/shader_cache.cpp | 20 ++ src/mesa/program/program.c | 4 ++ 3 files changed, 89 insertions(+), 9 deletions(-) diff

[Mesa-dev] [RFC PATCH 08/65] mesa: refuse to change tex buffers when a handle is allocated

2017-05-19 Thread Samuel Pitoiset
The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by BufferData if it is called to modify a buffer object bound to a buffer texture while that texture object is referenced by one or more texture handles." Signed-off-by: Samuel Pitoiset

[Mesa-dev] [RFC PATCH 31/65] tgsi/ureg: accept TGSI_FILE_{CONSTANT, INPUT} for dst registers

2017-05-19 Thread Samuel Pitoiset
For example, TGSI_OPCODE_STORE for bindless images might use a constant buffer or a shader input. Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c

[Mesa-dev] [RFC PATCH 14/65] glsl: pass the ir_variable object to set_opaque_binding()

2017-05-19 Thread Samuel Pitoiset
In order to set the explicit binding value for bindless samplers/images. Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/link_uniform_initializers.cpp | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [RFC PATCH 65/65] radeonsi: enable ARB_bindless_texture

2017-05-19 Thread Samuel Pitoiset
This has only been tested on RX480. Signed-off-by: Samuel Pitoiset --- docs/features.txt | 2 +- docs/relnotes/17.2.0.html | 1 + src/gallium/drivers/radeonsi/si_pipe.c | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff

[Mesa-dev] [RFC PATCH 50/65] radeonsi: add si_set_sampler_view_desc() helper

2017-05-19 Thread Samuel Pitoiset
To share some common code between bound and bindless textures. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/radeonsi/si_descriptors.c | 95 +++ 1 file changed, 52 insertions(+), 43 deletions(-) diff --git

[Mesa-dev] [RFC PATCH 60/65] radeonsi: only decompress resident textures/images when used

2017-05-19 Thread Samuel Pitoiset
When current bound shaders don't use any bindless textures or images, we shouldn't try to decompress the resident resources. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/radeonsi/si_blit.c | 12 1 file changed, 8 insertions(+), 4 deletions(-)

[Mesa-dev] [RFC PATCH 25/65] gallium: add ARB_bindless_texture interface

2017-05-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_context.h | 16 1 file changed, 16 insertions(+) diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 4b75386a65..83eb1c9b08 100644 ---

  1   2   3   >