Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Wladimir J. van der Laan
On Fri, Aug 04, 2017 at 06:54:12PM +0200, Philipp Zabel wrote: > On Fri, 2017-08-04 at 18:15 +0200, Wladimir J. van der Laan wrote: > > On Fri, Aug 04, 2017 at 05:07:54PM +0200, Philipp Zabel wrote: > > > Look up BOs from the name table using the name parameter instead of > > > req.handle (which at

Re: [Mesa-dev] [PATCH 21/30] i965/screen: Use ISL for doing image import checks

2017-08-04 Thread Jason Ekstrand
On Fri, Aug 4, 2017 at 2:16 AM, Rainer Hochecker wrote: > This seems to breaks exporting 16bit vaapi images via drm buffers > Yes, I'm aware of the problem and there are two patches on the list which should fix it: https://patchwork.freedesktop.org/patch/170051/ https://patchwork.freedesktop.or

[Mesa-dev] [PATCH shader-db 1/1] shaders: Add Dolphin’s übershaders

2017-08-04 Thread Emmanuel Gil Peyrot
These shaders have been generated by Dolphin 9649494f67 on Mesa 8c26b52349 for an HD4000 GPU. They include a lot of uniform branches, mostly on integers, as well as switch statements branching on small and bounded integers. Signed-off-by: Emmanuel Gil Peyrot --- The actual patch isn’t included

Re: [Mesa-dev] [PATCH v5 2/2] i965: Queue the buffer with a sync fence for Android OS

2017-08-04 Thread Tomasz Figa
Hi Yogesh, On Sat, Aug 5, 2017 at 1:22 AM, Marathe, Yogesh wrote: >> -Original Message- >> From: Tomasz Figa [mailto:tf...@chromium.org] >> Sent: Friday, August 4, 2017 9:39 PM >> On Sat, Aug 5, 2017 at 12:53 AM, Marathe, Yogesh >> wrote: >> > Tomasz, Emil, >> > >> >> -Original Messa

Re: [Mesa-dev] [PATCH] radv: avoid GPU hangs if someone does a resolve with non-multisample src (v2)

2017-08-04 Thread Dave Airlie
On 4 August 2017 at 18:53, Nicolai Hähnle wrote: > On 04.08.2017 04:51, Dave Airlie wrote: >> >> From: Dave Airlie >> >> This is a bug in the app, but I'd rather avoid hanging the GPU, >> esp if someone is running in validation and it takes out their >> development environment. >> >> v2: get it r

Re: [Mesa-dev] [PATCH 21/30] i965/screen: Use ISL for doing image import checks

2017-08-04 Thread Rainer Hochecker
This seems to breaks exporting 16bit vaapi images via drm buffers ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 8/8] egl/drm: rename dri2_drm_create_surface()

2017-08-04 Thread Emil Velikov
On 5 August 2017 at 00:25, Emil Velikov wrote: > From: Emil Velikov > > The function can handle only window surfaces, so let's rename it > accordingly, killing the wrapper around it. > > Suggested-by: Eric Engestrom > Signed-off-by: Emil Velikov > --- > New patch > --- > src/egl/drivers/dri2/p

Re: [Mesa-dev] No reloc for i965

2017-08-04 Thread Kenneth Graunke
On Friday, August 4, 2017 12:22:19 PM PDT Chris Wilson wrote: > Quoting Kenneth Graunke (2017-08-04 19:47:14) > > On Friday, July 21, 2017 8:36:42 AM PDT Chris Wilson wrote: > > > Patch reordering from last time so that the cosmetic tweaks are done first > > > and out of the way. Kenneth has review

Re: [Mesa-dev] [PATCH] intel/genxml: Fix gen10 BLEND_STATE variable length packing

2017-08-04 Thread Rafael Antognolli
Oh, I saw it had the old xml and was assuming it didn't cause any errors, but clearly I was wrong. Reviewed-by: Rafael Antognolli On Fri, Aug 04, 2017 at 10:21:43PM +, Scott D Phillips wrote: > BLEND_STATE packing was modified to be variable-length in: > > 9670124e31 genxml: Make BLEND_STA

Re: [Mesa-dev] [PATCH 1/3] loader: rework xmlconfig dependency

2017-08-04 Thread Emil Velikov
On 4 August 2017 at 23:08, Dieter Nützel wrote: > For the series: > > Tested-by: Dieter Nützel > > on RX580 > > with Clover, vdpau and Nine. > > ./autogen.sh --prefix=/usr/local --with-dri-drivers="" > --with-gallium-drivers=r600,radeonsi,swrast --with-platforms=drm,x11 > --enable-nine --enable-t

[Mesa-dev] [PATCH 3/8] egl: handle BAD_NATIVE_PIXMAP further up the stack

2017-08-04 Thread Emil Velikov
From: Emil Velikov The basic (null) check is identical across all backends. Just move it to the top. v2: - Split the WINDOW vs PIXMAP into separate patches - Move check after the dpy and config - dEQP expects so Cc: Eric Engestrom Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platfo

[Mesa-dev] [PATCH 6/8] egl/x11: pass NULL instead of XCB_WINDOW_NONE as native_surface

2017-08-04 Thread Emil Velikov
From: Emil Velikov Signed-off-by: Emil Velikov Reviewed-by: Matt Turner --- src/egl/drivers/dri2/platform_x11.c | 2 +- src/egl/drivers/dri2/platform_x11_dri3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dr

[Mesa-dev] [PATCH 8/8] egl/drm: rename dri2_drm_create_surface()

2017-08-04 Thread Emil Velikov
From: Emil Velikov The function can handle only window surfaces, so let's rename it accordingly, killing the wrapper around it. Suggested-by: Eric Engestrom Signed-off-by: Emil Velikov --- New patch --- src/egl/drivers/dri2/platform_drm.c | 17 - 1 file changed, 4 insertions(+

[Mesa-dev] [PATCH 2/8] egl: drop unreachable BAD_NATIVE_WINDOW conditions

2017-08-04 Thread Emil Velikov
From: Emil Velikov The code in _eglCreatePixmapSurfaceCommon() already has a NULL check which handles the condition. There's no point in checkin again further down the stack. v2: Split the WINDOW vs PIXMAP into separate patches Cc: Eric Engestrom Signed-off-by: Emil Velikov --- src/egl/drive

[Mesa-dev] [PATCH 5/8] egl: Clean up native_type vs drawable mess

2017-08-04 Thread Emil Velikov
From: Matt Turner The next patch is going to stop passing XCB_WINDOW_NONE (of type xcb_window_enum_t) as an argument where these functions expect a void *, which clang does not appreciate. This patch cleans things up to better convince me and reviewers that it's safe to do that. v2: Emil Veliko

[Mesa-dev] [PATCH 4/8] egl: rework input validation order in _eglCreateWindowSurfaceCommon

2017-08-04 Thread Emil Velikov
From: Emil Velikov As mentioned in previous commit the negative tests in dEQP expect the arguments to be evaluated in particular order. Namely - first the dpy, then the config, followed by the surface/window. Move the check further down or executing the test below will produce the following err

[Mesa-dev] [PATCH 7/8] egl/drm: remove unreachable code in dri2_drm_create_surface()

2017-08-04 Thread Emil Velikov
From: Emil Velikov The function can be called only when the type is EGL_WINDOW_BIT. Remove the unneeded switch statement. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_drm.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/egl/driver

[Mesa-dev] [PATCH 1/8] egl: add dri2_setup_swap_interval helper

2017-08-04 Thread Emil Velikov
From: Emil Velikov The current two implementations - X11 and Wayland were identical, barrind the upper limit. Instead of having same code twice - introduce a helper and pass the limit as an argument. Thus as Android/DRM/others get support - they only need to call the function ;-) v2: Rebase on

[Mesa-dev] [PATCH] intel/genxml: Fix gen10 BLEND_STATE variable length packing

2017-08-04 Thread Scott D Phillips
BLEND_STATE packing was modified to be variable-length in: 9670124e31 genxml: Make BLEND_STATE command support variable length array. The initial gen10.xml still had the old, fixed-length style definition for BLEND_STATE. So gen10_upload_blend_state would overwrite the packed BLEND_STATE_ENTRYs

Re: [Mesa-dev] [PATCH 1/3] loader: rework xmlconfig dependency

2017-08-04 Thread Dieter Nützel
For the series: Tested-by: Dieter Nützel on RX580 with Clover, vdpau and Nine. ./autogen.sh --prefix=/usr/local --with-dri-drivers="" --with-gallium-drivers=r600,radeonsi,swrast --with-platforms=drm,x11 --enable-nine --enable-texture-float --enable-opencl --with-vulkan-drivers=radeon Die

Re: [Mesa-dev] [PATCH 10/12] egl/drm: remove unreachable code in dri2_drm_create_surface()

2017-08-04 Thread Emil Velikov
On 4 August 2017 at 11:03, Eric Engestrom wrote: > On Thursday, 2017-08-03 19:29:36 +0100, Emil Velikov wrote: >> From: Emil Velikov >> >> The function can be called only when the type is EGL_WINDOW_BIT. >> Remove the unneeded switch statement. > > I take it we plan on never supporting pbuffers o

Re: [Mesa-dev] [PATCH 08/11] i965/miptree: Call alloc_aux in create_for_bo

2017-08-04 Thread Jordan Justen
On 2017-08-02 13:35:33, Jason Ekstrand wrote: > Originally, I had moved it to the caller to make some things easier when > adding the CCS modifier. However, this broke DRI2 because > intel_process_dri2_buffer calls intel_miptree_create_for_bo but never > calls intel_miptree_alloc_aux. Also, in hi

[Mesa-dev] [PATCH 01/12] i965: Only put external handles into the handle ht

2017-08-04 Thread Chris Wilson
--- src/mesa/drivers/dri/i965/brw_bufmgr.c | 36 +++--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index e1036f25a4..844ccaf1e5 100644 --- a/src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH 04/12] i965: Replace open-coded gen6 queryobj offsets with simple helpers

2017-08-04 Thread Chris Wilson
Lots of places open-coded the assumed layout of the predicate/results within the query object, replace those with simple helpers. v2: Fix function decl style. Signed-off-by: Chris Wilson Cc: Kenneth Graunke Cc: Matt Turner --- src/mesa/drivers/dri/i965/brw_conditional_render.c | 10 --

[Mesa-dev] [PATCH 06/12] i965: Use snoop bo for accessing query results on !llc

2017-08-04 Thread Chris Wilson
Ony non-llc architectures where we are primarily reading back the results of the GPU queries, then we can improve performance by using a cacheable mapping of the results. Unfortunately, enabling snooping makes the writes from the GPU slower, which may adversely affect pipelined query operations (wh

[Mesa-dev] [PATCH 08/12] i965: Pack simple pipelined query objects into the same buffer

2017-08-04 Thread Chris Wilson
Reuse the same query object buffer for multiple queries within the same batch. A task for the future is propagating the GL_NO_MEMORY errors. Signed-off-by: Chris Wilson Cc: Kenneth Graunke Cc: Matt Turner --- src/mesa/drivers/dri/i965/brw_context.c | 4 +++ src/mesa/drivers/dri/i965/brw_co

[Mesa-dev] [PATCH 05/12] i965: Map the query results for the life of the bo

2017-08-04 Thread Chris Wilson
If we map the bo upon creation, we can avoid the latency of mmapping it when querying, and later use the asynchronous, persistent map of the predicate to do a quick query. v2: Inline the wait on results; it disappears shortly in the next few patches. Signed-off-by: Chris Wilson Cc: Kenneth Graun

[Mesa-dev] [PATCH 07/12] i965: Use 'available' fence for polling query results

2017-08-04 Thread Chris Wilson
If we always write the 'available' flag after writing the final result of the query, we can probe that predicate to quickly query whether the result is ready from userspace. The primary advantage of checking the predicate is that it allows for more fine-grained queries, we do not have to wait for t

Re: [Mesa-dev] [PATCH 01/11] intel/isl: Stop padding surfaces

2017-08-04 Thread Jordan Justen
Reviewed-by: Jordan Justen On 2017-08-02 13:35:26, Jason Ekstrand wrote: > The docs contain a bunch of commentary about the need to pad various > surfaces out to multiples of something or other. However, all of those > requirements are about avoiding GTT errors due to missing pages when the > da

[Mesa-dev] [PATCH 02/12] i965: Check last known busy status on bo before asking the kernel

2017-08-04 Thread Chris Wilson
If we know the bo is idle (that is we have no submitted a command buffer referencing this bo since the last query) we can skip asking the kernel. Note this may report a false negative if the target is being shared between processes (exported via dmabuf or flink). To allow the caller control over us

[Mesa-dev] [PATCH 11/12] i965: Use snooping for mapping the miptree

2017-08-04 Thread Chris Wilson
Avoid having to clflush after blitting the miptree to a linear buffer for mapping by enabling snooping on !llc and treating the buffer as coherent. Similarly, it avoids the clflush afterwards if used for READ | WRITE. --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 17 +++-- 1 file

[Mesa-dev] [PATCH 09/12] i965: Pass consistent args along gen6_queryobj.c

2017-08-04 Thread Chris Wilson
Be consistent in passing along brw_context rather than switching between that and gl_context. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/gen6_queryobj.c | 32 ++- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 03/12] i965: Replace hard-coded indices with const named variables in gen6_queryobj

2017-08-04 Thread Chris Wilson
To simplify replacement later, replace repeated use of explicit 0/1 with local variables of the same value. Signed-off-by: Chris Wilson Cc: Kenneth Graunke Cc: Matt Turner --- src/mesa/drivers/dri/i965/gen6_queryobj.c | 30 -- 1 file changed, 16 insertions(+), 14 de

[Mesa-dev] [PATCH 12/12] i965: Prefer to use the GPU copy if we need to stall for reads

2017-08-04 Thread Chris Wilson
If we need to stall to read the bo, ask the GPU to copy it into the CPU cache whilst we wait. --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 10/12] i965: Set query->flush after flushing the query

2017-08-04 Thread Chris Wilson
Skip the next check for brw_batch_references() by recording when we flush the query. --- src/mesa/drivers/dri/i965/gen6_queryobj.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c i

Re: [Mesa-dev] No reloc for i965

2017-08-04 Thread Chris Wilson
Quoting Kenneth Graunke (2017-08-04 19:47:14) > On Friday, July 21, 2017 8:36:42 AM PDT Chris Wilson wrote: > > Patch reordering from last time so that the cosmetic tweaks are done first > > and out of the way. Kenneth has reviewed the core NO_RELOC patches, so > > hopefully it doesn't look too bad

Re: [Mesa-dev] [PATCH 01/11] intel/isl: Stop padding surfaces

2017-08-04 Thread Jason Ekstrand
Ken and I had a fairly lengthy conversation about this on IRC today: https://people.freedesktop.org/~jekstrand/isl-padding The conclusion was that we both hate the patch but it's probably safe and it does fix bugs. The thing that really wins me over is that we have historically done none of this

Re: [Mesa-dev] [PATCH v5 2/2] i965: Queue the buffer with a sync fence for Android OS

2017-08-04 Thread Emil Velikov
On 4 August 2017 at 14:23, Tomasz Figa wrote: > > If this needs so complicated series of checks, maybe it would make > more sense to just set enable_out_fence based on availability of the > capability at initialization time? > Either way is fine with me. >> Did you drop it all together or change

Re: [Mesa-dev] [PATCH 0/8 v2] A few clover fixes for both CTS and eventual 1.2 support

2017-08-04 Thread Jan Vesely
Hi, I went through most of the series. I think the approach is OK. The biggest issue I had is with the sequence: 1.) add an interface 2.) implement a feature 3.) change the interface I gave my rb to 1 and 2, but you might want to consider changing them as well, if returning int from the functions

Re: [Mesa-dev] No reloc for i965

2017-08-04 Thread Kenneth Graunke
On Friday, July 21, 2017 8:36:42 AM PDT Chris Wilson wrote: > Patch reordering from last time so that the cosmetic tweaks are done first > and out of the way. Kenneth has reviewed the core NO_RELOC patches, so > hopefully it doesn't look too bad and we can land at least as far as > there (patch 8/1

Re: [Mesa-dev] [PATCH 8/8] clover/llvm: Make __OPENCL_VERSION__ dynamic

2017-08-04 Thread Jan Vesely
On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote: > Signed-off-by: Aaron Watry > CC: Jan Vesely > > v2: base it on the device version > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_t

Re: [Mesa-dev] [PATCH 1/3] loader: rework xmlconfig dependency

2017-08-04 Thread Nicolai Hähnle
On 04.08.2017 20:18, Emil Velikov wrote: From: Emil Velikov Currently xmlconfig is conditionally used, only when --enable-dri is available. As the library has moved to src/util and has wider wisebase, this guard is no longer correct. Strictly speaking - it wasn't since the introduction of xmlc

Re: [Mesa-dev] [PATCH 5/8] clover/llvm: Use device in llvm compilation instead of copying fields

2017-08-04 Thread Jan Vesely
On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote: > Copying the individual fields from the device when compiling/linking > will lead to an unnecessarily large number of fields getting passed > around. > > Signed-off-by: Aaron Watry > Cc: Jan Vesey I think this should be patch 3/8. It looks

Re: [Mesa-dev] [PATCH 4/8] clover/llvm: Use -cl-std and device version to select language defaults

2017-08-04 Thread Jan Vesely
On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote: > According to section 5.8.4.5 of the 2.0 spec, the CL C version is chosen by: > 1) If you have -cl-std=CL1.1+ use the version specified > 2) If not, use the highest 1.x version that the device supports > > Curiously, there is no valid value

Re: [Mesa-dev] [PATCH] loader: always include libxmlconfig on autotools build

2017-08-04 Thread Emil Velikov
On 4 August 2017 at 10:53, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > This aligns with the fact that we also check for EXPAT_LIBS > unconditionally in configure.ac now. It should make all the > various build permutations of Clover work (whether DRI is > enabled or disabled in the build). >

[Mesa-dev] [PATCH 3/3] WIP: loader: android: allow using of xmlconfig

2017-08-04 Thread Emil Velikov
From: Emil Velikov Brings the Android binaries on par with Autoconf, allowing users to select their GPU via device_id. Signed-off-by: Emil Velikov --- Completely untested. Posting if anyone is interested if polishing it up. --- src/loader/Android.mk | 3 +++ 1 file changed, 3 insertions(+) di

[Mesa-dev] [PATCH 2/3] WIP: loader: scons: allow using of xmlconfig on supported platforms

2017-08-04 Thread Emil Velikov
From: Emil Velikov Brings the SCons binaries on par with Autoconf, allowing users to select their GPU via device_id. Signed-off-by: Emil Velikov --- Completely untested. Posting if anyone is interested if polishing it up. --- src/loader/SConscript | 4 1 file changed, 4 insertions(+) dif

[Mesa-dev] [PATCH 1/3] loader: rework xmlconfig dependency

2017-08-04 Thread Emil Velikov
From: Emil Velikov Currently xmlconfig is conditionally used, only when --enable-dri is available. As the library has moved to src/util and has wider wisebase, this guard is no longer correct. Strictly speaking - it wasn't since the introduction of xmlconfig into st/nine a while ago. Unconditio

Re: [Mesa-dev] [PATCH 3/8] clover: Add device_clc_version to llvm::[compile|link]_program

2017-08-04 Thread Jan Vesely
On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote: > We'll be using it to select the default language version soon. > > Signed-off-by: Aaron Watry > Cc: Pierre Moreau > Cc: Jan Vesely > > v2: (Pierre) Move changes to create_compiler_instance invocation to correct > patch to prevent temp

Re: [Mesa-dev] [PATCH 2/8] clover: Add device_clc_version to device.[hc]pp

2017-08-04 Thread Jan Vesely
On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote: > device_version and device_clc_version are not necessarily the same for > devices that support CL 1.0, but have a 1.1 compiler and the necessary > extensions. > > CC: Jan Vesey I think you might consider squashing 1/8 and 2/8. squashed or no

Re: [Mesa-dev] [PATCH 1/8] clover/device: Move device version into core/device.cpp

2017-08-04 Thread Jan Vesely
On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote: > The device version is the maximum CL version that the device supports. > > Eventually, this will be based on the features/extensions of the actual > device, but for now move it a bit closer to its eventual destination. > > Signed-off-by: Aar

[Mesa-dev] [PATCH 24/25] i965: Mark brw_hw_type_to_reg_type() as a pure function

2017-08-04 Thread Matt Turner
textdata bss dec hex filename 7816886 346248 420496 8583630 82f9ce i965_dri.so before 7816214 346248 420496 8582958 82f72e i965_dri.so after --- src/intel/compiler/brw_reg_type.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/

[Mesa-dev] [PATCH 22/25] i965: Stop using hardware register types directly

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_disasm.c | 47 - src/intel/compiler/brw_eu_validate.c | 196 --- src/intel/compiler/brw_reg_type.c| 17 +-- src/intel/compiler/brw_reg_type.h| 11 +- 4 files changed, 113 insertions(+), 158 deletions(-) diff --git

[Mesa-dev] [PATCH 25/25] i965: Optimize reading the destination type

2017-08-04 Thread Matt Turner
brw_hw_type_to_reg_type() needs to know only whether the file is BRW_IMMEDIATE_VALUE or not, which is not a valid file for the destination. gcc and clang will evaluate __builtin_strcmp() at compile time, so we can use it to pass a constant file for the destination. textdata bss dec

[Mesa-dev] [PATCH 23/25] i965: Hide the register type hardware encodings

2017-08-04 Thread Matt Turner
So we stop mixing them with the logical enum. --- src/intel/compiler/brw_eu_defines.h | 31 --- src/intel/compiler/brw_reg_type.c | 31 +++ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/intel/compiler/brw_eu_defines.h

[Mesa-dev] [PATCH 20/25] i965: Move brw_reg_type_letters() as well

2017-08-04 Thread Matt Turner
And add "to_" to the name for consistency with the other functions in this file. --- src/intel/compiler/brw_eu.c | 28 src/intel/compiler/brw_fs.cpp | 4 ++-- src/intel/compiler/brw_reg.h | 1 - src/intel/compiler/brw_reg_type.c | 30 ++

[Mesa-dev] [PATCH 21/25] i965: Add brw_hw_reg_type_to_letters() and use it in brw_disasm.c

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_disasm.c | 72 ++- src/intel/compiler/brw_reg_type.c | 8 + src/intel/compiler/brw_reg_type.h | 4 +++ 3 files changed, 45 insertions(+), 39 deletions(-) diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_di

[Mesa-dev] [PATCH 19/25] i965: Switch to using the logical register types

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_eu_compact.c | 27 --- src/intel/compiler/brw_eu_emit.c| 13 +++-- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/intel/compiler/brw_eu_compact.c b/src/intel/compiler/brw_eu_compact.c index 743ee9519c..7674aa8b85

[Mesa-dev] [PATCH 17/25] i965: Rename brw_inst's functions that access the register type

2017-08-04 Thread Matt Turner
Put hw_ in the name so that it's clear these are the hardware encodings. --- src/intel/compiler/brw_disasm.c | 22 src/intel/compiler/brw_eu_compact.c | 22 src/intel/compiler/brw_eu_emit.c| 18 +++ src/intel/compiler/brw_eu_validate.c| 28 +-

[Mesa-dev] [PATCH 18/25] i965: Add functions to abstract access to register types

2017-08-04 Thread Matt Turner
Previously the brw_inst{,_set}_{dst,src0,src1}_reg_type() functions provided access to the hardware encodings for the register types. We often mixed these with the logical BRW_REGISTER_TYPE_* enums (which themselves used to be the hardware format!) with bad results. With that functionality now ava

[Mesa-dev] [PATCH 15/25] i965: Add a brw_hw_type_to_reg_type() function

2017-08-04 Thread Matt Turner
Will be used in later commits. --- src/intel/compiler/brw_reg_type.c | 25 + src/intel/compiler/brw_reg_type.h | 4 2 files changed, 29 insertions(+) diff --git a/src/intel/compiler/brw_reg_type.c b/src/intel/compiler/brw_reg_type.c index b0696570e5..8da93ae1cb 1006

[Mesa-dev] [PATCH 16/25] i965: Index brw_hw_reg_type_to_size()'s table by logical type

2017-08-04 Thread Matt Turner
I'll be transitioning everything to use the logical types. --- src/intel/compiler/brw_reg_type.c | 58 +-- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/src/intel/compiler/brw_reg_type.c b/src/intel/compiler/brw_reg_type.c index 8da93ae1cb..85

[Mesa-dev] [PATCH 13/25] i965: Extract functions dealing with register types to separate file

2017-08-04 Thread Matt Turner
I'm going to encapsulate all of the logic dealing with register types in this file. Rename the parameters for the hardware encodings from type -> hw_type at the same time. --- src/intel/Makefile.sources| 2 + src/intel/compiler/brw_eu_emit.c | 102 -- src/in

[Mesa-dev] [PATCH 14/25] i965: Use a common table to translate logical to hardware types

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_reg_type.c | 65 +-- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/src/intel/compiler/brw_reg_type.c b/src/intel/compiler/brw_reg_type.c index 8aac0ca009..b0696570e5 100644 --- a/src/intel/compiler/brw_reg_type.c +++

[Mesa-dev] [PATCH 12/25] i965: Reverse file/type arguments to register type functions

2017-08-04 Thread Matt Turner
I think of the initial arguments as "state" and the last as the actual subject. --- src/intel/compiler/brw_disasm.c | 4 ++-- src/intel/compiler/brw_eu_emit.c | 14 -- src/intel/compiler/brw_eu_validate.c | 2 +- src/intel/compiler/brw_reg.h | 8 4 files ch

[Mesa-dev] [PATCH 11/25] i965: Add support for disassembling 64-bit integer immediates

2017-08-04 Thread Matt Turner
After the last patch converted things into enums, I helpfully got a compiler warning about these missing from the switch statement. --- src/intel/compiler/brw_disasm.c | 6 ++ src/intel/compiler/brw_inst.h | 7 +++ 2 files changed, 13 insertions(+) diff --git a/src/intel/compiler/brw_di

[Mesa-dev] [PATCH 07/25] i965: Don't let raw-move check be tricked by immediate vector types

2017-08-04 Thread Matt Turner
UB and B type encodings are the same as UV and VF. Noticed when writing the following patch. --- src/intel/compiler/brw_eu_validate.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c inde

[Mesa-dev] [PATCH 10/25] i965: Use separate enums for register vs immediate types

2017-08-04 Thread Matt Turner
The hardware encodings often mean different things depending on whether the source is an immediate. --- src/intel/compiler/brw_disasm.c | 46 --- src/intel/compiler/brw_eu_compact.c | 8 +-- src/intel/compiler/brw_eu_defines.h | 48 +-- src/intel/compiler/brw_eu_

[Mesa-dev] [PATCH 09/25] i965: Reorder brw_reg_type enum values

2017-08-04 Thread Matt Turner
These vaguely corresponded to the hardware encodings, but that is purely historical at this point. Reorder them so we stop making things "almost work" when mixing enums. The ordering has been closen so that no enum value is the same as a compatible hardware encoding. --- src/intel/compiler/brw_eu

[Mesa-dev] [PATCH 06/25] i965: Only change type of 0.0f to VF if destination stride == 1

2017-08-04 Thread Matt Turner
The destination stride must be equivalent to a dword if VF is used. Also, since the only compaction table entires with "i:vf" have the destination as "r:f" specifically check that the destination is of type float. --- src/intel/compiler/brw_eu_compact.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Mesa-dev] [PATCH 05/25] i965: Remove CONT/BREAK from instruction compaction test

2017-08-04 Thread Matt Turner
These cannot be compacted. A similar mistake was fixed in commit 90eaf01616a8 --- src/intel/compiler/test_eu_compact.cpp | 4 1 file changed, 4 deletions(-) diff --git a/src/intel/compiler/test_eu_compact.cpp b/src/intel/compiler/test_eu_compact.cpp index 668a972bfa..1532e3b984 100644 --- a

[Mesa-dev] [PATCH 08/25] i965: Validate destination restrictions with vector immediates

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_eu_emit.c| 13 +- src/intel/compiler/brw_eu_validate.c| 61 + src/intel/compiler/test_eu_validate.cpp | 79 + 3 files changed, 141 insertions(+), 12 deletions(-) diff --git a/src/intel/compiler/brw_

[Mesa-dev] [PATCH 04/25] i965: Test instruction compaction on all supported Gens

2017-08-04 Thread Matt Turner
Note that there's no point in testing on G45, since its compaction is the same as Gen5. Same logic applies to Gen7 variants and low-power parts. --- src/intel/compiler/test_eu_compact.cpp | 50 -- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/src/in

[Mesa-dev] [PATCH 01/25] i965: Mark src inst pointer const in compaction code

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_eu.h | 2 +- src/intel/compiler/brw_eu_compact.c | 23 --- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index a3a9c63239..8e597b212a 100644 --- a/src/intel/compiler

[Mesa-dev] [PATCH 00/25] i965: Switch to always using logical register types

2017-08-04 Thread Matt Turner
The mixture of hardware encodings and logical types has caused lots of confusion. It's time to fix that. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 03/25] i965: Silence signed/unsigned comparison warning

2017-08-04 Thread Matt Turner
--- src/intel/compiler/test_eu_compact.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/test_eu_compact.cpp b/src/intel/compiler/test_eu_compact.cpp index 39e7f1a27c..1ef7e5ae7f 100644 --- a/src/intel/compiler/test_eu_compact.cpp +++ b/src/intel/compiler/

[Mesa-dev] [PATCH 02/25] i965: Move compaction "prepass" into brw_eu_compact.c

2017-08-04 Thread Matt Turner
--- src/intel/compiler/brw_eu_compact.c | 82 - src/intel/compiler/brw_eu_emit.c| 72 +--- 2 files changed, 82 insertions(+), 72 deletions(-) diff --git a/src/intel/compiler/brw_eu_compact.c b/src/intel/compiler/brw_eu_compact.c

[Mesa-dev] [PATCH v3 7/8] anv: Use DRM sync objects for external semaphores when available

2017-08-04 Thread Jason Ekstrand
--- src/intel/vulkan/anv_batch_chain.c | 59 +++ src/intel/vulkan/anv_device.c | 1 + src/intel/vulkan/anv_private.h | 8 src/intel/vulkan/anv_queue.c | 83 +++--- 4 files changed, 128 insertions(+), 23 deletions(-) dif

[Mesa-dev] [PATCH v3 8/8] anv: Advertise VK_KHR_external_semaphore

2017-08-04 Thread Jason Ekstrand
--- src/intel/vulkan/anv_extensions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py index 00186bc..3252e0f 100644 --- a/src/intel/vulkan/anv_extensions.py +++ b/src/intel/vulkan/anv_extensions.py

[Mesa-dev] [PATCH v3 6/8] anv/gem: Add a drm syncobj support

2017-08-04 Thread Jason Ekstrand
--- src/intel/vulkan/anv_gem.c | 52 src/intel/vulkan/anv_gem_stubs.c | 24 +++ src/intel/vulkan/anv_private.h | 4 3 files changed, 80 insertions(+) diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index 5

[Mesa-dev] [PATCH v3 3/8] anv/gem: Use EXECBUFFER2_WR when the FENCE_OUT flag is set

2017-08-04 Thread Jason Ekstrand
Reviewed-by: Chad Versace --- src/intel/vulkan/anv_gem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index ac47da4..36692f5 100644 --- a/src/intel/vulkan/anv_gem.c +++ b/src/intel/vulkan/anv_gem.c @@ -185,7 +185,1

[Mesa-dev] [PATCH v3 5/8] intel/drm: Pull in the i916 fence array API

2017-08-04 Thread Jason Ekstrand
--- include/drm-uapi/i915_drm.h | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h index c26bf7c..338c8c2 100644 --- a/include/drm-uapi/i915_drm.h +++ b/include/drm-uapi/i915_drm.h @@ -431,6

[Mesa-dev] [PATCH v3 4/8] anv: Implement support for exporting semaphores as FENCE_FD

2017-08-04 Thread Jason Ekstrand
--- src/intel/vulkan/anv_batch_chain.c | 57 +-- src/intel/vulkan/anv_device.c | 1 + src/intel/vulkan/anv_gem.c | 36 src/intel/vulkan/anv_private.h | 23 + src/intel/vulkan/anv_queue.c | 69 +

[Mesa-dev] [PATCH v3 2/8] anv: Submit a dummy batch when only semaphores are provided.

2017-08-04 Thread Jason Ekstrand
Vulkan allows you to do a submit whose only job is to wait on and trigger semaphores. The easiest way for us to support that right now is to insert a dummy execbuf. --- src/intel/vulkan/anv_batch_chain.c | 28 +--- src/intel/vulkan/anv_device.c | 30 ++

[Mesa-dev] [PATCH v3 1/8] anv: Add a basic implementation of VK_KHX_external_semaphore

2017-08-04 Thread Jason Ekstrand
This patch adds an implementation based on DRM BOs. We don't actually advertise the extension yet because we want to add a couple more paths first. --- src/intel/vulkan/anv_batch_chain.c | 31 +++- src/intel/vulkan/anv_extensions.py | 3 + src/intel/vulkan/anv_private.h | 3 + src/in

[Mesa-dev] [PATCH v3 0/8] anv: Implement VK_KHR_external_semaphore

2017-08-04 Thread Jason Ekstrand
This series is a quick re-spin of the v2 sent yesterday to address review feedback from Chris. In particular, we now set EXEC_ASYNC on the trivial batch and I deleted the syncobj cache. Somehow, when I was working on this yesterday, I got it into my head that the kernel deduplicates syncobj handl

[Mesa-dev] [PATCH] docs: removed the '--with-sha1' requirement from shading.html

2017-08-04 Thread Eleni Maria Stea
The configuration option --with-sha1 is no longer required for the MESA_SHADER_READ_PATH, MESA_SHADER_DUMP_PATH environment variables to take effect. 1- removed the "--with-sha1" sentence from docs/shading.html 2- added an extra note: that the corresponding dumped and replacement shaders must have

Re: [Mesa-dev] [PATCH 09/12] egl/x11: pass NULL instead of XCB_WINDOW_NONE as native_surface

2017-08-04 Thread Matt Turner
Thanks. I wrote the same patch some time ago, but never had a chance to send it out. I'll send you another patch that I wrote to clear up some of this confusion. I put it in my series immediately before this patch. Feel free to add it to yours. Reviewed-by: Matt Turner ___

[Mesa-dev] [PATCH] egl: Clean up native_type vs drawable mess

2017-08-04 Thread Matt Turner
The next patch is going to stop passing XCB_WINDOW_NONE (of type xcb_window_enum_t) as an argument where these functions expect a void *, which clang does not appreciate. This patch cleans things up to better convince me and reviewers that it's safe to do that. --- src/egl/drivers/dri2/platform_x

[Mesa-dev] [Bug 102038] assertion failure in update_framebuffer_size

2017-08-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=102038 --- Comment #2 from Brian Paul --- Hmm, swr isn't working at all for me. It's hanging in a swr_fence_finish() call with everything I've tried. Even glxinfo hangs (but elsewhere). Maybe one of the swr developers can take a look. -- You are r

[Mesa-dev] [Bug 102038] assertion failure in update_framebuffer_size

2017-08-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=102038 --- Comment #1 from Brian Paul --- Sorry for the breakage, Brad. I'll try to investigate ASAP, but I'm about to leave town for a week. I can't repro with llmvpipe, fwiw. I suspect it may be an issue in the swr driver. I'm building it now, bu

Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Philipp Zabel
On Fri, 2017-08-04 at 18:15 +0200, Wladimir J. van der Laan wrote: > On Fri, Aug 04, 2017 at 05:07:54PM +0200, Philipp Zabel wrote: > > Look up BOs from the name table using the name parameter instead of > > req.handle (which at this point is always zero). > > Good catch. > > Just out of interest

Re: [Mesa-dev] [PATCH v2 8/9] anv: Use DRM sync objects for external semaphores when available

2017-08-04 Thread Jason Ekstrand
On Fri, Aug 4, 2017 at 2:03 AM, Chris Wilson wrote: > Quoting Jason Ekstrand (2017-08-04 02:25:27) > > @@ -1497,6 +1569,12 @@ anv_cmd_buffer_execbuf(struct anv_device *device, > >setup_empty_execbuf(&execbuf, device); > > } > > > > + if (execbuf.fence_count > 0) { > > For sanity, si

Re: [Mesa-dev] [PATCH v2 7/9] anv/allocator: Add a syncobj cache

2017-08-04 Thread Jason Ekstrand
On Fri, Aug 4, 2017 at 1:59 AM, Chris Wilson wrote: > Quoting Jason Ekstrand (2017-08-04 02:25:26) > > This is mostly a copy+paste of the BO cache but it's a bit simpler > > because syncobjs don't have actual backing storage so we don't need to > > check sizes or anything like that. Also, we put

Re: [Mesa-dev] [PATCH 1/5] clover/memory: Copy data when creating buffers with CL_MEM_USE_HOST_PTR

2017-08-04 Thread Grigori Goronzy
On 2017-08-03 22:26, Alex Deucher wrote: IIRC, user_ptrs require page alignment. Alex I didn't follow the whole discussion (sorry if I'm saying something redundant), but AMD's older OpenCL Optimization Guide [1] has some notes regarding the implementation of the USE_HOST_PTR flag. It initi

Re: [Mesa-dev] [PATCH v5 2/2] i965: Queue the buffer with a sync fence for Android OS

2017-08-04 Thread Marathe, Yogesh
> -Original Message- > From: Tomasz Figa [mailto:tf...@chromium.org] > Sent: Friday, August 4, 2017 9:39 PM > On Sat, Aug 5, 2017 at 12:53 AM, Marathe, Yogesh > wrote: > > Tomasz, Emil, > > > >> -Original Message- > >> From: Tomasz Figa [mailto:tf...@chromium.org] > >> On Fri, Aug

Re: [Mesa-dev] [PATCH v2 2/9] anv: Submit a dummy batch when only semaphores are provided.

2017-08-04 Thread Jason Ekstrand
On Fri, Aug 4, 2017 at 1:43 AM, Chris Wilson wrote: > Quoting Jason Ekstrand (2017-08-04 02:25:21) > > Vulkan allows you to do a submit whose only job is to wait on and > > trigger semaphores. The easiest way for us to support that right > > now is to insert a dummy execbuf. > > --- > > diff --g

Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Wladimir J. van der Laan
On Fri, Aug 04, 2017 at 05:07:54PM +0200, Philipp Zabel wrote: > Look up BOs from the name table using the name parameter instead of > req.handle (which at this point is always zero). Good catch. Just out of interest: when is this used, what problems does this cause? Regards, Wladimir __

Re: [Mesa-dev] [PATCH v5 2/2] i965: Queue the buffer with a sync fence for Android OS

2017-08-04 Thread Tomasz Figa
On Sat, Aug 5, 2017 at 12:53 AM, Marathe, Yogesh wrote: > Tomasz, Emil, > >> -Original Message- >> From: Tomasz Figa [mailto:tf...@chromium.org] >> Sent: Friday, August 4, 2017 6:54 PM >> To: Emil Velikov >> Cc: Marathe, Yogesh ; Antognolli, Rafael >> ; ML mesa-dev > d...@lists.freedeskto

Re: [Mesa-dev] [PATCH] loader: always include libxmlconfig on autotools build

2017-08-04 Thread Jan Vesely
On Fri, 2017-08-04 at 11:53 +0200, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > This aligns with the fact that we also check for EXPAT_LIBS > unconditionally in configure.ac now. It should make all the > various build permutations of Clover work (whether DRI is > enabled or disabled in the bu

  1   2   >