Re: [Mesa-dev] [PATCH 2/5] i965: Add support for swizzling arbitrary immediates to (brw_)swizzle().

2016-02-29 Thread Iago Toral
took me a while to understand what this was doing even with the comment in imm_shift(). Another comment here explaining what this series of operations are doing might save future readers some time... ;) The implementation looks correct to me: Reviewed-by: Iago Toral Quiroga > + return y; > +

Re: [Mesa-dev] [PATCH 3/5] i965/vec4: Use swizzle() to swizzle immediates during constant propagation.

2016-02-29 Thread Iago Toral
d = swizzle_vf_imm(value.ud, inst->src[arg].swizzle); > + value = swizzle(value, inst->src[arg].swizzle); so I guess V/UV was broken before this? Reviewed-by: Iago Toral Quiroga > switch (inst->opcode) { > case BRW_OPCODE_MOV: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 4/5] i965: Don't try copy propagation if constant propagation succeeded.

2016-02-29 Thread Iago Toral
opy_propagate(inst, i, entry)) Maybe remove the blank line between the if and the else if? Reviewed-by: Iago Toral Quiroga > progress = true; > } >} > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp > b/src/mesa/drivers/d

Re: [Mesa-dev] [PATCH 1/2] glsl/opt_array_splitting: Fix crash when doing array indexing into other arrays

2016-03-02 Thread Iago Toral
On Thu, 2016-03-03 at 09:38 +1100, Timothy Arceri wrote: > On Mon, 2015-09-14 at 13:49 +0200, Iago Toral Quiroga wrote: > > When we find indirect indexing into an array, the current > > implementation > > of the array spliiting optimization pass does not look further into &

Re: [Mesa-dev] [PATCH 3/3] i965/fs: Optimize float conversions of byte/word extract.

2016-03-03 Thread Iago Toral
BYTE; > + } > + > + fs_reg op0 = get_nir_src(src0->src[0].src); > + op0.type = brw_type_for_nir_type(nir_op_infos[src0->op].input_types[0]); > + op0 = offset(op0, bld, src0->src[0].swizzle[0]); > + > + set_saturate(instr->dest.saturate, > +

Re: [Mesa-dev] [PATCH 2/2] glsl: Improve the accuracy of the acos() approximation.

2016-03-03 Thread Iago Toral
ought we would have to use higher order polynomials. Series is: Reviewed-by: Iago Toral Quiroga What about asin? It looks like the new coefficients should be useful there as well. > --- > src/compiler/glsl/builtin_functions.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH 2/2] glsl: Improve the accuracy of the acos() approximation.

2016-03-03 Thread Iago Toral
On Thu, 2016-03-03 at 16:23 -0800, Francisco Jerez wrote: > Iago Toral writes: > > > On Thu, 2016-03-03 at 01:30 -0800, Kenneth Graunke wrote: > >> From: Francisco Jerez > >> > >> The adjusted polynomial coefficients come from the numerical > >

[Mesa-dev] i965: Spilling non-contiguous registers

2016-03-08 Thread Iago Toral
Hi, I am trying to improve register spilling for fp64 programs. Specifically for the varying-packing-simple piglit test with double types. Because this test uses all available varying slots, register pressure is significant and spilling is necessary for it to pass, even for non-fp64 types. The ma

Re: [Mesa-dev] [PATCH] i965/fs/nir: "surface_access::" prefix not needed

2016-03-08 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Fri, 2016-03-04 at 20:38 +0100, Alejandro Piñeiro wrote: > "using namespace brw::surface_access" is already present at the > top of the source file. > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 24 ++-- > 1 fi

Re: [Mesa-dev] [PATCH] glsl: avoid stack smashing when there are too many attributes

2016-03-08 Thread Iago Toral
On Sun, 2016-03-06 at 12:21 -0500, Ilia Mirkin wrote: > This fixes a crash in > > dEQP-GLES3.functional.transform_feedback.array_element.separate.points.lowp_mat3x2 > > and likely others. The vertex shader has > 16 input variables (without > explicit locations), which causes us to index outside o

Re: [Mesa-dev] [PATCH] glsl: avoid stack smashing when there are too many attributes

2016-03-08 Thread Iago Toral
On Tue, 2016-03-08 at 10:01 -0500, Ilia Mirkin wrote: > On Tue, Mar 8, 2016 at 9:54 AM, Iago Toral wrote: > > On Sun, 2016-03-06 at 12:21 -0500, Ilia Mirkin wrote: > >> This fixes a crash in > >> > >> dEQP-GLES3.functional.transform_feedback.array_element.separ

Re: [Mesa-dev] [PATCH] i965/fs: Recognize constants can be loaded by subtracting from 1.0.

2016-03-08 Thread Iago Toral
On Mon, 2016-02-29 at 22:06 -0800, Matt Turner wrote: > Some shaders from Synmark contain this loop: > >for (float i = 0.02; i < 0.9; i += 0.11) > > and in its body it uses both i and (1.0 - i). All 16 immediates are > promoted to registers (they're used by 3-src MAD instructions). By > recog

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
ntal width of 4 > > > and we think there won't be any regression on gen9... but we don't > > > have any gen9 machine to run piglit with these patches. Can someone > > > check it? > > > > > > Please read the original cover letter [0] for more inform

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
't > > > > have any gen9 machine to run piglit with these patches. Can someone > > > > check it? > > > > > > > > Please read the original cover letter [0] for more information. > > > > > > > > Sam > > > > > > > > [0] ht

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
On Wed, 2016-03-09 at 09:54 +0200, Pohjolainen, Topi wrote: > On Mon, Mar 07, 2016 at 10:48:49AM +0100, Samuel Iglesias Gons?lvez wrote: > > Hello, > > > > There is only one patch from this series that has been reviewed (patch > > 1). > > > > Our plans is to start sending patches for adding fp64

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
On Wed, 2016-03-09 at 10:53 +0200, Pohjolainen, Topi wrote: > On Wed, Mar 09, 2016 at 09:36:42AM +0100, Iago Toral wrote: > > On Wed, 2016-03-09 at 09:54 +0200, Pohjolainen, Topi wrote: > > > On Mon, Mar 07, 2016 at 10:48:49AM +0100, Samuel Iglesias Gons?lvez wr

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
On Wed, 2016-03-09 at 09:24 +0100, Iago Toral wrote: > On Wed, 2016-03-09 at 09:26 +0200, Pohjolainen, Topi wrote: > > On Wed, Mar 09, 2016 at 09:07:44AM +0200, Pohjolainen, Topi wrote: > > > On Mon, Mar 07, 2016 at 10:48:49AM +0100, Samuel Iglesias Gons?lvez wr

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
ntal width of 4 > > > and we think there won't be any regression on gen9... but we don't > > > have any gen9 machine to run piglit with these patches. Can someone > > > check it? > > > > > > Please read the original cover letter [0] for more inform

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
On Wed, 2016-03-09 at 11:42 +0200, Pohjolainen, Topi wrote: > On Wed, Mar 09, 2016 at 11:05:17AM +0200, Pohjolainen, Topi wrote: > > On Wed, Mar 09, 2016 at 10:03:08AM +0100, Iago Toral wrote: > > > On Wed, 2016-03-09 at 10:53 +0200, Pohjolainen, Topi wrote: > > > >

Re: [Mesa-dev] [PATCH] glsl: dont allow undefined array sizes in ES

2016-03-09 Thread Iago Toral
On Tue, 2016-03-08 at 20:35 +1100, Timothy Arceri wrote: > This applies the rule to empty declarations. > > Fixes: > dEQP-GLES3.functional.shaders.arrays.invalid.empty_declaration_without_var_name_vertex > dEQP-GLES3.functional.shaders.arrays.invalid.empty_declaration_without_var_name_fragment > -

Re: [Mesa-dev] [PATCH] i965/cfg: Remove redundant #pragma once.

2016-03-09 Thread Iago Toral
On Tue, 2016-03-08 at 17:42 -0800, Francisco Jerez wrote: > brw_cfg.h already has include guards, remove the "#pragma once" which > is redundant and non-standard. FWIW, I think using both #pragma once and include guards is a way to keep portability while still getting the performance advantage of

Re: [Mesa-dev] [PATCH] glcpp: Fix locations when encounting "#".

2016-03-09 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2016-03-08 at 19:09 -0800, Kenneth Graunke wrote: > We were failing to reset our location tracking when encountering a > NEWLINE in the state. Rip the code from the <*>{NEWLINE} rule, > which handles this properly. > > Also, upd

Re: [Mesa-dev] [PATCH] i965: Set a proper _BaseFormat for window system renderbuffers in ES.

2016-03-09 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2016-03-08 at 20:50 -0800, Kenneth Graunke wrote: > intel_alloc_private_renderbuffer_storage did: > >rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat); > > Unfortunately, internalFormat was usually an unsiz

Re: [Mesa-dev] Mesa include guard style. (Was: [PATCH] i965/cfg: Remove redundant #pragma once.)

2016-03-09 Thread Iago Toral
On Wed, 2016-03-09 at 19:04 -0800, Francisco Jerez wrote: > Matt Turner writes: > > > On Wed, Mar 9, 2016 at 1:37 PM, Francisco Jerez > > wrote: > >> Iago Toral writes: > >> > >>> On Tue, 2016-03-08 at 17:42 -0800, Francisco Jerez wrote: > &g

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-09 Thread Iago Toral
On Wed, 2016-03-09 at 18:31 +0200, Pohjolainen, Topi wrote: > On Wed, Mar 09, 2016 at 11:16:41AM +0100, Iago Toral wrote: > > On Wed, 2016-03-09 at 11:42 +0200, Pohjolainen, Topi wrote: > > > On Wed, Mar 09, 2016 at 11:05:17AM +0200, Pohjolainen, Topi wrote: > > > >

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-14 Thread Iago Toral
On Wed, 2016-03-09 at 09:54 +0200, Pohjolainen, Topi wrote: > On Mon, Mar 07, 2016 at 10:48:49AM +0100, Samuel Iglesias Gons?lvez wrote: > > Hello, > > > > There is only one patch from this series that has been reviewed (patch > > 1). > > > > Our plans is to start sending patches for adding fp64

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-14 Thread Iago Toral
On Mon, 2016-03-14 at 11:15 -0700, Mark Janes wrote: > Iago Toral writes: > > > On Wed, 2016-03-09 at 09:54 +0200, Pohjolainen, Topi wrote: > >> On Mon, Mar 07, 2016 at 10:48:49AM +0100, Samuel Iglesias Gons?lvez wrote: > >> > Hello, > >> > > &g

Re: [Mesa-dev] [PATCH 13/14] nir: propagate bitsize information in nir_search

2016-03-15 Thread Iago Toral
and nir_type_bool with variables. > - Fix bool comparisons in nir_search.c to account for bitsized > types. > > v3 (Sam): > - Unpack the double constant value as unsigned long long (8 > bytes) in > nir_algrebraic.py. >

Re: [Mesa-dev] [PATCH 0/9] Skip automatic execsize for instructions with a width of 4

2016-03-15 Thread Iago Toral
On Tue, 2016-03-15 at 11:04 +0200, Pohjolainen, Topi wrote: > On Tue, Mar 15, 2016 at 07:44:43AM +0100, Iago Toral wrote: > > On Mon, 2016-03-14 at 11:15 -0700, Mark Janes wrote: > > > Iago Toral writes: > > > > > > > On Wed, 2016-03-09 at 09:54 +0200, P

Re: [Mesa-dev] [PATCH 06/14] nir: handle different bit sizes when constant folding

2016-03-15 Thread Iago Toral
if defined (Iago) > > Signed-off-by: Iago Toral Quiroga > > FIXME: This should be squashed into the previous commit so we > don't break > the build. The break happens because the python script that > generates the >

Re: [Mesa-dev] [PATCH 06/14] nir: handle different bit sizes when constant folding

2016-03-15 Thread Iago Toral
t; v2: Use the bit-size information from the opcode information if defined > >> (Iago) > >> > >> Signed-off-by: Iago Toral Quiroga > >> > >> FIXME: This should be squashed into the previous commit so we don't break > >> the build. The b

Re: [Mesa-dev] [PATCH 06/14] nir: handle different bit sizes when constant folding

2016-03-16 Thread Iago Toral
On Tue, 2016-03-15 at 08:02 -0700, Jason Ekstrand wrote: > > On Mar 15, 2016 7:48 AM, "Connor Abbott" wrote: > > > > On Tue, Mar 15, 2016 at 10:43 AM, Connor Abbott > wrote: > > > On Tue, Mar 15, 2016 at 5:53 AM, Iago Toral > wrote: > > >

Re: [Mesa-dev] [PATCH 13/14] nir: propagate bitsize information in nir_search

2016-03-16 Thread Iago Toral
On Wed, 2016-03-16 at 09:48 +0100, Samuel Iglesias Gonsálvez wrote: > > On 15/03/16 08:41, Iago Toral wrote: > > On Mon, 2016-03-14 at 17:33 -0700, Jason Ekstrand wrote: > [...] > >> + nir_alu_type type; + union { - uint32_t u; - > >> int32_t i;

Re: [Mesa-dev] [PATCH 05/14] nir: update opcode definitions for different bit sizes

2016-03-16 Thread Iago Toral
On Mon, 2016-03-14 at 14:24 -0400, Connor Abbott wrote: > On Mon, Mar 14, 2016 at 2:10 PM, Jason Ekstrand wrote: (...) > >> > >> -opcode("ldexp", 0, tfloat, [0, 0], [tfloat, tint], "", """ > >> -dst = ldexpf(src0, src1); > >> +opcode("ldexp", 0, tfloat32, [0, 0], [tfloat32, tint32], "", """ > >> +

Re: [Mesa-dev] [PATCH] i965: Account for TES in is_drawing_points().

2016-03-18 Thread Iago Toral
_PRIMITIVE */ >return brw->primitive == _3DPRIM_POINTLIST; > @@ -484,6 +488,7 @@ const struct brw_tracked_state gen6_sf_state = { > BRW_NEW_FS_PROG_DATA | > BRW_NEW_GEOMETRY_PROGRAM | > BRW_NEW_PRIMITIVE | > + BRW_NEW_TE

Re: [Mesa-dev] [PATCH] doc: add 'vec4' option in INTEL_DEBUG

2016-03-18 Thread Iago Toral
each optimization pass > and iteration that make progress > + vec4 - force vec4 mode in vertex shader Reviewed-by: Iago Toral Quiroga > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 13/14] nir: propagate bitsize information in nir_search

2016-03-19 Thread Iago Toral
On Wed, 2016-03-16 at 10:54 -0700, Jason Ekstrand wrote: > > > On Wed, Mar 16, 2016 at 2:01 AM, Iago Toral wrote: > On Wed, 2016-03-16 at 09:48 +0100, Samuel Iglesias Gonsálvez > wrote: > > > > On 15/03/16 08:41, Iago Toral wrote: >

Re: [Mesa-dev] [PATCH] glsl: re-enable varying packing in GL4.4+

2016-05-25 Thread Iago Toral
On Thu, 2016-05-26 at 14:50 +1000, Timothy Arceri wrote: > The i965 backend currently expects doubles to be packed. This patch is: Reviewed-by: Iago Toral Quiroga With that said, I think these two patches from Samuel might have fixed i965 to handle unpacked doubles, or at least, some cases

Re: [Mesa-dev] [PATCH] nir: Use double-precision pow() when bit_size is 64, powf() otherwise

2016-05-26 Thread Iago Toral
On Thu, 2016-05-26 at 15:13 +0100, Emil Velikov wrote: > On 19 May 2016 at 10:00, Iago Toral wrote: > > I have just noticed that this was never pushed, right? I noticed this > > while working on providing double-precision implementation for the other > > functions di

Re: [Mesa-dev] [PATCH] i965: Fix isoline reads in scalar TES.

2016-06-01 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2016-05-31 at 22:45 -0700, Kenneth Graunke wrote: > Isolines aren't reversed. commit 5b2d8c2273c6f fixed this for the vec4 > TES backend, but not the scalar one. > > Found while debugging GL45-CTS.te

Re: [Mesa-dev] [PATCH] i965/xfb: skip components in correct buffer.

2016-06-01 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Wed, 2016-06-01 at 14:13 +1000, Dave Airlie wrote: > From: Dave Airlie > > The driver was adding the skip components but always for buffer 0. > > This fixes: > GL45-CTS.gtf40.GL3Tests.transform_feedback3.transform_feedback3_skip_multip

Re: [Mesa-dev] [PATCH 1/2] i965: Add _NEW_POINT to a couple of comments.

2016-06-02 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Wed, 2016-06-01 at 21:25 -0700, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > Cc: "12.0" > --- > src/mesa/drivers/dri/i965/gen6_sf_state.c | 2 +- > src/mesa/drivers/dri/i965/gen7_sf_state.c | 2 +- > src/mesa/drivers/

Re: [Mesa-dev] [PATCH] glsl: initialise pointer to NULL

2016-06-06 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Sat, 2016-06-04 at 01:09 +0200, Jakob Sinclair wrote: > Could cause issues if you tried to read from an uninitialised pointer. > This just initalises the pointer to null to avoid that being a problem. > Discovered by Coverity. > > CID: 1343616

Re: [Mesa-dev] [PATCH] glsl/ast: don't crash when func_name is NULL

2016-06-06 Thread Iago Toral
I guess this makes sense: Reviewed-by: Iago Toral Quiroga From: Dave Airlie > > This fixes a crash in > GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types > > If we can't find the func_name in one of these paths,

Re: [Mesa-dev] [PATCH] glsl: initialise pointer to NULL

2016-06-06 Thread Iago Toral
On Mon, 2016-06-06 at 16:45 +0200, Jakob Sinclair wrote: > On 2016-06-06 15:48, Iago Toral wrote: > > Reviewed-by: Iago Toral Quiroga > > > > I don't have push access so I would be very happy if you could push this > patch for me. Thanks! Sure,

Re: [Mesa-dev] [PATCH 1/5] mesa/subroutines: start adding per-context subroutine index support

2016-06-07 Thread Iago Toral
On Tue, 2016-06-07 at 15:25 +1000, Dave Airlie wrote: > From: Dave Airlie > > One piece of ARB_shader_subroutine I ignored was the fact that it > needs to store the subroutine index data per context and not per > shader program. > > There is one CTS test that tests this: > GL45-CTS.shader_subrou

Re: [Mesa-dev] [PATCH] i965/fs: Fix regs_written for SIMD-lowered instructions some more.

2016-06-14 Thread Iago Toral
On Fri, 2016-06-10 at 22:39 -0700, Francisco Jerez wrote: > ISTR having suggested this during review of the recent FP64 changes to > the SIMD lowering pass, but it doesn't look like it was taken into > account in the end. Using the fs_reg::component_size helper instead > of this open-coded variant

Re: [Mesa-dev] [PATCH] i965: move vs outputs written into a helper

2016-06-20 Thread Iago Toral
only amends the bitfield with some special outputs... maybe something like brw_vs_amend_outputs_written would be more accurate. What do you think? Either way: Reviewed-by: Iago Toral Quiroga > +{ > + if (key->copy_edgeflag) { > + outputs_written |= BITFIELD64_BIT(VARYING_SLOT

Re: [Mesa-dev] [PATCH] i965: get PrimitiveMode from the program rather than the shader struct

2016-06-20 Thread Iago Toral
On Mon, 2016-06-20 at 17:40 +1000, Timothy Arceri wrote: > This is more consitent with what we do elsewhere and will allow consistent Reviewed-by: Iago Toral Quiroga > us to only cache one of the values in the shader cache. > --- > src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH 18/27] i965: avoid int64 induced warnings

2016-06-20 Thread Iago Toral
Patches 18 and 18 are: Reviewed-by: Iago Toral Quiroga On Mon, 2016-06-20 at 15:07 +1000, Dave Airlie wrote: > From: Dave Airlie > > Just add types into unsupported or double > equivalent spots. > > Signed-off-by: Dave Airlie > --- > src/mesa/drivers/dri/i965/

Re: [Mesa-dev] [PATCH] glsl/mesa: stop duplicating tess layout values

2016-06-21 Thread Iago Toral
On Tue, 2016-06-21 at 12:21 +1000, Timothy Arceri wrote: > We already store this in gl_shader and gl_program here we > remove it from gl_shader_program and just use the values > from gl_shader. > > This will allow us to keep the shader cache restore code as > simple as it can be while making it so

Re: [Mesa-dev] [PATCH] glsl/mesa: stop duplicating tess layout values

2016-06-22 Thread Iago Toral
On Wed, 2016-06-22 at 09:54 +1000, Timothy Arceri wrote: > On Tue, 2016-06-21 at 17:45 +0200, Iago Toral wrote: > > On Tue, 2016-06-21 at 12:21 +1000, Timothy Arceri wrote: > > > > > > We already store this in gl_shader and gl_program here we > > > remove it

Re: [Mesa-dev] [PATCH] i965: move vs outputs written into a helper

2016-06-22 Thread Iago Toral
On Wed, 2016-06-22 at 11:34 +1000, Timothy Arceri wrote: > On Mon, 2016-06-20 at 17:38 +0200, Iago Toral wrote: > > On Mon, 2016-06-20 at 21:11 +1000, Timothy Arceri wrote: > > > > > > We will reuse this for fs key generation for the on disk shader > > > cach

Re: [Mesa-dev] [PATCH V2 1/2] glsl/mesa: stop duplicating tes layout values

2016-06-22 Thread Iago Toral
be while making it somewhat clearer where these > values originate from. > > V2: remove unessisary NULL check unnecessary > > Reviewed-by: Marek Olšák > Reviewed-by: Iago Toral > --- > src/compiler/glsl/linker.cpp | 4 > src/mesa/main/api_validate.c | 11 +++

Re: [Mesa-dev] [PATCH 2/2] glsl/mesa: stop duplicating geom and tcs layout values

2016-06-22 Thread Iago Toral
n/mtypes.h > index 168e2ae..0cd420e 100644 > --- a/src/mesa/main/mtypes.h > +++ b/src/mesa/main/mtypes.h > @@ -2718,17 +2718,6 @@ struct gl_shader_program > enum gl_frag_depth_layout FragDepthLayout; > > /** > -* Tessellation Control shader state from layout

Re: [Mesa-dev] [PATCH 1/2] i965: Make emit_urb_writes() not produce an EOT message for GS.

2016-06-27 Thread Iago Toral
/* For GS, just turn EmitVertex() into a no-op. */ Maybe it would be better to explain in this comment why we can do this safely here, which as you say would be because for GS we will send a send with EOT set at the end of the shader in any case. Both patches are: Reviewed-by: Iago Toral

Re: [Mesa-dev] [PATCH 4/7] glsl: pass symbols to find_matching_signature() rather than shader

2016-06-28 Thread Iago Toral
On Tue, 2016-06-28 at 11:52 +1000, Timothy Arceri wrote: > This will allow us to later split gl_shader into two structs. > --- > src/compiler/glsl/link_functions.cpp | 47 > +--- > 1 file changed, 22 insertions(+), 25 deletions(-) > > diff --git a/src/compiler/gls

Re: [Mesa-dev] Split gl_shader in two and clean-ups

2016-06-28 Thread Iago Toral
it is a good idea, thanks! I dropped a comment in patch 4, with that fixed patches 1-4 are: Reviewed-by: Iago Toral Quiroga I'll try to review the last 3 patches tomorrow. Iago > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop

Re: [Mesa-dev] [PATCH 5/7] glsl/mesa: split gl_shader in two

2016-06-29 Thread Iago Toral
On Tue, 2016-06-28 at 11:52 +1000, Timothy Arceri wrote: > There are two distinctly different uses of this struct. The first > is to store GL shader objects. The second is to store information > about a shader stage thats been linked. > > The two uses actually share few fields and there is clearly

Re: [Mesa-dev] [PATCH 5/7] glsl/mesa: split gl_shader in two

2016-06-29 Thread Iago Toral
On Tue, 2016-06-28 at 11:52 +1000, Timothy Arceri wrote: > There are two distinctly different uses of this struct. The first > is to store GL shader objects. The second is to store information > about a shader stage thats been linked. > > The two uses actually share few fields and there is clearly

Re: [Mesa-dev] [PATCH 07/11] i965: Move postprocess_nir to codegen time

2015-11-16 Thread Iago Toral
On Fri, 2015-11-13 at 07:34 -0800, Jason Ekstrand wrote: > > On Nov 13, 2015 5:53 AM, "Iago Toral" wrote: > > > > On Wed, 2015-11-11 at 17:26 -0800, Jason Ekstrand wrote: > > > --- > > > src/mesa/drivers/dri/i965/brw_fs.cpp | 11

Re: [Mesa-dev] [PATCH 11/11] i965: Use nir_lower_tex for texture coordinate lowering

2015-11-16 Thread Iago Toral
brw_nir_apply_sampler_key(shader, compiler->devinfo, &key->tex, true); This looks like it is part of the post-processing process. In fact, you call this right before brw_postprocess_nir() for every stage. Why not just add a key parameter to brw_postprocess_nir() and c

Re: [Mesa-dev] [PATCH 00/11] i965/nir: Do texture rectangle lowering in NIR

2015-11-16 Thread Iago Toral
On Wed, 2015-11-11 at 17:27 -0800, Jason Ekstrand wrote: > On Wed, Nov 11, 2015 at 5:23 PM, Jason Ekstrand wrote: > > On older hardware (Iron Lake and below), we can't support texture rectangle > > natively. Sandy Bridge through Haswell can support it but don't support > > the GL_CLAMP wrap mode

Re: [Mesa-dev] [PATCH 14/36] glsl ubo/ssbo: Use enum to track current buffer access type

2015-11-16 Thread Iago Toral
On Sat, 2015-11-14 at 13:43 -0800, Jordan Justen wrote: > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > --- > src/glsl/lower_ubo_reference.cpp | 26 +- > 1 file changed, 21 insertions(+), 5 deletions(-) >

Re: [Mesa-dev] [PATCH 15/36] glsl ubo/ssbo: Split buffer access to insert_buffer_access

2015-11-16 Thread Iago Toral
Looks good to me, Reviewed-by: Iago Toral Quiroga On Sat, 2015-11-14 at 13:43 -0800, Jordan Justen wrote: > This allows the code in emit_access to be generic enough to also be > for lowering shared variables. > > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez &

Re: [Mesa-dev] [PATCH 16/36] glsl ubo/ssbo: Add lower_buffer_access class

2015-11-16 Thread Iago Toral
c: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > --- > src/glsl/Makefile.sources| 1 + > src/glsl/lower_buffer_access.cpp | 307 > +++ > src/glsl/lower_buffer_access.h | 56 +++ > src/glsl/lower_ubo_reference.cpp | 180 +--

Re: [Mesa-dev] [PATCH 17/36] glsl ubo/ssbo: Move is_dereferenced_thing_row_major into lower_buffer_access

2015-11-16 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Sat, 2015-11-14 at 13:43 -0800, Jordan Justen wrote: > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > --- > src/glsl/lower_buffer_access.cpp | 90 > ++

Re: [Mesa-dev] [PATCH 18/36] glsl ubo/ssbo: Move common code into lower_buffer_access::setup_buffer_access

2015-11-16 Thread Iago Toral
ordan Justen > Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > --- > src/glsl/lower_buffer_access.cpp | 167 > +++ > src/glsl/lower_buffer_access.h | 5 ++ > src/glsl/lower_ubo_reference.cpp | 160 +-

Re: [Mesa-dev] [PATCH 11/11] i965: Use nir_lower_tex for texture coordinate lowering

2015-11-16 Thread Iago Toral
On Mon, 2015-11-16 at 11:33 +0100, Iago Toral wrote: > On Wed, 2015-11-11 at 17:26 -0800, Jason Ekstrand wrote: > > Previously, we had a rescale_texcoords helper in the FS backend for > > handling rescaling of texture coordinates. Now that we can do variants in > > NIR, we

Re: [Mesa-dev] [PATCH 31/36] glsl: Check for SSBO variable in SSBO atomic lowering

2015-11-16 Thread Iago Toral
On Sat, 2015-11-14 at 13:44 -0800, Jordan Justen wrote: > When an atomic function is called, we need to check to see if it is > for an SSBO variable before lowering it to the SSBO specific intrinsic > function. > > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez

Re: [Mesa-dev] [PATCH 30/36] glsl: Replace atomic_ssbo and ssbo_atomic with atomic

2015-11-16 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Sat, 2015-11-14 at 13:44 -0800, Jordan Justen wrote: > The atomic functions can also be used with shared variables in compute > shaders. > > When lowering the intrinsic in lower_ubo_reference, we still create an > SSBO specific intrinsic sinc

Re: [Mesa-dev] [PATCH 32/36] glsl: Translate atomic intrinsic functions on shared variables

2015-11-16 Thread Iago Toral
On Sat, 2015-11-14 at 13:44 -0800, Jordan Justen wrote: > When an intrinsic atomic operation is used on a shared variable, we > translate it to a new 'share variable' specific intrinsic function > call. > > For example, add call to __intrinsic_atomic_add when used on a shared > variable will be tr

Re: [Mesa-dev] [PATCH 32/36] glsl: Translate atomic intrinsic functions on shared variables

2015-11-16 Thread Iago Toral
hOn Sat, 2015-11-14 at 13:44 -0800, Jordan Justen wrote: > When an intrinsic atomic operation is used on a shared variable, we > translate it to a new 'share variable' specific intrinsic function > call. > > For example, add call to __intrinsic_atomic_add when used on a shared > variable will be t

Re: [Mesa-dev] [PATCH 16/36] glsl ubo/ssbo: Add lower_buffer_access class

2015-11-16 Thread Iago Toral
On Mon, 2015-11-16 at 17:52 -0800, Jordan Justen wrote: > On 2015-11-16 04:27:55, Iago Toral wrote: > > On Sat, 2015-11-14 at 13:43 -0800, Jordan Justen wrote: > > > This class has code that will be shared by lower_ubo_reference and > > > lower_shared_reference. (low

Re: [Mesa-dev] [PATCH 14/36] glsl ubo/ssbo: Use enum to track current buffer access type

2015-11-16 Thread Iago Toral
On Mon, 2015-11-16 at 16:50 -0800, Jordan Justen wrote: > On 2015-11-16 03:06:37, Iago Toral wrote: > > On Sat, 2015-11-14 at 13:43 -0800, Jordan Justen wrote: > > > Signed-off-by: Jordan Justen > > > Cc: Samuel Iglesias Gonsalvez > > > Cc: Iago Tora

Re: [Mesa-dev] [PATCH 07/11] i965: Move postprocess_nir to codegen time

2015-11-16 Thread Iago Toral
Hi Jason, On Mon, 2015-11-16 at 07:50 -0800, Jason Ekstrand wrote: > > On Nov 16, 2015 2:01 AM, "Iago Toral" wrote: > > > > On Fri, 2015-11-13 at 07:34 -0800, Jason Ekstrand wrote: > > > > > > On Nov 13, 2015 5:53 AM, "Iago Toral" wrote:

Re: [Mesa-dev] [PATCH 11/11] i965: Use nir_lower_tex for texture coordinate lowering

2015-11-16 Thread Iago Toral
On Mon, 2015-11-16 at 07:55 -0800, Jason Ekstrand wrote: > On Mon, Nov 16, 2015 at 6:27 AM, Iago Toral wrote: > > On Mon, 2015-11-16 at 11:33 +0100, Iago Toral wrote: > >> On Wed, 2015-11-11 at 17:26 -0800, Jason Ekstrand wrote: > >> > Previously, we had a resc

Re: [Mesa-dev] [PATCH 32/36] glsl: Translate atomic intrinsic functions on shared variables

2015-11-17 Thread Iago Toral
On Tue, 2015-11-17 at 01:30 -0800, Jordan Justen wrote: > On 2015-11-16 06:51:55, Iago Toral wrote: > > On Sat, 2015-11-14 at 13:44 -0800, Jordan Justen wrote: > > > When an intrinsic atomic operation is used on a shared variable, we > > > translate it to a new 'sh

Re: [Mesa-dev] [PATCH 32/36] glsl: Translate atomic intrinsic functions on shared variables

2015-11-17 Thread Iago Toral
On Tue, 2015-11-17 at 01:35 -0800, Jordan Justen wrote: > On 2015-11-16 07:27:10, Iago Toral wrote: > > hOn Sat, 2015-11-14 at 13:44 -0800, Jordan Justen wrote: > > > When an intrinsic atomic operation is used on a shared variable, we > > > translate it to a new 'sh

Re: [Mesa-dev] [PATCH] i965: Add missing stdio.h include to brw_compiler.h.

2015-11-17 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2015-11-17 at 01:38 -0800, Kenneth Graunke wrote: > This is needed for the FILE * type in brw_print_vue_map(). > > Apparently, all files that include brw_compiler.h already pick this up > via some include chain, so this isn't act

Re: [Mesa-dev] [PATCH v2 15/42] glsl ubo/ssbo: Use enum to track current buffer access type

2015-11-17 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2015-11-17 at 21:54 -0800, Jordan Justen wrote: > v2: > * Rename ssbo_get_array_length to ssbo_unsized_array_length_access (Iago) > * Use always use this-> when referencing buffer_access_type (Iago) > > Signed-off-by: Jordan Ju

Re: [Mesa-dev] [PATCH v2 17/42] glsl ubo/ssbo: Add lower_buffer_access class

2015-11-17 Thread Iago Toral
gt; Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > --- > src/glsl/Makefile.sources| 2 + > src/glsl/lower_buffer_access.cpp | 218 > +++ > src/glsl/lower_buffer_access.h | 55 ++ > src/glsl/lower_ubo_refer

Re: [Mesa-dev] [PATCH v2 19/42] glsl ubo/ssbo: Move common code into lower_buffer_access::setup_buffer_access

2015-11-18 Thread Iago Toral
t; * Add comment for lower_buffer_access::setup_buffer_access > > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > Reviewed-by: Iago Toral Quiroga > --- > src/glsl/lower_buffer_access.cpp | 177 > +++ >

Re: [Mesa-dev] [PATCH v2 20/42] glsl: Remove mem_ctx as member variable in lower_ubo_reference_visitor

2015-11-18 Thread Iago Toral
Reviewed-by:; Iago Toral Quiroga On Tue, 2015-11-17 at 21:54 -0800, Jordan Justen wrote: > Signed-off-by: Jordan Justen > Cc: Iago Toral Quiroga > --- > src/glsl/lower_ubo_reference.cpp | 64 > +--- > 1 file changed, 34 insertion

Re: [Mesa-dev] [PATCH v2 34/42] glsl: Check for SSBO variable in check_for_ssbo_store

2015-11-18 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2015-11-17 at 21:55 -0800, Jordan Justen wrote: > The compiler probably already blocks this earlier on, but we should be > checking for an SSBO here. > > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Qui

Re: [Mesa-dev] [PATCH v2 33/42] glsl: Check for SSBO variable in SSBO atomic lowering

2015-11-18 Thread Iago Toral
Iago) > > Signed-off-by: Jordan Justen > Cc: Samuel Iglesias Gonsalvez > Cc: Iago Toral Quiroga > Reviewed-by: Iago Toral Quiroga > --- > src/glsl/lower_ubo_reference.cpp | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/src/glsl/lower_ubo_

Re: [Mesa-dev] [PATCH 0/9] Early fp64 fixes

2015-11-19 Thread Iago Toral
On Thu, 2015-11-19 at 10:54 -0500, Connor Abbott wrote: > On Thu, Nov 19, 2015 at 5:05 AM, Iago Toral Quiroga wrote: > > These patches are fixes extracted from Connor's fp64 branch that > > I would like to review and land ahead of the rest. They are > > independent of th

Re: [Mesa-dev] [PATCH 0/9] Early fp64 fixes

2015-11-19 Thread Iago Toral
On Thu, 2015-11-19 at 12:19 -0800, Matt Turner wrote: > For the next patches you send from Connor, please use > --suppress-cc=author so that every reply doesn't generate a bounce > message about his disabled @intel email. :) > Yeah, will do :) Iago __

Re: [Mesa-dev] [PATCH 3/9] i965: fix 64-bit immediates in brw_inst(_set)_bits

2015-11-19 Thread Iago Toral
On Thu, 2015-11-19 at 12:08 -0800, Matt Turner wrote: > On Thu, Nov 19, 2015 at 11:35 AM, Kristian Høgsberg > wrote: > > On Thu, Nov 19, 2015 at 11:24 AM, Matt Turner wrote: > >> On Thu, Nov 19, 2015 at 9:30 AM, Kristian Høgsberg > >> wrote: > >>> O

Re: [Mesa-dev] [PATCH 2/9] i965/fs: print writemask_all when it's enabled

2015-11-19 Thread Iago Toral
On Thu, 2015-11-19 at 10:14 -0500, Connor Abbott wrote: > I think Ken already pushed a similar patch so we can drop this. I don't see that in master, but sure, we can hold this back if he is planning to push the same thing. Iago > On Thu, Nov 19, 2015 at 5:05 AM, Iago Toral Qui

Re: [Mesa-dev] [PATCH 0/9] Early fp64 fixes

2015-11-20 Thread Iago Toral
On Thu, 2015-11-19 at 11:05 +0100, Iago Toral Quiroga wrote: > These patches are fixes extracted from Connor's fp64 branch that > I would like to review and land ahead of the rest. They are > independent of the rest of the series, some of them are even > general fixes unrelated t

Re: [Mesa-dev] [PATCH 1/2] i965: Use ldexpf() in VF float test set up.

2015-11-20 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Thu, 2015-11-19 at 22:43 -0800, Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/test_vf_float_

Re: [Mesa-dev] [PATCH 2/2] i965: Test that nonrepresentable floats cannot be converted to VF.

2015-11-20 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Thu, 2015-11-19 at 22:43 -0800, Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cp

[Mesa-dev] Link failure when copying big arrays stored in SSBOs

2015-11-20 Thread Iago Toral
Hi, Jordan sent a piglit test that produces a link failure with the ssbo code [1]. Doing something like this is sufficient to reproduce the problem: [fragment shader] #version 330 #extension GL_ARB_shader_storage_buffer_object: require #define SIZE 6 layout (std430) buffer SSBO { mat4 m1[SI

Re: [Mesa-dev] Link failure when copying big arrays stored in SSBOs

2015-11-20 Thread Iago Toral
On Fri, 2015-11-20 at 13:07 +0100, Iago Toral wrote: > Hi, > > Jordan sent a piglit test that produces a link failure with the ssbo > code [1]. Doing something like this is sufficient to reproduce the > problem: > > [fragment shader] > #

Re: [Mesa-dev] [PATCH] glsl: split ssbo array copies into element copies

2015-11-23 Thread Iago Toral
On Fri, 2015-11-20 at 11:09 -0800, Jordan Justen wrote: > On 2015-11-20 06:48:27, Iago Toral Quiroga wrote: > > Improves register pressure, since otherwise we end up emitting > > loads for all the elements in the RHS and them emitting > > stores for all elements in the LH

Re: [Mesa-dev] [PATCH] i965: Use ull immediates in brw_inst_bits

2015-11-23 Thread Iago Toral
On Mon, 2015-11-23 at 14:03 -0800, Ian Romanick wrote: > On 11/23/2015 02:01 PM, Ian Romanick wrote: > > On 11/23/2015 10:54 AM, Jason Ekstrand wrote: > >> This fixes a regression introduced in b1a83b5d1 that caused basically all > >> shaders to fail to compile on 32-bit platforms. > > > > Here's

Re: [Mesa-dev] [PATCH] glsl: Pass ast_type_qualifier by const reference.

2015-11-24 Thread Iago Toral
gt; public: > ast_cs_input_layout(const struct YYLTYPE &locp, > - ast_layout_expression **local_size) > + ast_layout_expression *const *local_size) I think this change does not belong in this patch. Otherwise: Reviewed-b

Re: [Mesa-dev] [PATCH 1/4] glsl: remove trailing spaces in ast_to_hir.cpp

2015-11-24 Thread Iago Toral
On Tue, 2015-11-24 at 12:26 +, Emil Velikov wrote: > Hi Iago, > > I'm not sure how others feel on the topic, but imho it's not that > useful to have XX patches where each addresses a couple of lines of > whitespace issues. Squashing the lot per section (one for glsl, > another for i965) seems

Re: [Mesa-dev] [PATCH v2 22/42] glsl: Don't lower_variable_index_to_cond_assign for shared variables

2015-11-25 Thread Iago Toral
this->lower_uniforms; > > + case ir_var_shader_shared: > + return false; I suppose the right thing to do here is to add a lower_shared_variables parameter to this and take its value from a compiler option that we set to false, like we do with the other types, but I guess this is go

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