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

2016-04-01 Thread Samuel Pitoiset
The maximum number of uniform blocks (MAX_COMPUTE_UNIFORM_BLOCKS) per compute program must be at least 12. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 -- src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 1 - 2 files changed,

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

2016-04-01 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/codegen/nv50_ir_driver.h | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_context.h| 3 +++ src/gallium/drivers/nouveau/nvc0/nvc0_program.c| 1 + src/gallium/drivers/nouveau/nvc0/nve4_compute.c| 26

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

2016-04-01 Thread Samuel Pitoiset
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: - remove one branch Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp |

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

2016-04-01 Thread Samuel Pitoiset
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 compute only) but this will be properly re-introduced later for ARB_shader_image_load_store.

[Mesa-dev] [PATCH v3 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 v3: - add missing

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

2016-04-01 Thread Samuel Pitoiset
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 which is bound on c0, but this will be changed later with a new series. Signed-off-by: Samuel

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

2016-04-01 Thread Samuel Pitoiset
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 ARB_shader_image_load_store. Signed-off-by: Samuel Pitoiset

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

2016-04-01 Thread Samuel Pitoiset
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 possible const buf - rework the lowering pass Signed-off-by: Samuel Pitoiset

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

2016-04-01 Thread Samuel Pitoiset
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. Suggested by Ilia Mirkin. Signed-off-by: Samuel Pitoiset ---

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

2016-04-01 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 4 +-- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 38 + 2 files changed, 39 insertions(+), 3 deletions(-) diff --git

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

2016-04-01 Thread Samuel Pitoiset
This fixes 84b9b8f (nvc0/ir: add missing emission of locked load predicate). Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

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

2016-04-01 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 114 - .../nouveau/codegen/nv50_ir_lowering_nvc0.h| 1 + 2 files changed, 114 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH v3 00/12] nvc0: ARB_compute_shader for Kepler/Maxwell

2016-04-01 Thread Samuel Pitoiset
Hi, This series adds support for ARB_compute_shader on GK104 and GM107+, except on GK110 where one test miserably fail (related to texelFetch) for really weird reasons. Anyway, this is not going to break anything because NVF0_COMPUTE is still required for using compute on GK110. I will have a

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

2016-04-01 Thread Ilia Mirkin
On Thu, Mar 31, 2016 at 8:04 PM, Dylan Baker wrote: > This implementation is somewhat more efficient than the previous, and is > less code. It works by replacing one of the list building functions with > a generator, so that the last list can be avoided. It also decreases

Re: [Mesa-dev] [PATCH] docs: minor updates to license.html file

2016-04-01 Thread Jose Fonseca
On 01/04/16 16:35, Brian Paul wrote: Mesa demos are no longer part of the main Mesa tree/tarball. Add Gallium and GLX code to list of major components. --- docs/license.html | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/license.html

[Mesa-dev] [PATCH] docs: minor updates to license.html file

2016-04-01 Thread Brian Paul
Mesa demos are no longer part of the main Mesa tree/tarball. Add Gallium and GLX code to list of major components. --- docs/license.html | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/license.html b/docs/license.html index d56823f..2848832 100644 ---

Re: [Mesa-dev] [PATCH 00/41] glapi python cleanups

2016-04-01 Thread Brian Paul
On 03/31/2016 06:04 PM, Dylan Baker wrote: This is the first part of a much larger project I'm working on to overhaul the generators. The end goal is to use mako templates rather than a massive series of print statements, be python 2.7 (the current) and python 3.3+ (I might be talked into

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

2016-04-01 Thread Brian Paul
On 03/31/2016 06:04 PM, Dylan Baker wrote: This implementation is somewhat more efficient than the previous, and is less code. It works by replacing one of the list building functions with a generator, so that the last list can be avoided. It also decreases the size of the list that remains by

Re: [Mesa-dev] [PATCH v2 07/13] nvc0: add indirect compute support on Kepler

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 10:24 AM, Samuel Pitoiset wrote: > > > On 04/01/2016 07:34 AM, Ilia Mirkin wrote: >> >> >> On Mar 31, 2016 12:09 PM, "Samuel Pitoiset" > > wrote: >> > >> > The grid size is stored as

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

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 11:16 AM, Ilia Mirkin wrote: > On Fri, Apr 1, 2016 at 10:20 AM, Samuel Pitoiset > wrote: >> >> >> On 04/01/2016 07:21 AM, Ilia Mirkin wrote: >>> >>> As I recall, we already upload ms offsets for fs. Perhaps reuse the same

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

2016-04-01 Thread Ilia Mirkin
On Fri, Apr 1, 2016 at 10:20 AM, Samuel Pitoiset wrote: > > > On 04/01/2016 07:21 AM, Ilia Mirkin wrote: >> >> As I recall, we already upload ms offsets for fs. Perhaps reuse the same >> spot for these CP ones? What are they used for, anyways? Can't think of >> anything

[Mesa-dev] [Bug 94148] Framebuffer considered invalid when a draw call is done before glCheckFramebufferStatus

2016-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94148 Jannik Vogel changed: What|Removed |Added QA Contact|mesa-dev@lists.freedesktop.

Re: [Mesa-dev] [PATCH] gallium/radeon: allow multiple exports of the same texture with different usage

2016-04-01 Thread Marek Olšák
The updated patch is attached. Marek On Fri, Apr 1, 2016 at 9:59 AM, Michel Dänzer wrote: > On 01.04.2016 00:47, Marek Olšák wrote: >> From: Marek Olšák >> >> Instead of failing an assertion, disable DCC and CMASK on the first export >> that needs it,

Re: [Mesa-dev] [PATCH v2 11/13] nvc0/ir: do not lower shared+atomics on GM107+

2016-04-01 Thread Samuel Pitoiset
On 04/01/2016 07:44 AM, Ilia Mirkin wrote: On Mar 31, 2016 12:09 PM, "Samuel Pitoiset" > wrote: > > For Maxwell, the ATOMS instruction can be used to perform atomic > operations on shared memory instead of this load/store

Re: [Mesa-dev] [PATCH 27/29] nir/lower_to_source_mod: Skip unsafe operations

2016-04-01 Thread Connor Abbott
On Fri, Apr 1, 2016 at 4:56 AM, Samuel Iglesias Gonsálvez wrote: > On 31/03/16 17:16, Connor Abbott wrote: >> This seems a little ugly to me. Since these ops are just moving bits >> around, maybe we should just convert the float64 src/dest to uint64? >> We do this for other

Re: [Mesa-dev] [PATCH v2 08/13] nvc0/ir: add support for compute UBOs on Kepler

2016-04-01 Thread Samuel Pitoiset
On 04/01/2016 07:40 AM, Ilia Mirkin wrote: On Mar 31, 2016 12:09 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

Re: [Mesa-dev] [PATCH v2 07/13] nvc0: add indirect compute support on Kepler

2016-04-01 Thread Samuel Pitoiset
On 04/01/2016 07:34 AM, Ilia Mirkin wrote: On Mar 31, 2016 12:09 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

Re: [Mesa-dev] [PATCH v2 04/13] nvc0: reserve an area for ubos info in the driver constbuf

2016-04-01 Thread Samuel Pitoiset
On 04/01/2016 07:28 AM, Ilia Mirkin wrote: Please see if you can't rejigger some stuff to make it all fit into 1024... I know it will have to grow for images, but let's try to limit the damage... I already tried, but I just can't because offsets in the driver cb must be aligned to 0x40 and

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

2016-04-01 Thread Samuel Pitoiset
On 04/01/2016 07:21 AM, Ilia Mirkin wrote: As I recall, we already upload ms offsets for fs. Perhaps reuse the same spot for these CP ones? What are they used for, anyways? Can't think of anything offhand, but perhaps opencl needs something funky? Where do we upload ms offset for fs ?

Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c

2016-04-01 Thread Emil Velikov
On 21 February 2016 at 19:57, Mauro Rossi wrote: > Hi Micheal, > > no problem, I'm learning so much and you and Emil have both shown amounts of > patience with me. > > I've tested the following patch and it works > Mauro, please send patches that can be applied without

Re: [Mesa-dev] [PATCH 0/8] Fixes for building AOSP master

2016-04-01 Thread Emil Velikov
On 18 March 2016 at 19:05, Rob Herring wrote: > On Tue, Mar 1, 2016 at 9:06 AM, Rob Herring wrote: >> On Mon, Feb 29, 2016 at 4:50 AM, Emil Velikov >> wrote: >>> On 25 February 2016 at 01:47, Emil Velikov

Re: [Mesa-dev] [PATCH v2 1/5] egl: Add EGL_FRAMEBUFFER_TARGET_ANDROID attribute

2016-04-01 Thread Emil Velikov
On 22 February 2016 at 15:24, Rob Herring wrote: > On Thu, Feb 18, 2016 at 11:11 AM, Emil Velikov > wrote: >> Hi Rob, >> >> On 2 February 2016 at 20:23, Rob Herring wrote: >>> This is used by Android to select an eglconfig compatible

Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace

2016-04-01 Thread Pierre Moreau
On 01:11 PM - Apr 01 2016, Jose Fonseca wrote: > On 31/03/16 23:08, Pierre Moreau wrote: > >Starting from C++11, several math functions, like isinf, moved into the std > >namespace. Since cmath undefines those functions before redefining them > >inside > >the namespace, and glibc 2.23 defines the

Re: [Mesa-dev] [PATCH 1/5] include/GL: add mesa_glinterop.h for OpenGL-OpenCL interop (v3)

2016-04-01 Thread Emil Velikov
On 16 March 2016 at 10:40, Marek Olšák wrote: > "offset_after" isn't nasty. :) Yeah, I was inspired by other APIs I > had seen. The sizes make even more sense when they are function > parameters, because the caller can just do: > (sizeof(in), , sizeof(out), ) > A nice list of

Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace

2016-04-01 Thread Jose Fonseca
On 31/03/16 23:08, Pierre Moreau wrote: Starting from C++11, several math functions, like isinf, moved into the std namespace. Since cmath undefines those functions before redefining them inside the namespace, and glibc 2.23 defines the C variants as macros, the C variants in global namespace

[Mesa-dev] [Bug 94737] Git history is broken; prevents github upload

2016-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94737 Daniel Stone changed: What|Removed |Added Status|REOPENED|RESOLVED

Re: [Mesa-dev] [PATCHv2 0/9] drisw/glx: use XShm if possible

2016-04-01 Thread Pierre Ossman
On Mon, 15 Jun 2015 15:34:06 +0200 marcandre.lureau at gmail.com (Marc-André Lureau) wrote: > Hi, > > XPutImage/XGetImage requires to copy the images around, and the > request may be split over several chunks. Using XShm should improve > performance. > Just wanted to check what happened to

Re: [Mesa-dev] [PATCH 27/29] nir/lower_to_source_mod: Skip unsafe operations

2016-04-01 Thread Samuel Iglesias Gonsálvez
On 31/03/16 17:16, Connor Abbott wrote: > This seems a little ugly to me. Since these ops are just moving bits > around, maybe we should just convert the float64 src/dest to uint64? > We do this for other opcodes that just shuffle bits around. > Yes, this is a possibility. I wonder if the change

Re: [Mesa-dev] [PATCH] glsl: do not raise unitialized variable warnings on builtins/reserved GL variables

2016-04-01 Thread Alejandro Piñeiro
On 01/04/16 09:46, Kenneth Graunke wrote: > On Friday, April 1, 2016 9:40:03 AM PDT Alejandro Piñeiro wrote: >> Needed because not all the built-in variables are marked as system >> values, so they still have the mode ir_var_auto. Right now it fixes >> raising the warning when

Re: [Mesa-dev] [PATCH] gallium/radeon: allow multiple exports of the same texture with different usage

2016-04-01 Thread Michel Dänzer
On 01.04.2016 00:47, Marek Olšák wrote: > From: Marek Olšák > > Instead of failing an assertion, disable DCC and CMASK on the first export > that needs it, and merge the external usage flags. [...] > + /* Set metadata. */ > + if (!res->is_shared ||

Re: [Mesa-dev] [PATCH] glsl: do not raise unitialized variable warnings on builtins/reserved GL variables

2016-04-01 Thread Kenneth Graunke
On Friday, April 1, 2016 9:40:03 AM PDT Alejandro Piñeiro wrote: > Needed because not all the built-in variables are marked as system > values, so they still have the mode ir_var_auto. Right now it fixes > raising the warning when gl_GlobalInvocationID and > gl_LocalInvocationIndex are used. > >

[Mesa-dev] [PATCH] glsl: do not raise unitialized variable warnings on builtins/reserved GL variables

2016-04-01 Thread Alejandro Piñeiro
Needed because not all the built-in variables are marked as system values, so they still have the mode ir_var_auto. Right now it fixes raising the warning when gl_GlobalInvocationID and gl_LocalInvocationIndex are used. v2: use is_gl_identifier instead of filtering for some names (Ilia

<    1   2