Re: [Mesa-dev] [PATCH 1/2] glsl: Don't rehash the values when copying to new table

2016-12-29 Thread Tapani Pälli
On 12/30/2016 05:53 AM, Vladislav Egorov wrote: I've looked into it recently (I'm working on series of many various trivial optimizations) and it's faster to just memcpy() it. Just throwing out superfluous hashing still keeps slow hash-table insertion around -- with resizing, rehashing,

Re: [Mesa-dev] [PATCH] anv, radv: disable StorageImageWriteWithoutFormat for now

2016-12-29 Thread Dave Airlie
On 30 December 2016 at 15:52, Ilia Mirkin wrote: > The SPIR-V capability isn't even marked as enabled, and there are no > tests in Vulkan-CTS. Per Jason Ekstrand, this won't work in anv as such > write-only surfaces require additional setup which is currently not >

[Mesa-dev] [PATCH] anv, radv: disable StorageImageWriteWithoutFormat for now

2016-12-29 Thread Ilia Mirkin
The SPIR-V capability isn't even marked as enabled, and there are no tests in Vulkan-CTS. Per Jason Ekstrand, this won't work in anv as such write-only surfaces require additional setup which is currently not performed. Signed-off-by: Ilia Mirkin --- I don't care whether

Re: [Mesa-dev] [PATCH] spirv: mark SpvCapabilityStorageImageWriteWithoutFormat supported

2016-12-29 Thread Jason Ekstrand
Ugh... The problem is that we have to set the surface up differently for write-only surfaces. We should shut it off for now. On Dec 29, 2016 11:01 PM, "Ilia Mirkin" wrote: > Well, maybe not, but > > src/amd/vulkan/radv_device.c: > .shaderStorageImageWriteWithoutFormat

[Mesa-dev] [PATCH] radv/ac: add support for multi sample image coords

2016-12-29 Thread Dave Airlie
From: Dave Airlie This just adds the nir->llvm support, enabling the extension causes some failures on llvm 3.9 at least, but this code seems fine. NIR passes the sampler in src[1].x, and we LLVM/SI requires it as the last parameters in the coords (coord[2] for 2D, coord[3]

Re: [Mesa-dev] [PATCH] spirv: mark SpvCapabilityStorageImageWriteWithoutFormat supported

2016-12-29 Thread Ilia Mirkin
Well, maybe not, but src/amd/vulkan/radv_device.c: .shaderStorageImageWriteWithoutFormat = true, src/intel/vulkan/anv_device.c: .shaderStorageImageWriteWithoutFormat = true, and from a brief look at the code, it seems like it should work - image_format gets set to 0 (GL_NONE), which is

Re: [Mesa-dev] [PATCH] spirv: mark SpvCapabilityStorageImageWriteWithoutFormat supported

2016-12-29 Thread Jason Ekstrand
I don't think we actually do... On Dec 29, 2016 9:34 PM, "Ilia Mirkin" wrote: > Both anv and radv support this. > > Signed-off-by: Ilia Mirkin > --- > src/compiler/spirv/spirv_to_nir.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [Mesa-dev] [PATCH 1/2] glsl: Don't rehash the values when copying to new table

2016-12-29 Thread Vladislav Egorov
I've looked into it recently (I'm working on series of many various trivial optimizations) and it's faster to just memcpy() it. Just throwing out superfluous hashing still keeps slow hash-table insertion around -- with resizing, rehashing, memory allocation/deallocation, internal

[Mesa-dev] [PATCH] spirv: mark SpvCapabilityStorageImageWriteWithoutFormat supported

2016-12-29 Thread Ilia Mirkin
Both anv and radv support this. Signed-off-by: Ilia Mirkin --- src/compiler/spirv/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 07980aa..22e14f6 100644 ---

[Mesa-dev] [AppVeyor] mesa master #3005 completed

2016-12-29 Thread AppVeyor
Build mesa 3005 completed Commit 36c648b894 by Ilia Mirkin on 12/30/2016 1:59 AM: spirv: always expose SpvCapabilityStorageImageExtendedFormats\n\nI forgot to do this in commit 76b97d544e ("anv: enable storage image\nextended formats"). Since both drivers

Re: [Mesa-dev] [PATCH] spirv: always expose SpvCapabilityStorageImageExtendedFormats

2016-12-29 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Dec 29, 2016 at 6:00 PM, Ilia Mirkin wrote: > I forgot to do this in commit 76b97d544e ("anv: enable storage image > extended formats"). Since both drivers support this now, no need for the > conditional enable. >

[Mesa-dev] [PATCH] spirv: always expose SpvCapabilityStorageImageExtendedFormats

2016-12-29 Thread Ilia Mirkin
I forgot to do this in commit 76b97d544e ("anv: enable storage image extended formats"). Since both drivers support this now, no need for the conditional enable. Signed-off-by: Ilia Mirkin --- src/amd/vulkan/radv_pipeline.c| 1 - src/compiler/spirv/nir_spirv.h| 1 -

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

2016-12-29 Thread AppVeyor
Build mesa 3004 failed Commit c633f228b4 by Ilia Mirkin on 11/27/2016 8:45 PM: anv: add support for extended texture gather\n\nNow that the SPIR-V -> NIR translation is in place, no additional logic\nis required.\n\nSigned-off-by: Ilia Mirkin

Re: [Mesa-dev] [PATCH 16/27] i965/miptree: Allocate mcs_buf for an image's CCS_E

2016-12-29 Thread Ben Widawsky
On 16-12-10 15:26:02, Pohjolainen, Topi wrote: On Thu, Dec 01, 2016 at 02:09:57PM -0800, Ben Widawsky wrote: From: Ben Widawsky This code will disable actually creating these buffers for the scanout, but it puts the allocation in place. Primarily this patch is split out

Re: [Mesa-dev] [PATCH 00/27] Renderbuffer Decompression (and GBM modifiers)

2016-12-29 Thread Ben Widawsky
On 16-12-06 13:34:02, Paulo Zanoni wrote: 2016-12-01 20:09 GMT-02:00 Ben Widawsky : From: Ben Widawsky This patch series ultimately adds support within the i965 driver for Renderbuffer Decompression with GBM. In short, this feature reduces

Re: [Mesa-dev] Seeking advice on implementing KHR_no_error

2016-12-29 Thread Timothy Arceri
On Fri, 2016-12-30 at 10:02 +1000, Dave Airlie wrote: > On 30 December 2016 at 09:48, Ilia Mirkin > wrote: > > On Thu, Dec 29, 2016 at 5:54 PM, Thomas Helland > > wrote: > > > Apart from that it's basically a case of looking at a patch > > >

Re: [Mesa-dev] [PATCH] dri: allow 16bit R/GR images to be exported via drm buffers

2016-12-29 Thread Ben Widawsky
On 16-12-16 21:27:51, Rainer Hochecker wrote: From: Rainer Hochecker This allows eglCreateImageKHR to access P010 surfaces created by vaapi patch for drm, fourcc: http://paste.ubuntu.com/23638632/ Signed-off-by: Rainer Hochecker ---

Re: [Mesa-dev] Seeking advice on implementing KHR_no_error

2016-12-29 Thread Thomas Helland
2016-12-30 0:39 GMT+01:00 Timothy Arceri : > On Thu, 2016-12-29 at 23:54 +0100, Thomas Helland wrote: >> Hi all, >> >> I'm sitting here looking for something usefull to do on mesa in my >> spare time. >> I've considered implementing some optimization passes, or

Re: [Mesa-dev] Seeking advice on implementing KHR_no_error

2016-12-29 Thread Dave Airlie
On 30 December 2016 at 09:48, Ilia Mirkin wrote: > On Thu, Dec 29, 2016 at 5:54 PM, Thomas Helland > wrote: >> Apart from that it's basically a case of looking at a patch series >> implementing >> some other fairly trivial extension to get an

[Mesa-dev] [PATCH 2/2] radv: only allow cmask/dcc in color optimal.

2016-12-29 Thread Dave Airlie
From: Dave Airlie I had this on transfers due to the clear color cmd, but it seems like that path shouldn't get fast clears. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_image.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[Mesa-dev] [PATCH 1/2] radv: only allow cmask/dcc on exclusive or concurrent with graphics queue.

2016-12-29 Thread Dave Airlie
From: Dave Airlie Otherwise we don't get the barriers to flush dcc etc. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_image.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_image.c

[Mesa-dev] [PATCH 2/2] glsl: Don't compute the hash when we already have it

2016-12-29 Thread Thomas Helland
We should really have a function to copy the table contents, but this will at least get us somewhere in the meantime. --- src/compiler/glsl/opt_copy_propagation_elements.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 1/2] glsl: Don't rehash the values when copying to new table

2016-12-29 Thread Thomas Helland
Really, we should have some kind of function for copying the whole table, but this will work for now. --- src/compiler/glsl/opt_copy_propagation.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagation.cpp

Re: [Mesa-dev] Seeking advice on implementing KHR_no_error

2016-12-29 Thread Ilia Mirkin
On Thu, Dec 29, 2016 at 5:54 PM, Thomas Helland wrote: > Apart from that it's basically a case of looking at a patch series > implementing > some other fairly trivial extension to get an idea of what needs changing > apart > from the functionality of the extension

Re: [Mesa-dev] [PATCH] clover: Check for executables before enqueueing a kernel

2016-12-29 Thread Francisco Jerez
Pierre Moreau writes: > Without this check, the kernel::bind() method would fail with a > std::out_of_range exception, letting an exception escape from the > library into the client, rather than returning the corresponding error > code CL_INVALID_PROGRAM_EXECUTABLE. > >

Re: [Mesa-dev] Seeking advice on implementing KHR_no_error

2016-12-29 Thread Timothy Arceri
On Thu, 2016-12-29 at 23:54 +0100, Thomas Helland wrote: > Hi all, > > I'm sitting here looking for something usefull to do on mesa in my > spare time. > I've considered implementing some optimization passes, or finding > some overhead > that I can have a shot at reducing, like the huge amount of

[Mesa-dev] [PATCH] clover: Check for executables before enqueueing a kernel

2016-12-29 Thread Pierre Moreau
Without this check, the kernel::bind() method would fail with a std::out_of_range exception, letting an exception escape from the library into the client, rather than returning the corresponding error code CL_INVALID_PROGRAM_EXECUTABLE. Signed-off-by: Pierre Moreau ---

Re: [Mesa-dev] [PATCH] meta: Disable dithering during glGenerateMipmap

2016-12-29 Thread Jason Ekstrand
On Dec 29, 2016 4:58 PM, "Kenneth Graunke" wrote: On Thursday, December 29, 2016 1:25:57 PM PST Chad Versace wrote: > Fixes tests 'dEQP-GLES3.functional.texture.mipmap.*.generate.rgba5551*' on > Intel Broadwell 0x1616. > > The GL 4.5 spec describes the algorithm of

Re: [Mesa-dev] [PATCH] meta: Disable dithering during glGenerateMipmap

2016-12-29 Thread Kenneth Graunke
On Thursday, December 29, 2016 1:25:57 PM PST Chad Versace wrote: > Fixes tests 'dEQP-GLES3.functional.texture.mipmap.*.generate.rgba5551*' on > Intel Broadwell 0x1616. > > The GL 4.5 spec describes the algorithm of glGenerateMipmap as: > > The contents of the derived images are computed by

[Mesa-dev] Seeking advice on implementing KHR_no_error

2016-12-29 Thread Thomas Helland
Hi all, I'm sitting here looking for something usefull to do on mesa in my spare time. I've considered implementing some optimization passes, or finding some overhead that I can have a shot at reducing, like the huge amount of malloc/alloc/free calls. However, I've found that this is hard when I

[Mesa-dev] [PATCH] meta: Disable dithering during glGenerateMipmap

2016-12-29 Thread Chad Versace
Fixes tests 'dEQP-GLES3.functional.texture.mipmap.*.generate.rgba5551*' on Intel Broadwell 0x1616. The GL 4.5 spec describes the algorithm of glGenerateMipmap as: The contents of the derived images are computed by repeated, filtered reduction of the level base image. [...] No particular

Re: [Mesa-dev] [PATCH 6/9] i965: Add support for tex upload using gpu

2016-12-29 Thread Anuj Phogat
On Tue, Dec 20, 2016 at 6:45 AM, Topi Pohjolainen wrote: > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/intel_tex.h | 8 + > src/mesa/drivers/dri/i965/intel_tex_subimage.c | 194 > +

Re: [Mesa-dev] [PATCH V2 2/70] mesa/glsl: move subroutine metadata to gl_program

2016-12-29 Thread Eric Anholt
Timothy Arceri writes: > This will allow us to store gl_program rather than gl_shader_program > as the current program perstage which allows us to simplify code > that makes use of the CurrentProgram list. > > V2: don't change subroutine init helper interface

Re: [Mesa-dev] [PATCH V2] mesa/compiler: add stage to shader_info

2016-12-29 Thread Eric Anholt
Timothy Arceri writes: > This will allow us to simplify the current program logic for SSO. > > Also since we aim to detach shader_info from nir_shader this will come > in handy avoiding passing nir_shader around just to keep track of > the stage we are dealing with.

Re: [Mesa-dev] [PATCH 1/3] glsl: disable dead code removal of lowered ubos

2016-12-29 Thread Kenneth Graunke
On Thursday, December 29, 2016 1:40:00 PM PST Timothy Arceri wrote: > This lets us assign uniform storage for packed UBOs after > they have been lowered otherwise the var is removed too early. > --- > src/compiler/glsl/glsl_parser_extras.cpp | 5 +++-- > src/compiler/glsl/ir_optimization.h

Re: [Mesa-dev] [PATCH 1/4] glsl: move more varying linking code to link_varyings.cpp

2016-12-29 Thread Kenneth Graunke
On Thursday, December 29, 2016 2:15:10 PM PST Timothy Arceri wrote: > --- > src/compiler/glsl/link_varyings.cpp | 157 > > src/compiler/glsl/link_varyings.h | 3 + > src/compiler/glsl/linker.cpp| 149 +- > 3 files