Re: [Mesa-dev] [PATCH mesa v2] Introduce .editorconfig

2016-08-31 Thread Eric Anholt
Jose Fonseca writes: > Thanks for the update. > > Reviewed-by: Jose Fonseca > > If you need and there's no outstanding objections, I can push this > change for you. I've gone ahead and pushed it now. Seems like we've had plenty of discussion time, and there's general support. signature.asc

Re: [Mesa-dev] [PATCH] i915g: Fix typo in i915_translate_instruction()

2016-08-29 Thread Eric Anholt
Echelon9 writes: > From: Rhys Kidd > > Noticed this error in a debug message whilst reviewing > https://bugs.freedesktop.org/show_bug.cgi?id=97477 > > This patch doesn't go towards fixing that bug, but at > least may clarify future debug output. > > Signed-off-by: Rhys Kidd Reviewed and pushed

Re: [Mesa-dev] [PATCH 0/2] r600g: Pair of small code clean ups with TGSI

2016-08-29 Thread Eric Anholt
Rhys Kidd writes: > Having run Mesa through Clang on Eric Anholt's Travis harness, these small > code clean ups improve readability of TGSI code in r600g and may avoid > future problems. > > Series also can be found at: > https://github.com/Echelon9/mesa/tree/fix/r600g-cleanup-tgsi-opcodes > > I

[Mesa-dev] [PATCH] nir: Update shader info when adding discards

2016-08-26 Thread Eric Anholt
vc4 is about to start using the shader info field to set up discard handling. --- src/compiler/nir/nir_lower_bitmap.c | 2 ++ src/compiler/nir/nir_lower_clip.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_lower_bitmap.c b/src/compiler/nir/nir_lower_bitmap.c index

Re: [Mesa-dev] [PATCH 2/3] nir: Change nir_shader_get_entrypoint to return an impl.

2016-08-25 Thread Eric Anholt
Kenneth Graunke writes: > Jason suggested adding an assert(function->impl) here. All callers > of this function actually want ->impl, so I decided just to change > the API. > > We also change the nir_lower_io_to_temporaries API here. All but one > caller passed nir_shader_get_entrypoint(), and

Re: [Mesa-dev] [PATCH] swrast: fix incorrectly positioned putImage() in swrast driver

2016-08-24 Thread Eric Anholt
y setting xrb->map_y to the inverted coordinate in > swrast_map_renderbuffer() which is used later by the putImage() call. > Also pass xrb->map_y to getImage() to be symmetric. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97426 > Cc: Reviewed-by: Eric Anholt

Re: [Mesa-dev] [PATCH] gallium/ttn: Remove duplicated TGSI_OPCODE_DP2A initialization

2016-08-24 Thread Eric Anholt
Rhys Kidd writes: > Duplicate line is currently on 1535. > > Identified by Clang, when run through Eric Anholt's Travis harness. > > Signed-off-by: Rhys Kidd Reviewed and pushed. Thanks! signature.asc Description: PGP signature ___ mesa-dev mailing

Re: [Mesa-dev] [PATCH 0/4] Travis CI build fixes

2016-08-24 Thread Eric Anholt
Emil Velikov writes: > On 18 August 2016 at 23:28, Eric Anholt wrote: >> Here are a few fixes to get Travis CI builds on github working again. >> >> As a reminder: If your personal branches of Mesa are on github, you >> can enable it in your github account, then

Re: [Mesa-dev] [PATCH] loader/dri3: Overhaul dri3_update_num_back

2016-08-23 Thread Eric Anholt
Michel Dänzer writes: > On 20/08/16 04:42 AM, Eric Anholt wrote: >> Michel Dänzer writes: >> >>> From: Michel Dänzer >>> >>> Always use 3 buffers when flipping. With only 2 buffers, we have to wait >>> for a flip to complete (which takes non

[Mesa-dev] [PATCH] gtn: Trim out unused VS input variables.

2016-08-19 Thread Eric Anholt
If we're going to skip setting up vertex input data in them, we should probably not leave them as vertex inputs with a driver_location that happens to alias to something else. Fixes a regression in glsl-mat-attribute on vc4 when enabling GTN. --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 27 +++

[Mesa-dev] [PATCH 2/2] nir: Fix crash in nir_lower_drawpixels.

2016-08-19 Thread Eric Anholt
Generally you'd see the gl_Color reference first and get some cursor set. However, in piglit draw-pixel-with-texture we're now seeing the TexCoord dereferenced first. --- src/compiler/nir/nir_lower_drawpixels.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_drawpi

[Mesa-dev] [PATCH 1/2] nir: Fix a comment typo in nir_lower_drawpixels.

2016-08-19 Thread Eric Anholt
--- src/compiler/nir/nir_lower_drawpixels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_drawpixels.c b/src/compiler/nir/nir_lower_drawpixels.c index 7ffaa525b5a4..a71bccddfb07 100644 --- a/src/compiler/nir/nir_lower_drawpixels.c +++ b/src/compile

Re: [Mesa-dev] [PATCH] loader/dri3: Overhaul dri3_update_num_back

2016-08-19 Thread Eric Anholt
e 2 back buffers when the swap interval is non-0, > otherwise we have to wait for the swap interval to pass before we can > start working on the next frame. This condition was previously reversed. > > Cc: "12.0 11.2" > Bugzilla: https://bugs.freedesktop.org/show_bug.c

Re: [Mesa-dev] [PATCH v2 1/2] glsl: fix key used for hashing switch statement cases

2016-08-19 Thread Eric Anholt
Tapani Pälli writes: > Implementation previously used value itself as the key, however after > hash implementation change by ee02a5e we cannot use 0 as key. > > v2: use constant pointer as the key and implement comparison > for contents (Eric Anholt) > > Signed

[Mesa-dev] [PATCH 0/4] Travis CI build fixes

2016-08-18 Thread Eric Anholt
pushes will get a make check and a scons bulid run on them, across a variety of drivers. Eric Anholt (4): travis: Parse configure.ac to pick an updated LIBDRM_VERSION. travis: Update to the Ubuntu Trusty image. travis: Enable vc4 in libdrm to satisfy vc4 test build dependency. travis: Upgrade

[Mesa-dev] [PATCH 4/4] travis: Upgrade LLVM dependency to 3.5 and enable LLVM drivers.

2016-08-18 Thread Eric Anholt
--- .travis.yml | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index e086173c529f..5f489a47fb79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,11 @@ addons: - libexpat1-dev - libxcb-dri2-0-dev - libx11-xcb-d

[Mesa-dev] [PATCH 1/4] travis: Parse configure.ac to pick an updated LIBDRM_VERSION.

2016-08-18 Thread Eric Anholt
Travis has been broken a couple of times by configure.ac updates. To make it useful, auto-update the version necessary. This could potentially be used for other dependencies, too, but those get bumped less frequently. --- .travis.yml | 10 ++ 1 file changed, 10 insertions(+) diff --git

[Mesa-dev] [PATCH 2/4] travis: Update to the Ubuntu Trusty image.

2016-08-18 Thread Eric Anholt
This will hopefully fix wget from x.org (no real reason explained in Travis CI bug reports), and may also mean that we can enable LLVM driver builds. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 843a9bcdc2ee..6a22e9595fe0 100

[Mesa-dev] [PATCH 3/4] travis: Enable vc4 in libdrm to satisfy vc4 test build dependency.

2016-08-18 Thread Eric Anholt
--- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6a22e9595fe0..e086173c529f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,7 +89,7 @@ install: - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2 - tar -jxvf

Re: [Mesa-dev] [PATCH] glsl: fix key used for hashing switch statement cases

2016-08-18 Thread Eric Anholt
Tapani Pälli writes: > Implementation previously used case value itself as the key, however > afterhash implementation change by ee02a5e we cannot use 0 as key. > Patch uses _mesa_hash_data to formulate a suitable key for this hash. > > Signed-off-by: Tapani Pälli > Bugzilla: https://bugs.freede

Re: [Mesa-dev] [PATCH] dri2: Insert a synchronisation point for glXWaitX

2016-08-17 Thread Eric Anholt
Adam Jackson writes: > On Tue, 2016-08-16 at 15:55 +0100, Chris Wilson wrote: >> On Mon, Aug 17, 2015 at 03:17:30PM -0700, Eric Anholt wrote: >> > >> > I think XSync makes more sense.  It's cheaper, and it does exactly what >> > you're supposed to

[Mesa-dev] [PATCH] i965: Drop assertion about buffer offset at draw time.

2016-08-15 Thread Eric Anholt
Given robust access, we should just be returning zeroes if the user gives us a base pointer that's too big, which is what was happens on a release build. This was caught by a webgl conformance test for out-of-bounds draws on servo. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 11 ---

Re: [Mesa-dev] [PATCH 0/5] Move check for mapped buffers into api_validate.

2016-08-14 Thread Eric Anholt
w call. Some cleanups in that area are included. > > Please review! Very nice! I've always been bothered by this validation being in vbo. Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list m

Re: [Mesa-dev] [PATCH 2/6] nir: Turn bcsel of +/- 1.0 and 0.0 into b2f sequences.

2016-08-10 Thread Eric Anholt
Connor Abbott writes: > On Wed, Aug 10, 2016 at 1:53 PM, Eric Anholt wrote: >> Kenneth Graunke writes: >> >>> On Haswell (GL 3.3): >>> >>> total instructions in shared programs: 6208759 -> 6203860 (-0.08%) >>> instructions in affecte

Re: [Mesa-dev] [PATCH] nir: Add support for scalarizing load_interpolated_input.

2016-08-10 Thread Eric Anholt
Kenneth Graunke writes: > Signed-off-by: Kenneth Graunke > --- > src/compiler/nir/nir_lower_io_to_scalar.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c > b/src/compiler/nir/nir_lower_io_to_scalar.c > index f2345d5..8b

Re: [Mesa-dev] [PATCH 2/6] nir: Turn bcsel of +/- 1.0 and 0.0 into b2f sequences.

2016-08-10 Thread Eric Anholt
Kenneth Graunke writes: > On Haswell (GL 3.3): > > total instructions in shared programs: 6208759 -> 6203860 (-0.08%) > instructions in affected programs: 856541 -> 851642 (-0.57%) > helped: 3157 > HURT: 113 > LOST: 7 > GAINED: 15 > > On Broadwell (GL 4.4): > > total instructions in shared prog

Re: [Mesa-dev] [PATCH 02/13] glsl: remove dead builtins before assigning varying locations

2016-08-10 Thread Eric Anholt
Timothy Arceri writes: > Builtins already have locations assigned so this shouldn't > changing anything. We want to call it earlier so we can tranform "change" Other than that, 1-4 are: Reviewed-by: Eric Anholt and I'll see if I can get to some more tomorrow.

Re: [Mesa-dev] [PATCH] glsl: look for frag data bindings with [0] tacked onto the end for arrays

2016-08-09 Thread Eric Anholt
the bindings. Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 2/4] prog_hash_table: Convert compare funcs to match util/hash_table.h.

2016-08-09 Thread Eric Anholt
I'm going to replace this hash table with util/hash_table.h, and the first step is to compare things the same way. --- src/mesa/program/hash_table.h | 9 - src/mesa/program/prog_hash_table.c | 9 +++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/mesa/progra

[Mesa-dev] [PATCH 1/4] nir: Drop an unused program/hash_table.h include.

2016-08-09 Thread Eric Anholt
--- src/compiler/nir/nir_lower_samplers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_samplers.c b/src/compiler/nir/nir_lower_samplers.c index 4a4326983a65..e878edd9b54b 100644 --- a/src/compiler/nir/nir_lower_samplers.c +++ b/src/compiler/nir/nir_lower_samplers.

[Mesa-dev] [PATCH 3/4] prog_hash_table: Convert to using util/hash_table.h.

2016-08-09 Thread Eric Anholt
Improves glretrace -b servo.trace (a trace of Mozilla's servo rendering engine booting, rendering a page, and exiting) from 1.8s to 1.1s. It uses a large uniform array of structs, making a huge number of separate program resources, and the fixed-size hash table was killing it. Given how many time

[Mesa-dev] [PATCH 4/4] mesa: Use a temporary set to track whether we've added a resource yet.

2016-08-09 Thread Eric Anholt
Saves another .1s on servo.trace. --- src/compiler/glsl/linker.cpp | 76 +--- 1 file changed, 50 insertions(+), 26 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index f4049133ee69..ceb86aa0a929 100644 --- a/src/compil

Re: [Mesa-dev] [PATCH] nir: Add an IO scalarizing pass using the intrinsic's first_component.

2016-08-08 Thread Eric Anholt
Timothy Arceri writes: > On Sat, 2016-08-06 at 10:15 +1000, Timothy Arceri wrote: >> On Fri, 2016-08-05 at 16:27 -0700, Eric Anholt wrote: >> > vc4 wants to have per-scalar IO load/stores so that dead code >> > elimination >> > can happen on a more granular b

[Mesa-dev] [PATCH 3/3] nir: Define system values for vc4's blending-lowering arguments.

2016-08-06 Thread Eric Anholt
In the GLSL-to-NIR conversion of VC4, I had a bit of trouble with what I was calling the "state uniforms" that I was putting into the NIR fighting with its other lowering passes. Instead of using magic uniform base numbers in the backend, follow the lead of load_user_clip_plane and just define sys

[Mesa-dev] [PATCH 1/3] nir: Move the undef of nir_intrinsics.h macros to the .h.

2016-08-06 Thread Eric Anholt
I wanted to include this from nir_builder as well, so it also needed the undefs. --- src/compiler/nir/nir.h| 3 --- src/compiler/nir/nir_intrinsics.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 379a5f8e02

[Mesa-dev] [PATCH 2/3] nir: Add nir_builder support for individual system value loads.

2016-08-06 Thread Eric Anholt
The previous nir_load_system_value(b, nir_intrinsic_load_whatever), 0) was rather verbose, when system values should be easy to generate. The index is left out because only one system value had an index included in it. --- src/compiler/nir/nir_builder.h | 15 +++ src/c

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Eric Anholt
Rob Clark writes: > On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. >> This patch removes all RTLD_NOW in favor of RTLD_LAZY. >> >> In comparison to early binding, lazy binding reduces CPU instruc

[Mesa-dev] [PATCH] nir: Add an IO scalarizing pass using the intrinsic's first_component.

2016-08-05 Thread Eric Anholt
vc4 wants to have per-scalar IO load/stores so that dead code elimination can happen on a more granular basis, which it has been doing in the backend using a multiplication by 4 of the intrinsic's driver_location. We can represent it properly in the NIR using the first_component field, though. ---

[Mesa-dev] [PATCH 3/3] ttn: Use nir_load_front_face instead of the TGSI-style input.

2016-08-05 Thread Eric Anholt
This reduces the diff between GLSL-to-NIR and TGSI-to-NIR, and gives NIR more optimization to work on. --- src/gallium/auxiliary/nir/tgsi_to_nir.c| 30 -- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 46 -- src/gallium/drivers/vc4/vc4_nir_lower_i

[Mesa-dev] [PATCH 1/3] nir: Tell opt_algebraic that load_front_face is a boolean.

2016-08-05 Thread Eric Anholt
This gives a chance for things like "gl_FrontFace != 0" to get optimized out. --- src/compiler/nir/nir_search.c | 60 --- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index b21f

[Mesa-dev] [PATCH 0/3] Converting TTN to using frontface intrinsic.

2016-08-05 Thread Eric Anholt
Here's a little miniseries from my trying to convert from using TTN to usually using GTN in vc4. No change on shader-db, but seems like a good idea. Eric Anholt (3): nir: Tell opt_algebraic that load_front_face is a boolean. nir: Use the system-value front face for twoside lowering.

[Mesa-dev] [PATCH 2/3] nir: Use the system-value front face for twoside lowering.

2016-08-05 Thread Eric Anholt
GLSL-to-NIR generates system value usage, and vc4/freedreno would both like the system value instead of the varying, so switch this pass over to it. --- src/compiler/nir/nir_lower_two_sided_color.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/com

Re: [Mesa-dev] [PATCH] i965: import prime buffers in the current context, not screen

2016-08-04 Thread Eric Anholt
Martin Peres writes: > This mirrors the codepath taken by DRI2 in IntelSetTexBuffer2() and > fixes many applications when using DRI3: > - Totem with libva on hw-accelerated decoding > - obs-studio, using Window Capture (Xcomposite) as a Source > - gstreamer with VAAPI > > Cc: mesa-sta...@lists

[Mesa-dev] [PATCH 2/2 v2] mesa: Dynamically allocate the matrix stack.

2016-08-03 Thread Eric Anholt
By allocating and initializing the matrices at context creation, the OS can't even overcommit the pages. This saves about 63k (out of 946k) of maximum memory size according to massif on simulated vc4 glsl-algebraic-add-add-1. It also means we could potentially relax the maximum stack sizes, but t

Re: [Mesa-dev] [PATCH] loader: fix memory leak in loader_dri3_open

2016-08-03 Thread Eric Anholt
Jan Ziak <0xe2.0x9a.0...@gmail.com> writes: > Found via "valgrind --leak-check=full glxgears". Pushed. Thanks! signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/lis

Re: [Mesa-dev] [PATCH] gbm: Correct bo_import documentation (trivial)

2016-08-03 Thread Eric Anholt
Ben Widawsky writes: > Missed here: > commit a43d286ef7ff65087b1f051d071b829ca7b02073 > Author: Kristian Høgsberg > Date: Fri Mar 28 10:17:11 2014 -0700 > > gbm: Add import from fd > > Cc: Kristian Høgsberg > Signed-off-by: Ben Widawsky Pushed. Thanks! signature.asc Description: PGP

[Mesa-dev] [PATCH 2/2] mesa: Dynamically allocate the matrix stack.

2016-08-03 Thread Eric Anholt
By allocating and initializing the matrices at context creation, the OS can't even overcommit the pages. This saves about 63k (out of 946k) of maximum memory size according to massif on simulated vc4 glsl-algebraic-add-add-1. It also means we could potentially relax the maximum stack sizes, but t

[Mesa-dev] [PATCH 1/2] state_tracker: Initialize the draw context only when needed.

2016-08-03 Thread Eric Anholt
It's only used for rarely-used deprecated GL features (feedback/rasterpos), so we can skip the memory allocation and initialization for it most of the time. Saves about 659k (out of 1605k) of maximum memory size according to massif on simulated vc4 glsl-algebraic-add-add-1 --- src/mesa/state_trac

[Mesa-dev] [PATCH] ttn: Make FRAG_RESULT_DEPTH be a float variable to match gtn and ptn.

2016-08-01 Thread Eric Anholt
This lets TTN-using drivers handle FRAG_RESULT_DEPTH the same between all their source paths. --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 19 --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 6 -- src/gallium/drivers/freedreno/ir3/ir3_shader.c |

[Mesa-dev] [PATCH] nir: Allow opt_peephole_select to work on empty blocks.

2016-08-01 Thread Eric Anholt
nir_opt_peephole_select has the job of removing IF statements with no side effects. However, if the IF statement's successor didn't have any instructions in it, we were skipping it, which occurred in mupen64 on vc4 with glsl_to_nir enabled: instructions in affected programs: 6134 -> 4120 (-32

Re: [Mesa-dev] [PATCH 03/11] mesa: Implement _mesa_all_varyings_in_vbos.

2016-07-27 Thread Eric Anholt
mathias.froehl...@gmx.net writes: > From: Mathias Fröhlich > > Implement the equivalent of vbo_all_varyings_in_vbos for > vertex array objects. One comment on patch 1, but other than that, 2-11 are: Reviewed-by: Eric Anholt signature.asc Description: P

Re: [Mesa-dev] [PATCH 01/11] mesa: Add flush_vertices argument to _mesa_bind_vertex_buffer.

2016-07-27 Thread Eric Anholt
mathias.froehl...@gmx.net writes: > From: Mathias Fröhlich > > Similar to _mesa_update_array_format add an argument to > avoid calling FLUSH_VERTICES in certain cases. > This will be used with the following change. Do we need to avoid calling FLUSH_VERTICES in the following change, though? We'v

Re: [Mesa-dev] [PATCH v2] vc4: add hash table look-up for exported dmabufs

2016-07-25 Thread Eric Anholt
Rob Clark writes: > On Mon, Jul 25, 2016 at 8:47 PM, Eric Anholt wrote: >> Rob Herring writes: >> >>> It is necessary to reuse existing BOs when dmabufs are imported. There >>> are 2 cases that need to be handled. dmabufs can be created/exported and >>&g

Re: [Mesa-dev] [PATCH v2] vc4: add hash table look-up for exported dmabufs

2016-07-25 Thread Eric Anholt
ack exported BOs so the > BOs get reused. > > Cc: Eric Anholt > Signed-off-by: Rob Herring Looks good to me, other than a bit of funny whitespace that I'll fix up. I built a piglit test for this today (want to go take a look at those?), and once I get a piglit run through, I'l

Re: [Mesa-dev] [PATCH v4 11/11] vc4: use common screen ref counting

2016-07-25 Thread Eric Anholt
Rob Herring writes: > Use the common pipe_screen ref counting and fd hashing functions for > vc4. This is necessary to only create a single pipe_screen for a > process and avoid multiple imports of same prime fd among other things > (probably). Reviewed-by: Eric Anholt s

Re: [Mesa-dev] [PATCH v3 10/11] vc4: use common screen ref counting

2016-07-20 Thread Eric Anholt
tex present in this code before. > Cc: Eric Anholt > Signed-off-by: Rob Herring > --- > src/gallium/winsys/vc4/drm/vc4_drm_winsys.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c > b/src/gallium/w

[Mesa-dev] [PATCH 2/2] vc4: Disable early Z with computed depth.

2016-07-20 Thread Eric Anholt
We don't tell the hardware whether we're computing depth, so we need to manage early Z state manually. Fixes piglit early-z. --- src/gallium/drivers/vc4/vc4_context.h | 2 ++ src/gallium/drivers/vc4/vc4_emit.c| 6 -- src/gallium/drivers/vc4/vc4_program.c | 5 + 3 files changed, 11 ins

[Mesa-dev] [PATCH 1/2] ttn: Update shader->info as we generate code.

2016-07-20 Thread Eric Anholt
We could use the nir_shader_gather_info() pass to update it after the fact, but this is what glsl_to_nir and prog_to_nir do. Note that this doesn't update all the fields (num_textures, num_ubos are still missing, for example). --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 13 + 1 file

Re: [Mesa-dev] [RFC mesa] Introduce .editorconfig

2016-07-18 Thread Eric Anholt
t just do editorconfig out of the box, but it makes sense to have something that other editors can easily handle (and that makes so much more sense than emacs files). For vc4, Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa

Re: [Mesa-dev] [PATCH 04/10] egl/android: Stop leaking DRI images

2016-07-15 Thread Eric Anholt
Tomasz Figa writes: > Hi Eric, > > On Sat, Jul 16, 2016 at 3:05 AM, Eric Anholt wrote: >> Tomasz Figa writes: >> >>> Current implementation of the DRI image loader does not free the images >>> created in get_back_bo() and so leaks memory. Moreover, it cre

Re: [Mesa-dev] [PATCH 10/10] egl/android: Add fallback to kms_swrast driver

2016-07-15 Thread Eric Anholt
ms_swrast if hardware-only > probe fails. This seems sensible, and if you change the "int swrast" and 0/1s to some sort of boolean (I guess EGLBoolean?), it's: Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___

Re: [Mesa-dev] [PATCH 09/10] egl/android: Add support for YV12 pixel format

2016-07-15 Thread Eric Anholt
index = 5; > + > + for (p = 0; p < total_planes; ++p) { > + attr_list[++index] = plane_fd_attr[p]; > + attr_list[++index] = fd; > + attr_list[++index] = plane_pitch_attr[p]; > + attr_list[++index] = pitches[p]; > + attr_list[++index] =

Re: [Mesa-dev] [PATCH 08/10] egl/android: Make get_fourcc() accept HAL formats

2016-07-15 Thread Eric Anholt
Tomasz Figa writes: > There are DRI_IMAGE_FOURCC macros, for which there are no corresponding > DRI_IMAGE_FORMAT macros. To support such formats we need to make the > lookup function take the native format directly. As a side effect, it > simplifies all existing calls to this function, because th

Re: [Mesa-dev] [PATCH 06/10] egl/android: Fix support for pbuffers

2016-07-15 Thread Eric Anholt
Windows support only double buffering. */ > + else if (!dri2_conf->dri_double_config[j]) > +dri2_conf->base.SurfaceType &= ~EGL_WINDOW_BIT; > + } Style nitpick, I'd either drop the "else" or use some braces and put the

Re: [Mesa-dev] [PATCH 04/10] egl/android: Stop leaking DRI images

2016-07-15 Thread Eric Anholt
aking memory again. > > This patch adds missing call to destroyImage() in droid_enqueue_buffer() > and a check if image is already created to get_back_bo() to fix the > above. This patch is: Reviewed-by: Eric Anholt But I noticed in review, it looks like droid_destroy_surface() could a

Re: [Mesa-dev] [PATCH 03/10] egl/android: Add some useful error messages

2016-07-15 Thread Eric Anholt
Tomasz Figa writes: > It is much easier to debug issues when the application gives some > meaningful error messages. This patch adds few to the EGL Android > platform backend. > > Signed-off-by: Tomasz Figa Reviewed-by: Eric Anholt signature.asc Description

Re: [Mesa-dev] [PATCH 01/10] egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT

2016-07-15 Thread Eric Anholt
Tomasz Figa writes: > From: Haixia Shi > > Set config attributes EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT to > hard-coded non-zero values. These two attributes are required on Android. > > Signed-off-by: Tomasz Figa > --- > src/egl/drivers/dri2/platform_android.c | 2 ++ > 1 file chang

Re: [Mesa-dev] [PATCH 02/10] egl/android: Check return value of dri2_get_dri_config()

2016-07-15 Thread Eric Anholt
Tomasz Figa writes: > It might return NULL if specific config variant is unsupported. > > Signed-off-by: Tomasz Figa Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.

Re: [Mesa-dev] [PATCH mesa] vc4: fix memory leak

2016-07-13 Thread Eric Anholt
Eric Engestrom writes: > The allocation has succeeded by that point, so it needs to be freed. Reviewed and pushed. Thanks! signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.or

Re: [Mesa-dev] [PATCH 2/2] nir: Optimize away IF statements with no body on either side.

2016-07-07 Thread Eric Anholt
Eric Anholt writes: > Due to the rampant dead code elimination in coordinate shaders for vc4, we > often end up with IFs that do nothing on either side. In the > loops-enabled build, shader-db gives: > > total instructions in shared programs: 125192 -> 119693 (-4.39%) > ins

[Mesa-dev] [PATCH 1/2] nir: Add optimization for (a || True == True)

2016-07-06 Thread Eric Anholt
This was appearing in vc4 VS/CS in mupen64, due to vertex attrib lowering producing some constants that were getting compared. total instructions in shared programs: 112276 -> 112198 (-0.07%) instructions in affected programs: 2239 -> 2161 (-3.48%) total estimated cycles in shared programs: 28

[Mesa-dev] [PATCH 2/2] nir: Optimize away IF statements with no body on either side.

2016-07-06 Thread Eric Anholt
Due to the rampant dead code elimination in coordinate shaders for vc4, we often end up with IFs that do nothing on either side. In the loops-enabled build, shader-db gives: total instructions in shared programs: 125192 -> 119693 (-4.39%) instructions in affected programs: 30649 -> 25150 (-17

Re: [Mesa-dev] [PATCH] vc4: add hash table look-up for exported dmabufs

2016-06-26 Thread Eric Anholt
Rob Clark writes: > On Sat, Jun 25, 2016 at 11:33 PM, Eric Anholt wrote: >> Rob Herring writes: >> >>> It is necessary to reuse existing BOs when dmabufs are imported. There >>> are 2 cases that need to be handled. dmabufs can be created/exported and >>&g

Re: [Mesa-dev] [PATCH] vc4: add hash table look-up for exported dmabufs

2016-06-26 Thread Eric Anholt
ack exported BOs so the > BOs get reused. > > Cc: Eric Anholt > Signed-off-by: Rob Herring > --- > With this and the fd hashing to get a single screen, the flickery screen > is gone and Android is somewhat working. Several apps though hang, don't > render, and then ex

[Mesa-dev] [PATCH] nir: Fix copy_prop_src when src is an indirect access on a reg.

2016-06-25 Thread Eric Anholt
The intent was to continue down the indirect chain, not to call ourselves with unchanged input arguments. Found by code inspection, and comparison to copy_prop_alu_src(). We haven't hit this because callers of NIR's copy prop are doing so in SSA, before indirect variable dereferences have been lo

Re: [Mesa-dev] [PATCH] vc4: fix vc4_resource_from_handle() stride calculation

2016-06-15 Thread Eric Anholt
Rob Herring writes: > The expected stride calculation is completely wrong. It should > ultimately be multiplying cpp and width rather than dividing. The width > also needs to be aligned to the tiling width first before converting to > stride bytes. > > The whole stride check here is possibly poin

Re: [Mesa-dev] [PATCH 1/2] gallium: replace [0-9]*.f with [0-9]*.0f

2016-06-15 Thread Eric Anholt
Jose Fonseca writes: > On 15/06/16 18:13, Emil Velikov wrote: >> On 15 June 2016 at 15:58, Brian Paul wrote: >>> Why is this change needed? Does some compiler balk at 1.f? >>> >> Since I'm the one 'to blame' for these patches I'll answer - consistency. >> These are the only remaining cases wher

Re: [Mesa-dev] [PATCH 0/7] Fix ralloc/rzalloc usage v2

2016-06-14 Thread Eric Anholt
Rob Clark writes: > I (and I expect Eric too) would appreciate it if you went ahead and > replaced the current use of non-"z" versions in code that you can't > test w/ the "z" versions. That way we can switch over to non-zero'ing > on our own time, rather than getting a surprise next time we > p

Re: [Mesa-dev] [PATCH] vc4: Fix failed instruction path of QIR validate pass

2016-05-31 Thread Eric Anholt
Rhys Kidd writes: > Correct use of qir_dump_inst() within QIR validate pass. > > Reported by the following GCC warning: > > mesa/src/gallium/drivers/vc4/vc4_qir_validate.c: In function 'fail_instr': > mesa/src/gallium/drivers/vc4/vc4_qir_validate.c:31:23: warning: passing > argument 1 of 'qir_du

Re: [Mesa-dev] [PATCH 2/2] vc4: Fix doxygen warnings

2016-05-31 Thread Eric Anholt
Emil Velikov writes: > On 25 May 2016 at 22:10, Rhys Kidd wrote: >> Now that vc4 automated code documentation can be generated with >> doxygen, fix the warnings issued by Doxygen 1.8.11. >> >> Signed-off-by: Rhys Kidd >> --- >> src/gallium/drivers/vc4/vc4_qir_schedule.c | 4 ++-- >> src/galliu

Re: [Mesa-dev] tilers and out-of-order rendering..

2016-05-19 Thread Eric Anholt
gt; state and forces a flush). This one probably not something that can > be fixed in the app ;-) > > There are probably other cases where this comes up which I haven't > noticed yet. I'm not entirely sure how common the pattern that I see > in manhattan is. > > At on

Re: [Mesa-dev] [RFC] nir/validate: on failure, dump shader w/ offending line annotated

2016-05-13 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > If we assert in nir_validate_shader(), print the shader with the > offending instruction prefixed with "=>" to make it easier to find what > part of the shader nir_validate is complaining about. > > Macro funny-business in nir_validate() was just to avoid

Re: [Mesa-dev] [PATCH 01/17] scons: Build NIR.

2016-05-10 Thread Eric Anholt
$TARGET' > +) > + > +env.CodeGenerate( > +target = 'nir/nir_opt_algebraic.c', > +script = 'nir/nir_algebraic.py', > +source = [], > +command = python_cmd + ' $SCRIPT > $TARGET' > +) > + > +# parse Makefile.sourc

Re: [Mesa-dev] [PATCH 0/6] Update generated GLX server code

2016-05-10 Thread Eric Anholt
xserver will need to revert the commit that > removes the open-coded size logic for GetProgramString. I've looked through the python and the generated diff to the server. The server's diff is still unreasonably huge, but this series' change to the diff seems sensible to me. Revie

Re: [Mesa-dev] [PATCH 00/17] gallium: add support for NIR as alternate IR

2016-05-09 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > Not much changed from last time, other than rebasing or nir iterator > macro changes, and pulling in Jose's patch to add scons support to > build NIR. > > Hopefully we can get some r-b's for the few remaining patches, so I > can do something else other tha

Re: [Mesa-dev] [PATCH] glsl: remove trailing comma in enum lists to silence warning

2016-05-09 Thread Eric Anholt
Ian Romanick writes: > On 05/03/2016 10:17 PM, Eric Anholt wrote: >> Brian Paul writes: >> >>> On 05/02/2016 06:15 PM, Ilia Mirkin wrote: >>>> I know I've been sticking commas at the end of enums left and right >>>> for the past seve

Re: [Mesa-dev] [PATCH v2 9/9] gbm: Add map/unmap functions

2016-05-06 Thread Eric Anholt
erence > counting and problems with memory leaks. This last bit of commit message is stale. With that dropped, and the other whitespace nit fixed, this series is: Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev maili

Re: [Mesa-dev] [PATCH v2 6/9] st/dri: Add support for DRIimage extension mapImage/unmapImage

2016-05-06 Thread Eric Anholt
Rob Herring writes: > Implement support for mapImage/unmapImage functions in version 12 of the > DRIimage extension. > > Signed-off-by: Rob Herring > --- > v2: > - Make READ flag optional > > src/gallium/state_trackers/dri/dri2.c | 43 > ++- > 1 file changed, 42

Re: [Mesa-dev] [PATCH 2/4] DRI: Add DRIimage map and unmap functions

2016-05-03 Thread Eric Anholt
Rob Herring writes: > On Mon, Apr 25, 2016 at 7:42 AM, Daniel Stone wrote: >> Hi, >> >> On 22 April 2016 at 19:12, Eric Anholt wrote: >>> I think this needs a longer comment to explain what the interface does: >>> >>> "Returns a map of t

Re: [Mesa-dev] [PATCH 8/9] vc4: fixup for new nir_foreach_block()

2016-05-03 Thread Eric Anholt
Jason Ekstrand writes: > From: Connor Abbott Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: remove trailing comma in enum lists to silence warning

2016-05-03 Thread Eric Anholt
Brian Paul writes: > On 05/02/2016 06:15 PM, Ilia Mirkin wrote: >> I know I've been sticking commas at the end of enums left and right >> for the past several years, and haven't heard any complaints. The nice >> thing about the trailing comma is that you avoid having to change >> unrelated lines

Re: [Mesa-dev] [PATCH 02/59] vc4: lower lrp when operating with double operands

2016-05-02 Thread Eric Anholt
Samuel Iglesias Gonsálvez writes: > Lower lrp when operating with double operands because float version of > lrp is also lowered. Kind of silly since there will never be double operands on vc4. I'd drop the patch, but if you'd like it for consistency: Acked-by: Eric Anholt

Re: [Mesa-dev] [PATCH 4/4] gbm: Add map/unmap functions

2016-04-28 Thread Eric Anholt
Rob Herring writes: > On Wed, Apr 27, 2016 at 5:01 PM, Emil Velikov > wrote: >> On 27 April 2016 at 19:51, Eric Anholt wrote: >>> Rob Herring writes: >>> >>>> On Mon, Apr 25, 2016 at 7:53 PM, Eric Anholt wrote: >>>>> Rob Herring

Re: [Mesa-dev] [PATCH 4/4] gbm: Add map/unmap functions

2016-04-27 Thread Eric Anholt
Rob Herring writes: > On Mon, Apr 25, 2016 at 7:53 PM, Eric Anholt wrote: >> Rob Herring writes: >> >>> On Fri, Apr 22, 2016 at 9:08 PM, Rob Herring wrote: >>>> On Fri, Apr 22, 2016 at 6:32 PM, Emil Velikov >>>> wrote: >>>>> Hi

Re: [Mesa-dev] [PATCH 4/4] gbm: Add map/unmap functions

2016-04-25 Thread Eric Anholt
Rob Herring writes: > On Fri, Apr 22, 2016 at 9:08 PM, Rob Herring wrote: >> On Fri, Apr 22, 2016 at 6:32 PM, Emil Velikov >> wrote: >>> Hi Rob, >>> >>> On 22 April 2016 at 16:50, Rob Herring wrote: This adds map and unmap functions to GBM utilizing the DRIimage extension mapImage/u

Re: [Mesa-dev] [PATCH 4/4] gbm: Add map/unmap functions

2016-04-22 Thread Eric Anholt
Rob Herring writes: > This adds map and unmap functions to GBM utilizing the DRIimage extension > mapImage/unmapImage functions or existing internal mapping for dumb > buffers. Unlike prior attempts, this version provides a region to map and > usage flags for the mapping. The operation follows th

Re: [Mesa-dev] [PATCH 3/4] st/dri: Add support for DRIimage extension mapImage/unmapImage

2016-04-22 Thread Eric Anholt
Rob Herring writes: > Implement support for mapImage/unmapImage functions in version 12 of the > DRIimage extension. > > Signed-off-by: Rob Herring This looks good to me, other than my previous comment about looking at the read flag. Once we sort that out, I'll be ready to give r-b. signatur

Re: [Mesa-dev] [PATCH 2/4] DRI: Add DRIimage map and unmap functions

2016-04-22 Thread Eric Anholt
Rob Herring writes: > Add mapImage and unmapImage functions to DRIimage extension for mapping > and unmapping DRIimages for CPU access. The caller provides the region of > the image to map and is returned a pointer to the beginning of the region > and the stride (which could be different from the

Re: [Mesa-dev] [PATCH] mesa/st: add support for NIR as possible driver IR

2016-04-20 Thread Eric Anholt
Rob Clark writes: > diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp > b/src/mesa/state_tracker/st_glsl_to_nir.cpp > new file mode 100644 > index 000..c15c537 > --- /dev/null > +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp > +static void > +st_nir_assign_uniform_locations(struct gl_

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

2016-04-20 Thread Eric Anholt
e to do it as long as we're doing uniform storage the same as TGSI, which seems like the right way to go for now. Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

<    5   6   7   8   9   10   11   12   13   14   >