Re: [Mesa-dev] [PATCH] swrast: Fix eglMakeCurrent(dpy, NULL, NULL, ctx) (v2)

2018-07-09 Thread Eric Anholt
Adam Jackson writes: > Fixes 14 piglits, mostly in egl_khr_create_context. > > v2: Also short-circuit the same-context-no-drawables case (Eric Anholt) > > Fixes: https://github.com/anholt/libepoxy/issues/177 > Signed-off-by: Adam Jackson r-b signature.asc Descript

[Mesa-dev] [PATCH 1/2] drm-uapi: Update drm_fourcc.h for new format modifiers.

2018-07-06 Thread Eric Anholt
This brings in the Broadcom VC4 SAND and V3D 3.x+ UIF modifiers, from drm-next commit 4da1d4c751c9b1b713c13043bad7c4d27cd1418c. --- In sending this series, I'm just looking for an ack from someone for updating the drm_fourcc.h from drm-next. include/drm-uapi/drm_fourcc.h | 80

[Mesa-dev] [PATCH 2/2] v3d: Fix tiling modifier support to use the new UIF define.

2018-07-06 Thread Eric Anholt
You can't use T tiled buffers on V3D 3.x and newer, it's been replaced with a newer layout shared with other hardware blocks. --- src/gallium/drivers/v3d/v3d_resource.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/v3d/v3d_resource.c

Re: [Mesa-dev] [PATCH] glx: Don't allow glXMakeContextCurrent() with only one valid drawable

2018-07-06 Thread Eric Anholt
Adam Jackson writes: > Drawable and readable need to either both be None or both be non-None. Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.

Re: [Mesa-dev] [RFC 10/10] glsl: use only copy_propagation_elements

2018-07-05 Thread Eric Anholt
nasty duplication at the time that I wrote the second copy. Hopefully it improves compiler performance for all. Depending on the previous patches, this patch is: Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailin

Re: [Mesa-dev] [PATCH] swrast: Fix eglMakeCurrent(dpy, NULL, NULL, ctx)

2018-07-05 Thread Eric Anholt
_get_current_context() > + && mesaCtx->DrawBuffer == mesaDraw > + && mesaCtx->ReadBuffer == mesaRead) { > + return GL_TRUE; > + } > +} Didn't you mean for this block to be outside of the driDrawPriv &&a

Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age

2018-07-05 Thread Eric Anholt
Qiang Yu writes: > Hi Emil, > > On Thu, Jul 5, 2018 at 9:54 PM Emil Velikov wrote: >> >> On 5 July 2018 at 14:31, Emil Velikov wrote: >> > Hi Qiang Yu >> > >> > On 5 July 2018 at 03:31, Qiang Yu wrote: >> >> For GPU like ARM mali Utgard EGL/GLX_EXT_buffer_age will make >> >> performace worse.

Re: [Mesa-dev] [PATCH 04/10] glsl: separate copy propagation state

2018-07-05 Thread Eric Anholt
Caio Marcelo de Oliveira Filho writes: > Separate higher level logic of visiting instructions and chosing when > to store and use new copy data from the datastructure holding the copy > propagation information. This will also make easier later patches that > change the structure. > --- >

Re: [Mesa-dev] [PATCH 08/10] glsl: don't let an 'if' then-branch kill copy propagation (elements) for else-branch

2018-07-05 Thread Eric Anholt
{ > z = x; // This would turn into z = y. > x = 22; // x gets killed. > } else { > w = x; // This would NOT turn into w = y. > } Reviewed-by: Eric Anholt signature.asc Description: PGP signature _

Re: [Mesa-dev] [PATCH 01/10] glsl: don't let an 'if' then-branch kill const propagation for else-branch

2018-07-05 Thread Eric Anholt
t; _mesa_hash_pointer, > + _mesa_key_pointer_equal); > + bool then_killed_all = false; > + bool else_killed_all = false; > + > + handle_if_block(>then_instructions, new_kills, _killed_all); > + handle_if_block(>else_instruct

Re: [Mesa-dev] [PATCH 06/10] util/set: helper to remove entry by key

2018-07-05 Thread Eric Anholt
Caio Marcelo de Oliveira Filho writes: > --- This one should be trivial to unit test, with a present and non-present key. signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH 05/10] util/set: add a clone function

2018-07-05 Thread Eric Anholt
Caio Marcelo de Oliveira Filho writes: > --- Could you add a little unit test with it? Maybe make a table with a couple entries and a deleted entry, and verify that the clone has both entries and not the deleted one? I tend to try to create the API in both hash and set at the same time. If I

Re: [Mesa-dev] [PATCH] nir: Apply fragment color clamping to gl_FragData[] as well.

2018-07-05 Thread Eric Anholt
Rob Clark writes: > On Thu, Jul 5, 2018 at 12:49 PM, Eric Anholt wrote: >> From the ARB_color_buffer_float spec: >> >>35. Should the clamping of fragment shader output gl_FragData[n] >>be controlled by the fragment color clamp. >> >>

Re: [Mesa-dev] [PATCH] st/nir: Disable varying packing when doing transform feedback.

2018-07-05 Thread Eric Anholt
Timothy Arceri writes: > On 03/07/18 05:51, Eric Anholt wrote: > >> Eric Anholt writes: >> >>> [ Unknown signature status ] >>> Timothy Arceri writes: >>> >>>> nir_compact_varyings() is meant to skip over varyings used by

[Mesa-dev] [PATCH] nir: Apply fragment color clamping to gl_FragData[] as well.

2018-07-05 Thread Eric Anholt
From the ARB_color_buffer_float spec: 35. Should the clamping of fragment shader output gl_FragData[n] be controlled by the fragment color clamp. RESOLVED: Since the destination of the FragData is a color buffer, the fragment color clamp control should apply. Fixes

Re: [Mesa-dev] [PATCH] st/nir: Disable varying packing when doing transform feedback.

2018-07-02 Thread Eric Anholt
Eric Anholt writes: > [ Unknown signature status ] > Timothy Arceri writes: > >> nir_compact_varyings() is meant to skip over varyings used by xfb: >> >> /* We can't repack xfb varyings. */ >> if (var->data.always_active_io) >>

Re: [Mesa-dev] [PATCH] glsl: Take sampler2DRect and sampler2DRectShadow as reserved

2018-06-22 Thread Eric Anholt
e761bc61 ("glsl/parser: Track built-in types using the glsl_type directly") 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] glsl: Make sure that packed varyings reflect always_active_io properly.

2018-06-22 Thread Eric Anholt
The always_active_io flag was only set according to the first variable that got packed in, so NIR io compaction would end up compacting XFB varyings that shouldn't move at that point. --- This doesn't fix my XFB issues on V3D, but seems like a step in the right direction. Packing

Re: [Mesa-dev] [PATCH] st/nir: Disable varying packing when doing transform feedback.

2018-06-21 Thread Eric Anholt
Timothy Arceri writes: > nir_compact_varyings() is meant to skip over varyings used by xfb: > > /* We can't repack xfb varyings. */ > if (var->data.always_active_io) > continue; > > Any idea why that isn't working in this case? Looks like GLSL IR has that flag

Re: [Mesa-dev] [PATCH] anv: Disable __gen_validate_value if NDEBUG is set.

2018-06-21 Thread Eric Anholt
Kenneth Graunke writes: > We were enabling undefined memory checking for genxml values based on > Valgrind being installed at build time, even for release builds. This > generates piles and piles of assembly whenever you touch genxml. > > With gcc 7.3.1 and -O3 and -march=native on a Kabylake

[Mesa-dev] [PATCH] st/nir: Disable varying packing when doing transform feedback.

2018-06-20 Thread Eric Anholt
If one of the TF variables got varying-packed, it would end up with a new driver_location, despite the pipe_stream_output already being set up for the old driver location. This left the gallium driver with no way to work back to what varying was referenced by pipe_stream_output. Fixes these

Re: [Mesa-dev] [PATCH 0/8] i965: Don't recycle BOs until they are idle

2018-06-18 Thread Eric Anholt
Jason Ekstrand writes: > On Mon, Jun 18, 2018 at 2:14 AM, Michel Dänzer wrote: > >> On 2018-06-16 08:23 AM, Jason Ekstrand wrote: >> > On Fri, Jun 15, 2018 at 4:44 PM, Eric Anholt wrote: >> > >> >> Michel Dänzer writes: >> >&g

Re: [Mesa-dev] [PATCH 0/8] i965: Don't recycle BOs until they are idle

2018-06-15 Thread Eric Anholt
Michel Dänzer writes: > On 2018-06-15 05:25 PM, Jason Ekstrand wrote: >> On June 15, 2018 01:14:24 Michel Dänzer wrote: >>> On 2018-06-15 07:31 AM, Jason Ekstrand wrote: I did some testing and x11perf -copywinwin500 is... exactly the same with or without my patches.  If

Re: [Mesa-dev] [PATCH] mesa: enable EXT_render_snorm extension

2018-06-13 Thread Eric Anholt
Tapani Pälli writes: > Patch sets additional formats renderable and enables the extension > when OpenGL ES 3.1 is supported. > > Signed-off-by: Tapani Pälli > --- > src/mesa/main/extensions_table.h | 1 + > src/mesa/main/fbobject.c | 20 +++- >

Re: [Mesa-dev] [PATCH 4/4] meson: remove a bunch of out of date TODO's

2018-06-08 Thread Eric Anholt
Dylan Baker writes: > [ Unknown signature status ] > Quoting Eric Anholt (2018-06-07 14:29:19) >> Dylan Baker writes: >> >> > Some of these are done already, some of them are things we're not going >> > to do, like have a toggle for GLX_TLS.

Re: [Mesa-dev] [PATCH v2 2/2] mesa/st: only do scalar lowerings if driver benefits

2018-06-08 Thread Eric Anholt
Christian Gmeiner writes: > As not every (upcoming) backend compiler is happy with > nir_lower_xxx_to_scalar lowerings do them only if the backend > is scalar (and not vec4) based. Reviewed-by: Eric Anholt signature.asc Description: PGP

Re: [Mesa-dev] [PATCH v2 1/2] gallium: add scalar isa shader cap

2018-06-08 Thread Eric Anholt
Christian Gmeiner writes: > v1 -> v2: > - nv30 is _NOT_ scalar as suggested by Ilia Mirkin. > - Change from a screen cap to a shader cap as suggested > by Eric Anholt. > - radeonsi is scalar as suggested by Marek Olšák. > - Change missing ones to be scalar. Rev

Re: [Mesa-dev] [PATCH] meson: Allow use of ASM for x86 host with x86_64 build machine

2018-06-08 Thread Eric Anholt
Dylan Baker writes: > [ Unknown signature status ] > Quoting Eric Anholt (2018-06-07 14:34:02) >> Dylan Baker writes: >> >> > The reason we restrict the use of ASM when cross compiling is that there >> > is a C based generator (mtypes) that must be r

Re: [Mesa-dev] [PATCH] meson: Allow use of ASM for x86 host with x86_64 build machine

2018-06-07 Thread Eric Anholt
Dylan Baker writes: > The reason we restrict the use of ASM when cross compiling is that there > is a C based generator (mtypes) that must be run as part of the build > process, and it must be built for the host architecture. In the case of > an x86 host and an x86_64 build machine this is

Re: [Mesa-dev] [PATCH 4/4] meson: remove a bunch of out of date TODO's

2018-06-07 Thread Eric Anholt
Dylan Baker writes: > Some of these are done already, some of them are things we're not going > to do, like have a toggle for GLX_TLS. > > Signed-off-by: Dylan Baker > - > if with_osmesa != 'none' >if with_osmesa == 'classic' and not with_dri_swrast > error('OSMesa classic requires

Re: [Mesa-dev] [PATCH 2/4] meson: Add support for ppc assembly/optimizations

2018-06-07 Thread Eric Anholt
Dylan Baker writes: > --- > meson.build | 30 ++ > meson_options.txt | 7 +++ > 2 files changed, 33 insertions(+), 4 deletions(-) > > diff --git a/meson.build b/meson.build > index 0171328bcd7..f6fe141056a 100644 > --- a/meson.build > +++ b/meson.build >

Re: [Mesa-dev] [PATCH 1/4] meson: Add support for SPARC assembly

2018-06-07 Thread Eric Anholt
Dylan Baker writes: > Not tested at all (not even compiled), just a blind port from autotools. > > Signed-off-by: Dylan Baker > --- > meson.build| 5 + > src/mapi/glapi/meson.build | 3 ++- > src/mesa/meson.build | 16 +--- > 3 files changed, 20

Re: [Mesa-dev] [PATCH 1/2] gallium: add scalar isa cap

2018-06-07 Thread Eric Anholt
Christian Gmeiner writes: > Signed-off-by: Christian Gmeiner Shouldn't the cap be per shader target, rather than per screen? i965, for example, was vector VS and scalar FS for a long time. signature.asc Description: PGP signature ___ mesa-dev

Re: [Mesa-dev] [PATCH mesa] vma/tests: cast away implementation detail of using strtoul()

2018-06-06 Thread Eric Anholt
Eric Engestrom writes: > On MacOS, the build fails because of a compiler complaint about > a downcast: > > vma_random_test.cpp:239:18: error: non-constant-expression cannot be > narrowed from type 'unsigned long' to 'uint_fast32_t' (aka 'unsigned int') in > initializer list

[Mesa-dev] [PATCH 2/2] travis: Add the v3d driver to the automake build.

2018-06-05 Thread Eric Anholt
Hopefully this reduces the number of fixup commits we need for the automake build. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3a88b24bdbec..c53d74ea44ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -159,7 +159,7 @@ matrix:

[Mesa-dev] [PATCH 1/2] travis: Do our automake build tests with srcdir != builddir.

2018-06-05 Thread Eric Anholt
This will catch many automake bugs that end-users get to experience first, otherwise. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1f83f5b8d74d..3a88b24bdbec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -591,7 +591,9 @@

Re: [Mesa-dev] [Piglit] GitLab migration of Piglit

2018-06-04 Thread Eric Anholt
Jason Ekstrand writes: > All, > > Sorry for the mess of GitLab e-mails but there are a lot of questions to > ask as this process moves forward. Today, we're discussing piglit. I've > included both the mesa and piglit list in the hopes that people will > actually see this e-mail. > > Honestly,

Re: [Mesa-dev] [PATCH 1/2] nir: optimize min(min(a, b), c) to min3(a, b, c) under an option

2018-06-01 Thread Eric Anholt
Samuel Pitoiset writes: > On 06/01/2018 02:17 AM, Ian Romanick wrote: >> On 05/30/2018 10:06 AM, Samuel Pitoiset wrote: >>> Similar for max(). >>> >>> Signed-off-by: Samuel Pitoiset >>> --- >>> src/compiler/nir/nir.h| 3 +++ >>> src/compiler/nir/nir_opt_algebraic.py | 8

Re: [Mesa-dev] [PATCH 00/16] Move the Mesa Website to Sphinx

2018-05-31 Thread Eric Anholt
Jordan Justen writes: > On 2018-05-24 17:37:09, Laura Ekstrand wrote: >> A few of the commits are quite large and awaiting list approval. I suggest >> that you take a look at the code here: >> https://gitlab.freedesktop.org/ldeks/mesa/tree/website1_75, >> and the new website here:

Re: [Mesa-dev] GitLab Migration: Users and Groups

2018-05-31 Thread Eric Anholt
Jason Ekstrand writes: > All, > > As part of the move to GitLab, we have a few decisions to make regarding > users and groups. FWIW, I like your resolutions to both questions. signature.asc Description: PGP signature ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 1/8] nir: Add lowering for bitfieldInsert without using bfi.

2018-05-31 Thread Eric Anholt
Ian Romanick writes: > On 05/31/2018 10:34 AM, Ian Romanick wrote: >> There are GLSL IR lowering passes for a lot (all?) of this that I added >> when I did GL_MESA_shader_integer_functions. Is there a reason to not >> use those? > > Which I now see that you mentioned in the commit messages.

Re: [Mesa-dev] [PATCH 1/8] nir: Add lowering for bitfieldInsert without using bfi.

2018-05-30 Thread Eric Anholt
Eric Anholt writes: > If you don't have HW to do bfi, then lowering bitfieldInsert to bfi makes > things harder than keeping the "bits" argument around. > > This still uses bfm, but I've added the obvious lowering of bfm if you > need it. Anyone? Even just an ack,

Re: [Mesa-dev] [PATCH v3] mesa: handle a bunch of formats in IMPLEMENTATION_COLOR_READ_*

2018-05-30 Thread Eric Anholt
hat the > results match as we don't have all the starting information at both > points. So leave the assert out and hope CI comes soon to save us all. > > v2: * Let R10G10B10A2_UINT fall back to GL_RGBA_INTEGER (Eric Anholt) > * Assert with _mesa_format_matches_format_and_type (Eric A

Re: [Mesa-dev] [PATCH] glsl: Add ir_binop_vector_extract in NIR

2018-05-30 Thread Eric Anholt
+) { > + swiz[0] = i; > + nir_ssa_def *swizzled = nir_swizzle(, srcs[0], swiz, 1, true); You could use nir_channel(, srcs[0], i) here and above to simplify (which I think gets the use_fmov argument right, as well). Other than that, Reviewed-by: Eric Anho

Re: [Mesa-dev] Gitlab migration

2018-05-30 Thread Eric Anholt
Jason Ekstrand writes: > Mesa developers, > > tl;dr. Please go to gitlab.freedesktop.org, create your account, and > upload your SSH keys. Instructions are the bottom of this e-mail. > > The freedesktop.org admins are trying to move as many projects and services > as possible over to gitlab

Re: [Mesa-dev] [PATCH] v3d: Fix automake linking error.

2018-05-30 Thread Eric Anholt
Vinson Lee writes: > CXXLDgallium_dri.la > ../../../../src/broadcom/.libs/libbroadcom.a(clif_dump.o): In function > `clif_dump_packet': > src/broadcom/clif/clif_dump.c:87: undefined reference to > `v3d33_clif_dump_packet' > src/broadcom/clif/clif_dump.c:85: undefined reference to >

Re: [Mesa-dev] [PATCH] Revert "st/nir: use NIR for asm programs"

2018-05-30 Thread Eric Anholt
Timothy Arceri writes: > On 22/05/18 04:15, Eric Anholt wrote: >> Timothy Arceri writes: >> >>> On 18/05/18 00:53, Eric Anholt wrote: >>>> This reverts commit 5c33e8c7729edd5e16020ebb8703be96523e04f2. It broke >>>> fixed function verte

Re: [Mesa-dev] [PATCH v2] mesa: handle a bunch of formats in IMPLEMENTATION_COLOR_READ_*

2018-05-21 Thread Eric Anholt
_and_type, so both functions are kept in > sync. > > Signed-off-by: Tomeu Vizoso <tomeu.viz...@collabora.com> > > v2: * Let R10G10B10A2_UINT fall back to GL_RGBA_INTEGER (Eric Anholt) > * Assert with _mesa_format_matches_format_and_type (Eric Anholt) > --- > src/mesa/m

Re: [Mesa-dev] [PATCH] v3d: Include v3d_drm.h path.

2018-05-21 Thread Eric Anholt
Vinson Lee writes: > Fix build error. > > CC v3d_blit.lo > In file included from v3d_blit.c:27:0: > v3d_context.h:39:10: fatal error: v3d_drm.h: No such file or directory > #include "v3d_drm.h" > ^~~ > > Fixes: 8a793d42f1cc ("v3d: Switch the vc5

Re: [Mesa-dev] [PATCH] Revert "st/nir: use NIR for asm programs"

2018-05-21 Thread Eric Anholt
Timothy Arceri <tarc...@itsqueeze.com> writes: > On 18/05/18 00:53, Eric Anholt wrote: >> This reverts commit 5c33e8c7729edd5e16020ebb8703be96523e04f2. It broke >> fixed function vertex programs on vc4 and v3d, and apparently caused >> trouble for radeonsi's NIR pat

Re: [Mesa-dev] [RFC PATCH 0/3] mesa/main/extensions: approximate feature levels for enabling better

2018-05-19 Thread Eric Anholt
Benedikt Schemmer writes: > Most of the extensions are currently either always available or not. > A mechanism to enable extensions based on the required OpenGL version is > already > in place, its just rarely used. > > This might cause problems when an application actually tries

Re: [Mesa-dev] [PATCH v2 0/6] broadcom/vc4: Native fence fd support

2018-05-17 Thread Eric Anholt
Stefan Schake writes: > v2 drops the submit flags, directly moves in fence handling to the > job submit function and queries for the syncobj cap instead of using > a separate support parameter. > > This series adds support for the native fence fd extension to vc4. > The

[Mesa-dev] [PATCH] Revert "st/nir: use NIR for asm programs"

2018-05-17 Thread Eric Anholt
This reverts commit 5c33e8c7729edd5e16020ebb8703be96523e04f2. It broke fixed function vertex programs on vc4 and v3d, and apparently caused trouble for radeonsi's NIR paths as well. --- src/mesa/state_tracker/st_program.c | 65 - 1 file changed, 7 insertions(+), 58

Re: [Mesa-dev] [PATCH] mesa: handle a bunch of formats in IMPLEMENTATION_COLOR_READ_*

2018-05-16 Thread Eric Anholt
Tomeu Vizoso writes: > Virgl could save a lot of work converting buffers in the host side > between formats if Mesa supported a bunch of other formats when reading > pixels. > > This commit adds cases to handle specific formats so that the values > reported by the two

Re: [Mesa-dev] [PATCH 2/2] egl: make eglWaitClient behave like glFinish

2018-05-14 Thread Eric Anholt
Tapani Pälli <tapani.pa...@intel.com> writes: > On 14.05.2018 10:03, Eric Anholt wrote: >> Tapani Pälli <tapani.pa...@intel.com> writes: >> >>> As defined by the spec: >>> "All rendering calls for the currently bound context, for >>>

Re: [Mesa-dev] [PATCH 1/2] vc4: use util_copy_framebuffer_state

2018-05-14 Thread Eric Anholt
fer_state() > > and ofc if I actually managed to test-compile what I *thought* I was > compiling, I would have noticed the missing #include and unused > variable warning, both of which fixed up locally Assuming it compiles, Reviewed-by: Eric Anholt <e...@anh

Re: [Mesa-dev] [PATCH 2/2] egl: make eglWaitClient behave like glFinish

2018-05-14 Thread Eric Anholt
Tapani Pälli writes: > As defined by the spec: >"All rendering calls for the currently bound context, for >the current rendering API, made prior to eglWaitClient, are >guaranteed to be executed before native rendering calls made >after eglWaitClient which

Re: [Mesa-dev] [PATCH 2/2] st/nir: use NIR for asm programs

2018-05-11 Thread Eric Anholt
Timothy Arceri <tarc...@itsqueeze.com> writes: > On 10/05/18 02:46, Eric Anholt wrote: >> Timothy Arceri <tarc...@itsqueeze.com> writes: >> >>> --- >>> src/mesa/state_tracker/st_program.c | 65 + >>> 1 file

Re: [Mesa-dev] [PATCH 2/2] st/nir: use NIR for asm programs

2018-05-09 Thread Eric Anholt
Timothy Arceri writes: > --- > src/mesa/state_tracker/st_program.c | 65 + > 1 file changed, 58 insertions(+), 7 deletions(-) > > diff --git a/src/mesa/state_tracker/st_program.c > b/src/mesa/state_tracker/st_program.c > index

Re: [Mesa-dev] Lowering viewport transformation in NIR

2018-05-08 Thread Eric Anholt
Alyssa Rosenzweig writes: > Hi all, > > Certain embedded GPUs do not implement coordinate transformation in > hardware. Instead, section 12.5 "Coordinate Transformation" of the ES > 3.2 specification is implemented in the vertex shader itself. Relevant > examples include

[Mesa-dev] [PATCH 4/8] nir: Add lowering for find_lsb.

2018-05-08 Thread Eric Anholt
There is a fairly simple relation to turn this into ufind_msb. --- src/compiler/nir/nir.h| 2 ++ src/compiler/nir/nir_opt_algebraic.py | 4 2 files changed, 6 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ee45b0709636..53ac1598dfc9 100644

[Mesa-dev] [PATCH 8/8] v3d: Enable the new NIR bitfield operation lowering paths.

2018-05-08 Thread Eric Anholt
These toegether get the GLSL 3.00 unpack functions and MESA_shader_integer operations working. --- src/broadcom/compiler/nir_to_vir.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c

[Mesa-dev] [PATCH 3/8] nir: Add lowering for ifind_msb to ufind_msb.

2018-05-08 Thread Eric Anholt
ufind_msb is easily expressed in terms of clz, and we can reduce ifind_msb to that. --- src/compiler/nir/nir.h| 2 ++ src/compiler/nir/nir_opt_algebraic.py | 4 2 files changed, 6 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index

[Mesa-dev] [PATCH 1/8] nir: Add lowering for bitfieldInsert without using bfi.

2018-05-08 Thread Eric Anholt
If you don't have HW to do bfi, then lowering bitfieldInsert to bfi makes things harder than keeping the "bits" argument around. This still uses bfm, but I've added the obvious lowering of bfm if you need it. --- src/compiler/nir/nir.h| 5 +

[Mesa-dev] [PATCH 2/8] nir: Add lowering from ibitfield_extract/ubitfield_extract to shifts.

2018-05-08 Thread Eric Anholt
V3D doesn't have opcodes for ibfe/ubfe, so we need to lower similarly to glsl/lower_instructions.cpp. --- src/compiler/nir/nir.h| 3 +++ src/compiler/nir/nir_opt_algebraic.py | 16 2 files changed, 19 insertions(+) diff --git a/src/compiler/nir/nir.h

[Mesa-dev] [PATCH 5/8] nir: Add an ALU lowering pass for mul_high.

2018-05-08 Thread Eric Anholt
This is based on the glsl/lower_instructions.cpp implementation, but should be much more readable. --- src/compiler/Makefile.sources | 1 + src/compiler/nir/meson.build | 1 + src/compiler/nir/nir.h| 3 + src/compiler/nir/nir_lower_alu.c

[Mesa-dev] [PATCH 6/8] nir: Add lowering for nir_op_bitfield_reverse.

2018-05-08 Thread Eric Anholt
This is basically the same as the GLSL lowering path. --- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_lower_alu.c | 47 +++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index

[Mesa-dev] [PATCH 7/8] nir: Add lowering for nir_op_bit_count.

2018-05-08 Thread Eric Anholt
This is basically the same as the GLSL lowering path. --- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_lower_alu.c | 36 2 files changed, 38 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index

[Mesa-dev] [PATCH 3/5] v3d: Rename the driver files from "vc5" to "v3d".

2018-05-01 Thread Eric Anholt
--- configure.ac | 4 +- src/broadcom/Makefile.am | 2 +- .../{Makefile.vc5.am => Makefile.v3d.am} | 0 src/gallium/Makefile.am | 2 +- .../auxiliary/target-helpers/drm_helper.h | 2 +- .../drivers/{vc5 =>

[Mesa-dev] [PATCH 1/5] v3d: Switch the vc5 driver to using the finalized V3D UABI.

2018-05-01 Thread Eric Anholt
In the process of merging to the kernel, I renamed the driver to the general product line's name (since we have both vc5 and vc6 supported already). Since the ABI is finalized, move the header to include/drm-uapi. --- Makefile.am | 1 + .../vc5_drm.h =>

[Mesa-dev] [PATCH 2/5] v3d: Rename the vc5_dri.so driver to v3d_dri.so.

2018-05-01 Thread Eric Anholt
This allows the driver to load against the merged kernel DRM driver. In the process, rename most of the build system variables and gallium plumbing functions. --- configure.ac | 18 ++-- meson.build | 6 ++--

[Mesa-dev] [PATCH 5/5] v3d: Enable the driver by default.

2018-05-01 Thread Eric Anholt
Now that we have a stabilized ABI and a fairly conformant driver, turn it on. --- configure.ac| 2 +- src/gallium/drivers/v3d/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d5228032bb7b..626b238511e0

[Mesa-dev] [PATCH 0/5] vc5 rename to v3d and enable by default.

2018-05-01 Thread Eric Anholt
upported already, and I'd like to avoid the confusion we always had with the i915 kernel driver vs i965 in mesa. This series renames Mesa to follow the kernel's name. Eric Anholt (5): v3d: Switch the vc5 driver to using the finalized V3D UABI. v3d: Rename the vc5_dri.so driver to v3d_dri.so. v3d

[Mesa-dev] [PATCH 4/5] v3d: Rename driver functions from vc5 to v3d.

2018-05-01 Thread Eric Anholt
This is the final step of the driver rename. --- The 300k of contents of this patch are just s/vc5/v3d/ over the files. See my vc5-publish branch for full series. src/gallium/drivers/v3d/v3d_blit.c | 96 +++--- src/gallium/drivers/v3d/v3d_bufmgr.c| 158 +-

[Mesa-dev] [PATCH] freedreno: Fix ir3_cmdline.c build.

2018-05-01 Thread Eric Anholt
Fixes: 6487e7a30c9e ("nir: move GL specific passes to src/compiler/glsl") --- src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index

Re: [Mesa-dev] [PATCH] glsl/tests: add GLSL_TYPE_UINT8, GLSL_TYPE_INT8 cases to switch statements

2018-04-30 Thread Eric Anholt
Brian Paul <bri...@vmware.com> writes: > To silence warnings about unhandled switch values. > Untested otherwise. Maybe this should go down with the unimplemented UINT16 cases? Either way, thanks for cleaning up warnings. Reviewed-by: Eric Anholt <e...@anholt.net> signatu

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-30 Thread Eric Anholt
Marek Olšák writes: > From: Nicolai Hähnle > > Allow the caller to specify the row stride (in bytes) with which an image > should be mapped. Note that completely ignoring USER_STRIDE is a valid > implementation of mapImage. > > This is horrible API

[Mesa-dev] [PATCH] st: Choose a 2101010 format for GL_RGB/GL_RGBA with a 2_10_10_10 type.

2018-04-25 Thread Eric Anholt
GLES's GL_EXT_texture_type_2_10_10_10_REV allows uploading this type to an unsized internalformat, and it should be non-color-renderable. fbobject.c's implementation of the check for color-renderable is checks that the texture has a 2101010 mesa format, so make sure that we have chosen a 2101010

[Mesa-dev] [PATCH] gallium/util: Fix incorrect refcounting of separate stencil.

2018-04-25 Thread Eric Anholt
The driver may have a reference on the separate stencil buffer for some reason (like an unflushed job using it), so we can't directly free the resource and should instead just decrement the refcount that we own. Fixes double-free in KHR-GLES3.packed_depth_stencil.blit.depth32f_stencil8 on vc5.

Re: [Mesa-dev] [PATCH] nir: Look into uniform structs for samplers when counting num_textures.

2018-04-24 Thread Eric Anholt
Eric Anholt <e...@anholt.net> writes: > mesa/st decides whether to update samplers after a program change based on > whether num_textures is nonzero. By not counting samplers in a uniform > struct, we would segfault in > KHR-GLES3.shaders.struct.uniform.sampler_vertex if it w

Re: [Mesa-dev] [PATCH 1/3] meson: don't build classic mesa tests without dri_drivers

2018-04-24 Thread Eric Anholt
Dylan Baker <dy...@pnwbakers.com> writes: > Since mesa_classic is not build-on-demand the tests will create a demand > and add a bunch of extra compilation. s/not //? Other than that, the series is Reviewed-by: Eric Anholt <e...@anholt.net> signature.asc Descript

Re: [Mesa-dev] [PATCH 0/7] broadcom/vc4: Native fence fd support

2018-04-23 Thread Eric Anholt
Stefan Schake writes: > This series adds support for the native fence fd extension to vc4. > The implementation relies on a newly introduced kernel interface that > allows submitting syncobjs for in/out fences during job submission. > > Since syncobjs are relatively new,

Re: [Mesa-dev] [PATCH 7/7] broadcom/vc4: Native fence fd support

2018-04-23 Thread Eric Anholt
Stefan Schake writes: > With the syncobj support in place, lets use it to implement the > native fence fd extension. This mostly follows previous implementations > in freedreno and etnaviv. Could we include the name of the actual extension being exposed, in the commit

Re: [Mesa-dev] [PATCH 6/7] broadcom/vc4: Expose syncobj import

2018-04-23 Thread Eric Anholt
Stefan Schake writes: > Our submit ioctl allows to optionally specify a syncobj that will be > waited on before job execution. Expose this in our job submission > interface. Since every uint32_t could be a valid syncobj handle, pass > the handle as a pointer so we can make it

Re: [Mesa-dev] [PATCH] compiler/glsl: close fd's in glcpp_test.py

2018-04-20 Thread Eric Anholt
Dylan Baker <dy...@pnwbakers.com> writes: > I would have thought falling out of scope would allow the gc to collect > these, but apparently it doesn't, and this hits an fd limit on macos. Reviewed-by: Eric Anholt <e...@anholt.net> signature.asc Descript

Re: [Mesa-dev] [PATCH 6/7] meson: use array type options

2018-04-17 Thread Eric Anholt
Dylan Baker writes: > This option type is nice since it involves less converting strings into > lists, and because it validates the values that are provided. > > Signed-off-by: Dylan Baker > --- > meson.build | 113

Re: [Mesa-dev] [PATCH 00/18] [RFC] Pointer specific data structures

2018-04-12 Thread Eric Anholt
Erik Faye-Lund writes: > On Wed, Apr 11, 2018 at 8:48 PM, Thomas Helland > wrote: >> This series came about when I saw a talk online, while simultaneously >> being annoyd about the needless waste of memory in our set as reported >> by pahole. I

[Mesa-dev] [PATCH] nir: Look into uniform structs for samplers when counting num_textures.

2018-04-11 Thread Eric Anholt
mesa/st decides whether to update samplers after a program change based on whether num_textures is nonzero. By not counting samplers in a uniform struct, we would segfault in KHR-GLES3.shaders.struct.uniform.sampler_vertex if it was run in the same context after a non-vertex-shader-uniform

Re: [Mesa-dev] [PATCH v2 11/12] meson: build tests for gallium mesa state tracker

2018-04-10 Thread Eric Anholt
Dylan Baker writes: > Signed-off-by: Dylan Baker > --- > src/mesa/state_tracker/tests/meson.build | 40 +- > src/meson.build | 3 ++- > 2 files changed, 43 insertions(+) > create mode 100644

Re: [Mesa-dev] [PATCH v2 01/12] glsl/tests: reimplement warnings-test in python

2018-04-10 Thread Eric Anholt
Dylan Baker writes: > This reimplements the test in python with a shell script wrapper that > allows autotools to continue to run the test without realizing that > anything has changed. > > Using python has two advantages, first it's portable so this test can be > run on

Re: [Mesa-dev] [PATCH v3 010/104] prog/nir: Simplify some load/store operations

2018-04-04 Thread Eric Anholt
Jason Ekstrand <ja...@jlekstrand.net> writes: > --- This one is: Reviewed-by: Eric Anholt <e...@anholt.net> signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesk

Re: [Mesa-dev] [PATCH] Revert "mesa: add GL_HALF_FLOAT as supported type to readpixels"

2018-04-03 Thread Eric Anholt
Eric Anholt <e...@anholt.net> writes: > From GLES 3.0.2: > > Only two combinations of format and type are accepted in most > cases. The first varies depending on the format of the currently > bound rendering surface. For normalized fixed-point rend

[Mesa-dev] [PATCH] Revert "mesa: add GL_HALF_FLOAT as supported type to readpixels"

2018-04-03 Thread Eric Anholt
From GLES 3.0.2: Only two combinations of format and type are accepted in most cases. The first varies depending on the format of the currently bound rendering surface. For normalized fixed-point rendering surfaces, the combination format RGBA and type UNSIGNED_BYTE is

[Mesa-dev] [PATCH] nir: Look into uniform structs for samplers when counting num_textures.

2018-04-02 Thread Eric Anholt
mesa/st decides whether to update samplers after a program change based on whether num_textures is nonzero. By not counting samplers in a uniform struct, we would segfault in KHR-GLES3.shaders.struct.uniform.sampler_vertex if it was run in the same context after a non-vertex-shader-uniform

Re: [Mesa-dev] [PATCH] st/dri: Initialise modifier to INVALID for DRI2

2018-04-02 Thread Eric Anholt
de other decisions. This makes sense. Reviewed-by: Eric Anholt <e...@anholt.net> 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] nir+drivers: add helpers to get # of src/dest components

2018-03-30 Thread Eric Anholt
vers/freedreno/ir3/ir3_compiler_nir.c | 6 +- > src/intel/compiler/brw_fs_nir.cpp | 11 +-- > 6 files changed, 32 insertions(+), 25 deletions(-) Reviewed-by: Eric Anholt <e...@anholt.net> signature.asc Description: PGP signature __

Re: [Mesa-dev] [PATCH v3] mesa: readpixels add support for GL_HALF_FLOAT

2018-03-30 Thread Eric Anholt
Lin Johnson writes: > Ext_color_buffer_half_float is using type GL_HALF_FLOAT > and data_type GL_FLOAT. This fix Android CTS test > android.view.cts.PixelCopyTest > v2: remove commtens of Ext_color_buffer_half_float. > As Ext_color_buffer__float can use type GL_HALF_FLOAT

Re: [Mesa-dev] [PATCH] nir: add support for 4 constant offsets in tg4

2018-03-30 Thread Eric Anholt
tex_src_type)(nir_tex_src_offset + i); > +src_number++; > + } > + } else { > + assert(false); Maybe just do assert(ir->offset->type->is_array()) in the previous block instead of the extra else. And optionally pull ir->offset->as_consta

Re: [Mesa-dev] [PATCH] vc4: Fix out-of-tree build

2018-03-28 Thread Eric Anholt
Aaron Watry <awa...@gmail.com> writes: > Signed-off-by: Aaron Watry <awa...@gmail.com> > Cc: Eric Anholt <e...@anholt.net> Some day we should probably just consistently prefix our includes so we don't need so many -I. For now I've reviewed and pushed your patch. signat

Re: [Mesa-dev] [PATCH] st: Don't try to finalize the texture in st_render_texture().

2018-03-28 Thread Eric Anholt
Brian Paul <bri...@vmware.com> writes: > On 03/27/2018 10:14 PM, Eric Anholt wrote: >> We can't necessarily finalize the texture at this point if we're rendering >> to a texture image whose format is different from the baselevel's format. > > This is just a test s

<    1   2   3   4   5   6   7   8   9   10   >