Re: [Mesa-dev] [PATCH mesa 2/2] egl: android: remove DRM_GRALLOC_TOP hack

2015-07-21 Thread Varad Gautam
On Tuesday, July 21, 2015 03:36:32 PM Emil Velikov wrote: > Now that the drm_gralloc module exports the correct includes we can get > rid of this hack. > > Cc: Varad Gautam > Cc: Chih-Wei Huang > Cc: Eric Anholt > Signed-off-by: Emil Velikov > --- these two Tested-by: Varad Gautam > Androi

Re: [Mesa-dev] [PATCH v2] android: rework the EGL build

2015-07-21 Thread Varad Gautam
On Tuesday, July 21, 2015 03:27:47 PM Emil Velikov wrote: > See previous two commits for details. > > v2: Don't forget git mv, bring back DRM_GRALLOC_TOP. Spotted by Varad. > > Cc: Varad Gautam > Cc: Chih-Wei Huang > Cc: Eric Anholt > Signed-off-by: Emil Velikov Tested-by: Varad Gautam > -

Re: [Mesa-dev] [PATCH 07/14] mesa: Set green, blue channels to zero only for formats with these components

2015-07-21 Thread Iago Toral
On Tue, 2015-07-21 at 11:13 -0700, Anuj Phogat wrote: > On Tue, Jul 21, 2015 at 12:50 AM, Iago Toral wrote: > > On Tue, 2015-06-16 at 11:15 -0700, Anuj Phogat wrote: > >> Signed-off-by: Anuj Phogat > >> --- > >> src/mesa/drivers/common/meta.c | 13 ++--- > >> 1 file changed, 10 insertion

[Mesa-dev] [Bug 90264] [Regression, bisected] Tooltip corruption in Chrome

2015-07-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90264 --- Comment #38 from Heiko --- (In reply to Antoine Labour from comment #37) > Can you make glXWaitX "re-evaluate window sizes"? That's the reason we call > it - we just resized the window, we want to make sure we're drawing to the > right back b

Re: [Mesa-dev] [PATCH 05/14] meta: Abort meta pbo path if readpixels need signed-unsigned conversion

2015-07-21 Thread Iago Toral
On Tue, 2015-07-21 at 17:05 -0700, Anuj Phogat wrote: > On Tue, Jul 21, 2015 at 1:36 AM, Iago Toral wrote: > > On Tue, 2015-07-21 at 08:13 +0200, Iago Toral wrote: > >> On Mon, 2015-07-20 at 10:56 -0700, Anuj Phogat wrote: > >> > On Mon, Jul 20, 2015 at 5:10 AM, Iago Toral wrote: > >> > > On Fri,

[Mesa-dev] [PATCH] radeon: Silence GCC unused-but-set-variable warnings.

2015-07-21 Thread Vinson Lee
radeon_fbo.c: In function 'radeon_map_renderbuffer_s8z24': radeon_fbo.c:162:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_map_renderbuffer_z16': radeon_fbo.c:200:9: warning: variable 'ret' set but not used [-Wunu

Re: [Mesa-dev] [PATCH 0/7] NIR dead control flow, take two

2015-07-21 Thread Connor Abbott
On Tue, Jul 21, 2015 at 9:53 PM, Connor Abbott wrote: > This is another spin of my dead control flow elimination series, this > time based on the control flow modification series I sent out earlier. > It's much shorter, since it now uses the much-more-reusable modification > API, rather than a few

[Mesa-dev] [PATCH 6/7] i965/fs/nir: enable the dead control flow optimization

2015-07-21 Thread Connor Abbott
From: Connor Abbott Doesn't do anything on the public shader-db. Signed-off-by: Connor Abbott --- src/mesa/drivers/dri/i965/brw_nir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 3e154c1..df3be22 100644 -

[Mesa-dev] [PATCH 4/7] nir: add a helper for iterating over blocks in a cf node

2015-07-21 Thread Connor Abbott
From: Connor Abbott We were already doing this internally for iterating over a function implementation, so just expose it directly. Signed-off-by: Connor Abbott --- src/glsl/nir/nir.c | 7 +++ src/glsl/nir/nir.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/glsl/nir/nir.c b/sr

[Mesa-dev] [PATCH 0/7] NIR dead control flow, take two

2015-07-21 Thread Connor Abbott
This is another spin of my dead control flow elimination series, this time based on the control flow modification series I sent out earlier. It's much shorter, since it now uses the much-more-reusable modification API, rather than a few ad-hoc functions to do what it needs to do. The changes themse

[Mesa-dev] [PATCH 1/7] nir: add an optimization for removing dead control flow

2015-07-21 Thread Connor Abbott
From: Connor Abbott v2: use nir_cf_node_remove_after() instead of our own broken thing. v3: use the new control flow modification helpers. Signed-off-by: Connor Abbott --- src/glsl/Makefile.sources | 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_opt_dead_cf.c | 155 ++

[Mesa-dev] [PATCH 7/7] XXX disable opt_if_simplification

2015-07-21 Thread Connor Abbott
From: Connor Abbott This helps with testing the NIR dead cf pass. Signed-off-by: Connor Abbott --- src/glsl/glsl_parser_extras.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 5412f0b..2948607 100644

[Mesa-dev] [PATCH 5/7] nir/dead_cf: add support for removing useless loops

2015-07-21 Thread Connor Abbott
From: Connor Abbott v2: fix detecting if the loop has any phi nodes after it. v2: use nir_foreach_ssa_def() instead of nir_foreach_dest() when checking for values live after the loop to catch const_load instructions. v2: fix handling return instructions v2: add some documentation to loop_

[Mesa-dev] [PATCH 2/7] nir/dead_cf: delete code that's unreachable due to jumps

2015-07-21 Thread Connor Abbott
From: Connor Abbott v2: use nir_cf_node_remove_after(). v2: use foreach_list_typed() instead of hardcoding a list walk. v3: update to new control flow modification helpers. Signed-off-by: Connor Abbott --- src/glsl/nir/nir_opt_dead_cf.c | 123 ++--- 1 file ch

[Mesa-dev] [PATCH 3/7] nir: add nir_block_get_following_loop() helper

2015-07-21 Thread Connor Abbott
From: Connor Abbott Signed-off-by: Connor Abbott --- src/glsl/nir/nir.c | 16 src/glsl/nir/nir.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index e9af1a7..f2b60d4 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -

[Mesa-dev] [PATCH 18/21] nir/cf: add split_block_cursor()

2015-07-21 Thread Connor Abbott
This is a helper that will be shared between the new control flow insertion and modification code. Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 48 + 1 file changed, 48 insertions(+) diff --git a/src/glsl/nir/nir_control_flow.c b/src

[Mesa-dev] [PATCH 15/21] nir/cf: fix link_blocks() when there are no successors

2015-07-21 Thread Connor Abbott
When we insert a single basic block A into another basic block B, we will split B into C and D, insert A in the middle, and then splice together C, A, and D. When we splice together C and A, we need to move the successors of A into C -- except A has no successors, since it hasn't been inserted yet.

[Mesa-dev] [PATCH 12/21] nir/cf: handle jumps better in stitch_blocks()

2015-07-21 Thread Connor Abbott
In particular, handle the case where the earlier block ends in a jump and the later block is empty. In that case, we want to preserve the jump and remove any traces of the later block. Before, we would only hit this case when removing a control flow node after a jump, which wasn't a common occuranc

[Mesa-dev] [PATCH 13/21] nir/cf: remove uses of SSA definitions that are being deleted

2015-07-21 Thread Connor Abbott
Unlike calling nir_instr_remove(), calling nir_cf_node_remove() (and later in the series, the nir_cf_list_delete()) implies that you're removing instructions that may still have uses, except those instructions are never executed so any uses will be undefined. When cleaning up a CF node for deletion

[Mesa-dev] [PATCH 02/21] nir: inline block_add_pred() a few places

2015-07-21 Thread Connor Abbott
It was being used to initialize function impls and loops, even though it's really a control flow modification helper. It's pretty trivial, so just inline it to avoid the dependency. Signed-off-by: Connor Abbott --- src/glsl/nir/nir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) di

[Mesa-dev] [PATCH 16/21] nir/cf: add a cursor structure

2015-07-21 Thread Connor Abbott
For now, it allows us to refactor the control flow insertion API's so that there's a single entrypoint (with some wrappers). More importantly, it will allow us to reduce the combinatorial explosion in the extract function. There, we need to specify two points to extract, which may be at the beginni

[Mesa-dev] [PATCH 19/21] nir/cf: use a cursor for inserting control flow

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 197 ++-- src/glsl/nir/nir_control_flow.h | 27 +- 2 files changed, 49 insertions(+), 175 deletions(-) diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c index

[Mesa-dev] [PATCH 20/21] nir/cf: add new control modification API's

2015-07-21 Thread Connor Abbott
These will help us do a number of things, including: - Early return elimination. - Dead control flow elimination. - Various optimizations, such as replacing: if (foo) { ... } if (!foo) { ... } with: if (foo) { ... } else { ... } Signed-off-by: Connor Abbott --- src/glsl/nir/n

[Mesa-dev] [PATCH 17/21] nir/cf: add split_block_before_instr()

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c index 9ae113f..fcdabc7 100644 --- a/src/glsl/nir/nir_control_flow.c +++ b/src/glsl/nir/nir_con

[Mesa-dev] [PATCH 11/21] nir/cf: handle jumps in split_block_end()

2015-07-21 Thread Connor Abbott
Before, we would only split a block with a jump at the end if we were inserting something after a block with a jump, which never happened in practice. But now, we want to use this to extract control flow lists which may end in a jump, in which case we really need to do the correct patching up. As a

[Mesa-dev] [PATCH 03/21] nir: make cleanup_cf_node() not use remove_defs_uses()

2015-07-21 Thread Connor Abbott
cleanup_cf_node() is part of the control flow modification code, which we're going to split into its own file, but remove_defs_uses() is an internal function used by nir_instr_remove(). Break the dependency by making cleanup_cf_node() use nir_instr_remove() instead, which simply calls remove_defs_u

[Mesa-dev] [PATCH 06/21] nir: add nir_foreach_phi_src_safe()

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 2029dc9..e9f1363 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1101,6 +1101,8 @@ typedef struct { #define nir_foreach_phi_src(p

[Mesa-dev] [PATCH 21/21] nir/cf: reimplement nir_cf_node_remove() using the new API

2015-07-21 Thread Connor Abbott
This gives us some testing of it. Also, the old nir_cf_node_remove() wasn't handling phi nodes correctly and was calling cleanup_cf_node() too late. Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 31 --- src/glsl/nir/nir_control_flow.h | 11 +++

[Mesa-dev] [PATCH 14/21] nir/cf: clean up jumps when cleaning up CF nodes

2015-07-21 Thread Connor Abbott
We may delete a control flow node which contains structured jumps to other parts of the program. We need to remove the jump as a predecessor, as well as remove any phi node sources which reference it. Right now, the same problem exists for blocks that don't end in a jump instruction, but with the n

[Mesa-dev] [PATCH 05/21] nir/cf: add insert_phi_undef() helper

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c index 8d146c4..bb94652 100644 --- a/src/glsl/nir/nir_control_flow.c +++ b/src/glsl/nir/

[Mesa-dev] [PATCH 09/21] nir/cf: handle phi nodes better in split_block_beginning()

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c index 205b608..b416a58 100644 --- a/src/glsl/nir/nir_control_flow.c +++ b/src/glsl/nir/nir_control_

[Mesa-dev] [PATCH 10/21] nir/cf: add block_ends_in_jump()

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 8 1 file changed, 8 insertions(+) diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c index b416a58..b99bf89 100644 --- a/src/glsl/nir/nir_control_flow.c +++ b/src/glsl/nir/nir_control_flow.c

[Mesa-dev] [PATCH 07/21] nir/cf: add remove_phi_src() helper

2015-07-21 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/nir/nir_control_flow.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c index bb94652..bf25813 100644 --- a/src/glsl/nir/nir_control_flow.c +++ b/src/glsl/nir/nir_cont

[Mesa-dev] [PATCH 08/21] nir/cf: split up and improve nir_handle_remove_jumps()

2015-07-21 Thread Connor Abbott
Before, the process of removing a jump and wiring up the remaining block correctly was atomic, but with the new control flow modification it's split into two parts: first, we extract the jump, which creates a new block with re-wired successors as well as a free-floating jump, and then we delete the

[Mesa-dev] [PATCH 01/21] nir/validate: check successors/predecessors more carefully

2015-07-21 Thread Connor Abbott
We should be checking almost everything now. Signed-off-by: Connor Abbott --- src/glsl/nir/nir_validate.c | 95 +++-- 1 file changed, 84 insertions(+), 11 deletions(-) diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c index dc79941..9

[Mesa-dev] [PATCH 04/21] nir: move control flow modification to its own file

2015-07-21 Thread Connor Abbott
We want to start reworking and expanding this code, but it'll be a lot easier to do once we disentangle it from the rest of the stuff in nir.c. Unfortunately, there are a few unavoidable dependencies in nir.c on methods we'd rather not expose publicly, since if not used in very specific situations

[Mesa-dev] [PATCH 00/21] NIR control flow modification

2015-07-21 Thread Connor Abbott
Back when I was getting NIR up and running, I created a bunch of functions that dealt with modifying control flow; they allowed you to remove control flow nodes (if's, loops, and basic blocks) as well as insert newly-created control flow nodes at certain points. The insertion API's worked well enou

[Mesa-dev] radeonsi sampler/ubo indirect support

2015-07-21 Thread Dave Airlie
These two are needs for ARB_gpu_shader5 support, the only remaining piece is geometry streams, and I have them implemented, but they are a bit conflicty with tess. This also needs an llvm change for sampler indirect to work, but we should land the frontend pieces. Dave.

[Mesa-dev] [PATCH 2/2] radeonsi: ubo indexing support

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is required as part of ARB_gpu_shader5. no backend changes are required for this, or if any are, it's the same ones as for samplers. Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 17 ++

[Mesa-dev] [PATCH 1/2] radeonsi: add support for indirect samplers

2015-07-21 Thread Dave Airlie
From: Dave Airlie This adds the frontend support, however the llvm backend produces the wrong pattern, however we can conditionalise enabling ARB_gpu_shader5 on whatever version of llvm we fix this in. Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- src/gallium

[Mesa-dev] [Bug 90264] [Regression, bisected] Tooltip corruption in Chrome

2015-07-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90264 --- Comment #37 from Antoine Labour --- (In reply to Heiko from comment #35) > Just some more input > > Debuggable with smth like > `/usr/lib/chromium-browser/chrome --user-data-dir=/tmp/fake --no-sandbox > --enable-gpu-debugging --gpu-launche

[Mesa-dev] [PATCH] mesa: initialize variables to silence compiler warnings

2015-07-21 Thread Brian Paul
--- src/mesa/main/fbobject.c | 4 ++-- src/mesa/main/shaderapi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f46554b..cc342c2 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3304,7 +3304,

Re: [Mesa-dev] [PATCH 01/46] drirc: drop support for Heaven 3.0, fixes tessellation in 4.0

2015-07-21 Thread Kenneth Graunke
On Friday, June 19, 2015 03:46:51 AM Kenneth Graunke wrote: > I made some comments, but assuming those are taken care of, > patches 1-22 are: > > Reviewed-by: Kenneth Graunke > > I plan on reviewing the rest, but probably not tonight. > Thanks for picking this up! The whole series is: Reviewed-

Re: [Mesa-dev] [PATCH 05/14] meta: Abort meta pbo path if readpixels need signed-unsigned conversion

2015-07-21 Thread Anuj Phogat
On Tue, Jul 21, 2015 at 1:36 AM, Iago Toral wrote: > On Tue, 2015-07-21 at 08:13 +0200, Iago Toral wrote: >> On Mon, 2015-07-20 at 10:56 -0700, Anuj Phogat wrote: >> > On Mon, Jul 20, 2015 at 5:10 AM, Iago Toral wrote: >> > > On Fri, 2015-06-19 at 13:40 -0700, Anuj Phogat wrote: >> > >> On Tue, J

Re: [Mesa-dev] [PATCH 01/46] drirc: drop support for Heaven 3.0, fixes tessellation in 4.0

2015-07-21 Thread Dave Airlie
>> The patches that are missing Rbs are: >> >> 23-24, 26-43, 45-46. With where I've replied, you can add my Reviewed-by to these. it might be nice to sed/^I// across the patches that add tabs into GLSL, but it's already scary in there. Dave. __

Re: [Mesa-dev] [PATCH 30/46] glsl: relax unsized input/output block arrays for TCS/TES

2015-07-21 Thread Dave Airlie
This should use _mesa_shader_stage_to_string in the _mesa_glsl_error strings, Change that and it can have Reviewed-by: Dave Airlie > > --- > src/glsl/ast_to_hir.cpp | 33 ++--- > 1 file changed, 26 insertions(+), 7 deletions(-) > > diff --git a/src/glsl/ast_to_hir.c

Re: [Mesa-dev] [PATCH 28/46] glsl: don't lower variable indexing on non-patch tessellation inputs/outputs

2015-07-21 Thread Dave Airlie
On 17 July 2015 at 06:15, Marek Olšák wrote: > From: Marek Olšák > > There is no way to lower them, because the array sizes are unknown > at compile time. > > Based on a patch from: Fabian Bieler > > v2: add comments you added the comment but you typoed it. > + >case ir_var_shader_in:

Re: [Mesa-dev] [PATCH 01/12] i965/fs: Define logical framebuffer write opcode.

2015-07-21 Thread Kenneth Graunke
On Thursday, July 16, 2015 06:41:16 PM Francisco Jerez wrote: > The logical variant is largely equivalent to the original opcode but > instead of taking a single payload source it expects the arguments > that make up the payload separately as individual sources, like: > > fb_write_logical null, c

Re: [Mesa-dev] [PATCH 26/46] glsl: add "in" or "out" prefix to name when flattening interface blocks

2015-07-21 Thread Dave Airlie
On 17 June 2015 at 09:01, Marek Olšák wrote: > From: Fabian Bieler > Reviewed-by: Dave Airlie > This is to prevent a name conflict in tessellation shaders built-in interface > blocks. > --- > src/glsl/lower_named_interface_blocks.cpp | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-

[Mesa-dev] [Bug 91418] Visual Studio 2015 vsnprintf build error

2015-07-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91418 Bug ID: 91418 Summary: Visual Studio 2015 vsnprintf build error Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Windows (All) Status: NEW Severity

Re: [Mesa-dev] [PATCH 24/46] glsl: make lower_clip_distance work with tessellation shaders.

2015-07-21 Thread Dave Airlie
On 17 June 2015 at 09:01, Marek Olšák wrote: > From: Fabian Bieler Reviewed-by: Dave Airlie > > --- > src/glsl/lower_clip_distance.cpp | 185 > ++- > 1 file changed, 105 insertions(+), 80 deletions(-) > > diff --git a/src/glsl/lower_clip_distance.cpp > b/s

Re: [Mesa-dev] [PATCH 2/2] radeonsi: renamed gs_used_inputs to inputs_read

2015-07-21 Thread Marek Olšák
For the series: Reviewed-by: Marek Olšák Marek On Wed, Jul 22, 2015 at 1:06 AM, Dave Airlie wrote: > From: Dave Airlie > > This is also picked from Marek's tess work, it reduces > the conflicts with my GS5 work. > > Signed-off-by: Dave Airlie > --- > src/gallium/drivers/radeonsi/si_shader.c

Re: [Mesa-dev] [PATCH 23/46] glsl: allow linking of tessellation shaders.

2015-07-21 Thread Dave Airlie
On 17 June 2015 at 09:01, Marek Olšák wrote: > From: Chris Forbes > > Marek: require a tess eval shader if a tess control shader is present As part of my learn about tess, Reviewed-by: Dave Airlie ___ mesa-dev mailing list mesa-dev@lists.freedesktop.

[Mesa-dev] radeonsi trivial renames from tess branch

2015-07-21 Thread Dave Airlie
While pulling tess into my gs5 branch these things got annoying so lets just rename them upfront. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] radeonsi: rename ddxy_lds to lds

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is picked from Marek's tess work, and I think it makes sense to just do it first. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/radeon

[Mesa-dev] [PATCH 2/2] radeonsi: renamed gs_used_inputs to inputs_read

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is also picked from Marek's tess work, it reduces the conflicts with my GS5 work. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c| 2 +- src/gallium/drivers/radeonsi/si_shader.h| 4 +++- src/gallium/drivers/radeonsi/si_state_shader

[Mesa-dev] [PATCH] xa: add xa_surface_from_handle2

2015-07-21 Thread Rob Clark
From: Rob Clark Like xa_surface_from_handle(), but takes a handle type, rather than hard-coding 'shared' handle. This is needed to fix bugs seen with xf86-video-freedreno with xrandr rotation, for example. The root issue is that doing a GEM_OPEN ioctl on a bo that already has a GEM handle assoc

Re: [Mesa-dev] [PATCH 12/12] i965/fs: Remove the emit_texture_gen*() fs_visitor methods.

2015-07-21 Thread Jason Ekstrand
I made a few minor nitpick comments on a couple of patches and I didn't feel like I could fully review 08/12. Other than the few nits, patches 1-7 and 9-12 are Reviewed-by: Jason Ekstrand On Sat, Jul 18, 2015 at 7:34 AM, Francisco Jerez wrote: > This is now dead code. > --- > src/mesa/drivers/

[Mesa-dev] [PATCH 1/4] radeonsi: separate out load sample position

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is prep work for reusing this in the interpolation code later. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 44 +++- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_s

[Mesa-dev] radeonsi: interpolateAt and ARB_derivative_control support

2015-07-21 Thread Dave Airlie
These are pretty standalone so I've pulled them out from my radeonsi-dev tree and cleaned them up. They pass all the tests, and get one step closer to gpu_shader5. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.

[Mesa-dev] [PATCH 3/4] radeonsi: add fine derivate control

2015-07-21 Thread Dave Airlie
From: Dave Airlie This adds support for fine derivatives and enables ARB_derivative_control on radeonsi. (just fell out of my working out interpolation) Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- docs/relnotes/10.7.0.html| 1 + src/galliu

[Mesa-dev] [PATCH 2/4] radeonsi: split out interpolation input selection

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is prep work for using it in the interpolation code later. Also add storage for the input interpolation mode so we can pick it up later. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 62 +++- src/gallium/drivers/ra

[Mesa-dev] [PATCH 4/4] radeonsi: add support for interpolateAt functions

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is part of ARB_gpu_shader5, and this passes all the piglit tests currently available. Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 232 ++- 2 files changed, 232 in

Re: [Mesa-dev] [PATCH 10/12] i965/fs: Reimplement emit_texture() in terms of logical send messages.

2015-07-21 Thread Jason Ekstrand
On Sat, Jul 18, 2015 at 7:34 AM, Francisco Jerez wrote: > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 66 > +--- > 1 file changed, 49 insertions(+), 17 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > b/src/mesa/drivers/dri/i965/brw_f

Re: [Mesa-dev] [PATCH 09/12] i965/fs: Hook up SIMD lowering to handle texturing opcodes of unsupported width.

2015-07-21 Thread Jason Ekstrand
On Sat, Jul 18, 2015 at 7:34 AM, Francisco Jerez wrote: > This should match the set of cases in which we currently call fail() > or no16() from the emit_texture_*() methods and the ones in which > emit_texture_gen4() enables the SIMD16 workaround. > > Hint for reviewers: It's not a big deal if I h

Re: [Mesa-dev] [PATCH v2] dri_interface: drop __NOT_HAVE_DRM_H magic

2015-07-21 Thread Ian Romanick
Reviewed-by: Ian Romanick On 07/21/2015 09:07 AM, Emil Velikov wrote: > v2: use HAVE_LIBDRM macro. > > Cc: Ian Romanick > Signed-off-by: Emil Velikov > --- > include/GL/internal/dri_interface.h | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/include/GL/intern

Re: [Mesa-dev] [PATCH] glapi: fix argument parsing in glX_proto_recv.py

2015-07-21 Thread Dylan Baker
Cool, I was under that impression too, but having it confirmed is great. Since these do matter and I don't have push access, could you make sure this lands? On Jul 21, 2015 15:33, "Emil Velikov" wrote: > It seems that I was under the wrong impression on the hole thing. > > Some of the files gene

Re: [Mesa-dev] [PATCH] glapi: fix argument parsing in glX_proto_recv.py

2015-07-21 Thread Emil Velikov
It seems that I was under the wrong impression on the hole thing. Some of the files generated from these scripts are used in/by xserver. Although they are imported/tracked into version control of the latter in order to prevent the xserver build directly diving into mesa source tree. The XORG_GLAP

Re: [Mesa-dev] [PATCH 08/12] i965/fs: Implement lowering of logical texturing opcodes on Gen4.

2015-07-21 Thread Jason Ekstrand
I *think* this is sane. I compared it against the current SIMD16 and SIMD8 code and it looks like it does the right thing. However, it's not a direct translation and I don't know the gen4 texturing code, so I can't really call it reviewed. Acked-by: Jason Ekstrand Ken, could you give it a quic

Re: [Mesa-dev] [PATCH] mesa: allow GL_TEXTURE_CUBE_MAP_ARRAY case for glCompressedTexSubImage3D()

2015-07-21 Thread Roland Scheidegger
Could mention this is actually a gl spec bug in the commit message, but either way: Reviewed-by: Roland Scheidegger Am 21.07.2015 um 22:55 schrieb Brian Paul: > Since s3tc works for cube maps and 2D arrays, it should also work for > cube arrays. NVIDIA's driver supports this too. This is a mi

Re: [Mesa-dev] [PATCH] glx: Fix image size computation for EXT_texture_integer (v2)

2015-07-21 Thread Eric Anholt
Adam Jackson writes: > Without this this extension basically can't work in indirect contexts, > TexImage2D will compute the image size as 0 and we'll send no image data > to the server. > > v2: Add EXT_texture_integer to the client extension list too (Ian) Reviewed-by: Eric Anholt signature.a

Re: [Mesa-dev] [PATCH 04/12] i965/fs: Pass a BAD_FILE header source to LOAD_PAYLOAD in emit_texture_gen7().

2015-07-21 Thread Jason Ekstrand
On Sat, Jul 18, 2015 at 7:34 AM, Francisco Jerez wrote: > So that it's left uninitialized by LOAD_PAYLOAD, we only need to > reserve space for it in the message since it will be initialized > implicitly by the generator. > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 --- > 1 file c

[Mesa-dev] [PATCH] ABI-check: Use more portable bash invocation.

2015-07-21 Thread Vinson Lee
Fixes 'make check' on FreeBSD. Signed-off-by: Vinson Lee --- src/mapi/es1api/ABI-check | 2 +- src/mapi/es2api/ABI-check | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mapi/es1api/ABI-check b/src/mapi/es1api/ABI-check index 44654cd..819568f 100755 --- a/src/mapi/es1ap

[Mesa-dev] [PATCH] mesa: allow GL_TEXTURE_CUBE_MAP_ARRAY case for glCompressedTexSubImage3D()

2015-07-21 Thread Brian Paul
Since s3tc works for cube maps and 2D arrays, it should also work for cube arrays. NVIDIA's driver supports this too. This is a minor follow-on fix for the commit "mesa: fix up some texture error checks". --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [Mesa-dev] [PATCH 12/12] i965/fs: Reimplement emit_single_fb_write() in terms of logical framebuffer writes.

2015-07-21 Thread Jason Ekstrand
On Thu, Jul 16, 2015 at 8:41 AM, Francisco Jerez wrote: > The only non-trivial thing it still has to do is figure out where to > take the src/dst depth values from and predicate the instruction if > discard is in use. The manual SIMD unrolling logic in the dual-source > case goes away because thi

Re: [Mesa-dev] ARB_copy_image support in Gallium

2015-07-21 Thread Roland Scheidegger
I just realized that there's actually another difference if you'd use the util_is_format_compatible to see whether resource_copy_region may be used: d3d style, this would exclude things like rg16 being compatible with r32 completely, swizzled or not (this is how d3d10 typeless groups work). Granted

Re: [Mesa-dev] [PATCH 01/46] drirc: drop support for Heaven 3.0, fixes tessellation in 4.0

2015-07-21 Thread Marek Olšák
FYI, I will push tessellation after Dave lands shader subroutines. Marek On Thu, Jul 16, 2015 at 10:27 PM, Marek Olšák wrote: > Thanks for the reviewing. > > The patches that are missing Rbs are: > > 23-24, 26-43, 45-46. > > The patches have been on the mailing list for one month. It looks like

Re: [Mesa-dev] [PATCH] nvc0: force cache flush when binding a new ubo

2015-07-21 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin I'm unconvinced that this is strictly necessary, but it seems to fix the test so... wtvr. UBO's don't get rebound too often without also doing other things that would incur a similar barrier/flush. On Tue, Jul 21, 2015 at 3:59 PM, Samuel Pitoiset wrote: > This fixes the

[Mesa-dev] [PATCH] nvc0: force cache flush when binding a new ubo

2015-07-21 Thread Samuel Pitoiset
This fixes the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/

Re: [Mesa-dev] [PATCH] nv50: force cache flush for Uniform Buffer Objects

2015-07-21 Thread Ilia Mirkin
How about "nv50: force cache flush when binding a new ubo" Reviewed-by: Ilia Mirkin On Tue, Jul 21, 2015 at 3:37 PM, Samuel Pitoiset wrote: > This fixes the following piglit test: > ext_transform_feedback-immediate-reuse-uniform-buffer > > Signed-off-by: Samuel Pitoiset > --- > src/gallium

[Mesa-dev] [PATCH] nv50: force cache flush for Uniform Buffer Objects

2015-07-21 Thread Samuel Pitoiset
This fixes the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nv50/nv50_shader_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c b/src/

Re: [Mesa-dev] [PATCH] r600/sb: Fix an &/&& mistake

2015-07-21 Thread Tobias Droste
Just FYI: http://lists.freedesktop.org/archives/mesa-dev/2015-June/085869.html Am Dienstag, 21. Juli 2015, 12:12:33 schrieb Adam Jackson: > gcc says: > > sb/sb_sched.cpp: In member function 'bool > r600_sb::alu_group_tracker::try_reserve(r600_sb::alu_node*)': > sb/sb_sched.cpp:492:7: war

Re: [Mesa-dev] [PATCH 4/4] i965/fs: Implement pass to lower instructions of unsupported SIMD width.

2015-07-21 Thread Jason Ekstrand
A few comments below. Mostly just asking for explanation. 1-3 are Reviewed-by: Jason Ekstrand Obviously, don't merge 4/4 until it actually has users. --Jason On Thu, Jul 16, 2015 at 8:35 AM, Francisco Jerez wrote: > This lowering pass implements an algorithm to expand SIMDN > instructions in

Re: [Mesa-dev] [PATCH 07/14] mesa: Set green, blue channels to zero only for formats with these components

2015-07-21 Thread Anuj Phogat
On Tue, Jul 21, 2015 at 12:50 AM, Iago Toral wrote: > On Tue, 2015-06-16 at 11:15 -0700, Anuj Phogat wrote: >> Signed-off-by: Anuj Phogat >> --- >> src/mesa/drivers/common/meta.c | 13 ++--- >> 1 file changed, 10 insertions(+), 3 deletions(-) >> >> diff --git a/src/mesa/drivers/common/me

[Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-21 Thread Zoltan Gilian
Read-only and write-only image arguments are recognized and distinguished. Attributes of the image arguments are passed to the kernel as implicit arguments. --- src/gallium/state_trackers/clover/core/kernel.cpp | 46 ++- src/gallium/state_trackers/clover/core/kernel.hpp | 13 +- src/galliu

Re: [Mesa-dev] [PATCH] r600/sb: Fix an &/&& mistake

2015-07-21 Thread Alex Deucher
On Tue, Jul 21, 2015 at 12:12 PM, Adam Jackson wrote: > gcc says: > > sb/sb_sched.cpp: In member function 'bool > r600_sb::alu_group_tracker::try_reserve(r600_sb::alu_node*)': > sb/sb_sched.cpp:492:7: warning: suggest parentheses around operand of '!' > or change '&' to '&&' or '!' to '~

[Mesa-dev] [PATCH] i965/fs: Handle non-const sample number in interpolateAtSample

2015-07-21 Thread Neil Roberts
If a non-const sample number is given to interpolateAtSample it will now generate an indirect send message with the sample ID similar to how non-const sampler array indexing works. Previously non-const values were ignored and instead it ended up using a constant 0 value. Note that unlike sampler a

[Mesa-dev] [PATCH 18/20] i965/fs: Translate image load, store and atomic NIR intrinsics.

2015-07-21 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 149 +++ 1 file changed, 149 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 31024b7..76297b7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++

[Mesa-dev] [PATCH 19/20] i965/fs: Translate memory barrier NIR intrinsics.

2015-07-21 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 76297b7..9a1fb4b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 12/20] i965/fs: Drop unused untyped surface read and atomic emit methods.

2015-07-21 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs.h | 7 -- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 13 ++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 112 --- 3 files changed, 5 insertions(+), 127 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b

[Mesa-dev] [PATCH 15/20] i965/fs: Don't overwrite fs_visitor::uniforms and ::param_size during the SIMD16 run.

2015-07-21 Thread Francisco Jerez
Image variables need to allocate additional uniform slots over nir_shader::num_uniforms. nir_setup_uniforms() overwrites the values imported from the SIMD8 visitor and then exits early before entering the nir_shader::uniforms loop, so image uniforms are never re-created. Instead leave the imported

[Mesa-dev] [PATCH 10/20] i965/fs: Implement image load, store and atomic.

2015-07-21 Thread Francisco Jerez
v2: Drop VEC4 suport. v3: Rebase. --- .../drivers/dri/i965/brw_fs_surface_builder.cpp| 216 + src/mesa/drivers/dri/i965/brw_fs_surface_builder.h | 17 ++ 2 files changed, 233 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drive

[Mesa-dev] [PATCH 11/20] i965/fs: Revisit NIR atomic counter intrinsic translation.

2015-07-21 Thread Francisco Jerez
Rewrite the NIR atomic counter intrinsics translation code making use of the recently introduced surface builder. This will allow the removal of some of the functionality duplicated between the visitor and surface builder. v2: Drop VEC4 suport. --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 49 +

[Mesa-dev] [PATCH 17/20] i965/fs: Handle image uniforms in NIR programs.

2015-07-21 Thread Francisco Jerez
v2: Move the image_params array back to brw_stage_prog_data. --- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 50 +++- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/sr

[Mesa-dev] [PATCH 06/20] i965/fs: Import image access validity checks.

2015-07-21 Thread Francisco Jerez
These utility functions check whether an image access is valid. According to the spec an invalid image access should have no effect on the image and yield well-defined results. Typically the hardware implements correct bounds and surface checking by itself, but in some cases (typed atomics on IVB

[Mesa-dev] [PATCH 20/20] i965: Expose ARB_shader_image_load_store.

2015-07-21 Thread Francisco Jerez
Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 6b3bd12..5a5e308 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.

[Mesa-dev] [PATCH 01/20] i965/fs: Define logical typed and untyped surface opcodes.

2015-07-21 Thread Francisco Jerez
Each logical variant is largely equivalent to the original opcode but instead of taking a single payload source it expects its arguments separately as individual sources, like: typed_surface_write_logical null, coordinates, source, surface, num_coordinates, num

[Mesa-dev] [PATCH 13/20] i965: Teach type_size() about the size of an image uniform.

2015-07-21 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 0b0c5e1..0d97474 100644 --- a/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 09/20] i965/fs: Import image format conversion primitives.

2015-07-21 Thread Francisco Jerez
Define bitfield packing, unpacking and type conversion operations in terms of which the image format conversion code will be implemented. These don't directly know about image formats: The packing and unpacking functions take a 4-tuple of bit shifts and a 4-tuple of bit widths as arguments, determi

[Mesa-dev] [PATCH 16/20] i965/fs: Execute nir_setup_uniforms, _inputs and _outputs unconditionally.

2015-07-21 Thread Francisco Jerez
Images take up zero uniform slots in the nir_shader::num_uniforms calculation, but nir_setup_uniforms needs to be executed even if the program has no non-image uniforms so the driver-specific image parameters are uploaded. nir_setup_uniforms is a no-op if there are really no uniforms, so checking

  1   2   >