Re: [Mesa-dev] [PATCH 07/12] nir: Don't use ffma in nir_lower_wpos_ytransform().

2016-05-18 Thread Kenneth Graunke
On Thursday, May 19, 2016 8:39:45 AM PDT Michael Schellenberger Costa wrote: > Hi Kenneth, > > Am 19.05.2016 um 00:00 schrieb Kenneth Graunke: > > ffma is an explicitly fused multiply add with higher precision. > > The optimizer will take care of promoting mul/add to fma when > > it's beneficial t

Re: [Mesa-dev] [PATCH 5/5] anv: Enable textureCompressionASTC_LDR on Gen9+

2016-05-18 Thread Jason Ekstrand
Do we pass all the ASTC CTS tests? If so, Reviewed-by: Jason Ekstrand That wasn't nearly as much work as we'd feared it would be. Hooray for ISL! On May 18, 2016 5:33 PM, "Nanley Chery" wrote: > From: Nanley Chery > > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_device.c | 2

Re: [Mesa-dev] [PATCH 4/5] anv/format: Reorder ASTC mappings to match ISL enum ordering

2016-05-18 Thread Jason Ekstrand
I think they were in Vulkan order. I don't know which is best. On May 18, 2016 5:33 PM, "Nanley Chery" wrote: > From: Nanley Chery > > Keep the lists consistent for ease of use. > > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_formats.c | 28 ++-- > 1 file

[Mesa-dev] [PATCH 2/4] anv/apply_dynamic_offsets: Use rewrite_src instead of a regular assignment

2016-05-18 Thread Jason Ekstrand
Originally we removed the instruction, changed the source, and then re-inserted it. This works, but nir_instr_rewrite_src is a bit more obviously correct. --- src/intel/vulkan/anv_nir_apply_dynamic_offsets.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/vulka

[Mesa-dev] [PATCH 3/4] anv/pipeline: Only do buffer bounds checks if robustBufferAccess is enabled

2016-05-18 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_apply_dynamic_offsets.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_nir_apply_dynamic_offsets.c b/src/intel/vulkan/anv_nir_apply_dynamic_offsets.c index a7ed3e5..ef9d1f4 100644 --- a/src/intel/vulkan/anv_nir_

[Mesa-dev] [PATCH 4/4] anv/pipeline: Bounds-check resource indices when robuts_buffer_access is enabled

2016-05-18 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 52 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index 91f4322..7e66149 100644 --- a/src/intel/vul

[Mesa-dev] [PATCH 1/4] anv/device: Add a boolean for robust buffer access

2016-05-18 Thread Jason Ekstrand
--- src/intel/vulkan/anv_device.c | 3 +++ src/intel/vulkan/anv_private.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 54810d9..fbc94ca 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -8

Re: [Mesa-dev] [PATCH] glsl: Use correct mode for split components.

2016-05-18 Thread Jordan Justen
On 2016-04-25 16:39:21, Kenneth Graunke wrote: > On Wednesday, April 20, 2016 3:42:01 PM PDT Bas Nieuwenhuizen wrote: > > The mode should stay the same as the original struct. In > > particular, shared should not be changed to temporary. > > > > Signed-off-by: Bas Nieuwenhuizen > > --- > > src/c

[Mesa-dev] [PATCH 2/2] nvc0: account for shader-allocated local memory needs

2016-05-18 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 2 +- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c b/src/gallium/drivers/nouveau/nvc0/nvc0_co

[Mesa-dev] [PATCH 1/2] nvc0: clear out surfaces bufctx before rebinding everything

2016-05-18 Thread Ilia Mirkin
Otherwise we can end up in a situation where that bin just grows and grows. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nvc0/nvc0_tex.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c b/src/gallium/drivers/nouveau/nvc0/nvc0_tex

[Mesa-dev] [PATCH 4/5] anv/format: Reorder ASTC mappings to match ISL enum ordering

2016-05-18 Thread Nanley Chery
From: Nanley Chery Keep the lists consistent for ease of use. Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_formats.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index

[Mesa-dev] [PATCH 1/5] isl: Add 2D ASTC format layouts and enums

2016-05-18 Thread Nanley Chery
From: Nanley Chery Also, make changes needed for successful compilation and registration as a texture compression mode. Signed-off-by: Nanley Chery --- src/intel/isl/isl.h | 30 ++ src/intel/isl/isl_format_layout.csv | 28 ++

[Mesa-dev] [PATCH 2/5] isl: Handle npot ASTC block dimensions on Gen9+

2016-05-18 Thread Nanley Chery
From: Nanley Chery Signed-off-by: Nanley Chery --- src/intel/isl/isl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index ca2db84..e4bca16 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -481,8 +481,8 @@ isl_

[Mesa-dev] [PATCH 5/5] anv: Enable textureCompressionASTC_LDR on Gen9+

2016-05-18 Thread Nanley Chery
From: Nanley Chery Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_device.c | 2 +- src/intel/vulkan/anv_formats.c | 56 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device

[Mesa-dev] [PATCH 3/5] genxml: Expand SKL's SurfaceFormat field width for ASTC

2016-05-18 Thread Nanley Chery
From: Nanley Chery In the expanded field, only ASTC format enums have the MSB set to 1. Expanding the field width makes the process of handling these formats identical to the way other formats are handled. Signed-off-by: Nanley Chery --- src/intel/genxml/gen9.xml | 3 +-- 1 file changed, 1 ins

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Matt Turner
On Wed, May 18, 2016 at 2:21 PM, Kenneth Graunke wrote: > and I think it looks nicer if the opening quote is offset by 1 so that > the actual quoted text lines up. It's just something I've always done. Very much agreed. ___ mesa-dev mailing list mesa-d

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Kenneth Graunke
On Wednesday, May 18, 2016 3:18:16 PM PDT Ian Romanick wrote: > On 05/18/2016 02:21 PM, Kenneth Graunke wrote: > > On Wednesday, May 18, 2016 1:12:29 PM PDT Ian Romanick wrote: > >> From: Ian Romanick > >> > >> v2: Remove extra "ES" from "GLSL ES ES". Noticed by Chris Forbes. > >> > >> v3: Many u

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Ian Romanick
On 05/18/2016 02:21 PM, Kenneth Graunke wrote: > On Wednesday, May 18, 2016 1:12:29 PM PDT Ian Romanick wrote: >> From: Ian Romanick >> >> v2: Remove extra "ES" from "GLSL ES ES". Noticed by Chris Forbes. >> >> v3: Many updates based on (very old) feedback from Paul Berry and (more >> recent) obs

Re: [Mesa-dev] [PATCH 2/3] glx/glvnd: Use strcmp() based binary search in FindGLXFunction()

2016-05-18 Thread Kyle Brenneman
That binary search needs to set middle inside the while loop, not just once at the top. Also, I think that should be "last = middle - 1", not "last = middle". -Kyle On 05/11/2016 12:01 PM, Adam Jackson wrote: From: Emil Velikov It will allows us to find the function within 6 attempts, out o

[Mesa-dev] [PATCH 04/12] nir: Make nir_lower_wpos_ytransform() match FragCoord by location.

2016-05-18 Thread Kenneth Graunke
gl_FragCoord is a shader input with location == VARYING_SLOT_POS. ARB_fragment_programs have an equivalent input at VARYING_SLOT_POS, but it isn't called gl_FragCoord. We do want to transform it. Matching by location guarantees we catch both. Fixes several fp tests on a branch which uses this pa

[Mesa-dev] [PATCH 10/12] i965: Delete brw_wm_prog_key::render_to_fbo and drawable_height.

2016-05-18 Thread Kenneth Graunke
Now that we handle flipping and other gl_FragCoord transformations via a uniform, these key fields have no users. This patch actually eliminates the associated recompiles. The Tomb Raider benchmark's minimum FPS increases from ~1 FPS to a reasonable number. Signed-off-by: Kenneth Graunke --- s

[Mesa-dev] [PATCH 02/12] nir: Fix fddy swizzles in nir_lower_wpos_ytransform().

2016-05-18 Thread Kenneth Graunke
The original value might have been swizzled. That's taken care of in the fmul source - we don't want to reswizzle it again. Fixes validation failures in glsl-derivs-varyings on a branch of mine which uses this pass in i965. Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytr

[Mesa-dev] [PATCH 12/12] spirv: Handle the PixelCenterInteger execution mode.

2016-05-18 Thread Kenneth Graunke
This isn't allowed by Vulkan, but might be useful someday for SPIR-V in OpenGL (if that ever becomes a thing). It's easy enough to hook up, and as precedent, we already do so for OriginLowerLeft. Signed-off-by: Kenneth Graunke --- src/compiler/spirv/spirv_to_nir.c | 3 +++ src/compiler/spirv/v

[Mesa-dev] [PATCH 11/12] i965: Delete dead dFdy flipping code.

2016-05-18 Thread Kenneth Graunke
Rob's pass flips dFdy in the opposite case of what I expected, so we always take the negate_value case. It doesn't really matter. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) di

[Mesa-dev] [PATCH 08/12] nir: Add a simple nir_lower_wpos_center() pass for Vulkan drivers.

2016-05-18 Thread Kenneth Graunke
nir_lower_wpos_ytransform() is great for OpenGL, which allows applications to choose whether their coordinate system's origin is upper left/lower left, and whether the pixel center should be on integer/half-integer boundaries. Vulkan, however, has much simpler requirements: the pixel center is alw

[Mesa-dev] [PATCH 06/12] nir: Handle fddy_fine and fddy_coarse in nir_lower_wpos_ytransform.

2016-05-18 Thread Kenneth Graunke
These also need flipping! Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytransform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 7741df2..36e25b9 100

[Mesa-dev] [PATCH 05/12] nir: Make lower_wpos_ytransform_block a void function.

2016-05-18 Thread Kenneth Graunke
The return value was used for the old nir_foreach_block callback system, but at this point it no longer means anything. Signed-off-by: Kenneth Graunke Reviewed-by: Rob Clark --- src/compiler/nir/nir_lower_wpos_ytransform.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/s

[Mesa-dev] [PATCH 07/12] nir: Don't use ffma in nir_lower_wpos_ytransform().

2016-05-18 Thread Kenneth Graunke
ffma is an explicitly fused multiply add with higher precision. The optimizer will take care of promoting mul/add to fma when it's beneficial to do so. This fixes failures on Gen4-5 when using this pass, as those platforms don't actually implement fma(). Signed-off-by: Kenneth Graunke --- src/c

[Mesa-dev] [PATCH 03/12] nir: Add interp_var_at_offset flipping.

2016-05-18 Thread Kenneth Graunke
The Y-offset needs flipping as well, similar to ddy. Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytransform.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransfo

[Mesa-dev] [PATCH 09/12] i965, anv: Use NIR FragCoord re-center and y-transform passes.

2016-05-18 Thread Kenneth Graunke
This handles gl_FragCoord transformations and other window system vs. user FBO coordinate system flipping by multiplying/adding uniform values, rather than recompiles. This is much better because we have no decent way to guess whether the application is going to use a shader with the window system

[Mesa-dev] [PATCH 01/12] nir: Fix wpos_ytransform lowering state_slot swizzle.

2016-05-18 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytransform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 1d53530..5546788 100644 --- a/src/compiler/nir/nir_lower_wpos_yt

Re: [Mesa-dev] [PATCH] anv/batch_chain: free pointers for error cases

2016-05-18 Thread Jason Ekstrand
R-B On Wed, May 18, 2016 at 2:37 PM, Mark Janes wrote: > Trivial fix to improperly handled cleanup during > VK_ERROR_OUT_OF_HOST_MEMORY. > > Identified by Coverity: CID 1358908 and 1358909 > --- > src/intel/vulkan/anv_batch_chain.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [Mesa-dev] [PATCH 00/39] Some nine patches for Mesa 12.0

2016-05-18 Thread Axel Davy
Hi, I plan to merge the patches when freedesktop comes back, except d3dadapter9: Add d3dadapter9.pc which needs more work and llvmpipe: Fix overflow for 32 bits available memory computation for which discussions aren't finished. Axel On 15/05/2016 12:45, Axel Davy wrote: Hi, Here are so

Re: [Mesa-dev] [PATCH] glsl/linker: attempt to match anonymous structures at link

2016-05-18 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 05/16/2016 05:33 PM, Dave Airlie wrote: > From: Dave Airlie > > This is my attempt at fixing at least one of the UE4 bugs with GL4.3. > > If we are doing intrastage matching and hit anonymous structs, then > we should do a record comparison instead o

[Mesa-dev] [PATCH] anv/batch_chain: free pointers for error cases

2016-05-18 Thread Mark Janes
Trivial fix to improperly handled cleanup during VK_ERROR_OUT_OF_HOST_MEMORY. Identified by Coverity: CID 1358908 and 1358909 --- src/intel/vulkan/anv_batch_chain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_b

Re: [Mesa-dev] [Mesa-announce] Mesa 11.1.4

2016-05-18 Thread enpeng xu
i agree, in fact, it's helpful to ship pre-generated files, especially for some platforms which do not use standard mesa Makefiles to build mesa:). Thanks Enpeng On Wed, May 18, 2016 at 5:19 PM, Matt Turner wrote: > On Wed, May 18, 2016 at 1:39 PM, Emil Velikov > wrote: > > That said, if we ge

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Kenneth Graunke
On Wednesday, May 18, 2016 1:12:29 PM PDT Ian Romanick wrote: > From: Ian Romanick > > v2: Remove extra "ES" from "GLSL ES ES". Noticed by Chris Forbes. > > v3: Many updates based on (very old) feedback from Paul Berry and (more > recent) observation of what is most commonly done in the code ba

Re: [Mesa-dev] [Mesa-announce] Mesa 11.1.4

2016-05-18 Thread Matt Turner
On Wed, May 18, 2016 at 1:39 PM, Emil Velikov wrote: > That said, if we get consensus that we shouldn't ship them I can make > that happen. I'm against that. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/

Re: [Mesa-dev] [PATCH 2/2] i965/fs: Silence warnings related to use of uninitialized values

2016-05-18 Thread Anuj Phogat
On Tue, May 17, 2016 at 3:21 AM, Eduardo Lima Mitev wrote: > brw_fs.cpp: In function ‘const unsigned int* brw_compile_fs(const [...] > brw_fs.cpp:6093:64: warning: ‘simd16_grf_start’ may be used uninitialized > [...] >prog_data->base.dispatch_grf_start_reg = simd16_grf_start; > > brw_fs.c

Re: [Mesa-dev] [PATCH 1/2] Silence warnings related to nir_texop_txf_ms_mcs not handled in switch

2016-05-18 Thread Anuj Phogat
On Tue, May 17, 2016 at 3:21 AM, Eduardo Lima Mitev wrote: > Such as > > ir3/ir3_compiler_nir.c: In function ‘emit_tex’: > ir3/ir3_compiler_nir.c:1438:2: warning: enumeration value > ‘nir_texop_txf_ms_mcs’ >not handled in switch [-Wswitch] > > and > > spirv/spirv_t

Re: [Mesa-dev] [PATCH] gallium/util: Implement util_format_translate_3D

2016-05-18 Thread Axel Davy
On 18/05/2016 22:49, Emil Velikov wrote: On 18 May 2016 at 21:33, Axel Davy wrote: This is the equivalent of util_format_translate, but for volumes. Signed-off-by: Axel Davy --- Emil, I hope I understood what you wanted correctly. Imho the function name should be all lowercase - util_format

Re: [Mesa-dev] [PATCH] gallium/util: Implement util_format_translate_3D

2016-05-18 Thread Emil Velikov
On 18 May 2016 at 21:33, Axel Davy wrote: > This is the equivalent of util_format_translate, but for volumes. > > Signed-off-by: Axel Davy > --- > Emil, I hope I understood what you wanted correctly. > Imho the function name should be all lowercase - util_format_translate_3d. The rest of gallium

Re: [Mesa-dev] Mesa 11.1.4

2016-05-18 Thread Emil Velikov
On 18 May 2016 at 16:15, enpeng xu wrote: > Hi Emil, > I just downloaded mesa-11.1.4 and found glsl_lexer.cpp was in the release > source code, > further more, in the file, there are some absolute path generated from flex > like this: > > #line 1 "/home/emil/development/mesa/src/glsl/glsl_lexer.ll

[Mesa-dev] [PATCH] gallium/util: Implement util_format_translate_3D

2016-05-18 Thread Axel Davy
This is the equivalent of util_format_translate, but for volumes. Signed-off-by: Axel Davy --- Emil, I hope I understood what you wanted correctly. src/gallium/auxiliary/util/u_format.c | 34 ++ src/gallium/auxiliary/util/u_format.h | 13 + 2 files ch

[Mesa-dev] [PATCH] d3dadapter9: Add ddebug, rbug and trace support

2016-05-18 Thread Axel Davy
Add support for ddebug, rbug and trace Signed-off-by: Axel Davy --- src/gallium/targets/d3dadapter9/Makefile.am | 9 + 1 file changed, 9 insertions(+) diff --git a/src/gallium/targets/d3dadapter9/Makefile.am b/src/gallium/targets/d3dadapter9/Makefile.am index 8b27938..c37da98 100644 --

[Mesa-dev] [Bug 91687] Crash when creating new context after destroying the old one using indirect rendering

2016-05-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91687 Marius Cirsta changed: What|Removed |Added CC||mfor...@gmail.com --- Comment #5 from Ma

[Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Ian Romanick
From: Ian Romanick v2: Remove extra "ES" from "GLSL ES ES". Noticed by Chris Forbes. v3: Many updates based on (very old) feedback from Paul Berry and (more recent) observation of what is most commonly done in the code base. Signed-off-by: Ian Romanick Cc: Brian Paul --- docs/devinfo.html |

Re: [Mesa-dev] [PATCH 03/39] llvmpipe: Fix overflow for 32 bits available memory computation

2016-05-18 Thread Axel Davy
On 16/05/2016 20:08, Emil Velikov wrote: Then there's the question if other drivers want to apply, and thus move, it elsewhere. -Emil Has anyone an opinion about that particular point ? Axel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.or

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Ian Romanick
On 05/18/2016 11:45 AM, Manolova, Plamena wrote: > Hi Ian, > Thanks for reviewing! > > On Wed, May 18, 2016 at 4:33 PM, Ian Romanick > wrote: > > On 05/17/2016 09:35 AM, Plamena Manolova wrote: > > According to the EGL specifications before binding an API >

[Mesa-dev] [PATCH] i965/compute: Fix uniform init issue when SIMD8 is skipped

2016-05-18 Thread Jordan Justen
In d8347f12ead89c5a58f69ce9283a54ac8487159c, we added support for skipping SIMD8 generation when the program local size is too large for SIMD8 to be usable. This change was missed in that commit. This bug would impact gen7 platforms when the compute shader local size is greater than 512, and gen8

Re: [Mesa-dev] [PATCH] anv/device: Fix viewportBoundsRange

2016-05-18 Thread Anuj Phogat
On Tue, May 17, 2016 at 4:23 PM, Nanley Chery wrote: > From: Nanley Chery > > Align with the spec requirement that the range must be at least > [−2 × maxViewportDimensions, 2 × maxViewportDimensions − 1]. Our > hardware supports this. > > Fixes dEQP-VK.api.info.device.properties > > Bugzilla: htt

[Mesa-dev] [AppVeyor] mesa master #1281 failed

2016-05-18 Thread AppVeyor
Build mesa 1281 failed Commit 2a8aa1e3de by Ardinartsev Nikita on 5/16/2016 11:27 PM: i965/urb: fixes division by zero\n\nFixes regression introduced by af5ca43f2676bff7499f93277f908b681cb821d0\n\nReviewed-by: Matt Turner \nBugzilla: https://bugs.freedesktop.or

Re: [Mesa-dev] [RFC 5/7] nir: fix block iterator coverity warning

2016-05-18 Thread Connor Abbott
nir_cf_node_cf_tree_next() never returns NULL, maybe we can mark it as such? Also, what is coverity saying... we never dereference anything here, only inside the functions themselves... On Wed, May 18, 2016 at 11:54 AM, Rob Clark wrote: > From: Rob Clark > > For example, in nir_opt_dead_cf.c:140

Re: [Mesa-dev] [PATCH 00/14] st/mesa: accelerate glReadPixels PBO downloads

2016-05-18 Thread Brian Paul
On 05/18/2016 09:25 AM, Nicolai Hähnle wrote: Hi, this series makes the existing PBO texture upload code symmetric, adding a download path that uses shader images a no-attachment framebuffers. This should help performance by reducing stalls in several games, including GRID: Autosport (verified w

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Manolova, Plamena
Hi Ian, Thanks for reviewing! On Wed, May 18, 2016 at 4:33 PM, Ian Romanick wrote: > On 05/17/2016 09:35 AM, Plamena Manolova wrote: > > According to the EGL specifications before binding an API > > we must check whether it's supported first. If not eglBindAPI > > should return EGL_FALSE and gen

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Manolova, Plamena
Hi Emil, Thanks for reviewing! On Wed, May 18, 2016 at 12:11 PM, Emil Velikov wrote: > Hi Plamena, > > On 17 May 2016 at 17:35, Plamena Manolova > wrote: > > According to the EGL specifications before binding an API > > we must check whether it's supported first. If not eglBindAPI > > should r

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add back multithreaded command submission

2016-05-18 Thread Marek Olšák
,On Wed, May 18, 2016 at 7:48 PM, Nicolai Hähnle wrote: > On 18.05.2016 11:58, Marek Olšák wrote: >> >> On Sat, May 7, 2016 at 5:12 PM, Nicolai Hähnle wrote: >>> >>> Looks good to me, just two remarks below... >>> >>> >>> On 06.05.2016 13:31, Marek Olšák wrote: From: Marek Olšák >

Re: [Mesa-dev] Mesa 11.1.4

2016-05-18 Thread Matt Turner
On Wed, May 18, 2016 at 8:15 AM, enpeng xu wrote: > Hi Emil, > I just downloaded mesa-11.1.4 and found glsl_lexer.cpp was in the release > source code, > further more, in the file, there are some absolute path generated from flex > like this: > > #line 1 "/home/emil/development/mesa/src/glsl/glsl_

[Mesa-dev] [PATCH v2] radeon: fixed division by zero

2016-05-18 Thread Jakob Sinclair
Coverity is getting a false positive that a division by zero can occur here. This change will silence the Coverity warnings as a division by zero cannot occur in this case. Signed-off-by: Jakob Sinclair --- Changes since V1: We realised that Coverity was actually giving out a false positive and

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add back multithreaded command submission

2016-05-18 Thread Nicolai Hähnle
On 18.05.2016 11:58, Marek Olšák wrote: On Sat, May 7, 2016 at 5:12 PM, Nicolai Hähnle wrote: Looks good to me, just two remarks below... On 06.05.2016 13:31, Marek Olšák wrote: From: Marek Olšák Ported from the initial amdgpu winsys from the private AMD branch. The thread creates the bu

Re: [Mesa-dev] [PATCH] radeonsi: add a workaround for a bug in LLVM <= 3.8

2016-05-18 Thread Marek Olšák
On Wed, May 18, 2016 at 6:41 PM, Nicolai Hähnle wrote: > On 18.05.2016 11:13, Marek Olšák wrote: >> >> From: Marek Olšák >> >> This is not directly applicable to stable and needs to be backported. > > > This is because LLVM gets confused / misled about SGPRs vs. VGPRs, right? > It's unfortunate,

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add back multithreaded command submission

2016-05-18 Thread Marek Olšák
On Sat, May 7, 2016 at 5:12 PM, Nicolai Hähnle wrote: > Looks good to me, just two remarks below... > > > On 06.05.2016 13:31, Marek Olšák wrote: >> >> From: Marek Olšák >> >> Ported from the initial amdgpu winsys from the private AMD branch. >> >> The thread creates the buffer list, submits IBs,

Re: [Mesa-dev] [PATCH 4/4] gallium/radeon: small cleanups in r600_texture_transfer_map

2016-05-18 Thread Nicolai Hähnle
For the series: Reviewed-by: Nicolai Hähnle On 18.05.2016 11:13, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeon/r600_texture.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/

Re: [Mesa-dev] [PATCH] radeonsi: add a workaround for a bug in LLVM <= 3.8

2016-05-18 Thread Nicolai Hähnle
On 18.05.2016 11:13, Marek Olšák wrote: From: Marek Olšák This is not directly applicable to stable and needs to be backported. This is because LLVM gets confused / misled about SGPRs vs. VGPRs, right? It's unfortunate, but I see no better way, so... Reviewed-by: Nicolai Hähnle --- sr

Re: [Mesa-dev] [PATCH v3] glsl/linker: dvec3/dvec4 consume twice input vertex attributes

2016-05-18 Thread Kenneth Graunke
On Wednesday, May 18, 2016 1:19:39 PM PDT Juan A. Suarez Romero wrote: > From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes): > > "A program with more than the value of MAX_VERTEX_ATTRIBS > active attribute variables may fail to link, unless > device-dependent optimizations are able to m

Re: [Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Jakob Sinclair
On 2016-05-18 16:08, Nicolai Hähnle wrote: On 18.05.2016 08:17, Jakob Sinclair wrote: In the function r600_test_dma the max_width and max_height can be set to zero. Thanks for looking into that. Can they really? I see max_width = MIN2(tsrc.width0, tdst.width0); max_height = MIN2(tsrc.height0

Re: [Mesa-dev] [PATCH 1/2] mesa: Don't advertise GLES 3.1 without compute support

2016-05-18 Thread Marek Olšák
Thanks, I'm going to push this soon. Marek On Tue, Apr 19, 2016 at 4:57 PM, Daniel Scharrer wrote: > The MaxComputeWorkGroupInvocations constant is used in > compute_version_es2() instead of extensions->ARB_compute_shader > as ES has lower requirements than desktop GL. > > Both i965 and gallium

Re: [Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Marek Olšák
I guess Coverity doesn't know that rand() can't return a negative number. Marek On Wed, May 18, 2016 at 4:08 PM, Nicolai Hähnle wrote: > On 18.05.2016 08:17, Jakob Sinclair wrote: >> >> In the function r600_test_dma the max_width and max_height can be set to >> zero. > > > Thanks for looking int

[Mesa-dev] [PATCH 2/4] gallium/radeon: handle VRAM_GTT placements as having slow CPU reads

2016-05-18 Thread Marek Olšák
From: Marek Olšák not sure if we should include GTT WC too --- src/gallium/drivers/radeon/r600_buffer_common.c | 2 +- src/gallium/drivers/radeon/r600_texture.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gal

[Mesa-dev] [PATCH 3/4] gallium/radeon: don't set PB_USAGE in winsyses

2016-05-18 Thread Marek Olšák
From: Marek Olšák There is no point. --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 2 -- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index ed12f30.

[Mesa-dev] [PATCH 4/4] gallium/radeon: small cleanups in r600_texture_transfer_map

2016-05-18 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_texture.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index a00dedc..e2955aa 100644 --- a/src/gallium/drive

[Mesa-dev] [PATCH 1/4] gallium/radeon: ignore PIPE_TRANSFER_MAP_DIRECTLY

2016-05-18 Thread Marek Olšák
From: Marek Olšák Only st/xa is using this, which is irrelevant to us. --- src/gallium/drivers/radeon/r600_texture.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index c89afbc..b22f

[Mesa-dev] [PATCH] radeonsi: add a workaround for a bug in LLVM <= 3.8

2016-05-18 Thread Marek Olšák
From: Marek Olšák This is not directly applicable to stable and needs to be backported. --- src/gallium/drivers/radeonsi/si_shader.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 6166403..3df7

[Mesa-dev] [RFC 1/7] nir/glsl_to_nir: quell some uninit_member coverity errors

2016-05-18 Thread Rob Clark
From: Rob Clark --- src/compiler/nir/glsl_to_nir.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index b25f065..3b487ff 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b/src/compiler/nir/glsl_to_nir.cpp @@ -213,

[Mesa-dev] [RFC 5/7] nir: fix block iterator coverity warning

2016-05-18 Thread Rob Clark
From: Rob Clark For example, in nir_opt_dead_cf.c:140: CID 1358914 (#1 of 1): Dereference null return value (NULL_RETURNS)13. dereference: Dereferencing a null pointer block. --- src/compiler/nir/nir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.h b/

[Mesa-dev] [RFC 7/7] nir/validate: assume() that hashtable entry exists

2016-05-18 Thread Rob Clark
From: Rob Clark At this point, it would require a logic error in nir_validate to not have already populated this hashtable entry, but coverity doesn't realize that: CID 1265547 (#1 of 1): Dereference null return value (NULL_RETURNS)3. dereference: Dereferencing a null pointer entry. CID 1271039

[Mesa-dev] [RFC 6/7] nir/validate: fix null deref coverity warning

2016-05-18 Thread Rob Clark
From: Rob Clark CID 1265536 (#1 of 2): Explicit null dereferenced (FORWARD_NULL)6. var_deref_op: Dereferencing null pointer parent. --- src/compiler/nir/nir_validate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index b186

[Mesa-dev] [RFC 2/7] nir: coverity sign-extension fix

2016-05-18 Thread Rob Clark
From: Rob Clark Not 100% sure, but I think being an unsigned literal will help: CID 1358505 (#1 of 1): Unintended sign extension (SIGN_EXTENSION)sign_extension: Suspicious implicit sign extension: load1->def.num_components with type unsigned char (8 bits, unsigned) is promoted in load1->def.num_

[Mesa-dev] [RFC 4/7] nir/array: fix empty-iterator coverity warning

2016-05-18 Thread Rob Clark
From: Rob Clark For example, at nir_lower_locals_to_regs.c:365: CID 1358911 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)7. var_deref_op: Dereferencing null pointer deref_ptr. I'm pretty sure that coverity doesn't understand the relationship between arr->data and arr->size. I think thro

[Mesa-dev] [RFC 3/7] nir: coverity unitialized pointer read

2016-05-18 Thread Rob Clark
From: Rob Clark Not sure how coverity arrives at the conclusion that we can read comp[j] unitialized (around line 204), other than not being aware that ncomp is greater than 1 so it won't underflow in the 'if (tex->is_array)' case. --- src/compiler/nir/nir_lower_tex.c | 6 ++ 1 file changed,

[Mesa-dev] [RFC 0/7] nir: some coverity (hopefully) fixes

2016-05-18 Thread Rob Clark
From: Rob Clark So I went through some of the nir coverity issues this morning. For the most part, they are cases which can never happen, so it is more of quieting the warnings than fixing actual issues. (But IMHO it is good to improve the signal/noise of the results so we notice real issues.)

[Mesa-dev] [PATCH 02/14] gallium/u_inlines: allow NULL src in util_copy_image_view

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/auxiliary/util/u_inlines.h | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 07c058a..789f6d6 100644 --- a/src/gallium/auxiliary/util/u_i

[Mesa-dev] [PATCH 07/14] st/mesa: move PBO upload fs creation to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 78 +- src/mesa/state_tracker/st_pbo.c| 76 + src/mesa/state_tracker/st_pbo.h| 3 ++ 3 files changed, 80 insertions(+), 77 deletions(-) diff --git a

[Mesa-dev] [PATCH 14/14] st/mesa: implement PBO downloads for ReadPixels

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_readpixels.c | 142 +- src/mesa/state_tracker/st_pbo.c | 16 src/mesa/state_tracker/st_pbo.h | 4 + 3 files changed, 159 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracke

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Ian Romanick
On 05/17/2016 09:35 AM, Plamena Manolova wrote: > According to the EGL specifications before binding an API > we must check whether it's supported first. If not eglBindAPI > should return EGL_FALSE and generate a EGL_BAD_PARAMETER error. Can you provide a spec quotation? > Signed-off-by: Plamena

[Mesa-dev] [PATCH 00/14] st/mesa: accelerate glReadPixels PBO downloads

2016-05-18 Thread Nicolai Hähnle
Hi, this series makes the existing PBO texture upload code symmetric, adding a download path that uses shader images a no-attachment framebuffers. This should help performance by reducing stalls in several games, including GRID: Autosport (verified with an apitrace), Metro 2033 Redux, and likely o

[Mesa-dev] [PATCH 10/14] st/mesa: add PBO download enable bit and fragment shaders

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle For downloads, the fragment shader must know the source texture target, hence we may cache multiple fragment shaders. --- src/mesa/state_tracker/st_context.h | 2 ++ src/mesa/state_tracker/st_pbo.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 04/14] st/mesa: begin moving PBO functions into their own file

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/Makefile.sources | 2 + src/mesa/state_tracker/st_cb_texture.c | 53 src/mesa/state_tracker/st_cb_texture.h | 6 --- src/mesa/state_tracker/st_context.c| 5 +- src/mesa/state_tracker/st_pbo.c| 89 +

[Mesa-dev] [PATCH 03/14] gallium/cso: allow saving the first fragment shader image slot

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/auxiliary/cso_cache/cso_context.c | 39 +++ src/gallium/auxiliary/cso_cache/cso_context.h | 9 +++ src/mesa/state_tracker/st_atom_image.c| 9 --- 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/gal

[Mesa-dev] [PATCH 08/14] st/mesa: move PBO buffer address calculation to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 168 ++--- src/mesa/state_tracker/st_pbo.c| 113 ++ src/mesa/state_tracker/st_pbo.h| 43 + 3 files changed, 204 insertions(+), 120 deletions(-) diff --git a

[Mesa-dev] [PATCH 11/14] st/mesa: create PBO download fragment shaders

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_pbo.c | 83 + src/mesa/state_tracker/st_pbo.h | 3 ++ 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 57ff9b0..c7735

[Mesa-dev] [PATCH 09/14] st/mesa: move shareable parts of PBO upload state and draw to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 109 + src/mesa/state_tracker/st_pbo.c| 122 + src/mesa/state_tracker/st_pbo.h| 4 ++ 3 files changed, 129 insertions(+), 106 deletions(-) diff --git a

[Mesa-dev] [PATCH 01/14] gallium: add PIPE_BARRIER_ALL define

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- 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 c231022..91f933b 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p

[Mesa-dev] [PATCH 12/14] st/mesa: add layer_offset to PBO fragment shader

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle This will be used to select a slice of a 3D texture. --- src/mesa/state_tracker/st_pbo.c | 19 +++ src/mesa/state_tracker/st_pbo.h | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker

[Mesa-dev] [PATCH 13/14] st/mesa: hook up a no-op try_pbo_readpixels

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle For better bisectability given that the order of some of the fallback tests in the blit path are rearranged. --- src/mesa/state_tracker/st_cb_readpixels.c | 57 --- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/src/mesa/state_tra

[Mesa-dev] [PATCH 06/14] st/mesa: rename pbo_upload to pbo

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle At the same time, rename members that are upload-specific to say so. --- src/mesa/state_tracker/st_cb_texture.c | 40 ++--- src/mesa/state_tracker/st_context.h| 10 src/mesa/state_tracker/st_pbo.c| 46 +

[Mesa-dev] [PATCH 05/14] st/mesa: move PBO vertex and geometry shader creation to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 92 ++ src/mesa/state_tracker/st_pbo.c| 88 src/mesa/state_tracker/st_pbo.h| 6 +++ 3 files changed, 97 insertions(+), 89 deletions(-) diff --git a

Re: [Mesa-dev] Mesa 11.1.4

2016-05-18 Thread enpeng xu
Hi Emil, I just downloaded mesa-11.1.4 and found glsl_lexer.cpp was in the release source code, further more, in the file, there are some absolute path generated from flex like this: #line 1 "/home/emil/development/mesa/src/glsl/glsl_lexer.ll" #line 2 "/home/emil/development/mesa/src/glsl/glsl_lex

Re: [Mesa-dev] [PATCH] spirv: add switch case for nir_texop_txf_ms_mcs in vtn_handle_texture()

2016-05-18 Thread Jason Ekstrand
R-b On May 18, 2016 5:59 AM, "Brian Paul" wrote: > Mark it as unreachable. Silences a compiler warning: > > spirv/spirv_to_nir.c:1397:4: warning: enumeration value > 'nir_texop_txf_ms_mcs' not handled in switch [-Wswitch] > switch (instr->op) { > ^ > --- > src/compiler/spirv/spirv_to_ni

Re: [Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Nicolai Hähnle
On 18.05.2016 08:17, Jakob Sinclair wrote: In the function r600_test_dma the max_width and max_height can be set to zero. Thanks for looking into that. Can they really? I see max_width = MIN2(tsrc.width0, tdst.width0); max_height = MIN2(tsrc.height0, tdst.height0); and

  1   2   >