Re: [Mesa-dev] [PATCH 16/26] i965: Implement the new imod and irem opcodes

2016-04-01 Thread Jason Ekstrand
On Tue, Mar 29, 2016 at 8:49 PM, Matt Turner wrote: > On Fri, Mar 25, 2016 at 4:12 PM, Jason Ekstrand > wrote: > > --- > > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 32 > ++ > > src/mesa/drivers/dri/i965/brw_vec4_nir.cpp

Re: [Mesa-dev] [PATCH 6/7] glsl: store ubo or ssbo index in block index

2016-04-01 Thread Kenneth Graunke
On Saturday, April 2, 2016 3:03:57 PM PDT Timothy Arceri wrote: > Previously we store the buffer block index i.e the index of a combined > ubo/ssbo list. > > Fixes several dEQP-GLES31.functional tests: > - program_interface_query.uniform.block_index.block_array > -

Re: [Mesa-dev] [PATCH 5/7] glsl: store stage reference in gl_uniform_block

2016-04-01 Thread Kenneth Graunke
On Saturday, April 2, 2016 3:03:56 PM PDT Timothy Arceri wrote: > This allows us to simplify the code and drop InterfaceBlockStageIndex > which is a per stage array of integers the size of all blocks in the > program combined including duplicates across stages. Adding a stage > ref per block will

Re: [Mesa-dev] [PATCH 4/7] glsl: simplify buffer block resource limit checking

2016-04-01 Thread Kenneth Graunke
On Saturday, April 2, 2016 3:03:55 PM PDT Timothy Arceri wrote: > This changes the code to use the buffer counts stored for each stage > rather than counting from scratch. It also moves the checks outside > of the for loop which means we now just get a single link error > message if we go over the

Re: [Mesa-dev] [PATCH 3/7] glsl: simplify image resources check

2016-04-01 Thread Kenneth Graunke
On Saturday, April 2, 2016 3:03:54 PM PDT Timothy Arceri wrote: > We already have a count of active SSBOs per stage so use it. > --- > src/compiler/glsl/linker.cpp | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/src/compiler/glsl/linker.cpp

Re: [Mesa-dev] [PATCH 1/7] glsl: only set buffer block binding once during initialisation

2016-04-01 Thread Kenneth Graunke
On Saturday, April 2, 2016 3:03:52 PM PDT Timothy Arceri wrote: > Since 8683d54d2be825 there is now a single instance of the buffer > block information that needs to be updated rather than one instance > for each stage. > --- > src/compiler/glsl/link_uniform_initializers.cpp | 32

Re: [Mesa-dev] [PATCH 2/2] glsl: Make vertex ID lowering declare gl_BaseVertex as hidden.

2016-04-01 Thread Ilia Mirkin
Series is Reviewed-by: Ilia Mirkin On Sat, Apr 2, 2016 at 12:17 AM, Kenneth Graunke wrote: > If the GL_ARB_shader_draw_parameters extension is enabled, we'll already > have a gl_BaseVertex variable. It will have var->how_declared set to >

Re: [Mesa-dev] [PATCH 05/10] glsl: Add all system variables to the input resource list.

2016-04-01 Thread Kenneth Graunke
On Thursday, March 31, 2016 3:00:37 PM PDT Ilia Mirkin wrote: > On Thu, Mar 31, 2016 at 2:53 PM, Kenneth Graunke wrote: > > System values are just built-in input variables that we've opted to > > special-case out of convenience. We need to consider all inputs, > >

[Mesa-dev] [PATCH 1/2] glsl: Exclude ir_var_hidden variables from the program resource list.

2016-04-01 Thread Kenneth Graunke
We occasionally generate variables internally that we want to exclude from the program resource list, as applications won't be expecting them to be present. The next patch will make use of this. Signed-off-by: Kenneth Graunke --- src/compiler/glsl/linker.cpp | 2 +- 1

[Mesa-dev] [PATCH 2/2] glsl: Make vertex ID lowering declare gl_BaseVertex as hidden.

2016-04-01 Thread Kenneth Graunke
If the GL_ARB_shader_draw_parameters extension is enabled, we'll already have a gl_BaseVertex variable. It will have var->how_declared set to ir_var_declared_implicitly, and will appear in the program resource list. If not, we make one for internal use. We don't want it to be listed in the

[Mesa-dev] [PATCH 5/7] glsl: store stage reference in gl_uniform_block

2016-04-01 Thread Timothy Arceri
This allows us to simplify the code and drop InterfaceBlockStageIndex which is a per stage array of integers the size of all blocks in the program combined including duplicates across stages. Adding a stage ref per block will use less memory. --- src/compiler/glsl/linker.cpp | 20

[Mesa-dev] [PATCH 1/7] glsl: only set buffer block binding once during initialisation

2016-04-01 Thread Timothy Arceri
Since 8683d54d2be825 there is now a single instance of the buffer block information that needs to be updated rather than one instance for each stage. --- src/compiler/glsl/link_uniform_initializers.cpp | 32 + 1 file changed, 6 insertions(+), 26 deletions(-) diff --git

[Mesa-dev] [PATCH 2/7] glsl: split buffer block arrays earlier

2016-04-01 Thread Timothy Arceri
This will allow us to use them when checking resources in a following patch and clean up a bunch of code. --- src/compiler/glsl/linker.cpp | 54 ++-- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/compiler/glsl/linker.cpp

[Mesa-dev] [PATCH 7/7] glsl: rename var and simplify if

2016-04-01 Thread Timothy Arceri
is_ubo_var is true for both UBOs and SSBOs --- src/compiler/glsl/link_uniforms.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index c84bb2f..3728d7d 100644 ---

[Mesa-dev] [PATCH 6/7] glsl: store ubo or ssbo index in block index

2016-04-01 Thread Timothy Arceri
Previously we store the buffer block index i.e the index of a combined ubo/ssbo list. Fixes several dEQP-GLES31.functional tests: - program_interface_query.uniform.block_index.block_array - program_interface_query.uniform.block_index.named_block -

[Mesa-dev] [PATCH 3/7] glsl: simplify image resources check

2016-04-01 Thread Timothy Arceri
We already have a count of active SSBOs per stage so use it. --- src/compiler/glsl/linker.cpp | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 649fb7c..c9eaa6b 100644 --- a/src/compiler/glsl/linker.cpp +++

[Mesa-dev] [PATCH 4/7] glsl: simplify buffer block resource limit checking

2016-04-01 Thread Timothy Arceri
This changes the code to use the buffer counts stored for each stage rather than counting from scratch. It also moves the checks outside of the for loop which means we now just get a single link error message if we go over the max rather than X error messages where X is the number we have exceeded

Re: [Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-01 Thread Rob Clark
I did toy with the idea of adding a DONT_REALLY_FLUSH_JUST_CREATE_A_FENCE flag to existing pctx->flush().. I'm not really sure I could call that better. And either way, we want the ctx ptr in fence_finish(), otherwise we are hiding the ctx ptr internally in the driver's pipe_fence struct so that

[Mesa-dev] Build completed: mesa 777

2016-04-01 Thread AppVeyor
Build mesa 777 completed Commit ef1b397b07 by Jordan Justen on 3/12/2016 12:44 AM: glsl: Don't require matching centroid qualifiers\n\nNote: This patch appears to violate older OpenGL and OpenGLES specs.\n\nThe OpenGLES GLSL 3.1 and OpenGL GLSL 4.3

[Mesa-dev] Build failed: mesa 776

2016-04-01 Thread AppVeyor
Build mesa 776 failed Commit cc1320220f by Jason Ekstrand on 4/1/2016 10:44 PM: nir/gather_info: Add an assert for supported stages Configure your notification preferences ___ mesa-dev mailing list

[Mesa-dev] [PATCH] swr: support samplers in vertex shaders

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/swr_shader.cpp | 98 +++--- src/gallium/drivers/swr/swr_shader.h | 41 +--- src/gallium/drivers/swr/swr_state.cpp | 153 +++-- src/gallium/drivers/swr/swr_state.h| 6 +-

[Mesa-dev] [PATCH] swr: handle pci cap requests

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/swr_screen.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index f9e52be..4a4992f 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++

[Mesa-dev] [PATCH 03/11] swr: [rasterizer common] win32 build fixups

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/common/os.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h index 5794f3f..427ebc1 100644 --- a/src/gallium/drivers/swr/rasterizer/common/os.h +++

[Mesa-dev] [PATCH 08/11] swr: [rasterizer core] Add experimental support for hyper-threaded front-end

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/core/api.cpp| 8 +- src/gallium/drivers/swr/rasterizer/core/context.h | 38 +++ .../drivers/swr/rasterizer/core/threads.cpp| 126 +++-- src/gallium/drivers/swr/rasterizer/core/threads.h | 4 +-

[Mesa-dev] [PATCH 01/11] swr: [rasterizer] Misc fixes identified by static code analysis

2016-04-01 Thread Tim Rowley
No perf loss detected --- src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 10 -- src/gallium/drivers/swr/rasterizer/core/pa.h | 10 -- src/gallium/drivers/swr/rasterizer/core/threads.cpp | 5 - src/gallium/drivers/swr/rasterizer/core/tilemgr.h| 2 +- 4

[Mesa-dev] [PATCH 02/11] swr: [rasterizer core] Affinitize thread scratch space to numa node of worker

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/core/api.cpp | 16 ++-- src/gallium/drivers/swr/rasterizer/core/arena.h | 2 +- src/gallium/drivers/swr/rasterizer/core/backend.cpp | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 10/11] swr: [rasterizer] Put in rudimentary garbage collection for the global arena allocator

2016-04-01 Thread Tim Rowley
- Check for unused blocks every few frames or every 64K draws - Delete data unused since the last check if total unused data is > 20MB Doesn't seem to cause a perf degridation --- src/gallium/drivers/swr/rasterizer/core/api.cpp | 17 +- src/gallium/drivers/swr/rasterizer/core/arena.h | 230

[Mesa-dev] [PATCH 04/11] swr: [rasterizer core] Quantize depth to depth buffer precision prior to depth test/write. Fixes z-fighting issues.

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/core/api.cpp| 20 +++ .../drivers/swr/rasterizer/core/backend.cpp| 31 ++--- src/gallium/drivers/swr/rasterizer/core/context.h | 2 ++ .../drivers/swr/rasterizer/core/depthstencil.h | 40 +-

[Mesa-dev] [PATCH 07/11] swr: [rasterizer] Avoid segv in thread creation on machines with non-consecutive NUMA topology.

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/core/threads.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp index 1a11175..056003e 100644 ---

[Mesa-dev] [PATCH 00/11] update swr rasterizer

2016-04-01 Thread Tim Rowley
More development of the swr rasterizer. Tim Rowley (11): swr: [rasterizer] Misc fixes identified by static code analysis swr: [rasterizer core] Affinitize thread scratch space to numa node of worker swr: [rasterizer common] win32 build fixups swr: [rasterizer core] Quantize depth to

[Mesa-dev] [PATCH 09/11] swr: [rasterizer core] Put DRAW_CONTEXT on a diet

2016-04-01 Thread Tim Rowley
No need for 256 pointers per DC. --- src/gallium/drivers/swr/rasterizer/core/api.cpp| 31 +++--- .../drivers/swr/rasterizer/core/backend.cpp| 8 +++--- src/gallium/drivers/swr/rasterizer/core/backend.h | 2 +- src/gallium/drivers/swr/rasterizer/core/context.h | 16

[Mesa-dev] [PATCH 05/11] swr: [rasterizer] Ensure correct alignment of stack variables used as vectors

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/common/os.h | 4 +--- src/gallium/drivers/swr/rasterizer/core/knobs.h | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h index

[Mesa-dev] [PATCH 06/11] swr: [rasterizer core] Replace all naked OSALIGN macro uses with OSALIGNSIMD / OSALIGNLINE

2016-04-01 Thread Tim Rowley
Future proofing --- src/gallium/drivers/swr/rasterizer/core/clip.cpp | 4 ++-- src/gallium/drivers/swr/rasterizer/core/clip.h | 4 ++-- src/gallium/drivers/swr/rasterizer/core/pa.h | 4 ++-- src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp | 16 4

[Mesa-dev] [PATCH 11/11] swr: [rasterizer core] warning cleanup

2016-04-01 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/core/api.cpp | 8 src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index

Re: [Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-01 Thread Roland Scheidegger
I'll admit I'm not an expert on this but I got a bad feeling on it. Do you really need another per-context fence_finish function? This looks to me like rather than improving the existing api, it throws another one at the same problem, which is to be sort of used in parallel making things confusing

[Mesa-dev] [PATCH] vc4: Remove unused include from vc4_program.c

2016-04-01 Thread Rhys Kidd
Found with grep and inspection. Test compiled on RPi hw. Assists any future effort to remove TGSI as an intermediate stage. Signed-off-by: Rhys Kidd --- src/gallium/drivers/vc4/vc4_program.c | 1 - 1 file changed, 1 deletion(-) diff --git

[Mesa-dev] [PATCH v2] egl: add EGL_KHR_reusable_sync to egl_dri

2016-04-01 Thread Dongwon Kim
This patch enables an EGL extension, EGL_KHR_reusable_sync. This new extension basically provides a way for multiple APIs or threads to be excuted synchronously via a "reusable sync" primitive shared by those threads/API calls. This was implemented based on the specification at

Re: [Mesa-dev] [PATCH 01/10] glsl: Pass stage to add_interface_variables().

2016-04-01 Thread Timothy Arceri
Patches 1-4 and 6-9 are: Reviewed-by: Timothy Arceri Patch 10 will give the correct result as discussed however I wouldn't mind seeing if I can come up with a patch that avoids the extra processing at query time. We really need to clean up these structures.

[Mesa-dev] [PATCH v2 07/26] nir: Add a pass for gathering various bits of shader info

2016-04-01 Thread Jason Ekstrand
Reviewed-by: Rob Clark Cc: Kenneth Graunke v2: Pull get_io_offset into nir_gather_info and add an assert that our shader is for one of the supported stages. (Ken) --- src/compiler/Makefile.sources | 1 + src/compiler/nir/Makefile.sources

Re: [Mesa-dev] [PATCH 2/4] gallium: add threads per block TGSI property

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 6:50 PM, Bas Nieuwenhuizen wrote: > I will change that to > > TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH etc. > > since most other properties, seem to use S instead of P, > unless you have any objections. Indeed they do - no objections from me. > > - Bas

Re: [Mesa-dev] [PATCH 2/4] gallium: add threads per block TGSI property

2016-04-01 Thread Bas Nieuwenhuizen
I will change that to TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH etc. since most other properties, seem to use S instead of P, unless you have any objections. - Bas On Sat, Apr 2, 2016 at 12:37 AM, Ilia Mirkin wrote: > On Fri, Apr 1, 2016 at 6:32 PM, Bas Nieuwenhuizen >

Re: [Mesa-dev] [PATCH 1/4] gallium: add compute shader IR type

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 6:32 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/trace/tr_dump_state.c | 4 +++- >

Re: [Mesa-dev] [PATCH 2/4] gallium: add threads per block TGSI property

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 6:37 PM, Ilia Mirkin wrote: > On Fri, Apr 1, 2016 at 6:32 PM, Bas Nieuwenhuizen > wrote: >> The value 0 for unknown has been chosen to so that >> drivers using tgsi_scan_shader do not need to detect >> missing properties if

Re: [Mesa-dev] [PATCH 4/4] gallium: distinguish between shader IR in get_compute_param

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 6:32 PM, Bas Nieuwenhuizen wrote: > For radeonsi, native and TGSI use different compilers and this results > in different limits for different IR's. > > The set we strictly need for radeonsi is only the MAX_BLOCK_SIZE > and MAX_THREADS_PER_BLOCK

Re: [Mesa-dev] [PATCH 2/4] gallium: add threads per block TGSI property

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 6:32 PM, Bas Nieuwenhuizen wrote: > The value 0 for unknown has been chosen to so that > drivers using tgsi_scan_shader do not need to detect > missing properties if they zero-initialize the struct. > > Signed-off-by: Bas Nieuwenhuizen

[Mesa-dev] [PATCH 4/4] gallium: distinguish between shader IR in get_compute_param

2016-04-01 Thread Bas Nieuwenhuizen
For radeonsi, native and TGSI use different compilers and this results in different limits for different IR's. The set we strictly need for radeonsi is only the MAX_BLOCK_SIZE and MAX_THREADS_PER_BLOCK params, but I added a few others as shader related that seemed like they would also typically

[Mesa-dev] [PATCH 1/4] gallium: add compute shader IR type

2016-04-01 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- src/gallium/drivers/trace/tr_dump_state.c | 4 +++- src/gallium/include/pipe/p_state.h| 1 + src/gallium/state_trackers/clover/core/kernel.cpp | 1 + src/gallium/tests/trivial/compute.c | 1 +

[Mesa-dev] [PATCH 2/4] gallium: add threads per block TGSI property

2016-04-01 Thread Bas Nieuwenhuizen
The value 0 for unknown has been chosen to so that drivers using tgsi_scan_shader do not need to detect missing properties if they zero-initialize the struct. Signed-off-by: Bas Nieuwenhuizen --- src/gallium/auxiliary/tgsi/tgsi_strings.c | 3 +++

[Mesa-dev] [PATCH 3/4] gallium: add global buffer memory barrier bit

2016-04-01 Thread Bas Nieuwenhuizen
Currently radeonsi synchronizes after every dispatch and Clover does nothing to synchronize. This is overzealous, especially with GL compute, so add a barrier for global buffers. Signed-off-by: Bas Nieuwenhuizen --- src/gallium/include/pipe/p_defines.h | 1

[Mesa-dev] [PATCH] xlib: fix memory leak on Display close

2016-04-01 Thread John Sheu
The XMesaVisual instances freed in the visuals table on display close are being freed with a free() call, instead of XMesaDestroyVisual(), causing a memory leak. --- src/mesa/drivers/x11/fakeglx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/x11/fakeglx.c

Re: [Mesa-dev] [PATCH 01/41] glapi: clean imports in python files

2016-04-01 Thread Michael Schellenberger Costa
Hi, minor nitpicks wrt ordering below Am 01.04.2016 um 02:04 schrieb Dylan Baker: > Completely clean the imports: > - Split so that one module is imported per line > - Remove unused imports > - Group stdlib imports, then 3rd party modules, and finally local > modules > - sort alphabetically

Re: [Mesa-dev] [PATCH v2 00/23] NIR: more bit-size related patches

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > Hello, > > This is the second version of this patch series [0]. > > In case you prefer a repository, it is available here [1]: > > $ git clone -b nir-bit-size-fixes-2.0 https://github.com/Igalia/mesa.git >

[Mesa-dev] [PATCH 6/6] gallium: support for native fence fd's

2016-04-01 Thread Rob Clark
From: Rob Clark This enables gallium support for EGL_ANDROID_native_fence_sync, for drivers which support PIPE_CAP_NATIVE_FENCE_FD. TODO: add PIPE_CAP_NATIVE_FENCE_FD to every's switch statement returning false.. but I'll leave that until this patchset is ready to push

Re: [Mesa-dev] [PATCH v2 13/23] nir/glsl_to_nir: set the bit-size in the result of evaluate_rvalue

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 3:00 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > From: Iago Toral Quiroga > > Found while testing UBO loads in scenarios like this: > > (assign (x) (var_ref vec_ctor) > (expression float d2f > (expression double ubo_load

Re: [Mesa-dev] [android-x86-devel] Re: gralloc_drm_pipe

2016-04-01 Thread Rob Herring
On Fri, Mar 25, 2016 at 8:38 PM, Stéphane Marchesin wrote: > On Wed, Mar 23, 2016 at 5:22 PM, Rob Herring wrote: >> On Fri, Mar 4, 2016 at 12:07 PM, Rob Clark wrote: >>> On Fri, Mar 4, 2016 at 12:59 PM, Rob Clark

[Mesa-dev] [PATCH 5/6] gallium: wire up server_wait_sync

2016-04-01 Thread Rob Clark
From: Rob Clark This will be needed for explicit synchronization with devices outside the gpu, ie. EGL_ANDROID_native_fence_sync. Signed-off-by: Rob Clark --- src/gallium/include/pipe/p_context.h | 6 ++

[Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-01 Thread Rob Clark
From: Rob Clark Since current thing is kinda horrible for tilers. And that issue will be even worse with EGL_ANDROID_native_fence_sync. Not wired up yet for gl syncobj, which can come later. For now we just need this with EGL. Signed-off-by: Rob Clark

[Mesa-dev] [PATCH 3/6] egl: add EGL_ANDROID_native_fence_sync

2016-04-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/egl/drivers/dri2/egl_dri2.c | 48 + src/egl/main/eglapi.c | 36 --- src/egl/main/eglapi.h | 2 ++

[Mesa-dev] [PATCH 2/6] dri: extend fence extension to support native fd fences

2016-04-01 Thread Rob Clark
From: Rob Clark Required to implement EGL_ANDROID_native_fence_sync. Signed-off-by: Rob Clark --- include/GL/internal/dri_interface.h | 44 - 1 file changed, 43 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 1/6] egl: initialize SyncCondition after attr parsing

2016-04-01 Thread Rob Clark
From: Rob Clark Reduce the noise in the next patch. For EGL_SYNC_NATIVE_FENCE_ANDROID the sync condition is conditional on EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute. Signed-off-by: Rob Clark --- src/egl/main/eglsync.c | 10 +- 1

[Mesa-dev] [PATCH 0/6] mesa: support for EGL_ANDROID_native_fence_sync

2016-04-01 Thread Rob Clark
From: Rob Clark This patchset implements support for EGL_ANDROID_native_fence_sync[1] for egl and gallium. This extension provides support for native fence fd's (file descriptors) for the GPU. In a similar way to dma-buf fd's, which provide a reference-counted

Re: [Mesa-dev] [PATCH v4 06/12] nvc0: add indirect compute support on Kepler

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 4:16 PM, Samuel Pitoiset wrote: > The grid size is stored as three 32-bits integers in the indirect > buffer but the launch descriptor uses a 32-bits integer for both > griddim_y and griddim_z like

[Mesa-dev] [PATCH v4 06/12] nvc0: add indirect compute support on Kepler

2016-04-01 Thread Samuel Pitoiset
The grid size is stored as three 32-bits integers in the indirect buffer but the launch descriptor uses a 32-bits integer for both griddim_y and griddim_z like this (z << 16) | y. To make it work, the 16 high bits of griddim_y are overwritten by griddim_z. Changes from v4: - move

Re: [Mesa-dev] [PATCH 3/3] svga: remove unused svga_compile_key::texture_msaa field

2016-04-01 Thread Jose Fonseca
On 01/04/16 19:01, Brian Paul wrote: --- src/gallium/drivers/svga/svga_shader.c | 1 - src/gallium/drivers/svga/svga_shader.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index 78eb3f6..d56cce4 100644

Re: [Mesa-dev] [PATCH v2 23/23] nir: verify destination bit size when checking algebraic optimizations

2016-04-01 Thread Jason Ekstrand
Unless I'm missing something, this series doesn't contain anything that uses this patch. Let's drop it for now and put it in with whatever adds the actual nir_opt_algebraic changes. Another option would be to silently bail if nir_search tries to create an expression where the opcode has an

Re: [Mesa-dev] [PATCH v2 22/23] nir: add a pass for lowering (un)pack_double_2x32

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 3:00 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > From: Connor Abbott > > v2: Undo unintended change to the signature of > nir_normalize_cubemap_coords (Iago). > > v3: Move to compiler/nir (Iago) > > v4: Remove Authors from

Re: [Mesa-dev] [PATCH v2 10/23] nir: handle doubles in nir_deref_get_const_initializer_load()

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > From: Connor Abbott > > --- > src/compiler/nir/nir.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c > index

Re: [Mesa-dev] [PATCH v2 09/23] nir/print: add support for printing doubles and bitsize

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > From: Connor Abbott > > v2: > - Squash the printing doubles related patches into one patch (Sam). > --- > src/compiler/nir/nir_print.c | 17 ++--- > 1 file changed,

Re: [Mesa-dev] [PATCH v2 07/23] nir/lower_load_const_to_scalar: suppport doubles and multiple bit sizes

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > From: Iago Toral Quiroga > > --- > src/compiler/nir/nir_lower_load_const_to_scalar.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH v2 03/23] nir: add bit_size info to nir_ssa_undef_instr_create()

2016-04-01 Thread Jason Ekstrand
On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > Signed-off-by: Samuel Iglesias Gonsálvez > --- > src/compiler/nir/glsl_to_nir.cpp | 2 +- > src/compiler/nir/nir.c | 6 -- > src/compiler/nir/nir.h

Re: [Mesa-dev] [PATCH 22/41] glapi: gl_XML.py: convert gl_api.functionIterateByOffset to a generator

2016-04-01 Thread Dylan Baker
Quoting Ilia Mirkin (2016-04-01 11:47:49) > On Fri, Apr 1, 2016 at 2:41 PM, Dylan Baker wrote: > > Quoting Ilia Mirkin (2016-04-01 08:46:19) > > > > Something like this(?): > > > > temp = [(f.offset, f) for f in self.functions_by_name.itervalues() > > if f.offset

Re: [Mesa-dev] [PATCH 22/41] glapi: gl_XML.py: convert gl_api.functionIterateByOffset to a generator

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 2:41 PM, Dylan Baker wrote: > Quoting Ilia Mirkin (2016-04-01 08:46:19) >> IMHO this is still quite fancy and unnecessarily complicated. >> >> How about >> >> temp = dict((f.offset, f) for f in self.functions_by_name.itervalues()) >> return

Re: [Mesa-dev] [PATCH 22/41] glapi: gl_XML.py: convert gl_api.functionIterateByOffset to a generator

2016-04-01 Thread Dylan Baker
Quoting Ilia Mirkin (2016-04-01 08:46:19) > IMHO this is still quite fancy and unnecessarily complicated. > > How about > > temp = dict((f.offset, f) for f in self.functions_by_name.itervalues()) > return (temp[offset] for offset in sorted(temp)) > > That's all that's happening there,

Re: [Mesa-dev] [PATCH 13/16] glsl: export accessor for builtin-uniform descriptors

2016-04-01 Thread Jason Ekstrand
On Fri, Apr 1, 2016 at 11:24 AM, Rob Clark wrote: > On Fri, Apr 1, 2016 at 2:04 PM, Jason Ekstrand > wrote: > > > > > > On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > >> > >> From: Rob Clark > >> >

Re: [Mesa-dev] [PATCH 15/16] mesa/st: add nir pass for lowering builtin uniforms

2016-04-01 Thread Jason Ekstrand
On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > src/mesa/Makefile.sources | 2 + > src/mesa/state_tracker/st_nir.h | 28 +++ >

Re: [Mesa-dev] [PATCH 13/16] glsl: export accessor for builtin-uniform descriptors

2016-04-01 Thread Jason Ekstrand
On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > We'll need this for a nir pass to lower builtin-uniform access. > > Signed-off-by: Rob Clark > --- > src/compiler/glsl/builtin_variables.cpp | 24

[Mesa-dev] [PATCH 2/3] svga: check TXF instruction's target to determine MSAA

2016-04-01 Thread Brian Paul
Rather than the currently bound texture. This goes along with the earlier patch to get away from examining bound textures and sampler views during shader translation. Fixes VMware bug 1632739. --- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Mesa-dev] [PATCH 1/3] tgsi: add simple tgsi_is_msaa_target() helper

2016-04-01 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_util.h | 8 1 file changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.h b/src/gallium/auxiliary/tgsi/tgsi_util.h index 3a049ee..ca07bfd 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_util.h +++

[Mesa-dev] [PATCH 3/3] svga: remove unused svga_compile_key::texture_msaa field

2016-04-01 Thread Brian Paul
--- src/gallium/drivers/svga/svga_shader.c | 1 - src/gallium/drivers/svga/svga_shader.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index 78eb3f6..d56cce4 100644 --- a/src/gallium/drivers/svga/svga_shader.c

Re: [Mesa-dev] [PATCH 12/16] nir/lower-io: add support for lowering inputs

2016-04-01 Thread Jason Ekstrand
Assuming we get the previous patch sorted out, Reviewed-by: Jason Ekstrand On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- >

Re: [Mesa-dev] [PATCH 01/41] glapi: clean imports in python files

2016-04-01 Thread Dylan Baker
Quoting Michael Schellenberger Costa (2016-04-01 01:30:53) > Hi, > > minor nitpicks wrt ordering below > > Am 01.04.2016 um 02:04 schrieb Dylan Baker: > > Completely clean the imports: > > - Split so that one module is imported per line > > - Remove unused imports > > - Group stdlib imports,

Re: [Mesa-dev] [PATCH 11/16] nir/lower-io: split out some helper fxns

2016-04-01 Thread Jason Ekstrand
I don't know that I like the lower-io prefix. Maybe nir/io-to-temp? Doesn't really matter On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > Prep work to reduce the noise in the next patch. > > Signed-off-by: Rob Clark

Re: [Mesa-dev] [PATCH 10/16] nir: rename lower_outputs_to_temporaries -> lower_io_to_temporaries

2016-04-01 Thread Jason Ekstrand
On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > Since it will gain support to lower inputs, give it a more generic name. > > Signed-off-by: Rob Clark > --- > src/compiler/Makefile.sources

Re: [Mesa-dev] [PATCH 09/16] nir: move callsite of lower_outputs_to_temporaries

2016-04-01 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > Going to convert this pass to parameterized lower_io_to_temporaries, and > we want the user to be able to specify whether to

Re: [Mesa-dev] [PATCH 08/16] nir: lower-io-types pass

2016-04-01 Thread Jason Ekstrand
On Sat, Mar 26, 2016 at 2:02 PM, Rob Clark wrote: > From: Rob Clark > > A pass to lower complex (struct/array/mat) inputs/outputs to primitive > types. This allows, for example, linking that removes unused components > of a larger type which is

Re: [Mesa-dev] [PATCH v3 12/12] nvc0: enable compute shaders on GK104 and GM107+

2016-04-01 Thread Martin Peres
On 01/04/16 20:28, Ilia Mirkin wrote: On Fri, Apr 1, 2016 at 1:26 PM, Martin Peres wrote: On 01/04/16 19:56, Samuel Pitoiset wrote: Compute support on GK110 is still unstable for weird reasons, but this can be fixed later as the NVF0_COMPUTE envvar prevent using compute.

Re: [Mesa-dev] [PATCH v3 12/12] nvc0: enable compute shaders on GK104 and GM107+

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > Compute support on GK110 is still unstable for weird reasons, but > this can be fixed later as the NVF0_COMPUTE envvar prevent using > compute. > > Note that GL3.txt is not updated yet because

Re: [Mesa-dev] [PATCH v3 12/12] nvc0: enable compute shaders on GK104 and GM107+

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 1:26 PM, Martin Peres wrote: > On 01/04/16 19:56, Samuel Pitoiset wrote: >> >> Compute support on GK110 is still unstable for weird reasons, but >> this can be fixed later as the NVF0_COMPUTE envvar prevent using >> compute. >> >> Note that GL3.txt is

Re: [Mesa-dev] [PATCH v3 12/12] nvc0: enable compute shaders on GK104 and GM107+

2016-04-01 Thread Martin Peres
On 01/04/16 19:56, Samuel Pitoiset wrote: Compute support on GK110 is still unstable for weird reasons, but this can be fixed later as the NVF0_COMPUTE envvar prevent using compute. Note that GL3.txt is not updated yet because GL_ARB_compute_shader is a bit useless without

Re: [Mesa-dev] [PATCH v3 11/12] nvc0: bump the maximum number of UBOs for compute on Kepler

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > The maximum number of uniform blocks (MAX_COMPUTE_UNIFORM_BLOCKS) > per compute program must be at least 12. > > Signed-off-by: Samuel Pitoiset

Re: [Mesa-dev] [PATCH v3 10/12] nvc0/ir: do not lower shared+atomics on GM107+

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > For Maxwell, the ATOMS instruction can be used to perform atomic > operations on shared memory instead of this load/store lowering pass. > > Changes from v2: > -

Re: [Mesa-dev] [PATCH v3 09/12] nvc0/ir: add atomics support on shared memory for Kepler

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 114 > - > .../nouveau/codegen/nv50_ir_lowering_nvc0.h| 1 +

Re: [Mesa-dev] [PATCH v3 08/12] nvc0/ir: fix wrong pred emission for ld lock on GK104

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > This fixes 84b9b8f (nvc0/ir: add missing emission of locked load > predicate). > > Signed-off-by: Samuel Pitoiset > --- >

Re: [Mesa-dev] [PATCH v3 07/12] nvc0/ir: add support for compute UBOs on Kepler

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > Make sure to avoid out of bounds access in presence of indirect > array indexing by loading the size from the driver constant buffer. > > Changes from v2: > - add a todo for clamping the offset to the max

Re: [Mesa-dev] [PATCH v3 06/12] nvc0: add indirect compute support on Kepler

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > The grid size is stored as three 32-bits integers in the indirect > buffer but the launch descriptor uses a 32-bits integer for both > griddim_y and griddim_z like this (z << 16) | y. To make it work, > the 16

Re: [Mesa-dev] [PATCH v3 05/12] nvc0: reduce likelihood of collision for real buffers on Kepler

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > Reduce likelihood of collision with real buffers by placing the > hole at the top of the 4G area. This fixes some indirect draw+compute > tests with large buffers.

Re: [Mesa-dev] [PATCH v3 04/12] nvc0: store ubo info to the driver constbuf on Kepler

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 12:56 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > .../drivers/nouveau/codegen/nv50_ir_driver.h | 1 + >

Re: [Mesa-dev] [PATCH v3 03/12] nvc0: bind user uniforms for compute on Kepler

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 12:55 PM, Samuel Pitoiset wrote: > Uniform buffer objects will be sticked to the driver constant buffer > like buffers because the launch descriptor only allows 8 CBs. > > Input kernel parameters for OpenCL are still uploaded to screen->parm >

Re: [Mesa-dev] [PATCH v3 02/12] nvc0: bind shader buffers for compute on Kepler

2016-04-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Apr 1, 2016 at 12:55 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 4 +-- >

Re: [Mesa-dev] [PATCH v3 01/12] nvc0: bind driver cb for compute on c7[] for Kepler

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 12:55 PM, Samuel Pitoiset wrote: > Instead of using the screen->parm buffer object which will be removed, > upload auxiliary constants to uniform_bo to be consistent regarding > what we already do for Fermi. > > This breaks surfaces support (for

  1   2   >