[Mesa-dev] [Bug 100854] YUV to RGB Color Space Conversion result is not precise

2017-05-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100854 Kenneth Graunke changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH] nir/lower_tex: Fix minor error in YUV color conversion matrix

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 11:37:52 PM PDT Johnson Lin wrote: > The matrix used for YCbCr to RGB is listed in: > > https://en.wikipedia.org/wiki/YCbCr > > There was an error in converting the offsets from integers to unorm > values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be > 12

Re: [Mesa-dev] [PATCH v03 18/38] i965: Port Gen6+ DEPTH_STENCIL state to genxml.

2017-05-03 Thread Pohjolainen, Topi
On Wed, May 03, 2017 at 11:28:31PM -0700, Kenneth Graunke wrote: > On Wednesday, May 3, 2017 9:59:03 PM PDT Pohjolainen, Topi wrote: > > On Mon, May 01, 2017 at 06:43:06PM -0700, Rafael Antognolli wrote: > > > +#if GEN_GEN == 6 > > > + brw_batch_emit(brw, GENX(3DSTATE_CC_STATE_POINTERS), ptr) { >

[Mesa-dev] [PATCH] nir/lower_tex: Fix minor error in YUV color conversion matrix

2017-05-03 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in: https://en.wikipedia.org/wiki/YCbCr There was an error in converting the offsets from integers to unorm values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. With this fix, the CSC result is bit aligned with wikipedia's con

Re: [Mesa-dev] [PATCH v03 14/38] i965: Move MOCS macros to brw_context.h.

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 7:52:01 PM PDT Pohjolainen, Topi wrote: > On Wed, May 03, 2017 at 05:11:45PM -0700, Rafael Antognolli wrote: > > On Wed, May 03, 2017 at 08:28:24PM +0300, Pohjolainen, Topi wrote: > > > On Mon, May 01, 2017 at 06:43:02PM -0700, Rafael Antognolli wrote: > > > > These macros

Re: [Mesa-dev] [PATCH v03 16/38] i965: Get real per-gen atom lists

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 10:47:57 AM PDT Pohjolainen, Topi wrote: > On Mon, May 01, 2017 at 06:43:04PM -0700, Rafael Antognolli wrote: > > +void > > +genX(init_atoms)(struct brw_context *brw) > > +{ > > +#if GEN_GEN < 6 > > + static const struct brw_tracked_state *render_atoms[] = > > + { > >

Re: [Mesa-dev] [PATCH v03 17/38] genxml: Add rules to build gen4, gen45 and ge5.

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 10:10:59 PM PDT Pohjolainen, Topi wrote: > On Thu, May 04, 2017 at 05:49:08AM +0300, Pohjolainen, Topi wrote: > > On Wed, May 03, 2017 at 05:08:12PM -0700, Rafael Antognolli wrote: > > > On Wed, May 03, 2017 at 09:10:10PM +0300, Pohjolainen, Topi wrote: > > > > > > > > In

Re: [Mesa-dev] [PATCH v03 18/38] i965: Port Gen6+ DEPTH_STENCIL state to genxml.

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 9:59:03 PM PDT Pohjolainen, Topi wrote: > On Mon, May 01, 2017 at 06:43:06PM -0700, Rafael Antognolli wrote: > > +#if GEN_GEN == 6 > > + brw_batch_emit(brw, GENX(3DSTATE_CC_STATE_POINTERS), ptr) { > > + ptr.PointertoDEPTH_STENCIL_STATE = ds_offset; > > + ptr.DE

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 the

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_stub.c index

Re: [Mesa-dev] [PATCH] glsl: rename image_* qualifiers to memory_*

2017-05-03 Thread Andres Gomez
This is: Reviewed-by: Andres Gomez On Wed, 2017-05-03 at 11:16 +0200, Samuel Pitoiset wrote: > It doesn't make sense to prefix them with 'image' because > they are called "Memory Qualifiers" and they can be applied > to members of storage buffer blocks. > > Signed-off-by: Samuel Pitoiset > ---

Re: [Mesa-dev] [PATCH v03 15/38] i965: Add genxml related plumbing in a new genX_state_upload.c file.

2017-05-03 Thread Pohjolainen, Topi
On Mon, May 01, 2017 at 06:43:03PM -0700, Rafael Antognolli wrote: > From: Kenneth Graunke > > v3: >- Drop aub parameter (Ken) > > Signed-off-by: Kenneth Graunke Reviewed-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/Makefile.sources| 15 ++- > src/mesa/drivers/dri/i965/ge

Re: [Mesa-dev] [PATCH v03 17/38] genxml: Add rules to build gen4, gen45 and ge5.

2017-05-03 Thread Pohjolainen, Topi
On Thu, May 04, 2017 at 05:49:08AM +0300, Pohjolainen, Topi wrote: > On Wed, May 03, 2017 at 05:08:12PM -0700, Rafael Antognolli wrote: > > On Wed, May 03, 2017 at 09:10:10PM +0300, Pohjolainen, Topi wrote: > > > > > > In the subject: s/ge5/gen5/ > > > > > > But don't we need to squash this into

[Mesa-dev] [PATCH] i965: Make INTEL_DEBUG=bat decode VS/CLIP/GS/SF/WM/CC_STATE on Gen4-5.

2017-05-03 Thread Kenneth Graunke
This is something the original decoder did, but I didn't bother with until now. I recently had to debug an Ironlake issue, and wanted to inspect VS_STATE. So, now it's back. The other packets in the switch statement are all Gen6/7+, where we use offsets from dynamic state base address, so we don

Re: [Mesa-dev] [PATCH v03 18/38] i965: Port Gen6+ DEPTH_STENCIL state to genxml.

2017-05-03 Thread Pohjolainen, Topi
On Mon, May 01, 2017 at 06:43:06PM -0700, Rafael Antognolli wrote: > From: Kenneth Graunke > > This emits 3DSTATE_WM_DEPTH_STENCIL on Gen8+ or DEPTH_STENCIL_STATE > (and the relevant pointer packets) on Gen6-7.5 from a single function. > > v3: >- Watch for BRW_NEW_BATCH too on gen8+ (Ken) >

Re: [Mesa-dev] [PATCH 0/4] Call for testing: Gallium set_index_buffer removal etc.

2017-05-03 Thread Brian Paul
On 05/01/2017 10:03 AM, Brian Paul wrote: On 05/01/2017 08:32 AM, Brian Paul wrote: On 04/28/2017 05:12 PM, Marek Olšák wrote: Hi, This series shrinks various gallium structures and removes set_index_buffer in order to decrease CPU overhead. PART 1: Performance results All testing below was

Re: [Mesa-dev] [PATCH 7/7] mesa: add KHR_no_error support for glUseProgram

2017-05-03 Thread Timothy Arceri
On 04/05/17 13:31, Dave Airlie wrote: +/* The ARB_separate_shader_object spec says: + * + * "The executable code for an individual shader stage is taken from + * the current program for that stage. If there is a current program + * object established by UseProgram, that program is

Re: [Mesa-dev] [PATCH 7/7] mesa: add KHR_no_error support for glUseProgram

2017-05-03 Thread Dave Airlie
> +/* The ARB_separate_shader_object spec says: > + * > + * "The executable code for an individual shader stage is taken from > + * the current program for that stage. If there is a current program > + * object established by UseProgram, that program is considered current > + * for

[Mesa-dev] [PATCH 4/7] radv: add subpass resolve compute path

2017-05-03 Thread Dave Airlie
From: Dave Airlie This adds a path to allow compute resolves to be used for subpass resolves. This isn't used yet, but will be later. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_meta_resolve_cs.c | 93 +++ src/amd/vulkan/radv_private.h | 1 + 2

[Mesa-dev] [PATCH 7/7] radv: drop resolve hack workarounds

2017-05-03 Thread Dave Airlie
From: Dave Airlie This drops the resolve workarounds that change an image tiling mode behinds it's back, this is horrible and breaks the image_view->image relationship. Remove all this. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_cmd_buffer.c | 40 -- src/amd/vul

[Mesa-dev] [PATCH 3/7] radv/resolve: split resolve emission out for compute

2017-05-03 Thread Dave Airlie
From: Dave Airlie This will allow to add a subpass compute resolve path. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_meta_resolve_cs.c | 141 +++--- 1 file changed, 78 insertions(+), 63 deletions(-) diff --git a/src/amd/vulkan/radv_meta_resolve_cs.c b/src/a

[Mesa-dev] [PATCH 1/7] radv/meta: add srgb conversion to end of resolve shader.

2017-05-03 Thread Dave Airlie
From: Dave Airlie If we are resolving into an srgb dest, we need to convert to linear so the store does the conversion back. This should fix some wierdness seen when we subresolves hit the compute path. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_meta_resolve_cs.c | 58

[Mesa-dev] radv image resolve rework

2017-05-03 Thread Dave Airlie
radv has had a hack in place to change some image details (tiling_mode) to enable hw resolver to work, however this isn't at all how Vulkan should work. Coupled with the compute resolve path hanging in some situations, I decided to rework the lot. This firstly refactors compute resolve to separate

[Mesa-dev] [PATCH 6/7] radv/meta: select resolve paths

2017-05-03 Thread Dave Airlie
From: Dave Airlie There are 3 resolve paths, the fastest being the hw resolver but it has restriction on tile modes and can't do subresolves, the compute resolver is next speed wise, but can't handle DCC destinations, the fragment resolver handles that case. This will end up with a slow down as

[Mesa-dev] [PATCH 5/7] radv/meta: add resolve pass using fragment/vertex shaders

2017-05-03 Thread Dave Airlie
From: Dave Airlie In order to resolve into DCC enabled dests we need to use the fragment shader. This reuses the code from the compute path and implements a resolve path in vertex/fragment shader. This code isn't used until later. Signed-off-by: Dave Airlie --- src/amd/vulkan/Makefile.sources

[Mesa-dev] [PATCH 2/7] radv/meta: split out core part of resolve shader

2017-05-03 Thread Dave Airlie
From: Dave Airlie I want to reuse the same code for the fragment shader version of the resolve shaders. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_meta.c| 127 ++ src/amd/vulkan/radv_meta.h| 8 +++ src/amd/vulkan/radv_meta_resol

Re: [Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 7:19:24 PM PDT Matt Turner wrote: > On Wed, May 3, 2017 at 6:03 PM, Kenneth Graunke wrote: > > On Tuesday, May 2, 2017 11:02:58 AM PDT Rafael Antognolli wrote: > >> Since the enum is in the same header now, we can use it as the type of > >> the field. > >> > >> Signed-off

Re: [Mesa-dev] [PATCH v03 00/38] Rebased and reviewed series to convert state emitting code to genxml.

2017-05-03 Thread Kenneth Graunke
On Monday, May 1, 2017 6:42:48 PM PDT Rafael Antognolli wrote: > The main difference for this one is that it includes the changes based on the > review by Kenneth. > > Current version here: > https://github.com/rantogno/mesa/commits/review/genxml-v03 I've pushed patches 1-33. signature.asc Desc

Re: [Mesa-dev] [PATCH v03 34/38] i965: Port push constant code to genxml.

2017-05-03 Thread Kenneth Graunke
On Monday, May 1, 2017 6:43:22 PM PDT Rafael Antognolli wrote: > The following states are ported on this patch: >- gen6_gs_push_constants >- gen6_vs_push_constants >- gen6_wm_push_constants >- gen7_tes_push_constants > > v2: >- Use helper to setup brw_address (Kristian) > v3: >

Re: [Mesa-dev] [PATCH v03 14/38] i965: Move MOCS macros to brw_context.h.

2017-05-03 Thread Pohjolainen, Topi
On Wed, May 03, 2017 at 05:11:45PM -0700, Rafael Antognolli wrote: > On Wed, May 03, 2017 at 08:28:24PM +0300, Pohjolainen, Topi wrote: > > On Mon, May 01, 2017 at 06:43:02PM -0700, Rafael Antognolli wrote: > > > These macros are defined in brw_defines.h, which contains a lot of > > > macros that c

Re: [Mesa-dev] [PATCH v03 17/38] genxml: Add rules to build gen4, gen45 and ge5.

2017-05-03 Thread Pohjolainen, Topi
On Wed, May 03, 2017 at 05:08:12PM -0700, Rafael Antognolli wrote: > On Wed, May 03, 2017 at 09:10:10PM +0300, Pohjolainen, Topi wrote: > > > > In the subject: s/ge5/gen5/ > > > > But don't we need to squash this into the previous patch? Alone that patch > > won't even link, right? > > Yes, you

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

2017-05-03 Thread Kenneth Graunke
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 there isn't one - we haven't made it yet. So we try to unmap a NULL pointer, wh

[Mesa-dev] [PATCH shader-db 3/3] intel_stub: Return a non-zero context ID.

2017-05-03 Thread Kenneth Graunke
Recent Mesa has started detecting a hardware context ID of zero (which is bogus - it's the default context ID) and failing GL context creation. Previously it saw that the ioctl returned success and happily proceeded. Don't bother assigning a real ID, but do assign a non-zero value. --- intel_stub

[Mesa-dev] [PATCH shader-db 2/3] intel_stub: Pretend to support command parser version 9.

2017-05-03 Thread Kenneth Graunke
Haswell requires a relatively new command parser version to enable GL 4.5, and we'd like to compile those shaders. Since we don't actually execute anything, it doesn't really matter. Claim version 9, the current version. --- intel_stub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/int

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

2017-05-03 Thread Kenneth Graunke
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_stub.c index 4917656..7f85678 100644 --- a/intel_stub.c +++ b/intel_stub.c @@ -192,11 +192,14 @@ ioctl(int fd

Re: [Mesa-dev] [RFC PATCH 00/17] Introducing SPIR-V support to clover

2017-05-03 Thread Rob Clark
On Wed, May 3, 2017 at 5:56 PM, Pierre Moreau wrote: > > * As there is no upstream version of LLVM which can produce SPIR-V out of > OpenCL code, clCreateProgramWithSource will refuse to work if the target IR > is SPIR-V, for now. hopefully this[1] will eventually happen, which would make th

Re: [Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-03 Thread Matt Turner
On Wed, May 3, 2017 at 6:03 PM, Kenneth Graunke wrote: > On Tuesday, May 2, 2017 11:02:58 AM PDT Rafael Antognolli wrote: >> Since the enum is in the same header now, we can use it as the type of >> the field. >> >> Signed-off-by: Rafael Antognolli >> --- >> >> PS: We can merge this with the prev

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-05-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #20 from Ray Strode --- Hi, > - if i leave vector_justify to FALSE, but change attachment 130980 > to use fetch_width instead of format_desc->block.bits then all the > 3 component sshort tests and half float tests start working, bu

[Mesa-dev] [PATCH 7/7] mesa: add KHR_no_error support for glUseProgram

2017-05-03 Thread Timothy Arceri
--- src/mapi/glapi/gen/gl_API.xml | 2 +- src/mesa/main/shaderapi.c | 65 +++ src/mesa/main/shaderapi.h | 2 ++ 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 83f

[Mesa-dev] [PATCH 2/7] mesa: add KHR_no_error support for glUseProgramStages()

2017-05-03 Thread Timothy Arceri
--- src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 2 +- src/mesa/main/pipelineobj.c| 21 + src/mesa/main/pipelineobj.h| 3 +++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/ARB_separate

[Mesa-dev] [PATCH 4/7] mesa: add KHR_no_error support for glBindProgramPipeline()

2017-05-03 Thread Timothy Arceri
--- src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 2 +- src/mesa/main/pipelineobj.c| 26 ++ src/mesa/main/pipelineobj.h| 2 ++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/ARB_separate

[Mesa-dev] [PATCH 1/7] mesa: create use_program_stages() helper

2017-05-03 Thread Timothy Arceri
This will be used to create a KHR_no_error version of glUseProgramStages(). --- src/mesa/main/pipelineobj.c | 71 + 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index dbca3c3..0

[Mesa-dev] [PATCH 6/7] mesa: small _mesa_UseProgram() tidy up

2017-05-03 Thread Timothy Arceri
Makes the code easier to follow --- src/mesa/main/shaderapi.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index b764fee..eb75a3e 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1846,21 +184

[Mesa-dev] [PATCH 5/7] mesa: restrict UseProgram env var to debug builds

2017-05-03 Thread Timothy Arceri
I can't think of any reason you would want this in a release build. --- src/mesa/main/shaderapi.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index c41f006..b764fee 100644 --- a/src/mesa/main/shaderapi.c +

[Mesa-dev] [PATCH 3/7] mesa: add KHR_no_error support for glActiveShaderProgram()

2017-05-03 Thread Timothy Arceri
--- src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 2 +- src/mesa/main/pipelineobj.c| 18 ++ src/mesa/main/pipelineobj.h| 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/ARB_separate_sha

Re: [Mesa-dev] [PATCH] genxml: Fix 3DSTATE_DEPTH_BUFFER length on gen5.

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 5:53:35 PM PDT Rafael Antognolli wrote: > The hardware docs are wrong, but the length used in the xml is also > wrong. > > Signed-off-by: Rafael Antognolli > --- > src/intel/genxml/gen5.xml | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Timothy Arceri
On 04/05/17 10:43, Ilia Mirkin wrote: I looked into removing these passes a while back. A little detail here is that DCE has to get run at least a little bit for correctness reasons -- some (lazy) glsl -> tgsi Is there anyway to improve this? I was actually looking at this a little yesterday b

Re: [Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-03 Thread Kenneth Graunke
On Tuesday, May 2, 2017 11:02:58 AM PDT Rafael Antognolli wrote: > Since the enum is in the same header now, we can use it as the type of > the field. > > Signed-off-by: Rafael Antognolli > --- > > PS: We can merge this with the previous patch too if that's better. > > src/intel/compiler/brw_c

[Mesa-dev] [PATCH] genxml: Fix 3DSTATE_DEPTH_BUFFER length on gen5.

2017-05-03 Thread Rafael Antognolli
The hardware docs are wrong, but the length used in the xml is also wrong. Signed-off-by: Rafael Antognolli --- src/intel/genxml/gen5.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/genxml/gen5.xml b/src/intel/genxml/gen5.xml index 0b84650..447499c 100644

[Mesa-dev] [PATCH] radv: don't advertise transfer props unless we can do anything else

2017-05-03 Thread Dave Airlie
From: Dave Airlie There is no reason to advertise transfer ability for formats we can't use for anything else. This stops some CTS tests hitting internal error for 64-bit types when they see the transfer flags. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_formats.c | 4 ++-- 1 file chang

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Ilia Mirkin
I looked into removing these passes a while back. A little detail here is that DCE has to get run at least a little bit for correctness reasons -- some (lazy) glsl -> tgsi code uses the dead_mask with the assumption that DCE is run later. Another observation was that while, indeed, those passes ta

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-03 Thread Timothy Arceri
This and the tgsi copy_propagation pass are very slow, I'd really like it if we both didn't require the pass for things to work and also didn't make it any slower. perf is showing these 2 passes at ~11% during Deus Ex start-up (cold cache). Can we not just add a DCE call to the glsl linker/com

Re: [Mesa-dev] [PATCH v03 14/38] i965: Move MOCS macros to brw_context.h.

2017-05-03 Thread Rafael Antognolli
On Wed, May 03, 2017 at 08:28:24PM +0300, Pohjolainen, Topi wrote: > On Mon, May 01, 2017 at 06:43:02PM -0700, Rafael Antognolli wrote: > > These macros are defined in brw_defines.h, which contains a lot of > > macros that conflict with autogenerated code from genxml. But we need to > > use them (t

Re: [Mesa-dev] [PATCH v03 17/38] genxml: Add rules to build gen4, gen45 and ge5.

2017-05-03 Thread Rafael Antognolli
On Wed, May 03, 2017 at 09:10:10PM +0300, Pohjolainen, Topi wrote: > > In the subject: s/ge5/gen5/ > > But don't we need to squash this into the previous patch? Alone that patch > won't even link, right? Yes, you are right, it should be squashed. > On Mon, May 01, 2017 at 06:43:05PM -0700, Rafa

Re: [Mesa-dev] i965: Use isl for hiz and stencil

2017-05-03 Thread Rafael Antognolli
On Wed, May 03, 2017 at 12:22:13PM +0300, Topi Pohjolainen wrote: > Patches 1-17 are revision that > > - rework hiz on gen6 to use on-demand offset calculator allowing > one to drop dependency to miptree structure and > - rework all auxiliary surfaces to be created against isl directly. >

Re: [Mesa-dev] [PATCH v3 2/2] i965/vec4: load dvec3/4 uniforms first in the push constant buffer

2017-05-03 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > Reorder the uniforms to load first the dvec4-aligned variables > in the push constant buffer and then push the vec4-aligned ones. > > This fixes a bug were the dvec3/4 might be loaded one part on a GRF and > the rest in next GRF, so the region parameters to rea

Re: [Mesa-dev] [PATCH 3/5 v2] glsl: Restrict func redeclarations (not just redefinitions) on GLSL 1.00.

2017-05-03 Thread Matt Turner
Thanks. This patch has no regressions. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/3] egl: Emit error when EGLSurface is lost

2017-05-03 Thread Chad Versace
From: Chad Versace Add a new bool, _EGLSurface::Lost, and check it in eglMakeCurrent and eglSwapBuffers. The EGL 1.5 spec says that those functions emit errors when the native surface is no longer valid. This patch just updates core EGL. No driver sets _EGLSurface::Lost yet. I discovered that M

[Mesa-dev] [PATCH 3/3] egl/android: Mark surface as lost when dequeueBuffer fails

2017-05-03 Thread Chad Versace
From: Chad Versace This ensures that future calls to eglSwapBuffers and eglMakeCurrent emit an error. This patch is part of a series for fixing android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface on Chrome OS x86 devices. Cc: Tomasz Figa Cc: Nicolas Boichat Cc: Tapa

[Mesa-dev] [PATCH 2/3] egl/android: Cancel any outstanding ANativeBuffer in surface destructor

2017-05-03 Thread Chad Versace
From: Chad Versace That is, call ANativeWindow::cancelBuffer in droid_destroy_surface(). This should prevent application deadlock when the app destroys the EGLSurface after EGL has acquired a buffer from SurfaceFlinger (ANativeWindow::dequeueBuffer) but before EGL has released it (ANativeWindow:

Re: [Mesa-dev] [PATCH] i965: Drop "Destination Element Offset" from Ironlake SGVs.

2017-05-03 Thread Rafael Antognolli
Reviewed-by: Rafael Antognolli On Fri, Apr 28, 2017 at 05:04:05PM -0700, Kenneth Graunke wrote: > The Ironlake documentation is terrible, so it's unclear whether or not > this field exists there. It definitely doesn't exist on Sandybridge > and later. It definitely does exist on G45. > > We ha

Re: [Mesa-dev] [PATCH 00/22] anv: Move CCS resolves to layout transitions

2017-05-03 Thread Jason Ekstrand
Ok, I must say I'm a bit impressed. This series is a bit nuts but you pulled it off with style. I don't think any hardware designers ever intended for resolves to be done this way but it seems to work out really well. Good work! I've sent a variety of comments throughout the series but no revie

Re: [Mesa-dev] [PATCH 22/22] anv: Predicate fast-clear resolves

2017-05-03 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > There's no image layout to represent a full-RT-cleared color attachment. > That's one reason we can end up with redundant resolves. Testing has > shown that such resolves can measurably hurt performance and that > predicating them can avoid

[Mesa-dev] [PATCH 2/5 v2] gallium: Add support for 5551 with the 1-bit field in the low bit.

2017-05-03 Thread Eric Anholt
This is how VC4 stores 5551 textures, which we need to support for GL_OES_required_internalformat. v2: Extend commit message, fix svga driver build, add BE ordering from Roland. --- src/gallium/auxiliary/util/u_format.csv | 2 ++ src/gallium/drivers/svga/svga_format.c | 2 ++ src/gallium/i

Re: [Mesa-dev] [PATCH 2/5] gallium: Add support for 5551 with the 1-bit field in the low bit.

2017-05-03 Thread Eric Anholt
Roland Scheidegger writes: > Am 02.05.2017 um 21:33 schrieb Eric Anholt: >> --- >> >> Do I have the swizzles right here? It's a bit complicated because I >> have a reswizzle in vc4, so I may have just massaged things to work >> out in my case. I tried a lot of combinations trying to specify BE

[Mesa-dev] [PATCH 3/5 v2] glsl: Restrict func redeclarations (not just redefinitions) on GLSL 1.00.

2017-05-03 Thread Eric Anholt
Fixes DEQP's scoping.invalid.redeclare_function_fragment/vertex. v2: Fix accidental rejection of prototype+decl. Reviewed-by: Samuel Pitoiset --- Thanks for testing! Here's a new version with that fixed. Piglit series covering this regression and more, to follow. src/compiler/glsl/ast_to_hi

Re: [Mesa-dev] [PATCH 2/2] wglgears: fix up wglChoosePixelFormatARB() attribute list

2017-05-03 Thread Charmaine Lee
Looks great. For the series, Reviewed-by: Charmaine Lee From: Brian Paul Sent: Wednesday, May 3, 2017 12:49:40 PM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee; Neha Bhende Subject: [PATCH 2/2] wglgears: fix up wglChoosePixelFormatARB() attribute

Re: [Mesa-dev] [PATCH 16/17] st/mesa: upload zero-stride vertex attributes here

2017-05-03 Thread Marek Olšák
On Wed, May 3, 2017 at 6:04 PM, Nicolai Hähnle wrote: > On 01.05.2017 14:53, Marek Olšák wrote: >> >> From: Marek Olšák >> >> This is the best place to do it. Now drivers without u_vbuf don't have to >> do it. >> --- >> src/mesa/state_tracker/st_atom_array.c | 56 >> -

[Mesa-dev] [RFC PATCH 08/17] clover: Fill in the program byte-size in pipe_compute_state

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/kernel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp index 4716705323..328323b6b0 100644 --- a/src/gallium/state

[Mesa-dev] [RFC PATCH 14/17] clover: Accept SPIR-V binaries in clCreateProgramWithBinary

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/program.cpp | 35 --- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 9d59668f8f.

[Mesa-dev] [RFC PATCH 17/17] clover: Handle CL_PROGRAM_IL in clGetProgramInfo

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/program.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 57b8aedb91..5357724939 100644 --- a/src/g

[Mesa-dev] [RFC PATCH 15/17] clover: Implement clCreateProgramWithIL from OpenCL 2.1

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/program.cpp | 29 ++- src/gallium/state_trackers/clover/core/program.cpp | 57 -- src/gallium/state_trackers/clover/core/program.hpp | 14 ++ 3 files changed, 95 insertions(+), 5 deletions(-)

[Mesa-dev] [RFC PATCH 16/17] clover: Add a pointer property to return ILs

2017-05-03 Thread Pierre Moreau
OpenCL 2.1 gives the ability to query for a program’s IL, which is returned as a pointer. Signed-off-by: Pierre Moreau --- .../state_trackers/clover/core/property.hpp| 39 ++ 1 file changed, 39 insertions(+) diff --git a/src/gallium/state_trackers/clover/core/propert

[Mesa-dev] [RFC PATCH 13/17] clover: Handle the case when linking SPIR-V binaries together

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/program.cpp | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/program.cpp index 15d559cd93..6

[Mesa-dev] [RFC PATCH 12/17] clover: Refuse to compile source code to SPIR-V

2017-05-03 Thread Pierre Moreau
Creating a program using clCreateProgramWithSource to SPIR-V requires a non-upstreamed version of LLVM and clang, therefore it is currently not supported. Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/program.cpp | 4 1 file changed, 4 insertions(+) diff --git a/s

[Mesa-dev] [RFC PATCH 09/17] clover: Add additional functions to query supported IRs

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/device.cpp | 11 +++ src/gallium/state_trackers/clover/core/device.hpp | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/c

[Mesa-dev] [RFC PATCH 11/17] clover/spirv: Add functions for parsing arguments, linking programs, etc.

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/Makefile.am | 10 +- src/gallium/state_trackers/clover/Makefile.sources | 4 + .../state_trackers/clover/spirv/invocation.cpp | 481 + .../state_trackers/clover/spirv/invocation.hpp | 40 ++ 4

[Mesa-dev] [RFC PATCH 10/17] clover/spirv: Import spirv.hpp11 version 1.0 (rev 10)

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- .../state_trackers/clover/spirv/spirv.hpp11| 952 + 1 file changed, 952 insertions(+) create mode 100644 src/gallium/state_trackers/clover/spirv/spirv.hpp11 diff --git a/src/gallium/state_trackers/clover/spirv/spirv.hpp11 b/src/galli

[Mesa-dev] [RFC PATCH 06/17] include/CL: Add new option to clGetProgramInfo from OpenCL 2.1

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- include/CL/cl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/CL/cl.h b/include/CL/cl.h index 44d7aedc3e..cc8d7ddf60 100644 --- a/include/CL/cl.h +++ b/include/CL/cl.h @@ -455,6 +455,7 @@ typedef struct _cl_buffer_region { #define CL_PROGRAM_BINARIE

[Mesa-dev] [RFC PATCH 00/17] Introducing SPIR-V support to clover

2017-05-03 Thread Pierre Moreau
Hello everyone, I have been working on converting SPIR-V to NVIR in order to run OpenCL kernels on Nouveau, and I would like to submit the first part of that work for review. Pieces from the SPIR-V to NVIR conversion work will be submitted once I have cleaned it up and this series has progressed t

[Mesa-dev] [RFC PATCH 07/17] configure.ac: Check for SPIRV-Tools header and library

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- configure.ac | 16 1 file changed, 16 insertions(+) diff --git a/configure.ac b/configure.ac index ba042791ad..602aeb279d 100644 --- a/configure.ac +++ b/configure.ac @@ -2064,6 +2064,11 @@ AC_ARG_WITH([clang-libdir], PKG_CHECK_EXISTS([libclc]

[Mesa-dev] [RFC PATCH 01/17] auxiliary: Introduce utilities for SPIR-V binaries

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/auxiliary/Makefile.am | 1 + src/gallium/auxiliary/Makefile.sources| 4 ++ src/gallium/auxiliary/spirv/spirv_utils.c | 75 +++ src/gallium/auxiliary/spirv/spirv_utils.h | 86 +++ 4 files

[Mesa-dev] [RFC PATCH 05/17] include/CL: Add clCreateProgramWithIL from OpenCL 2.1

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- include/CL/cl.h | 6 ++ include/CL/cl_platform.h | 1 + 2 files changed, 7 insertions(+) diff --git a/include/CL/cl.h b/include/CL/cl.h index 316565d6e4..44d7aedc3e 100644 --- a/include/CL/cl.h +++ b/include/CL/cl.h @@ -757,6 +757,12 @@ clCreateProgr

[Mesa-dev] [RFC PATCH 02/17] auxiliary: Implement a linker for SPIR-V binaries

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/auxiliary/Makefile.sources |4 +- src/gallium/auxiliary/spirv/spirv_linker.c | 1324 src/gallium/auxiliary/spirv/spirv_linker.h | 67 ++ 3 files changed, 1394 insertions(+), 1 deletion(-) create mode 100644 src/g

[Mesa-dev] [RFC PATCH 03/17] include/pipe: Define SPIRV as an IR

2017-05-03 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- src/gallium/include/pipe/p_defines.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index ce2cfd1d88..71991383c2 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/i

[Mesa-dev] [RFC PATCH 04/17] include/pipe: Store the byte-size of a SPIR-V binary

2017-05-03 Thread Pierre Moreau
Besides parsing all the opcodes until reaching the EOF character, there is no way to compute the size of a SPIR-V binary. Therefore, it is easier to pass it along the SPIR-V binary in pipe_compute_state. Signed-off-by: Pierre Moreau --- src/gallium/include/pipe/p_state.h | 1 + 1 file changed, 1

Re: [Mesa-dev] [PATCH 2/2] wglgears: fix up wglChoosePixelFormatARB() attribute list

2017-05-03 Thread Neha Bhende
Looks good to me. For the series, Reviewed-by: Neha Bhende Regards, Neha From: Brian Paul Sent: Wednesday, May 3, 2017 12:49:40 PM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee; Neha Bhende Subject: [PATCH 2/2] wglgears: fix up wglChoosePixelFormatARB(

Re: [Mesa-dev] [PATCH 16/22] anv/cmd_buffer: Add transition_color_buffer()

2017-05-03 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/genX_cmd_buffer.c | 93 ++ > > 1 file changed, 93 insertions(+) > > diff --git a/src/intel/vulkan/genX_cmd_buffer.c > b/src/intel/vulkan/genX_cmd_buf

Re: [Mesa-dev] [PATCH v2 5/7] docs/releasing: added relevant people for build/check with Windows

2017-05-03 Thread Jose Fonseca
On 03/05/17 19:14, Andres Gomez wrote: v2: Brian Paul as main contact point and Jose Fonseca as fallback (Vinson, Jose) Signed-off-by: Andres Gomez Cc: Emil Velikov Cc: Vinson Lee Cc: Brian Paul Cc: Jose Fonseca --- docs/releasing.html | 5 + 1 file changed, 5 insertions(+) diff -

Re: [Mesa-dev] [PATCH 01/14] radeonsi/gfx9: make some PA & DB registers match the closed Vulkan driver

2017-05-03 Thread Marek Olšák
Ping On Fri, Apr 28, 2017 at 11:42 PM, Marek Olšák wrote: > From: Marek Olšák > > Cc: 17.1 > --- > src/amd/common/gfx9d.h | 4 > src/gallium/drivers/radeonsi/si_state.c | 21 ++--- > 2 files changed, 22 insertions(+), 3 deletions(-) >

[Mesa-dev] [PATCH 1/2] wglinfo: query format bitmap, pbuffer GDI rendering ability

2017-05-03 Thread Brian Paul
Only reported with -v option for now. --- src/wgl/wglinfo.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/wgl/wglinfo.c b/src/wgl/wglinfo.c index f81978b..faccbb1 100644 --- a/src/wgl/wglinfo.c +++ b/src/wgl/wglinfo.c @@ -44,6 +44,7 @@ static G

[Mesa-dev] [PATCH 2/2] wglgears: fix up wglChoosePixelFormatARB() attribute list

2017-05-03 Thread Brian Paul
Specify WGL_DRAW_TO_WINDOW_ARB and WGL_COLOR_BITS_ARB. Improve some comments, per Charmaine. --- src/wgl/wglgears.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wgl/wglgears.c b/src/wgl/wglgears.c index 7d43822..d673143 100644 --- a/src/wgl/wglgears.c +++ b

Re: [Mesa-dev] [PATCH 16/21] anv: Implement VK_KHX_external_semaphore_fd

2017-05-03 Thread Jason Ekstrand
On Wed, May 3, 2017 at 12:04 PM, Chad Versace wrote: > On Wed 03 May 2017, Jason Ekstrand wrote: > > On Tue, May 2, 2017 at 5:15 PM, Chad Versace <[1] > chadvers...@chromium.org> > > wrote: > > > > On Fri 14 Apr 2017, Jason Ekstrand wrote: > > > This implementation allocates a 4k BO for e

Re: [Mesa-dev] [PATCH 2/3] egl/platform/drm: Don't take display ownership until gbm is initialized

2017-05-03 Thread Eric Anholt
Adam Jackson writes: > If the gbm_create_device() call here actually did fail, any subsequent > eglTerminate on the display would segfault. #1 and 2 are: Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list me

Re: [Mesa-dev] [PATCH 3/3] egl: Implement EGL_EXT_device_{base, query, enumeration}

2017-05-03 Thread Eric Anholt
Adam Jackson writes: > From: Jonny Lamb > > This is a rebase/squash/rewrite of a series Jonny had sent long ago. The > major change is implementing this in terms of the drmDevice API. Both > relevant piglits go from skip to pass on i965. Just some style notes and one "why are we duplicating thi

[Mesa-dev] [PATCH v2 13/14] Android: Add LLVM support for Android O

2017-05-03 Thread Rob Herring
Android O moves to LLVM 3.9 and also has some differences in header dependencies as LLVM has moved to blueprint files. It seems libLLVMCore was only needed for header dependencies, so we can drop that for O. Signed-off-by: Rob Herring --- Android.mk | 5 - 1 file changed, 4 insertions(+), 1

Re: [Mesa-dev] [PATCH 06/12] Android: rework libelf dependencies

2017-05-03 Thread Rob Herring
On Tue, May 2, 2017 at 1:45 PM, Emil Velikov wrote: > On 2 May 2017 at 19:01, Rob Herring wrote: >> On Sun, Apr 30, 2017 at 4:52 AM, Emil Velikov >> wrote: >>> Hi Rob, >>> >>> On 27 April 2017 at 20:43, Rob Herring wrote: >>> --- a/src/gallium/targets/dri/Android.mk +++ b/src/gallium

[Mesa-dev] [PATCH v2 14/14] Android: Drop linking libgcc

2017-05-03 Thread Rob Herring
Including libgcc breaks on Android O (master). This doesn't appear to be needed any more as both Android M and N have also been built w/o libgcc. Signed-off-by: Rob Herring Reviewed-by: Chih-Wei Huang --- src/gallium/targets/dri/Android.mk | 4 1 file changed, 4 deletions(-) diff --git a/

[Mesa-dev] [PATCH v2 12/14] Android: rework LLVM build support

2017-05-03 Thread Rob Herring
Currently, building with "mmma external/mesa3d" which builds all targets and dependencies is broken for targets that require LLVM. This is due to the build settings depending on MESA_ENABLE_LLVM. Instead of using a conditional in the global Android.common.mk, make all the components that need LLVM

[Mesa-dev] [PATCH v2 11/14] Android: rework libelf dependencies

2017-05-03 Thread Rob Herring
Add libelf as a library dependency rather than explicitly listing its include paths. This should work for Android M and later which have the necessary exported directories in libelf. Signed-off-by: Rob Herring --- Android.common.mk | 2 -- src/amd/Android.common.mk | 6

  1   2   3   >