[Mesa-dev] [PATCH 3/3] i965/fs: Consider MOV.SAT to interfere if it has a source modifier.

2015-02-11 Thread Matt Turner
The saturate propagation pass recognizes that the second instruction below does not interfere with an attempt to propagate the saturate modifier from instruction 3 to 1. 1: add(8) dst0 src0 src1 2: mov.sat(8) dst1 dst0 3: mov.sat(8) dst2 dst0 Unfortunately, we did not consider th

[Mesa-dev] [PATCH 2/3] i965/fs: Allow CSE to handle MULs with negated arguments.

2015-02-11 Thread Matt Turner
mul x, -y is equivalent to mul -x, y; and mul x, y is the negation of mul x, -y. total instructions in shared programs: 5937689 -> 5929512 (-0.14%) instructions in affected programs: 871152 -> 862975 (-0.94%) helped:4228 HURT: 17

[Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-11 Thread Matt Turner
We propagate negations to the right-most leaves of the multiplication expression trees: - mul(neg(x), neg(y)) -> mul(x, y) - mul(neg(x), y) -> neg(mul(x, y)) - mul(x, neg(y)) -> neg(mul(x, y)) total instructions in shared programs: 5943123 -> 5937229 (-0.10%) instructions in affected programs:

[Mesa-dev] [PATCH 1/3] i965/fs: Add unit tests for saturate propagation pass.

2015-02-11 Thread Matt Turner
Cc: --- src/mesa/drivers/dri/i965/Makefile.am | 7 + .../dri/i965/test_fs_saturate_propagation.cpp | 355 + 2 files changed, 362 insertions(+) create mode 100644 src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp diff --git a/src/mesa/drivers/dri/

Re: [Mesa-dev] [PATCH 10/10] i965/fs: Add algebraic optimizations for MAD.

2015-02-11 Thread Matt Turner
On Mon, Feb 9, 2015 at 6:00 PM, Kenneth Graunke wrote: > With that fixed, and the shader-db numbers confirmed, patches 9-10 are: > Reviewed-by: Kenneth Graunke To close the loop, the shader-db results are unchanged after the fix. ___ mesa-dev mailing l

Re: [Mesa-dev] [PATCH 1/3] glsl: Propagate negates through multiplication chains.

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 3:51 PM, Ian Romanick wrote: > On 02/11/2015 02:54 PM, Matt Turner wrote: >> We propagate negations to the right-most leaves of the multiplication >> expression trees: >> >> - mul(neg(x), neg(y)) -> mul(x, y) >> - mul(neg(x), y)

Re: [Mesa-dev] [PATCH 3/3] i965: Emit MUL with a negated src for neg(mul(...)).

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 3:57 PM, Ian Romanick wrote: > On 02/11/2015 02:54 PM, Matt Turner wrote: >> total instructions in shared programs: 5932832 -> 5932736 (-0.00%) >> instructions in affected programs: 8184 -> 8088 (-1.17%) >> helped:

Re: [Mesa-dev] [PATCH 3/5] i965: Move some asserts to unreachable.

2015-02-11 Thread Matt Turner
I don't see any of these warnings, strangely enough. This is (removing the !, like idr pointed out) Reviewed-by: Matt Turner as I guess the rest are. I really don't like useless initializations but I can't offer anything better. ___ m

Re: [Mesa-dev] [PATCH 4/7] mesa: Make bitset.h not rely on Mesa-specific types and functions.

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 4:48 PM, Eric Anholt wrote: > Note that we can't use u_math.h's align() because it's a function instead > of a macro, while BITSET_DECLARE needs a constant expression for nouveau's > usage in global declarations. > --- > src/mesa/main/bitset.h | 7 +++ > 1 file changed

Re: [Mesa-dev] [PATCH 1/7] mesa: Add gallium include dirs to more parts of the tree.

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 4:48 PM, Eric Anholt wrote: > --- Maybe I just read what I wanted to read in the cover letter, but I was expecting you to move u_math.h to src/util instead of this patch. That doesn't work because of u_math's inclusion of pipe/p_compiler.h? ___

Re: [Mesa-dev] [PATCH 1/7] mesa: Add gallium include dirs to more parts of the tree.

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 5:02 PM, Matt Turner wrote: > On Wed, Feb 11, 2015 at 4:48 PM, Eric Anholt wrote: >> --- > > Maybe I just read what I wanted to read in the cover letter, but I was > expecting you to move u_math.h to src/util instead of this patch. > > That

Re: [Mesa-dev] [PATCH 3/5] i965: Move some asserts to unreachable.

2015-02-11 Thread Matt Turner
On Wed, Feb 11, 2015 at 4:50 PM, Matt Turner wrote: > I don't see any of these warnings, strangely enough. But on another system with the same distribution and same gcc, I do. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.

[Mesa-dev] [PATCH 2/2] i965/vec4/vp: Use vec4_visitor::CMP.

2015-02-11 Thread Matt Turner
... instead of emit(BRW_OPCODE_CMP, ...). In commit 6b3a301f I changed vec4_visitor::CMP to set the destination's type to that of src0. In the following commit (2335153f) I removed an apparently now unnecessary work around for Gen8 that did the same thing. But there was a single place that emitted

[Mesa-dev] [PATCH 1/2] i965/vec4: Add and use byte-MOV instruction for unpack 4x8.

2015-02-11 Thread Matt Turner
Previously we were using a B/UB source in an Align16 instruction, which is illegal. It for some reason works on all platforms, except Broadwell. Cc: "10.5" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86811 --- I know! Another instruction for MOV! Sorry! src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH] automake: Use AM_DISTCHECK_CONFIGURE_FLAGS

2015-02-12 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 21/32] i965/vec4: Fix the scheduler to take into account reads and writes of multiple registers.

2015-02-12 Thread Matt Turner
On Fri, Feb 6, 2015 at 6:43 AM, Francisco Jerez wrote: > --- We don't have any operations today that return more than a single register in the vec4 backend, do we? Presumably this is partly preparation for image_load_store? Reviewed-by: Mat

Re: [Mesa-dev] [PATCH 28/32] i965/fs: Replace ud_reg_to_w() with a more general helper function.

2015-02-12 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 29/32] i965/gen8: Fix F32TO16 in vec4 mode if the source and destination registers alias.

2015-02-12 Thread Matt Turner
Heh, that's a nice bug. 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 30/32] i965: Handle F16TO32/F32TO16 with dword src/dst consistently on both back-ends.

2015-02-12 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 01/32] i965: Factor out virtual GRF allocation to a separate object.

2015-02-12 Thread Matt Turner
On Mon, Feb 9, 2015 at 11:25 AM, Matt Turner wrote: > On Fri, Feb 6, 2015 at 2:40 PM, Matt Turner wrote: >> 8 - Sent a question >> 9 - Like mine better? >> 10 - Looks wrong to me >> 11-13 - Asked Jason to review >> 14 - Asked for an example showing the problem &g

Re: [Mesa-dev] [PATCH 14/16] i965/fs: Allow flipping cond mod for negated arguments.

2015-02-12 Thread Matt Turner
On Thu, Feb 5, 2015 at 4:14 AM, Ian Romanick wrote: > On 01/20/2015 01:31 AM, Matt Turner wrote: >> @@ -73,10 +72,14 @@ opt_cmod_propagation_local(fs_visitor *v, bblock_t >> *block) >> scan_inst->dst.reg == inst->src[0].reg && >>

Re: [Mesa-dev] [PATCH] mesa: fix OES_texture_float texture render target behavior

2015-02-12 Thread Matt Turner
On Thu, Feb 12, 2015 at 4:33 AM, Tapani Pälli wrote: > Current implementation allowed usage of unsized type texture GL_FLOAT > and GL_HALF_FLOAT as a render target as this was 'expected behavior' by > WEBGL_oes_texture_float and is also allowed by the oes-texture-float > WebGL test. However this b

[Mesa-dev] [PATCH 1/2] i965: Add an is_negative_one() method.

2015-02-12 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_shader.cpp | 16 src/mesa/drivers/dri/i965/brw_shader.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 8b87d0d..d7b9c44 100644 --- a/src/mesa/dri

[Mesa-dev] [PATCH 2/2] i965: Optimize multiplication by -1 into a negated MOV.

2015-02-12 Thread Matt Turner
instructions in affected programs: 968 -> 942 (-2.69%) helped:4 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9 + src/mesa/drivers/dri/i965/brw_vec4.cpp | 5 + 2 files changed, 14 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/sr

[Mesa-dev] [PATCH] i965/fs/nir: Emit CMPs instead of MOV.NZ.

2015-02-12 Thread Matt Turner
--- I guess this is kind of a companion to the patch I sent recently that converts MOV -> CMP in opt_algebraic. src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 2/2] i965: Optimize multiplication by -1 into a negated MOV.

2015-02-12 Thread Matt Turner
On Thu, Feb 12, 2015 at 5:45 PM, Tom Stellard wrote: > On Thu, Feb 12, 2015 at 03:36:37PM -0800, Matt Turner wrote: >> instructions in affected programs: 968 -> 942 (-2.69%) >> helped:4 >> --- >> src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH 01/32] i965: Factor out virtual GRF allocation to a separate object.

2015-02-13 Thread Matt Turner
On Fri, Feb 13, 2015 at 4:36 AM, Francisco Jerez wrote: > Francisco Jerez writes: > >> Matt Turner writes: >> >>> On Mon, Feb 9, 2015 at 11:25 AM, Matt Turner wrote: >>>> On Fri, Feb 6, 2015 at 2:40 PM, Matt Turner wrote: >>>>> 8 - Sent a

Re: [Mesa-dev] [PATCH] i965/vec4: Override destination register writemask in sampler message send.

2015-02-13 Thread Matt Turner
he swizzle_result() code below expects > all four components of the vector to be valid. Oh, huh. I think in fact I suggested you remove that line in my review. Oops. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.

[Mesa-dev] [PATCH 2/2] i965: Let dump_instructions() work before calculate_cfg().

2015-02-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 24 src/mesa/drivers/dri/i965/brw_shader.cpp | 17 - 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 41473fa..

[Mesa-dev] [PATCH 1/2] i965/fs: Call calculate_cfg() before optimize().

2015-02-13 Thread Matt Turner
The CFG is fundamental to the FS IR, not merely a piece of optimization. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index c7c6acc..41473fa 100644 ---

Re: [Mesa-dev] [PATCH 5/5] i965/vec4: Silence unused parameter warnings

2015-02-13 Thread Matt Turner
^ And also unused since it was added in commit a9be50f7. I'd love to know why we see different sets of warnings. The series is 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] clover: Use Legacy PassManager for LLVM trunk (3.7)

2015-02-13 Thread Matt Turner
On Fri, Feb 13, 2015 at 5:37 PM, Shawn Starr wrote: > From: Shawn Starr s/ at /@/ > > Use the LegacyPassManager for now. > > Signed-off-by: Shawn Starr > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --

Re: [Mesa-dev] [PATCH v2] clover: Use Legacy PassManager for LLVM trunk (3.7)

2015-02-13 Thread Matt Turner
On Fri, Feb 13, 2015 at 5:49 PM, Shawn Starr wrote: > From: Shawn Starr > > Use the LegacyPassManager for now. > > v2: Not #ifdef, should be #if > > Signed-off-by: Shawn Starr > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 11 ++- > 1 file changed, 10 insertions(+), 1 d

Re: [Mesa-dev] [PATCH 1/3] i965/nir: Add support for nir_intrinsic_load_front_face

2015-02-14 Thread Matt Turner
On Sat, Feb 14, 2015 at 1:00 PM, Connor Abbott wrote: > I think we should be adding this to nir_emit_system_values_block() > like we do for the other system values. This should get us parity with > what we had before where we only called > emit_frontfacing_interpolation() once per shader. Calling

Re: [Mesa-dev] [PATCH 1/3] i965/nir: Add support for nir_intrinsic_load_front_face

2015-02-14 Thread Matt Turner
On Sat, Feb 14, 2015 at 12:51 PM, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > index da81b61..28a5f64

Re: [Mesa-dev] [PATCH v3 1/3] i965/nir: Add support for nir_intrinsic_load_front_face

2015-02-14 Thread Matt Turner
Thanks Jason. The series looks good to me: 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: don't enable NV_fragment_program_option with swrast

2015-02-15 Thread Matt Turner
On Sat, Feb 14, 2015 at 2:33 PM, Roland Scheidegger wrote: > Am 14.02.2015 um 21:12 schrieb Kenneth Graunke: >> On Saturday, February 14, 2015 04:37:25 PM srol...@vmware.com wrote: >>> From: Roland Scheidegger >>> >>> Since dropping some NV_fragment_program opcodes (commits >>> 868f95f1da74cf6dd7

Re: [Mesa-dev] [PATCH] mesa: don't enable NV_fragment_program_option with swrast

2015-02-16 Thread Matt Turner
On Mon, Feb 16, 2015 at 9:59 AM, Dieter Nützel wrote: > Sorry that I step in but what about GL_NV_vertex_program* in general? > There are several Mesa-demos (e.g. in tests) which do not work any longer. > > mesa-demos/tests> ./vptest1 > Sorry, this program requires GL_NV_vertex_program That sound

Re: [Mesa-dev] [PATCH 1/4] configure: add visibility macro detection to configure

2015-02-16 Thread Matt Turner
On Mon, Feb 16, 2015 at 1:36 AM, Marc Dietrich wrote: > This adds clang/gcc visibility macro detection to configure and util/macros.h. > This is can be used to conveniently add e.g. a "HIDDEN" attribute to a > function. > > Signed-off-by: Marc Dietrich > --- > configure.ac | 28 ++-

Re: [Mesa-dev] [PATCH 2/4] add visibility hidden to tls entry points

2015-02-16 Thread Matt Turner
On Mon, Feb 16, 2015 at 1:36 AM, Marc Dietrich wrote: > Avoid redefined symbol errors in clang. Based on a suggestion from > Rafael à vila de Espíndola in > http://llvm.org/bugs/show_bug.cgi?id=19778. > > Signed-off-by: Marc Dietrich > --- > src/mapi/entry_x86-64_tls.h | 3 ++- > src/mapi/entr

Re: [Mesa-dev] [PATCH 1/2] mesa: remove unused _math_trans_4chan()

2015-02-16 Thread Matt Turner
holes' inside and between vertices. Fix calculation of tnl->render_inputs to work with fp programs. Mirror VB->PointSizePtr in VB->AttribPtr so that it can work with t_vertex.c. Transition swrast_setup/ to use t_vertex.c to build swrast vertices. Wow. Revie

Re: [Mesa-dev] [PATCH] ra: Disable round-robin strategy for optimistically colorable nodes.

2015-02-16 Thread Matt Turner
On Mon, Feb 16, 2015 at 10:40 AM, Francisco Jerez wrote: > My intuition is that the huge performance improvement Matt observed by > disabling the third scheduling heuristic is more likely to have been > caused by a decrease in the amount of cache thrashing caused by the fact > that he was running

Re: [Mesa-dev] [PATCH 0/2] GL_ARB_program_interface_query

2015-02-17 Thread Matt Turner
On Tue, Feb 17, 2015 at 3:27 AM, Tapani Pälli wrote: > Here is a skeleton for the GL_ARB_program_interface_query API functions. > Adding the enum values makes it possible to start introducing changes in > the current shader query functions using these values. > > Plan is to build a resource list d

[Mesa-dev] [PATCH 3/3] i965/fs/nir: Optimize integer multiply by a 16-bit constant.

2015-02-17 Thread Matt Turner
Gen8+ support was just broken, since MUL now consumes 32-bits from both sources. Fixes 986 piglit tests on my BDW. total instructions in shared programs: 8010869 -> 8010307 (-0.01%) instructions in affected programs: 37244 -> 36682 (-1.51%) helped:113 GAINED:

[Mesa-dev] [PATCH 2/3] i965/fs/nir: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-02-17 Thread Matt Turner
total instructions in shared programs: 8013221 -> 8010869 (-0.03%) instructions in affected programs: 475925 -> 473573 (-0.49%) helped:2350 --- src/mesa/drivers/dri/i965/brw_fs.h | 3 ++ src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 81 ++

[Mesa-dev] [PATCH 1/3] nir/register: Add a parent_instr field

2015-02-17 Thread Matt Turner
out-of-SSA pass so that backends can get SSA-like information even after they have gone out of SSA. Reviewed-by: Matt Turner --- src/glsl/nir/nir.c | 1 + src/glsl/nir/nir.h | 11 ++- src/glsl/nir/nir_from_ssa.c | 7 +++ 3 files changed, 18 insertions(+), 1

Re: [Mesa-dev] [PATCH 1/3] mesa: Add _mesa_has_compute_shaders

2015-02-17 Thread Matt Turner
On Tue, Feb 17, 2015 at 1:30 PM, Ben Widawsky wrote: > On Tue, Feb 17, 2015 at 11:37:44AM -0800, Ian Romanick wrote: >> On 02/13/2015 11:02 PM, Ben Widawsky wrote: >> > From: Jordan Justen >> > >> > Signed-off-by: Jordan Justen >> > Reviewed-by: Ben Widawsky >> > --- >> > src/mesa/main/context

Re: [Mesa-dev] [PATCH:mesa 2/4] Avoid fighting with Solaris headers over isnormal()

2015-02-17 Thread Matt Turner
On Tue, Feb 17, 2015 at 1:59 PM, Connor Abbott wrote: > On Tue, Feb 17, 2015 at 4:41 PM, Alan Coopersmith > wrote: >> On 02/17/15 10:21 AM, Emil Velikov wrote: >>> >>> Hi Alan, >>> >>> On 16/02/15 02:41, Alan Coopersmith wrote: When compiling in C99 or C++11 modes, Solaris defines isnor

Re: [Mesa-dev] [PATCH 07/10] i965/fs: Add pass to combine immediates.

2015-02-17 Thread Matt Turner
On Tue, Feb 17, 2015 at 3:45 PM, Kenneth Graunke wrote: > On Wednesday, February 04, 2015 08:21:24 PM Matt Turner wrote: >> total instructions in shared programs: 5885407 -> 5940958 (0.94%) >> instructions in affected programs: 3617311 -> 3672

Re: [Mesa-dev] [PATCH] configure: By default, don't build non-ARM DRI drivers on ARM.

2015-02-17 Thread Matt Turner
On Tue, Feb 17, 2015 at 4:40 PM, Eric Anholt wrote: > As far as I know, none of the others (i915 i965 nouveau r200 radeon) could > appear on an ARM device. > --- I'm not going to object, but I've always thought [1] it was somewhat absurd that a person could run configure without specifying what d

Re: [Mesa-dev] [PATCH] i965/vec4: Opportunistically coalesce SIMD8 instructions

2015-02-17 Thread Matt Turner
On Tue, Feb 17, 2015 at 4:44 PM, Ben Widawsky wrote: > With scalar VS, it so happens that many vertex shaders will line up in a such > a > way that two SIMD8 instructions can be collapsed into 1 SIMD16 instruction. > For > example > > The following two MOVs > mov(8) g124<1>Fg6<8

Re: [Mesa-dev] [PATCH] i965: Prefer Meta over the BLT for BlitFramebuffer.

2015-02-17 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: Allow exec_list sentinels as arguments to insert functions.

2015-02-17 Thread Matt Turner
To insert an instruction at the end of a basic block, we typically do something like inst = block->last_non_control_flow_inst(); inst->insert_after(block, new_inst); But blocks can consist of a single control flow instruction, so inst will actually be the exec_list's head sentinel. We shoul

Re: [Mesa-dev] [PATCH 2/4] add visibility hidden to tls entry points

2015-02-17 Thread Matt Turner
On Mon, Feb 16, 2015 at 10:25 AM, Matt Turner wrote: > On Mon, Feb 16, 2015 at 1:36 AM, Marc Dietrich wrote: >> Avoid redefined symbol errors in clang. Based on a suggestion from >> Rafael à vila de Espíndola in >> http://llvm.org/bugs/show_bug.cgi?id=19778. >> >

Re: [Mesa-dev] [PATCH] i965/vec4: Calculate register allocation q values manually.

2015-02-18 Thread Matt Turner
Reviewed-by: Matt Turner Thanks Curro! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: don't allow invariant qualifiers for interface blocks

2015-02-18 Thread Matt Turner
* qualifiers are used, they can include interpolation qualifiers, > + * auxiliary storage qualifiers, and storage qualifiers and they > must > + * declare an input, output, or uniform member consistent with the > + * interface qualifier of the block" > + */ > + if (qualifier.flags.q.invariant) > +_mesa_glsl_error(&@1, state, "invariant qualifiers cannot be > used with interface blocks members"); Try to line wrap this. With those comments fixed: 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 08/10] glsl: A shader cannot redefine or overload built-in functions in GLSL ES 3.00

2015-02-18 Thread Matt Turner
gt; > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp > index bb7fbcd..f5052d3 100644 > --- a/src/glsl/builtin_functions.cpp > +++ b/src/glsl/builtin_functions.cpp > @@ -4618,6 +4618,17 @@ > _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state, > return s; > } > &

Re: [Mesa-dev] [PATCH v2] mesa: Check first that draw buffers are valid for glDrawBuffers on GLES3

2015-02-18 Thread Matt Turner
On Tue, Jan 13, 2015 at 3:29 AM, Eduardo Lima Mitev wrote: > This patch was updated and is pending review. I think we're waiting on a new version with Tapani's comment addressed. The patch looks right, FWIW. ___ mesa-dev mailing list mesa-dev@lists.fre

Re: [Mesa-dev] [PATCH] mesa: Adds check for integer internal formal and num samples in glRenderbufferStorageMultisample

2015-02-18 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: Returns correct error values from gl(Get)SamplerParameter*() on GL-ES 3.0+

2015-02-18 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] i965/skl: Layout a 1D miptree horizontally

2015-02-18 Thread Matt Turner
On Wed, Feb 18, 2015 at 3:34 PM, Erik Faye-Lund wrote: > On Wed, Feb 18, 2015 at 6:02 PM, Ian Romanick wrote: >> On 02/17/2015 06:03 AM, Neil Roberts wrote: >>> + /* When this layout is used the horizontal alignment is fixed at 64 and >>> the >>> +* hardware ignores the value given in the

Re: [Mesa-dev] [PATCH] mesa: Check that draw buffers are valid for glDrawBuffers on GLES3

2015-02-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

Re: [Mesa-dev] [Mesa-announce] Mesa 10.3 release candidate 1

2015-02-19 Thread Matt Turner
On Thu, Feb 19, 2015 at 5:53 AM, Lucas Stach wrote: > Am Freitag, den 07.11.2014, 01:19 -0800 schrieb Matt Turner: >> On Fri, Nov 7, 2014 at 1:07 AM, Thierry Vignaud >> wrote: >> > On 5 November 2014 04:44, Matt Turner wrote: >> >>>>>

Re: [Mesa-dev] [PATCH] install-lib-links: don't depend on .libs directory

2015-02-19 Thread Matt Turner
.$(LIB_EXT)*))); do \ > if test -h .libs/$$f; then \ > -- > 2.1.4 > Thanks a bunch Lucas. Reviewed-by: Matt Turner I'll commit this and tag it for 10.5 as well. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Use the without_array predicate

2015-02-19 Thread Matt Turner
ce_type); > -} > + return (this->type->without_array() == this->interface_type); Remove the superfluous parentheses, and 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/3] i965/fs: Use fs_inst::overwrites_reg() in saturate propagation.

2015-02-19 Thread Matt Turner
On Thu, Feb 19, 2015 at 3:25 PM, Ian Romanick wrote: > On 02/11/2015 02:54 PM, Matt Turner wrote: >> This is safer and matches the conditional_mod propagation pass. >> >> Cc: >> --- >> .../dri/i965/brw_fs_saturate_propagation.cpp

Re: [Mesa-dev] [PATCH 1/4] i965: Don't emit saturates for instructions without destinations.

2015-02-19 Thread Matt Turner
On Thu, Feb 19, 2015 at 3:31 PM, Ian Romanick wrote: > On 02/10/2015 11:09 AM, Matt Turner wrote: >> We were special casing OPCODE_END but no other instructions that have no >> destination, like OPCODE_KIL, leading us to emitting MOVs with null >> destinations. > >

Re: [Mesa-dev] [PATCH 4/4] i965/blorp: Emit MADs.

2015-02-19 Thread Matt Turner
On Thu, Feb 19, 2015 at 3:35 PM, Ian Romanick wrote: > Assuming that my assumption / recollection that blorp is only for GEN6+, > this patch is Indeed, that's correct. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH] i965/fs: Set pixel/sample mask for compute shaders atomic ops

2015-02-19 Thread Matt Turner
On Thu, Feb 19, 2015 at 3:42 PM, Jordan Justen wrote: > For fragment programs, we pull this mask from the payload header. The same > mask doesn't exist for compute shaders, so we set all bits to enabled. > > Note: this mask is ANDed with the execution mask, so some channels may not end > up issuin

Re: [Mesa-dev] [PATCH] nir: Copy-propagate vecN operations that are actually moves

2015-02-19 Thread Matt Turner
On Thu, Feb 19, 2015 at 11:01 PM, Connor Abbott wrote: > I agree with Ken that the regressions are small enough, and it seems > they're mostly stuff we can prevent by being smarter when doing the > sel peephole, so it seems like the cleanup that will probably help > other passes is worth it. So,

Re: [Mesa-dev] [PATCH 2/3] i965/fs/nir: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-02-19 Thread Matt Turner
On Tue, Feb 17, 2015 at 11:46 AM, Matt Turner wrote: > total instructions in shared programs: 8013221 -> 8010869 (-0.03%) > instructions in affected programs: 475925 -> 473573 (-0.49%) > helped:2350 > --- Patches 1 and 3 have been reviewed

Re: [Mesa-dev] [PATCH] nir: Copy-propagate vecN operations that are actually moves

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 9:23 AM, Jason Ekstrand wrote: > > > On Thu, Feb 19, 2015 at 11:03 PM, Matt Turner wrote: >> >> On Thu, Feb 19, 2015 at 11:01 PM, Connor Abbott >> wrote: >> > I agree with Ken that the regressions are small enough, and it seems >>

Re: [Mesa-dev] [PATCH 2/3] i965/fs/nir: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 11:54 AM, Eric Anholt wrote: > I wanted patch #1 to land, so I took a look at this one :) Thanks! :) > Matt Turner writes: >> + if (brw->gen >= 6) { >> + /* Bit 15 of g0.0 is 0 if the polygon is front facing. */ >> + fs_reg g0

Re: [Mesa-dev] [PATCH 1/5] nir: Add a couple of simplifications of csel operations.

2015-02-20 Thread Matt Turner
The series is 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: Have configure define NDEBUG, not mtypes.h.

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 12:44 PM, Matt Turner wrote: > mtypes.h had been defining NDEBUG (used by assert) if DEBUG was not > defined. Confusing and bizarre that you don't get NDEBUG if you don't > include mtypes.h. > > ... which is just what happened in commit bef38f62e

[Mesa-dev] [PATCH] mesa: Have configure define NDEBUG, not mtypes.h.

2015-02-20 Thread Matt Turner
mtypes.h had been defining NDEBUG (used by assert) if DEBUG was not defined. Confusing and bizarre that you don't get NDEBUG if you don't include mtypes.h. ... which is just what happened in commit bef38f62e. Let's let configure define this for us if not using --enable-debug. --- configure.ac

Re: [Mesa-dev] [PATCH] nir: Fix the Mesa build without -DDEBUG.

2015-02-20 Thread Matt Turner
Regardless of where DEBUG/NDEBUG is defined, it seems like we should do this anyway. 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] i965/fs: Use fs_reg for CS/VS atomics pixel mask immediate data

2015-02-20 Thread Matt Turner
Reviewed-by: Matt Turner It might be a good idea to make the fs_reg(struct brw_reg) explicit to prevent this kind of mistake from happening. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] nir: Compilation error in nir/nir_to_ssa.c

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 1:23 PM, Dieter Nützel wrote: > make[3]: Entering directory '/opt/mesa/src/glsl' > CC nir/nir_to_ssa.lo > In file included from nir/../glsl_types.h:30:0, > from nir/nir_types.h:32, > from nir/nir.h:36, > from nir/ni

Re: [Mesa-dev] [PATCH] drivers/x11: add gallium include dirs to Makefile.am

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 12:20 PM, Brian Paul wrote: > Fixes xlib driver build after e8c5cbfd921680c. > --- > src/mesa/drivers/x11/Makefile.am | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/mesa/drivers/x11/Makefile.am > b/src/mesa/drivers/x11/Makefile.am > index 76a7cd4..c0596f8

Re: [Mesa-dev] [PATCH 2/3] i965/fs/nir: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 1:41 PM, Eric Anholt wrote: >> Or maybe I'm just wrong and some bit is guaranteed to be set? > > A "This negation looks like it's safe in practice, because bits 0:4 will > surely be TRIANGLES" comment seems fine with me. Thanks, will do. R-b? I realized I was looking at V

Re: [Mesa-dev] [PATCH] i965/fs: Use fs_reg for CS/VS atomics pixel mask immediate data

2015-02-20 Thread Matt Turner
On Fri, Feb 20, 2015 at 1:14 PM, Jordan Justen wrote: > The brw_imm_ud will yield a HW_REG which then will introduce a barrier > for certain optimization opportunities. > > No piglit regressions seen with gen8 (simd8vs). > > Suggested-by: Matt Turner > Signed-off-by: Jord

Re: [Mesa-dev] [PATCH 1/2] tgsi: avoid returning pointer to local var

2015-02-21 Thread Matt Turner
On Sat, Feb 21, 2015 at 10:54 AM, Ilia Mirkin wrote: > Spotted by Coverity. > > Signed-off-by: Ilia Mirkin > --- > src/gallium/auxiliary/tgsi/tgsi_exec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c > b/src/gallium/auxiliary/t

Re: [Mesa-dev] [PATCH 2/2] glsl: ensure that enter/leave record get a record type

2015-02-21 Thread Matt Turner
glsl_type *type, const char *name, > bool row_major) { > + assert(type->is_record()); Add a new line here before the comment. With each comment addressed on the two patches, both are Reviewed-by: Matt Turner >/* If this is the last

[Mesa-dev] [PATCH] i965: Link test programs with gtest before pthreads.

2015-02-21 Thread Matt Turner
Cc: "10.5" Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=540962 --- src/mesa/drivers/dri/i965/Makefile.am | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am index 9230a49..23

[Mesa-dev] Segfault in r300_compiler_tests' peephole_mul_omod()

2015-02-22 Thread Matt Turner
Hi Tom, I've gotten a report about a segfault in the r300 compile tests. See Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=540970 It seems to be dependent on optimization level whether the test segfaults or not. Program received signal SIGSEGV, Segmentation fault. 0x004013fd in test

[Mesa-dev] [PATCH 2/3] gallium/util: Use HAVE___BUILTIN_* macros.

2015-02-22 Thread Matt Turner
--- SCons already defines these, and more precisely than just is-it-gcc. src/gallium/auxiliary/util/u_math.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index dd2ce01..1e1bdf0 100644 ---

[Mesa-dev] [PATCH 1/3] mesa: Move C99 MSVC compatibility code from u_math.h to c99_compat.h.

2015-02-22 Thread Matt Turner
--- This series is attempting to make some progress towards moving u_math.h to src/util. include/c99_compat.h| 143 src/gallium/auxiliary/util/u_math.h | 143 2 files changed, 143 insertions(+), 143 deletion

[Mesa-dev] [PATCH 3/3] gallium: Use util_cpu_to_le{16, 32} in many more places.

2015-02-22 Thread Matt Turner
... and util_le{16,32}_to_cpu. I think I've used the right ones for describing the actual operation performed (even though they're both just "byte-swap this if I'm on big-endian"). The Linux Kernel has typedefs __le32/__be32 and friends that static analysis tools can use to check that byte-orderin

[Mesa-dev] [PATCH] mesa/vbo: Use unreachable to silence uninitialized var warning.

2015-02-22 Thread Matt Turner
--- src/mesa/vbo/vbo_exec_array.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index f75ca38..cae04cb 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -181,8 +181,7 @@ vbo_get_mi

[Mesa-dev] [PATCH 1/2] i965: Remove hand-rolled memcpy implementation.

2015-02-22 Thread Matt Turner
--- I can't believe this is beneficial, especially since it came from the i915tex import. src/mesa/drivers/dri/i965/brw_context.h | 27 --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/mesa/

[Mesa-dev] [PATCH 2/2] i915: Remove hand-rolled memcpy implementation.

2015-02-22 Thread Matt Turner
--- src/mesa/drivers/dri/i915/intel_batchbuffer.c | 2 +- src/mesa/drivers/dri/i915/intel_context.h | 28 --- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_batchbuffer.c b/src/mesa/drivers/dri/i915/intel_batchbuffer.c i

[Mesa-dev] [PATCH 2/5] mesa: Remove CHECK macro.

2015-02-22 Thread Matt Turner
There's some commentary about how it's defined by other "modules", and maybe that was true in 2000 when the code was added. --- src/mesa/main/compiler.h| 6 src/mesa/math/m_trans_tmp.h | 76 ++--- src/mesa/math/m_translate.c | 6 3 files chan

[Mesa-dev] [PATCH 1/5] mesa: Remove dead CAPI define.

2015-02-22 Thread Matt Turner
--- src/mesa/main/compiler.h | 5 - 1 file changed, 5 deletions(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index cdc843d..6653bb2 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -174,11 +174,6 @@ static inline GLuint CPU_TO_LE32(GLuint x)

[Mesa-dev] [PATCH 4/5] mesa: Remove definition of NULL.

2015-02-22 Thread Matt Turner
If your stdlib.h doesn't define this you should fix your stdlib.h. --- src/mesa/main/compiler.h | 4 1 file changed, 4 deletions(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 9a5dbcf..d513284 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@

[Mesa-dev] [PATCH 5/5] mesa: Move START/END_FAST_MATH macros to their only use.

2015-02-22 Thread Matt Turner
--- src/mesa/main/compiler.h | 79 --- src/mesa/tnl/t_pipeline.c | 78 ++ 2 files changed, 78 insertions(+), 79 deletions(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index d513284..088

Re: [Mesa-dev] [PATCH 3/5] mesa: Use assert() instead of ASSERT wrapper.

2015-02-22 Thread Matt Turner
On Sun, Feb 22, 2015 at 9:13 PM, Matt Turner wrote: > --- > src/gallium/drivers/softpipe/sp_tex_sample.c | 2 +- > src/gallium/state_trackers/glx/xlib/glx_api.c | 2 +- > src/gallium/state_trackers/glx/xlib/xm_api.c | 4 +- > src/mesa/drivers/common/meta.c

Re: [Mesa-dev] [PATCH 3/5] mesa: Use assert() instead of ASSERT wrapper.

2015-02-22 Thread Matt Turner
On Sun, Feb 22, 2015 at 9:27 PM, Matt Turner wrote: > or > http://cgit.freedesktop.org/~mattst88/mesa/commit/?h=header-cleanup&id=70614b1d1e4cbab30add208bfacd5fe4469dc712 Ilia noticed I cast too wide a net with sed, so I've force pushed a new branch, so this commit is

Re: [Mesa-dev] [PATCH 1/3] mesa: Move C99 MSVC compatibility code from u_math.h to c99_compat.h.

2015-02-23 Thread Matt Turner
On Sun, Feb 22, 2015 at 11:05 PM, Eric Anholt wrote: > Matt Turner writes: > >> --- >> This series is attempting to make some progress towards moving u_math.h >> to src/util. > > Hmm, looks like for other headers we've got include/c99/whatever.h that > inclu

Re: [Mesa-dev] [PATCH 3/3] i965: Emit MUL with a negated src for neg(mul(...)).

2015-02-23 Thread Matt Turner
On Sun, Feb 22, 2015 at 2:23 PM, Ben Widawsky wrote: > On Wed, Feb 11, 2015 at 02:54:51PM -0800, Matt Turner wrote: >> total instructions in shared programs: 5932832 -> 5932736 (-0.00%) >> instructions in affected programs: 8184 -> 8088 (-1.17%) >> helped:

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