Re: [Mesa-dev] [PATCH] i965/fs_live_variables: Do liveness analysis bottom-to-top

2015-06-10 Thread Matt Turner
>livein[i] |= new_livein; > + cont = true; > + } > +} There are some tabs in the lines your moving, and this line's indentation is messed up. Fix those while you're here. > + BITSET_WORD new_livein = (bd->flag_use[0] | >

Re: [Mesa-dev] [PATCH 6/7] mesa: build xmlconfig to a separate static library

2015-06-10 Thread Matt Turner
libloader_la_LIBADD += \ Looks like we have an extra leading space here. Do I understand correctly that after this patch the Gallium drivers will get their only copy of xmlconfig via linking against libloader.la? If that's correct, Acked-by: Matt Turner > + $(top_builddir)/src/mesa/driv

[Mesa-dev] [PATCH] mesa: Enable subdir-objects globally.

2015-06-10 Thread Matt Turner
--- Emil, With your series, I think we can enable subdir-objects globally! Please give it a test. configure.ac | 2 +- src/Makefile.am | 2 -- src/gallium/auxiliary/Makefile.am | 2 -- src/gallium/drivers/freedreno/Makef

Re: [Mesa-dev] Request for Mentorship

2015-06-10 Thread Matt Turner
On Wed, Jun 10, 2015 at 5:04 PM, Emil Velikov wrote: > On 10 June 2015 at 23:56, Rob Clark wrote: >> On Wed, Jun 10, 2015 at 7:28 PM, Emil Velikov >> wrote: >>> On 5 June 2015 at 22:08, Rob Clark wrote: so, maybe a bit off topic (and maybe doesn't really help with the whole finding a

Re: [Mesa-dev] [PATCH v5] egl/dri2: implement platform_surfaceless

2015-06-12 Thread Matt Turner
On Fri, Jun 12, 2015 at 8:04 AM, Daniel Stone wrote: > Hi, > > On 12 June 2015 at 15:43, Emil Velikov wrote: >> On 11/06/15 17:43, Zach Reizner wrote: >>> + dri2_dpy->fd = open(card_path, O_RDWR); >> Pretty sure that we'd want some O_CLOEXEC/fcntl() magic but that can be >> done as a separat

Re: [Mesa-dev] [PATCH shader-db] si-report: Fix algorithm for determing difference in shader stats

2015-06-15 Thread Matt Turner
On Mon, Jun 15, 2015 at 11:39 AM, Tom Stellard wrote: > --- > si-report.py | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Feel free to commit. I think anyone with mesa commit access can push to shader-db as well. Let me know if that's not the case. ___

Re: [Mesa-dev] [PATCH v2 23/82] glsl: Do not do CSE for expressions involving SSBO loads

2015-06-17 Thread Matt Turner
On Wed, Jun 17, 2015 at 5:20 PM, Jordan Justen wrote: > I wanted to question whether this was required, based on this text > from the extension spec: > > "The ability to write to buffer objects creates the potential for > multiple independent shader invocations to read and write the same > under

[Mesa-dev] [PATCH] i965: Add missing braces around if-statement.

2015-06-18 Thread Matt Turner
Fixes a performance problem caused by commit b639ed2f. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90895 --- src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa

Re: [Mesa-dev] [PATCH] docs: update developer info

2015-06-18 Thread Matt Turner
old patches. > > > + > +When submitting follow-up patches you should also login to > +https://patchwork.freedesktop.org";>patchwork and change the > +state of your old patches to Superseded. > + > + > Reviewing Patches > > > -- &

Re: [Mesa-dev] [PATCH] mesa: move ARB_gs5 enums to core, EXT_polygon_offset_clamp to desktop

2015-06-19 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] i965: add EXT_polygon_offset_clamp support to gen4/gen5

2015-06-19 Thread Matt Turner
From: Ilia Mirkin Reviewed-by: Matt Turner Signed-off-by: Ilia Mirkin --- mattst88: Changed BRW_CONDITIONAL_G -> BRW_CONDITIONAL_GE (see commit 3b7f683f) Somewhat worryingly, I wasn't able to break any of the piglit tests by inverting the cmod on the CMP in brw_clip_unfilled.c.

Re: [Mesa-dev] [PATCH v2 02/18] i965/fs: Fix fs_inst::regs_read() for uniform pull constant loads

2015-06-19 Thread Matt Turner
On Fri, Jun 19, 2015 at 1:18 PM, Jason Ekstrand wrote: > Previously, fs_inst::regs_read() fell back to depending on the register > width for the second source. This isn't really correct since it isn't a > SIMD8 value at all, but a SIMD4x2 value. This commit changes it to > explicitly be always o

Re: [Mesa-dev] [PATCH 1/2] [RFC] i965/vec4: Reward spills in if/else/endif blocks

2015-06-19 Thread Matt Turner
On Fri, Jun 19, 2015 at 6:53 PM, Connor Abbott wrote: > I don't think this is doing what you think it's doing. This code is > for calculating the *cost* of spills, so a higher cost means a lower > priority for choosing the register. We increase the cost for things > inside loops because we don't w

Re: [Mesa-dev] [PATCH] i965: Don't count NIR instructions for shader-db.

2015-06-22 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 3/3] i965: Initialize backend_shader::mem_ctx in its constructor.

2015-06-22 Thread Matt Turner
We were initializing it in each subclasses' constructors for some reason. --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +--- src/mesa/drivers/dri/i965/brw_shader.cpp | 2 ++ src/mesa/drivers/dri/i965/brw_shader.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 +--

[Mesa-dev] [PATCH 1/3] i965/cfg: Assert that cur_do/while/if pointers are non-NULL.

2015-06-22 Thread Matt Turner
Coverity sees that the functions immediately below the new assertions dereference these pointers, but is unaware that an ENDIF always follows an IF, etc. --- src/mesa/drivers/dri/i965/brw_cfg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mes

[Mesa-dev] [PATCH 2/3] i965: Assert that the GL primitive isn't out of range.

2015-06-22 Thread Matt Turner
Coverity sees the if (mode >= BRW_PRIM_OFFSET (128)) test and assumes that the else-branch might execute for mode to up 127, which out be out of bounds. --- src/mesa/drivers/dri/i965/brw_draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_dra

[Mesa-dev] [PATCH] i965/fs: Don't mess up stride for uniform integer multiplication.

2015-06-22 Thread Matt Turner
If the stride is 0, the source is a uniform and we should not modify the stride. Cc: "10.6" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91047 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/mesa/dri

[Mesa-dev] [PATCH] mesa: Delete unused ICEIL().

2015-06-22 Thread Matt Turner
Can't find any uses of it in git history. --- Strangely, when it was moved to its current location in commit 27558a1, it was moved from mmath.h... which seems to have been lost from git's history. Searching further git log --grep mmath.h shows that various commit messages mention modifying mmath.h

Re: [Mesa-dev] [PATCH 6/6] mesa/es3.1: Fix error code for glCreateShaderProgram

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 5:23 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > According to the OpenGL ES standard, 7.3. > For a call to glCreateShaderProgram with count < 0, > a GL_INVALID_VALUE error should be generated. > > Signed-off-by: Marta Lofstedt > --- > src/mesa/main/shaderapi.c |

Re: [Mesa-dev] [PATCH 6/6] mesa/es3.1: Fix error code for glCreateShaderProgram

2015-06-23 Thread Matt Turner
I should have also mentioned -- the commit titles need some improvement. "Fix error code" isn't very descriptive of the change, and the change isn't actually specific to es3.1. How about > mesa: Raise INVALID_VALUE from glCreateShaderProgramv if count < 0. _

Re: [Mesa-dev] [PATCH 4/6] mesa/es3.1 : Correct error code for defect texture target

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 5:23 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > According to GLES 3.1 CTS test: > ES31-CTS.texture_storage_multisample. > APIGLGetTexLevelParameterifv. > invalid_texture_target_rejected: > > GL_INVALID_ENUM should be generated when > glGetTexLevelParameteriv is c

Re: [Mesa-dev] [PATCH 0/6] OpenGL ES 3.1 API checks and corner cases.

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 5:23 AM, Marta Lofstedt wrote: > This is a series of patches that solves a couple of > API check and corner cases issues that the OpenGL ES 3.1 > CTS exploits. > > Marta Lofstedt (6): > mesa/es3.1: Do not allow zero size multisampled textures > mesa/es3.1: Correct error

Re: [Mesa-dev] [PATCH] mesa : NULL check InfoLog

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 4:03 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > When a program is compiled, but linking failed the > sh->InfoLog could be NULL. This is expoloited > by OpenGL ES 3.1 conformance tests. > > Signed-off-by: Marta Lofstedt > --- > src/mesa/main/shaderapi.c | 4 ++--

Re: [Mesa-dev] [PATCH] glsl/es3.1: Fix up GL_ARB_compute_shader for GLSL ES 3.1

2015-06-23 Thread Matt Turner
I don't really think the "/es3.1" in the commit summary adds anything. With that removed: Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa/es3.1: Enable GL_ARB_separate_shader_objects for GLES 3.1

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 4:30 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > Signed-off-by: Marta Lofstedt > --- > src/mesa/main/get_hash_params.py | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/main/get_hash_params.py > b/src/mesa/main/get_hash_

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Matt Turner
mmit title and message that looks similar to others. In this case, the patch should be titled something like "glsl: Modify exec_list to avoid strict-aliasing violations." If you wanted to go farther and remove -fno-strict-aliasing from configure.ac -- Since strict-aliasing allows some

Re: [Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 3:04 PM, Brian Paul wrote: > Otherwise, if we're trying to build a 32-bit Mesa on a 64-bit host > we wind up with -DUSE_X86_64_ASM, which is incorrect. > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 6:44 PM, Ian Romanick wrote: > Please quote the spec. Section 6.5 Expressions of the draft C99 spec I have says (page 68, 80 of the pdf): 7 An object shall have its stored value accessed only by an lvalue expression that has one of the following types: 76) — a type compa

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Matt Turner
On Tue, Jun 23, 2015 at 7:57 PM, Michel Dänzer wrote: > On 24.06.2015 11:39, Dave Airlie wrote: >>> >>> Actually, I'm almost 100% certain that there are lots of other strict >>> aliasing violations in the Mesa code. That's why we've always disabled it. >>> >>> More generally, IMO it's unrealistic

Re: [Mesa-dev] [PATCH] mesa: fold duplicated GL/GL_CORE/GLES3 entry in get_hash_params.py

2015-06-24 Thread Matt Turner
On Wed, Jun 24, 2015 at 6:07 AM, Emil Velikov wrote: > Signed-off-by: Emil Velikov > --- > src/mesa/main/get_hash_params.py | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) Doh! Reviewed-by: Matt Turner ___ mesa-dev maili

Re: [Mesa-dev] [PATCH v2 4/7] glsl: No need to lock in _mesa_glsl_release_types

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: > This function only gets called while mesa is unloading, so there's > no potential of racing or multiple calls at the same time. So let's > just get rid of the locking. > > Signed-off-by: Erik Faye-Lund > --- > src/glsl/glsl_types.cpp | 8 +

Re: [Mesa-dev] [PATCH v2 6/7] mesa/main: free locale at exit

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: > In order to save a small leak if mesa is continously loaded and > unloaded, let's free the locale when the shared object is unloaded. > > Signed-off-by: Erik Faye-Lund > --- > src/mesa/main/context.c | 12 +++- > src/util/strtod.c

Re: [Mesa-dev] [PATCH v2 5/7] util: port _mesa_strto[df] to C

2015-06-25 Thread Matt Turner
t; > So let's use explicit initialization from the one-time init code instead > of depending on a C++ compiler to initialize at image-load time. > > Signed-off-by: Erik Faye-Lund > Reviewed-by: Matt Turner > --- > src/glsl/glcpp/glcpp.c| 3 ++ > src/glsl/main.cpp

Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-25 Thread Matt Turner
il: port _mesa_strto[df] to C > mesa/main: free locale at exit > util: assert to verify that locale is initialized Thanks for this! The series looks good to me. I'm slightly worried about 2/7, but not for any reasons other than I'm not very familiar with that code. 1-6 (with the

Re: [Mesa-dev] [PATCH] Allow setting GL_TEXTURE_COMPARE_MODE on a sampler object without ARB_shadow support.

2015-06-25 Thread Matt Turner
On Mon, Mar 23, 2015 at 12:25 PM, Stefan Dösinger wrote: > This fixes a GL error warning on r200 in Wine. > > The GL_ARB_sampler_objects extension does not specify a dependency on > GL_ARB_shadow or GL_ARB_depth_texture for this value. Just set the value > and don't do anything else. It won't matt

Re: [Mesa-dev] [PATCH] i965/vec4_live_variables: Do liveness analysis bottom-to-top

2015-06-25 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa : NULL check InfoLog

2015-06-25 Thread Matt Turner
On Tue, Jun 23, 2015 at 2:04 PM, Matt Turner wrote: > On Tue, Jun 23, 2015 at 4:03 AM, Marta Lofstedt > wrote: >> From: Marta Lofstedt >> >> When a program is compiled, but linking failed the >> sh->InfoLog could be NULL. This is expoloited exploited i

Re: [Mesa-dev] [PATCH v2] mesa : NULL check InfoLog

2015-06-25 Thread Matt Turner
On Thu, Jun 25, 2015 at 4:16 PM, Ben Widawsky wrote: > On Thu, Jun 25, 2015 at 02:52:47PM +0200, Marta Lofstedt wrote: >> From: Marta Lofstedt >> >> When a program is compiled, but linking failed the >> sh->InfoLog could be NULL. This is expoloited >> by OpenGL ES 3.1 conformance tests. >> >> V2:

[Mesa-dev] Fix for make[4]: *** No rule to make target '../../../mesa/src/util/strtod.cpp', needed by 'libmesautil_la-strtod.lo'. Stop.

2015-06-29 Thread Matt Turner
In commit c61bc6ed8 ("util: port _mesa_strto[df] to C") we renamed strtod.cpp -> strtod.c. Applying this patch on top of a tree that has already built strtod.cpp will yield the error in the subject. To fix, simply run sed -i -e 's/strtod\.cpp/strtod.c/' src/util/.deps/libmesautil_la-strtod.Plo i

Re: [Mesa-dev] [PATCH v4 0/6] port _mesa_strto[df] to C

2015-06-29 Thread Matt Turner
Thanks! Pushed, and sent a note describing how to fix the problems caused by renaming strtod.cpp -> strtod.c. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] mesa: Convert some asserts into STATIC_ASSERT.

2015-06-29 Thread Matt Turner
--- src/mesa/main/context.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index fdef412..faa1de7 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -377,13 +377,12 @@ one_time_init( struct gl_c

[Mesa-dev] [PATCH] glx: Drop CRAY support.

2015-06-29 Thread Matt Turner
It couldn't have worked anyway. There were calls to undefined functions. --- src/glx/packrender.h | 46 -- src/glx/packsingle.h | 56 2 files changed, 102 deletions(-) diff --git a/src/glx/packrender.h b/

Re: [Mesa-dev] [PATCH] mesa/prog: relative offsets into constbufs are not constant

2015-07-01 Thread Matt Turner
On Wed, Jul 1, 2015 at 3:22 PM, Ilia Mirkin wrote: > The optimization logic relies on being able to read out constbuf values > from program parameters. However that only works if there's no relative > addressing involved. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91173 > Signed-of

Re: [Mesa-dev] [PATCH] i965/chv|skl: Apply sampler bypass w/a

2015-07-02 Thread Matt Turner
On Wed, Jul 1, 2015 at 4:03 PM, Ben Widawsky wrote: > Certain compressed formats require this setting. The docs don't go into much > detail as to why it's needed exactly. > > This fixes 0 piglit failures with a GBM gpu piglit run. That's a really weird way of saying that. > > Signed-off-by: Ben

Re: [Mesa-dev] [PATCH] i965/chv|skl: Apply sampler bypass w/a

2015-07-02 Thread Matt Turner
On Thu, Jul 2, 2015 at 12:57 PM, Matt Turner wrote: > On Wed, Jul 1, 2015 at 4:03 PM, Ben Widawsky > wrote: >> Certain compressed formats require this setting. The docs don't go into much >> detail as to why it's needed exactly. >> >> This fixes 0 p

Re: [Mesa-dev] [PATCH] glsl: add a missing call to _mesa_locale_init

2015-07-02 Thread Matt Turner
On Thu, Jul 2, 2015 at 2:22 PM, Ilia Mirkin wrote: > Can this be done at dlopen/init time? For example what happens if you do > > static int foo = _mesa_locale_init() > > IIRC things like that are possible in C++, not sure about C. gcc has __attribute__((constructor)). But I don't think we reall

Re: [Mesa-dev] [PATCH] glsl: add a missing call to _mesa_locale_init

2015-07-02 Thread Matt Turner
On Thu, Jul 2, 2015 at 2:18 PM, Erik Faye-Lund wrote: > After c61bc6e ("util: port _mesa_strto[df] to C"), "make check" > fails due to a missing _mesa_locale_init. Fixup this oversight. > > Signed-off-by: Erik Faye-Lund > Tested-by: Vinson Lee Reviewed-by:

Re: [Mesa-dev] [PATCH v2] glsl: add a missing call to _mesa_locale_init

2015-07-03 Thread Matt Turner
to_defaults(). > > Signed-off-by: Erik Faye-Lund > --- > Here's what the latter suggestion would look like. Personally, > I have a slight preference for this version. Thanks, I've pushed this instead. Reviewed-by: Matt Turner http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965/fs: Don't disable SIMD16 when using the pixel interpolator

2015-07-05 Thread Matt Turner
338e9276839a7e9629ca0a6b4f Author: Matt Turner Date: Wed May 13 18:34:03 2015 -0700 i965/fs: Implement integer multiply without mul/mach. The remaining cases of "SIMD16 explicit accumulator operands unsupported" are ADDC, SUBB, and 32x32 -> high 32-bit multiplication. The

Re: [Mesa-dev] [PATCH v2 5/6] i965: Upload binding tables in hw-generated binding table format.

2015-07-05 Thread Matt Turner
On Fri, Jul 3, 2015 at 12:00 AM, Abdiel Janulgue wrote: > diff --git a/src/mesa/drivers/dri/i965/brw_binding_tables.c > b/src/mesa/drivers/dri/i965/brw_binding_tables.c > index 7396c94..34a88b9 100644 > --- a/src/mesa/drivers/dri/i965/brw_binding_tables.c > +++ b/src/mesa/drivers/dri/i965/brw_bin

Re: [Mesa-dev] [PATCH 1/2] glsl: Add missing check for whether an expression is an add operation

2015-07-06 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] glsl: Make sure not to dereference NULL

2015-07-06 Thread Matt Turner
On Sat, Jul 4, 2015 at 2:40 PM, Neil Roberts wrote: > In this bit of code point_five can be NULL if the expression is not a > constant. This fixes it to match the pattern of the rest of the chunk > of code so that it checks for NULLs. > > Cc: Matt Turner > Cc: "1

Re: [Mesa-dev] [PATCH] mesa: Add a MUST_CHECK macro for __attribute__((warn_unused_result)).

2015-07-06 Thread Matt Turner
> --- Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/3] i965/gen4-5: Set ENDIF dst and src0 fields to the null register.

2015-07-06 Thread Matt Turner
_grf(0,0), BRW_REGISTER_TYPE_UD)); > + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); > + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); Strange that it was an imm32 (type D) on gen < 6 and then imm16 after that. Reviewed-by: Ma

Re: [Mesa-dev] [PATCH 2/3] i965/gen4-5: Program the execution size correctly for DO/WHILE instructions.

2015-07-06 Thread Matt Turner
so this patch should fix them > too. The execution size of BREAK and CONT instructions was already > being set correctly. > > Fixes some 50 piglit tests on Gen4-5 when forced to run shaders with > conditional and loop instructions 16-

Re: [Mesa-dev] [PATCH 3/3] i965/gen4-5: Enable 16-wide dispatch on shaders with control flow.

2015-07-06 Thread Matt Turner
st a couple of bugs and nothing fundamental. Really nice work. > Causes no piglit regressions, and gives the following shader-db > results on ILK: Assuming no regressions on Gen4 and G45 (running through Jenkins should do it): Reviewed-by: Matt Turner

Re: [Mesa-dev] [PATCH 15/18] swrast: Defer _tnl_vertex_init until first use

2015-07-06 Thread Matt Turner
On Mon, Jul 6, 2015 at 3:33 AM, Chris Wilson wrote: > The vertices require a large chunk of memory, currently allocated during > context creation. However, this memory is not required until use so we > can defer the allocation until the first swrast_Wakeup(). Makes sense to me. Someone like Brian

Re: [Mesa-dev] [PATCH] i965: Fix missing BRW_NEW_FS_PROG_DATA in gen6_renderbuffer_surfaces.

2015-07-06 Thread Matt Turner
On Mon, Jul 6, 2015 at 9:55 AM, Kenneth Graunke wrote: > It looks like this was forgotten in commit 3c9dc2d31b80fc73bffa1f40a > (i965: Make a brw_stage_prog_data for storing the SURF_INDEX > information.) In other words, it's been missing since we moved to > dynamic binding table slot assignment

Re: [Mesa-dev] [PATCH] i965/fs: Don't disable SIMD16 when using the pixel interpolator

2015-07-06 Thread Matt Turner
On Sun, Jul 5, 2015 at 4:45 PM, Francisco Jerez wrote: > Hi Matt, > > Matt Turner writes: > >> On Fri, Jul 3, 2015 at 3:46 AM, Francisco Jerez >> wrote: >>> Heh, I happened to come across this comment yesterday while looking for >>> the remaini

[Mesa-dev] [PATCH] util: Don't link to SHA1 library if shader-cache is disabled.

2015-07-07 Thread Matt Turner
Cc: "10.6" --- src/util/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 2e7542e..1e087b4 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -46,9 +46,9 @@ libmesautil_la_SOURCES = \ if ENABLE_SHADER_

Re: [Mesa-dev] [Mesa-stable] [PATCH] util: Don't link to SHA1 library if shader-cache is disabled.

2015-07-08 Thread Matt Turner
On Wed, Jul 8, 2015 at 3:00 AM, Emil Velikov wrote: > On 08/07/15 07:33, Matt Turner wrote: >> Cc: "10.6" > Thanks for that I've completely forgot about this. > > Seems like we never got to using mesa_sha. Can we just remove it for now > and revive it as

Re: [Mesa-dev] [PATCH 02/11] i915; remove unused driFd variable

2015-07-08 Thread Matt Turner
50d35d..4ec4015 100644 > --- a/src/mesa/drivers/dri/i915/intel_context.h > +++ b/src/mesa/drivers/dri/i915/intel_context.h > @@ -273,8 +273,6 @@ struct intel_context > > bool use_early_z; > > - int driFd; > - > __DRIcontext *driContext; > struct

[Mesa-dev] [PATCH 2/2] i965: Optimize intel_batchbuffer_emit_dword().

2015-07-08 Thread Matt Turner
By keeping a pointer to the next available location, we reduce the number of memory accesses needed to write to the batchbuffer. A net ~7k reduction of .text size, 7.5k of which is from the change to intel_batchbuffer_emit_dword(). text data bss dec hex filename 4943740 1

[Mesa-dev] [PATCH 1/2] i965: Set brw->batch.emit only #ifdef DEBUG.

2015-07-08 Thread Matt Turner
It's only used inside #ifdef DEBUG. Cuts ~1.7k of .text, and more importantly prevents a larger code size regression in the next commit when the .used field is replaced and calculated on demand. text data bss dec hex filename 4945468 19515226192 5166812 4ed6dc i965

Re: [Mesa-dev] [PATCH 2/2] i965: Optimize intel_batchbuffer_emit_dword().

2015-07-08 Thread Matt Turner
On Wed, Jul 8, 2015 at 2:07 PM, Chris Wilson wrote: > On Wed, Jul 08, 2015 at 02:00:02PM -0700, Matt Turner wrote: >> By keeping a pointer to the next available location, we reduce the >> number of memory accesses needed to write to the batchbuffer. >> >> A net ~7k re

Re: [Mesa-dev] [PATCH] mesa: Implement faster streaming memcpy

2015-07-08 Thread Matt Turner
This > patch > does need performance data. I don't currently have a platform that this would > benefit (BYT or BSW), so I can't get anything useful. As soon as I get a > platform to test it on, I will - meanwhile, maybe whomever tested the original > patch the first tim

Re: [Mesa-dev] [PATCH 2/2] i965: Optimize intel_batchbuffer_emit_dword().

2015-07-08 Thread Matt Turner
On Wed, Jul 8, 2015 at 4:53 PM, Chris Wilson wrote: > On Wed, Jul 08, 2015 at 03:33:17PM -0700, Matt Turner wrote: >> On Wed, Jul 8, 2015 at 2:07 PM, Chris Wilson >> wrote: >> > On Wed, Jul 08, 2015 at 02:00:02PM -0700, Matt Turner wrote: >> >> By kee

Re: [Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Matt Turner
]); >} > - op[0].type = BRW_REGISTER_TYPE_D; > - result_dst.type = BRW_REGISTER_TYPE_D; > - emit(AND(result_dst, op[0], src_reg(0x3f80u))); > - result_dst.type = BRW_REGISTER_TYPE_F; > + emit(MOV(result_dst, negate(op[0]))); >

Re: [Mesa-dev] [PATCH 7/7] egl/wayland: remove dead code

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 10:49 AM, Emil Velikov wrote: > The macro HAVE_MKOSTEMP was never defined. > > Cc: Axel Davy > Signed-off-by: Emil Velikov > --- > src/egl/drivers/dri2/platform_wayland.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/src/egl/drivers/dri2/platform_wayland.

Re: [Mesa-dev] [PATCH] mesa: Implement faster streaming memcpy

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 4:20 AM, Marek Olšák wrote: > Shouldn't this stuff be in src/util? I guess? I'm not opposed to moving it, if other drivers can make use of it, but I don't want this patch to do the move. I wrote it in November 2013 and src/util only came into being in August 2014 if you'r

[Mesa-dev] [PATCH 5/5] i965: Optimize batchbuffer macros.

2015-07-10 Thread Matt Turner
Previously OUT_BATCH was just a macro around an inline function which does brw->batch.map[brw->batch.used++] = dword; When making consecutive calls to intel_batchbuffer_emit_dword() the compiler isn't able to recognize that we're writing consecutive memory locations or that it doesn't need to

[Mesa-dev] [PATCH 1/5] i965: Move BEGIN_BATCH() into same control flow as ADVANCE_BATCH().

2015-07-10 Thread Matt Turner
BEGIN_BATCH() and ADVANCE_BATCH() will contain "do {" and "} while (0)" respectively to allow declaring local variables used by intervening OUT_BATCH macros. As such, BEGIN_BATCH() and ADVANCE_BATCH() need to be in the same control flow. --- src/mesa/drivers/dri/i965/brw_draw.c | 4 ++-- 1 file ch

[Mesa-dev] [PATCH 3/5] i965: Turn set_blitter_tiling() into a macro.

2015-07-10 Thread Matt Turner
Its uses of OUT_BATCH will need a local variable defined by BEGIN_BATCH. Increases .text size by 528 bytes. --- src/mesa/drivers/dri/i965/intel_blit.c | 55 -- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b

[Mesa-dev] [PATCH 2/5] i965: Turn emit_vertex_buffer_state() into a macro.

2015-07-10 Thread Matt Turner
Its uses of OUT_BATCH will need a local variable defined by BEGIN_BATCH. Increases .text size by 8 bytes. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 79 + 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c

[Mesa-dev] [PATCH 4/5] i965: Split batch emission from relocation functions.

2015-07-10 Thread Matt Turner
So that everything writing to the batch between BEGIN_BATCH() and ADVANCE_BATCH() goes through OUT_BATCH. --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 30 ++- src/mesa/drivers/dri/i965/intel_batchbuffer.h | 34 ++- 2 files changed, 30 insertions(+

Re: [Mesa-dev] [PATCH] [v3] i965: Split out gen8 push constant state upload

2015-07-10 Thread Matt Turner
On Thu, Jul 9, 2015 at 11:00 AM, Ben Widawsky wrote: > While implementing the workaround in the previous patch I noticed things were > starting to get a bit messy. Since gen8 works differently enough from gen7, I > thought splitting it out with be good. > > While here, get rid of gen8 MOCS which d

Re: [Mesa-dev] [PATCH] i965: Replace illegal compacted NOP with valid compact instruction

2015-07-10 Thread Matt Turner
zeof(brw_inst)); > + brw_pop_insn_state(p); > + > + if (!brw_try_compact_instruction(devinfo, dst, &i)) { > + fprintf(stderr, "Failed to generate compact inst for alignment!\n"); > + exit(1); This isn't an error we ever expect a user to hit, to let's

Re: [Mesa-dev] [PATCH 2/5] i965/fs: fix stride and type for hw_reg's in regs_read()

2015-07-10 Thread Matt Turner
On Wed, Jul 1, 2015 at 11:51 AM, Connor Abbott wrote: > sources with file == HW_REG get all their information from the > fixed_hw_reg field, so we need to get the stride and type from there > when computing the size. > > Signed-off-by: Connor Abbott > --- Patches 1 and 2 are

Re: [Mesa-dev] [PATCH 1/2] i965/gs: Move vertex_count != 0 check up a level; skip one caller.

2015-07-10 Thread Matt Turner
{ > +/* If vertex_count is 0, then no control data bits have been > + * accumulated yet, so we skip emitting them. > + */ > + emit(CMP(dst_null_d(), this->vertex_count, 0u, > + BRW_CONDITIONAL_NEQ)); I think you wanted to indent B

Re: [Mesa-dev] [PATCH 2/2] i965: Fix indentation in emit_control_data_bits().

2015-07-10 Thread Matt Turner
Confirmed that git show -w shows only the removal of matching braces. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] [v2] i965/chv|skl: Apply sampler bypass w/a

2015-07-10 Thread Matt Turner
Matt) > Moved check out to function (Nanley). I left the setting of the bit in the > surface state open coded because it seems to go better with the existing > code. > > Cc: Matt Turner > Cc: Nanley Chery > Cc: Jordan Justen (aux-hiz needs this too) > Signed-off-by: Ben Wida

Re: [Mesa-dev] [PATCH 1/3] i965: Check the INTEL_USE_NIR environment variable once at context creation

2015-07-10 Thread Matt Turner
On Fri, Apr 3, 2015 at 10:04 AM, Jason Ekstrand wrote: > On Fri, Apr 3, 2015 at 9:46 AM, Matt Turner wrote: >> On Fri, Apr 3, 2015 at 1:07 AM, Jordan Justen >> wrote: >>> On 2015-04-02 20:56:15, Jason Ekstrand wrote: >>>> --- >>>&g

[Mesa-dev] [PATCH 2/4] i965: Split batch emission from relocation functions.

2015-07-13 Thread Matt Turner
So that everything writing to the batch between BEGIN_BATCH() and ADVANCE_BATCH() goes through OUT_BATCH. Reviewed-by: Chris Wilson --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 30 ++- src/mesa/drivers/dri/i965/intel_batchbuffer.h | 34 ++- 2 fi

[Mesa-dev] [PATCH 1/4] i965: Move BEGIN_BATCH() into same control flow as ADVANCE_BATCH().

2015-07-13 Thread Matt Turner
BEGIN_BATCH() and ADVANCE_BATCH() will contain "do {" and "} while (0)" respectively to allow declaring local variables used by intervening OUT_BATCH macros. As such, BEGIN_BATCH() and ADVANCE_BATCH() need to be in the same control flow. Reviewed-by: Iago Toral Quiroga --- src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 3/4] i965: Add and use USED_BATCH macro.

2015-07-13 Thread Matt Turner
The next patch will replace the .used field with an on-demand calculation of batchbuffer usage. --- src/mesa/drivers/dri/i965/brw_blorp.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_performance_monitor.c | 6 +++--- src/mesa/drivers/dri/i965/brw_state_batch.c | 4 ++-- src/mes

[Mesa-dev] [PATCH 4/4] i965: Optimize batchbuffer macros.

2015-07-13 Thread Matt Turner
Previously OUT_BATCH was just a macro around an inline function which does brw->batch.map[brw->batch.used++] = dword; When making consecutive calls to intel_batchbuffer_emit_dword() the compiler isn't able to recognize that we're writing consecutive memory locations or that it doesn't need to

Re: [Mesa-dev] [PATCH 4/5] i965: Split batch emission from relocation functions.

2015-07-13 Thread Matt Turner
On Sat, Jul 11, 2015 at 11:08 AM, Chris Wilson wrote: > On Fri, Jul 10, 2015 at 11:44:58AM -0700, Matt Turner wrote: >> So that everything writing to the batch between BEGIN_BATCH() and >> ADVANCE_BATCH() goes through OUT_BATCH. > > Reviewed-by: Chris Wilson > >

Re: [Mesa-dev] [PATCH 5/5] i965: Optimize batchbuffer macros.

2015-07-13 Thread Matt Turner
On Sat, Jul 11, 2015 at 11:02 AM, Chris Wilson wrote: > On Fri, Jul 10, 2015 at 11:44:59AM -0700, Matt Turner wrote: >> Previously OUT_BATCH was just a macro around an inline function which >> does >> >>brw->batch.map[brw->batch.used++] = dword; >&

[Mesa-dev] [PATCH] i965: Mark constant static data as const.

2015-07-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_curbe.c | 2 +- src/mesa/drivers/dri/i965/brw_draw_upload.c | 44 ++--- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index befd7a9..a1

[Mesa-dev] [PATCH 11/13] program: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/program/prog_execute.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 77274e2..2c52d0d 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog

[Mesa-dev] [PATCH 04/13] i965: Use float calculations when double is unnecessary.

2015-07-13 Thread Matt Turner
Literals without an f/F suffix are of type double, and implicit conversion rules specify that the float in (float op double) be converted to a double before the operation is performed. I believe float execution was intended (in nearly all cases) or is sufficient (in the case of gen7_urb.c). Remove

[Mesa-dev] [PATCH 06/13] gallium/auxiliary: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/gallium/auxiliary/util/u_format_rgb9e5.h | 2 +- src/gallium/auxiliary/util/u_math.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_rgb9e5.h b/src/gallium/auxiliary/util/u_format_rgb9e5.h index 7a01f7f..d1ace3f 100644 --

[Mesa-dev] [PATCH 03/13] gallium/auxiliary: Use exp2(x) instead of pow(2.0, x).

2015-07-13 Thread Matt Turner
--- src/gallium/auxiliary/util/u_format_rgb9e5.h | 6 +++--- src/gallium/auxiliary/util/u_math.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_rgb9e5.h b/src/gallium/auxiliary/util/u_format_rgb9e5.h index c2a3f6f..7a01f7f 10064

[Mesa-dev] [PATCH 02/13] program: Use exp2(x) instead of pow(2.0, x).

2015-07-13 Thread Matt Turner
--- src/mesa/program/prog_execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 46260b5..77274e2 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execute.c @@ -723,7 +723,7 @

[Mesa-dev] [PATCH 07/13] util: Avoid double promition.

2015-07-13 Thread Matt Turner
--- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 2ad8c3c..95be20f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -648,7 +648,7 @@ ra_get_best_spill

[Mesa-dev] [PATCH 08/13] vbo: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/vbo/vbo_context.c| 6 +++--- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index fd1ffe2..e3eb286 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context

[Mesa-dev] [PATCH 05/13] nir: Avoid double promition.

2015-07-13 Thread Matt Turner
--- src/glsl/nir/nir_opcodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py index 56e96d9..df5b7e2 100644 --- a/src/glsl/nir/nir_opcodes.py +++ b/src/glsl/nir/nir_opcodes.py @@ -474,10 +474,10 @@ else """) op

[Mesa-dev] [PATCH 10/13] swrast: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/swrast/s_aaline.c| 28 ++-- src/mesa/swrast/s_aalinetemp.h| 4 ++-- src/mesa/swrast/s_atifragshader.c | 4 ++-- src/mesa/swrast/s_copypix.c | 6 +++--- src/mesa/swrast/s_drawpix.c | 12 ++-- src/mesa/swrast/s_fragprog.c |

[Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/math/m_clip_tmp.h | 20 ++--- src/mesa/math/m_matrix.c | 70 +++--- src/mesa/math/m_norm_tmp.h | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/mesa/math/m_clip_tmp.h b/src/mesa/math/m_clip_tmp.h index e289

  1   2   3   4   5   6   7   8   9   10   >