Re: [Mesa-dev] [PATCH v4 01/18] anv: Transition MCS buffers from the undefined layout

2017-07-28 Thread Lionel Landwerlin
On 28/07/17 17:21, Nanley Chery wrote: On Fri, Jul 28, 2017 at 09:28:45AM +0100, Lionel Landwerlin wrote: On 19/07/17 22:21, Nanley Chery wrote: Cc: Suggested-by: Jason Ekstrand Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_blorp.c | 8 src/intel/vulkan

Re: [Mesa-dev] [PATCH 1/2] anv: Add a new centralized extensions file

2017-08-01 Thread Lionel Landwerlin
Both patches are : Reviewed-by: Lionel Landwerlin On 14/07/17 07:14, Jason Ekstrand wrote: This will allow us to keep everything in one place when it comes to declaring what extensions are supported. --- src/intel/Makefile.vulkan.am| 3 +- src/intel/vulkan

Re: [Mesa-dev] [PATCH 2/2] anv: Advertise VK_KHR_relaxed_block_layout

2017-08-01 Thread Lionel Landwerlin
Since this is available from 1.0.57, do we need to bump the supported API version first? On 01/08/17 17:02, Jason Ekstrand wrote: There is literally no work for us to do here. It already just works in our driver. --- src/intel/vulkan/anv_device.c | 4 1 file changed, 4 insertions(+) d

Re: [Mesa-dev] [PATCH 2/5] anv: Add MAX_API_VERSION to anv_extensions.py

2017-08-01 Thread Lionel Landwerlin
On 01/08/17 19:54, Jason Ekstrand wrote: The VkVersion class is probably overkill but it makes it really easy to compare versions in a way that's safe without the caller having to think about patch vs. no patch. --- src/intel/vulkan/anv_entrypoints_gen.py | 4 +-- src/intel/vulkan/anv_extensi

Re: [Mesa-dev] [PATCH 1/5] anv: Make some bits of anv_extensions module-private

2017-08-01 Thread Lionel Landwerlin
Patches 1, 3, 4 & 5 are: Reviewed-by: Lionel Landwerlin On 01/08/17 19:54, Jason Ekstrand wrote: This way we can use "from anv_extensions import *" in the entrypoint generator without worrying too much about pollution --- src/intel/vulkan/anv_entrypoints_gen.py | 4 ++-- sr

Re: [Mesa-dev] [PATCH 2/2] anv: Advertise VK_KHR_relaxed_block_layout

2017-08-01 Thread Lionel Landwerlin
On 01/08/17 23:33, Jason Ekstrand wrote: On Tue, Aug 1, 2017 at 2:03 PM, Lionel Landwerlin mailto:lionel.g.landwer...@intel.com>> wrote: Since this is available from 1.0.57, do we need to bump the supported API version first? I don't think it really matters Rb then :)

Re: [Mesa-dev] [PATCH 2/5] anv: Add MAX_API_VERSION to anv_extensions.py

2017-08-01 Thread Lionel Landwerlin
On 01/08/17 23:32, Jason Ekstrand wrote: On Tue, Aug 1, 2017 at 2:07 PM, Lionel Landwerlin mailto:lionel.g.landwer...@intel.com>> wrote: On 01/08/17 19:54, Jason Ekstrand wrote: The VkVersion class is probably overkill but it makes it really easy to c

Re: [Mesa-dev] [PATCH 1/2] anv: Advertise support for two more sRGB formats

2017-08-02 Thread Lionel Landwerlin
Both are : Reviewed-by: Lionel Landwerlin On 02/08/17 02:16, Jason Ekstrand wrote: Unreal Engine 4 seems to really like VK_FORMAT_R8_SRGB for some reason. We don't technically have the hardware format but we do have L8_SRGB. It's easy enough to fake with that and a swizzle. While w

[Mesa-dev] [PATCH 0/7] intel: command streamer decoder fixes

2017-08-03 Thread Lionel Landwerlin
Hi, What prompted me to dig into this was that we didn't seem the decode the ImmediateData field of MI_STORE_DATA_IMM properly. The fix for this is in patch 6. I also found out that we were skipping printing some dword with fields > 32bits. Cheers, Lionel Landwerlin (7): intel: decode

[Mesa-dev] [PATCH 2/7] intel: common: print out all dword with field spanning multiple dwords

2017-08-03 Thread Lionel Landwerlin
Stall At Pixel Scoreboard: false Depth Cache Flush Enable: false 0x000ce138: 0x : Dword 2 Address: 0x 0x000ce140: 0x : Dword 4 Immediate Data: 0 Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c | 10 ++ 1 file changed, 6

[Mesa-dev] [PATCH 1/7] intel: decoder: build sorted linked lists of fields

2017-08-03 Thread Lionel Landwerlin
The xml files don't always have fields in order. This might confuse our parsing of the commands. Let's have the fields in order. To do this, the easiest way it to use a linked list. It also helps a bit with the iterator. Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_deco

[Mesa-dev] [PATCH 6/7] intel: decoder: don't read qword outside the limit of the instruction/struct

2017-08-03 Thread Lionel Landwerlin
Length: 2 Store Qword: 0 Use Global GTT: false 0x000ce0b8: 0x00045010 : Dword 1 Core Mode Enable: 0 Address: 0x00045010 0x000ce0bc: 0x : Dword 2 0x000ce0c0: 0x : Dword 3 Immediate Data: 0 Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c

[Mesa-dev] [PATCH 5/7] intel: decoder: split out getting the next field and decoding it

2017-08-03 Thread Lionel Landwerlin
Due to the new way we handle fields, we need *not* to forget the first field when decoding instructions. The issue was that the advance function was called first and skipped the first field. Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c | 31

[Mesa-dev] [PATCH 4/7] intel: decoder: move field name copy

2017-08-03 Thread Lionel Landwerlin
This should be inside the function that actually decodes fields. Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index a30b7f28aab

[Mesa-dev] [PATCH 3/7] intel: decoder: reorder iterator init function

2017-08-03 Thread Lionel Landwerlin
Making the next change more readable. Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index e32d4190235

[Mesa-dev] [PATCH 7/7] aubinator: print number of dwords per instruction

2017-08-03 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/tools/aubinator.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 48d4456cc16..2c4eaab1701 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools

[Mesa-dev] [PATCH] anv: put anv_extensions.c in gitignore

2017-08-03 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/vulkan/.gitignore b/src/intel/vulkan/.gitignore index 725a8584624..4ea978d6e41 100644 --- a/src/intel/vulkan/.gitignore +++ b/src/intel/vulkan/.gitignore @@ -1,4 +1,5

[Mesa-dev] [PATCH] isl: add surface layout for yuv formats

2017-08-03 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/isl/isl_format_layout.csv | 4 1 file changed, 4 insertions(+) diff --git a/src/intel/isl/isl_format_layout.csv b/src/intel/isl/isl_format_layout.csv index f340e30a1bf..150c15220eb 100644 --- a/src/intel/isl/isl_format_layout.csv +++ b/src

Re: [Mesa-dev] [PATCH 3/3] intel/compiler: properly size attribute wa_flags array for Vulkan

2017-08-09 Thread Lionel Landwerlin
Acked-by: Lionel Landwerlin I can see that it fixes the tests and it makes sense, but I'm failing to see how gl_attrib_wa_flags ends up being set from anv :/ Thanks a lot! On 21/07/17 09:26, Iago Toral Quiroga wrote: Mesa will map user defined vertex input attributes to slots starti

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

2017-08-13 Thread Lionel Landwerlin
On 04/08/17 18:24, Jason Ekstrand wrote: --- 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/vul

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

2017-08-13 Thread Lionel Landwerlin
On 04/08/17 18:24, Jason Ekstrand wrote: 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/vul

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

2017-08-13 Thread Lionel Landwerlin
This series is : Reviewed-by: Lionel Landwerlin I have a couple of nits, feel free to ignore. Thanks! On 04/08/17 18:24, Jason Ekstrand wrote: 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

[Mesa-dev] [PATCH 1/2] aubinator: import intel_aub.h from libdrm

2017-04-25 Thread Lionel Landwerlin
This enables us to compile aubinator without the libdrm dependency. Signed-off-by: Lionel Landwerlin --- src/intel/tools/intel_aub.h | 153 1 file changed, 153 insertions(+) create mode 100644 src/intel/tools/intel_aub.h diff --git a/src/intel

[Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

2017-04-25 Thread Lionel Landwerlin
es. I've only included the minimal set of header files we need from the kernel for anv & i965. Maybe other drivers would be interested and maybe we should put all the kernel drm uapi headers into include? Cheers, Lionel Landwerlin (2): aubinator: import intel_aub.h from libdrm anv/i965:

Re: [Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

2017-04-27 Thread Lionel Landwerlin
On 27/04/17 08:20, Eric Anholt wrote: Emil Velikov writes: On 25 April 2017 at 23:56, Lionel Landwerlin wrote: Hi, While working with changes that span from kernel to user space, I've been wondering whether we need to depend on libdrm at all for the anv & i965 drivers. Indeed w

[Mesa-dev] [PATCH] anv: avoid null pointer dereference

2017-05-02 Thread Lionel Landwerlin
The application might not give an output structure. CID: 1405765 (Null pointer dereferences) Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_formats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c

Re: [Mesa-dev] [PATCH shader-db 1/3] intel_stub: Handle HAS_WAIT_TIMEOUT getparam.

2017-05-03 Thread Lionel Landwerlin
This series is : Reviewed-by: Lionel Landwerlin On 03/05/17 19:44, Kenneth Graunke wrote: Newer Mesa requires this. It's irrelevant for us; pretend to have it. --- intel_stub.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/intel_stub.c b/intel_s

Re: [Mesa-dev] [PATCH] i965: Don't try to unmap NULL program cache BO.

2017-05-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/05/17 19:46, Kenneth Graunke wrote: When running shader-db with intel_stub and recent Mesa, context creation fails when making a logical hardware context. In this case, we call intelDestroyContext(), which gets here and tries to unmap the cache BO. But

Re: [Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

2017-05-04 Thread Lionel Landwerlin
On 04/05/17 07:52, Emil Velikov wrote: On 4 May 2017 at 14:46, Daniel Vetter wrote: On Thu, Apr 27, 2017 at 10:58:42AM -0700, Lionel Landwerlin wrote: On 27/04/17 08:20, Eric Anholt wrote: Emil Velikov writes: On 25 April 2017 at 23:56, Lionel Landwerlin wrote: Hi, While working with

Re: [Mesa-dev] [PATCH] anv: fix possible stack corruption

2017-05-04 Thread Lionel Landwerlin
Something funny happened with the indentation, if you could fix this, this is : Reviewed-by: Lionel Landwerlin Thanks! - Lionel On 04/05/17 17:34, Grazvydas Ignotas wrote: ping Emil: the code this fixes is yours. Gražvydas On Tue, May 2, 2017 at 8:17 PM, Grazvydas Ignotas <mailto:n

Re: [Mesa-dev] [PATCH mesa] egl: avoid dereferencing a null display

2017-05-08 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 07/05/17 23:48, Eric Engestrom wrote: Fixes: ddb99127a6f6c ("egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute") Signed-off-by: Eric Engestrom --- src/egl/main/egldisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -

[Mesa-dev] [PATCH 0/2] Anv coverity issues

2017-05-08 Thread Lionel Landwerlin
A couple of straightforward changes to silence coverity warnings. Lionel Landwerlin (2): anv: avoid null pointer dereference anv: check return value of anv_execbuf_add_bo src/intel/vulkan/anv_batch_chain.c | 9 +++-- src/intel/vulkan/anv_formats.c | 3 ++- 2 files changed, 9

[Mesa-dev] [PATCH 2/2] anv: check return value of anv_execbuf_add_bo

2017-05-08 Thread Lionel Landwerlin
CID: 1405919 (Error handling issues) Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_batch_chain.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 6d6babadea1..9def174b429

[Mesa-dev] [PATCH 1/2] anv: avoid null pointer dereference

2017-05-08 Thread Lionel Landwerlin
The application might not give an output structure. CID: 1405765 (Null pointer dereferences) Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_formats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c

[Mesa-dev] [PATCH 1/3] intel: gen decoder: don't check for size_t negative values

2017-05-08 Thread Lionel Landwerlin
We should get either 0 or 1 here. CID: 1373562 (Control flow issues) Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 15bba3274ed

[Mesa-dev] [PATCH 3/3] intel: compiler: prevent integer overflow

2017-05-08 Thread Lionel Landwerlin
CID: 1399477, 1399478 (Integer handling issues) Signed-off-by: Lionel Landwerlin Cc: Matt Turner --- src/intel/compiler/brw_eu_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index

[Mesa-dev] [PATCH 0/3] intel: More coverity fixes

2017-05-08 Thread Lionel Landwerlin
Going through a few more warnings that seem relevant. Cheers, Lionel Landwerlin (3): intel: gen decoder: don't check for size_t negative values intel: compiler: remove duplicated code intel: compiler: prevent integer overflow src/intel/common/gen_decoder.c | 2 +- src/

[Mesa-dev] [PATCH 2/3] intel: compiler: remove duplicated code

2017-05-08 Thread Lionel Landwerlin
CID: 1399470: (Control flow issues) Signed-off-by: Lionel Landwerlin Cc: Matt Turner --- src/intel/compiler/brw_eu_validate.c | 12 1 file changed, 12 deletions(-) diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index f231ea038b4

Re: [Mesa-dev] [PATCH 2/5] genxml: Add alias for MOCS.

2017-05-10 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 10/05/17 01:12, Rafael Antognolli wrote: Use an alias for this field on 3DSTATE_INDEX_BUFFER on gen6+, so we can set the same value as the defines. Signed-off-by: Rafael Antognolli --- src/intel/genxml/gen6.xml | 1 + src/intel/genxml/gen7.xml | 1

Re: [Mesa-dev] [PATCH 1/5] i965/genxml: Mostly style fixes for emit_vertices code.

2017-05-10 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 10/05/17 01:12, Rafael Antognolli wrote: Several issues were caught on review after the original patch landed. This commit fixes them. v2: - Fix padding (Topi) - Remove .DestinationElementOffset change from this patch (Topi) Signed-off-by: Rafael

Re: [Mesa-dev] [PATCH 3/5] i965: Port brw_cs_state tracked state to genxml.

2017-05-10 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 10/05/17 01:12, Rafael Antognolli wrote: Emit the respective commands using genxml code. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/brw_state.h | 1 - src/mesa/drivers/dri/i965/gen7_cs_state.c | 162

Re: [Mesa-dev] [PATCH 4/5] i965: Port 3DSTATE_INDEX_BUFFER to genxml.

2017-05-10 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 10/05/17 01:12, Rafael Antognolli wrote: Also make the brw_get_index_type() function not shift its return, since that is genxml's job now. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/brw_context.h | 6 ++-- src/mesa/driver

Re: [Mesa-dev] [PATCH 5/5] i965: Port 3DSTATE_VF_TOPOLOGY on gen8+ to genxml.

2017-05-10 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 10/05/17 01:12, Rafael Antognolli wrote: With this last state ported, we can get rid of gen8_draw_upload.c. Signed-off-by: Rafael Antognolli --- src/mesa/drivers/dri/i965/Makefile.sources| 1 - src/mesa/drivers/dri/i965/brw_state.h | 1

Re: [Mesa-dev] [PATCH] i965: fix cast in OA performance query code

2017-05-11 Thread Lionel Landwerlin
On 11/05/17 12:27, Tapani Pälli wrote: On 05/11/2017 02:23 PM, Emil Velikov wrote: On 1 May 2017 at 12:09, Mauro Rossi wrote: Fixes the following building error happening on marshmallow-x86 with Ubuntu 16.04 LTS stock build essentials package and by the book Android build system. external/m

Re: [Mesa-dev] [PATCH] i965: fix cast in OA performance query code

2017-05-11 Thread Lionel Landwerlin
On 11/05/17 13:58, Lionel Landwerlin wrote: On 11/05/17 12:27, Tapani Pälli wrote: On 05/11/2017 02:23 PM, Emil Velikov wrote: On 1 May 2017 at 12:09, Mauro Rossi wrote: Fixes the following building error happening on marshmallow-x86 with Ubuntu 16.04 LTS stock build essentials package and

Re: [Mesa-dev] [PATCH v2 3/6] vulkan/wsi/wayland: Use per-display event queue

2017-05-12 Thread Lionel Landwerlin
On 05/05/17 17:47, Daniel Stone wrote: Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists

[Mesa-dev] [PATCH 1/2] intel: gen-decoder: fix xml parser leak

2017-05-12 Thread Lionel Landwerlin
In the unlikely case the parsing of genxml files fails, we were leaking an xml parser object. Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_decoder.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/intel/common/gen_decoder.c b/src/intel/common

[Mesa-dev] [PATCH 2/2] i965: perf: fix pointer to integer cast

2017-05-12 Thread Lionel Landwerlin
Reported-by: Mauro Rossi Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_performance_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index

[Mesa-dev] [PATCH v2 2/2] i965: perf: fix pointer to integer cast

2017-05-12 Thread Lionel Landwerlin
v2: Just use cast to uintptr_t (Chris) Reported-by: Mauro Rossi Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_performance_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH] meson: don't us build_by_default for specific gallium drivers

2017-11-10 Thread Lionel Landwerlin
Fixes a build issue with gallium headers trying to include llvm ones (which I don't have installed). Thanks! Tested-by: Lionel Landwerlin On 10/11/17 17:23, Dylan Baker wrote: Using build_by_default : false is convenient for dependencies that can be pulled in by various diverse componen

Re: [Mesa-dev] [PATCH 1/2] intel/tools: Fix detection of enabled shader stages.

2017-11-11 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 11/11/17 00:55, Kenneth Graunke wrote: We renamed "Function Enable" to "Enable", which broke our detection of whether shaders are enabled or not. So, we'd see a bunch of HS/DS packets with program offsets of 0, and think that wa

Re: [Mesa-dev] [PATCH 2/2] intel/tools: Fix program disassembly in aubinator_error_decode.

2017-11-11 Thread Lionel Landwerlin
:( The intention was to deal with cases where we've encountered more than MAX_NUM_PROGRAMS (actually happened to me). So we start by the index + 1 assuming this is the oldest program because we're in a rolling window of programs. This is obviously broken with the < 4096 programs case. Maybe w

Re: [Mesa-dev] [PATCH] aubinator: Don't skip the first field in each subgroup

2017-11-12 Thread Lionel Landwerlin
has one and this will trigger a segfault. We might be better off taking it out. Otherwise, looks good : Reviewed-by: Lionel Landwerlin + if (iter_more_fields(iter)) { + iter->field = iter->field->next; + } else { if (!iter_more_groups(iter)) ret

Re: [Mesa-dev] [PATCH 09/11] intel/tools/error: Decode shaders while decoding batch commands.

2017-11-12 Thread Lionel Landwerlin
].gtt_offset == instr_base_address) { Is it a guarantee that the instruction buffer is going to be given in its own section? Or do we need to check bounds ? if (instr_base_address >= sections[s].gtt_offset && inst_base_address <= sections[s].gtt_offset + sections[s].count * 4) Ot

Re: [Mesa-dev] [PATCH 10/11] intel/tools/error: Use do-while for field iterator loops.

2017-11-12 Thread Lionel Landwerlin
I think I sneaked the exact same fix in f5e5ca1e210c2e0f505ea154ca553275157dda73 (bottom of the patch). Reviewed-by: Lionel Landwerlin On 12/11/17 08:35, Kenneth Graunke wrote: while loops skip the first field of the instruction/structure, which is not what the code intended. It works out

Re: [Mesa-dev] [PATCH 11/11] intel/tools/error: Decode compute shaders.

2017-11-12 Thread Lionel Landwerlin
On 12/11/17 08:35, Kenneth Graunke wrote: This is a bit more annoying than your average shader - we need to look at MEDIA_INTERFACE_DESCRIPTOR_LOAD in the batch buffer, then hop over to the dynamic state buffer to read the INTERFACE_DESCRIPTOR_DATA, then hop over to the instruction buffer to deco

Re: [Mesa-dev] [PATCH] intel/genxml: Delete empty groups

2017-11-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 12/11/17 23:43, Jason Ekstrand wrote: They serve no purpose other than to just fill empty space in the packet so each dword has something. Just disallowing empty groups is a bit easier on some of the tools. This does not change the generated packing headers

Re: [Mesa-dev] [PATCH 06/18] intel/common/gen_decoder: make useable from C++ source

2017-11-13 Thread Lionel Landwerlin
On 13/11/17 13:17, kevin.rogo...@intel.com wrote: From: Kevin Rogovin Signed-off-by: Kevin Rogovin --- src/intel/common/gen_decoder.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h index 8b00b6edc2..e3b2457dfd 10064

[Mesa-dev] [PATCH 2/8] i965: perf: add support for userspace configurations

2017-11-13 Thread Lionel Landwerlin
This allows us to deploy new configurations without touching the kernel. v2: Detect loadable configs without creating one (Chris) Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_performance_query.c | 109 -- 1 file changed, 101 insertions(+), 8 deletions

[Mesa-dev] [PATCH 5/8] i965: fix time elapsed counter equations in VME/Media configs

2017-11-13 Thread Lionel Landwerlin
There was a mistake just in those metric sets. We probably didn't noticed because they're not really interesting for 3D workloads. Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_oa_bdw.xml| 4 ++-- src/mesa/drivers/dri/i965/brw_oa_kblgt2.xml | 4 ++-- src/me

[Mesa-dev] [PATCH 3/8] i965: add a debug option to disable oa config loading

2017-11-13 Thread Lionel Landwerlin
This provides a good way to verify we haven't broken using the perf driver on older kernels (which don't have the oa config loading mechanism). Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_debug.c | 1 + src/intel/common/gen_debug.h

[Mesa-dev] [PATCH 4/8] i965: perf: update counter names on gen8/9 platforms

2017-11-13 Thread Lionel Landwerlin
Just fixing names. Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_oa_bdw.xml| 50 ++--- src/mesa/drivers/dri/i965/brw_oa_bxt.xml| 26 +++ src/mesa/drivers/dri/i965/brw_oa_glk.xml| 26 +++ src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 0/8] i965: add performance query support for Coffeelake

2017-11-13 Thread Lionel Landwerlin
(allowed by 3) Cheers, Lionel Landwerlin (8): i965: perf: update configs for loading from userspace i965: perf: add support for userspace configurations i965: add a debug option to disable oa config loading i965: perf: update counter names on gen8/9 platforms i965: fix time elapsed counter

[Mesa-dev] [PATCH 1/8] i965: perf: update configs for loading from userspace

2017-11-13 Thread Lionel Landwerlin
When making configs loadable from userspace in the kernel, we left to userspace more responsability around programming some registers. In particular one register we use to set directly in the driver has now been moved into the configs. Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri

[Mesa-dev] [PATCH 6/8] i965: perf: add busyness metric sets on gen8/9 platforms

2017-11-13 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_oa_bdw.xml| 183 +++ src/mesa/drivers/dri/i965/brw_oa_bxt.xml| 160 src/mesa/drivers/dri/i965/brw_oa_kblgt2.xml | 164 src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 0/8] i965: add performance query support for Coffeelake

2017-11-13 Thread Lionel Landwerlin
Some of the big patches got caught. You can find this series here : https://github.com/djdeath/mesa/tree/wip/djdeath/oa-userspace-configs - Lionel On 13/11/17 14:58, Lionel Landwerlin wrote: Hi, Although the main point of this series is to add performance queries for Coffeelake. This series

Re: [Mesa-dev] [PATCH 09/11] intel/tools/error: Decode shaders while decoding batch commands.

2017-11-13 Thread Lionel Landwerlin
On 13/11/17 22:59, Kenneth Graunke wrote: On Sunday, November 12, 2017 3:57:56 AM PST Lionel Landwerlin wrote: On 12/11/17 08:35, Kenneth Graunke wrote: This makes aubinator_error_decode's shader dumping work like aubinator. Instead of printing them after the fact, it prints them right i

Re: [Mesa-dev] [PATCH 11/11] intel/tools/error: Decode compute shaders.

2017-11-13 Thread Lionel Landwerlin
On 13/11/17 21:40, Kenneth Graunke wrote: On Sunday, November 12, 2017 4:06:06 AM PST Lionel Landwerlin wrote: On 12/11/17 08:35, Kenneth Graunke wrote: This is a bit more annoying than your average shader - we need to look at MEDIA_INTERFACE_DESCRIPTOR_LOAD in the batch buffer, then hop over

Re: [Mesa-dev] [PATCH 01/14] anv/cmd_buffer: Advance the address when initializing clear colors

2017-11-14 Thread Lionel Landwerlin
> @@ -586,6 +587,8 @@ init_fast_clear_state_entry(struct anv_cmd_buffer *cmd_buffer, >              sdi.ImmediateData = 0; >           } >        } > + > +      addr += 4; Aparently, I didn't compile-test this because I need a .offset here. :/ Heh, I was confused too :) With that fixed : Reviewed-by:

Re: [Mesa-dev] [PATCH 02/14] anv/cmd_buffer: Take bo_offset into account in fast clear state addresses

2017-11-14 Thread Lionel Landwerlin
Oh dear... Reviewed-by: Lionel Landwerlin On 13/11/17 16:12, Jason Ekstrand wrote: Otherwise, if the image is not bound to the start of the buffer, we're going to be reading and writing its fast clear state in the wrong spot. Cc: mesa-sta...@lists.freedesktop.org --- src/intel/v

Re: [Mesa-dev] [PATCH 04/14] intel/blorp: Add fast-clear to the special case in MSAA resolves

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 05/14] i965/blorp: Use a designated initializer for blorp_surf

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 06/14] intel/blorp: Add initial support for indirect clear colors

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 08/14] anv: Move get_fast_clear_state_address into anv_private.h

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 07/14] intel/blorp: Take a range of layers in blorp_ccs_resolve

2017-11-14 Thread Lionel Landwerlin
, level, layer, format, resolve_op); + prepare_ccs_resolve(batch, ¶ms, surf, level, start_layer, + format, resolve_op); + params.num_layers = num_layers; Ohoh... Was num_layers uninitialized before this patch? Otherwise looks good : Reviewed-by: Lionel Landwerlin

Re: [Mesa-dev] [PATCH 09/14] anv: Let blorp handle indirect clear colors for CCS resolves

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 11/14] intel/blorp: Add a helper for filling out VERTEX_BUFFER_STATE

2017-11-14 Thread Lionel Landwerlin
On 13/11/17 16:12, Jason Ekstrand wrote: There are enough #ifs in there that it's kind-of pointless to duplicate it for each buffer. --- src/intel/blorp/blorp_genX_exec.h | 69 +++ 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/src/intel/blo

Re: [Mesa-dev] [PATCH 10/14] intel/blorp: Drop blorp_resolve_ccs_attachment

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 12/14] intel/blorp: Add indirect clear color support to mcs_partial_resolve

2017-11-14 Thread Lionel Landwerlin
On 13/11/17 16:12, Jason Ekstrand wrote: This is a bit complicated because we have to get the indirect clear color in there somehow. In order to not do any more work in the shader than needed, we set it up as it's own vertex binding which points directly at the clear color address specified by t

Re: [Mesa-dev] [PATCH 13/14] anv/blorp: Add an mcs_partial_resolve helper

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 14/14] anv: Add support for MSAA fast-clears

2017-11-14 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 03/14] intel/blorp/blit: Rename blorp_nir_txf_ms_mcs

2017-11-15 Thread Lionel Landwerlin
I thought I sent a Rb on this one... Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] genxml: Fix PIPELINE_SELECT on G45/Ironlake.

2017-11-16 Thread Lionel Landwerlin
On 16/11/17 08:36, Kenneth Graunke wrote: Original 965 sets bits 28:27 to 0, while G45 and later set it to 1. Also, there's no GPGPU pipeline on Gen5, and the pipeline to select is a single bit - bit 1 is reserved. Are you sure you haven't mixed them? --- src/intel/genxml/gen45.xml | 4 ++-

Re: [Mesa-dev] [PATCH] genxml: Fix PIPELINE_SELECT on G45/Ironlake.

2017-11-16 Thread Lionel Landwerlin
On 16/11/17 08:36, Kenneth Graunke wrote: Original 965 sets bits 28:27 to 0, while G45 and later set it to 1. Also, there's no GPGPU pipeline on Gen5, and the pipeline to select is a single bit - bit 1 is reserved. Are you sure you haven't mixed them? --- src/intel/genxml/gen45.xml | 4 ++-

Re: [Mesa-dev] [PATCH] genxml: Fix PIPELINE_SELECT on G45/Ironlake.

2017-11-16 Thread Lionel Landwerlin
rc/intel/genxml/gen5.xml b/src/intel/genxml/gen5.xml index 93e687a32bd..8fdac7cd55a 100644 --- a/src/intel/genxml/gen5.xml +++ b/src/intel/genxml/gen5.xml @@ -1253,13 +1253,12 @@ - + With the part below dropped : Reviewed-b

[Mesa-dev] [PATCH 0/2] anv: add capture flags to instruction/batch BOs

2017-11-17 Thread Lionel Landwerlin
Hi, We do the same things in i965 to notify the kernel about buffers of interest in case of GPU hang. Let's do it in Anv too! Cheer, Lionel Landwerlin (2): anv: setup BO flags at state_pool/block_pool creation anv: flag batch & instruction BOs for capture src/intel/vulkan/anv_al

[Mesa-dev] [PATCH 2/2] anv: flag batch & instruction BOs for capture

2017-11-17 Thread Lionel Landwerlin
When the kernel support flagging our BO, let's mark batch & instruction BOs for capture so then can be included in the error state. Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_device.c | 6 -- src/intel/vulkan/anv_private.h | 1 + 2 files changed, 5 insertions(+), 2

[Mesa-dev] [PATCH 1/2] anv: setup BO flags at state_pool/block_pool creation

2017-11-17 Thread Lionel Landwerlin
This will allow to set the flags on any anv_bo created/filled from a state pool or block pool later. Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_allocator.c | 24 -- src/intel/vulkan/anv_device.c | 18 src

Re: [Mesa-dev] [PATCH 2/2] anv: flag batch & instruction BOs for capture

2017-11-17 Thread Lionel Landwerlin
On 17/11/17 17:57, Kristian Høgsberg wrote: On Fri, Nov 17, 2017 at 9:48 AM, Lionel Landwerlin wrote: When the kernel support flagging our BO, let's mark batch & instruction BOs for capture so then can be included in the error state. Signed-off-by: Lionel Landwerlin --- src/int

Re: [Mesa-dev] [PATCH 1/2] anv: setup BO flags at state_pool/block_pool creation

2017-11-17 Thread Lionel Landwerlin
On 17/11/17 18:37, Kenneth Graunke wrote: On Friday, November 17, 2017 9:47:59 AM PST Lionel Landwerlin wrote: This will allow to set the flags on any anv_bo created/filled from a state pool or block pool later. Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_allocator.c

Re: [Mesa-dev] [PATCH] intel/genxml: Add helpers for determining field type

2017-11-17 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 18/11/17 00:55, Kristian H. Kristensen wrote: Signed-off-by: Kristian H. Kristensen --- src/intel/genxml/gen_pack_header.py | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/intel/genxml/gen_pack_header.py b

[Mesa-dev] [PATCH crucible] clear: check for invalid offsets in memory

2017-11-21 Thread Lionel Landwerlin
Trying to detect cases where we read/write at the wrong offsets in images. Signed-off-by: Lionel Landwerlin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103197 --- src/tests/func/renderpass/clear.c | 235 ++ 1 file changed, 235 insertions(+) diff

Re: [Mesa-dev] [PATCH] i965: Fix Smooth Point Enables.

2017-11-26 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 26/11/17 09:27, Kenneth Graunke wrote: We want to program the 3DSTATE_RASTER field to the gl_context value, not the other way around. Fixes: 13ac46557ab1 (i965: Port Gen8+ 3DSTATE_RASTER state to genxml.) --- src/mesa/drivers/dri/i965/genX_state_upload.c

Re: [Mesa-dev] [PATCH] i965: Move perf_debug and WARN_ONCE back to brw_context.h.

2017-11-26 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 26/11/17 10:09, Kenneth Graunke wrote: These were moved to src/intel/common/gen_debug.h, but they are not common code. They assume that brw_context or gl_context variables exist, named brw or ctx. That isn't remotely true outside of i965. --- src/

[Mesa-dev] [PATCH] util: hash_table: move NULL assert to string hashing function

2017-11-27 Thread Lionel Landwerlin
Hash maps might use pointer keys (which people surely might want to use to hash values) in which case a 0 value is perfectly acceptable. It's only if the hash function needs to deference the pointer that we want to be sure it's not NULL. Signed-off-by: Lionel Landwerlin ---

[Mesa-dev] [PATCH v2] util: hash_table: move NULL assert to string hashing function

2017-11-28 Thread Lionel Landwerlin
block (Ian) Signed-off-by: Lionel Landwerlin --- src/util/hash_table.c | 4 ++-- src/util/hash_table.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/hash_table.c b/src/util/hash_table.c index b7421a0144c..8a4de565fcc 100644 --- a/src/util/hash_table.c +++

[Mesa-dev] [PATCH 1/3] drm-uapi: Update drm/i915 headers from drm-next

2017-12-04 Thread Lionel Landwerlin
Taken from drm-next ca797d29cd63e7b71b4eea29aff3b1cefd1ecb59 Signed-off-by: Lionel Landwerlin --- include/drm-uapi/README | 8 +++--- include/drm-uapi/drm.h | 41 ++ include/drm-uapi/drm_mode.h | 70 +++-- include/drm

[Mesa-dev] [PATCH 3/3] anv: query CS timestamp frequency from the kernel

2017-12-04 Thread Lionel Landwerlin
The reference value in gen_device_info isn't going to be acurate on Gen10+. We should query it from the kernel, which reads a couple of register to compute the actual value. Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_device.c | 13 + 1 file changed, 13 inser

[Mesa-dev] [PATCH 2/3] i965: read CS timestamp frequency from the kernel on Gen10+

2017-12-04 Thread Lionel Landwerlin
p-get spec@ext_timer_query@time-elapsed Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/intel_screen.c | 24 1 file changed, 24 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index db1552

[Mesa-dev] [PATCH 0/3] anv/i965: account timestamp correctly on Gen10

2017-12-04 Thread Lionel Landwerlin
. We introduced a new parameter to query in the kernel to expose that information. This seems like it's going to land in 4.16. Here are the userspace patches making use of that new param. Cheers, Lionel Landwerlin (3): drm-uapi: Update drm/i915 headers from drm-next i965: read CS timestamp freq

<    1   2   3   4   5   6   7   8   9   10   >