Re: [Mesa-dev] [PATCH] i965: Momentarily pretend to support ARB_texture_stencil8 for blits.

2015-06-10 Thread Jason Ekstrand
On Jun 10, 2015 9:57 AM, "Neil Roberts" wrote: > > Kenneth Graunke writes: > > > _mesa_meta_fb_tex_blit_begin(ctx, &blit); > > + ctx->Extensions.ARB_texture_stencil8 = true; > > Maybe you could put assert(ctx->Extensions.ARB_texture_stencil8==false) > just before setting it to true so that

Re: [Mesa-dev] [PATCH] i965/fs: Remove one more fixed brw_null_reg() from the visitor.

2015-06-10 Thread Jason Ekstrand
LGTM Reviewed-by: Jason Ekstrand On Jun 10, 2015 7:39 AM, "Francisco Jerez" wrote: > Instead use fs_builder::null_reg_f() which has the correct register > width. Avoids the assertion failure in fs_builder::emit() h

Re: [Mesa-dev] [PATCH] i965: Re-index SSA definitions before printing NIR code.

2015-06-11 Thread Jason Ekstrand
On Thu, Jun 11, 2015 at 8:12 AM, Connor Abbott wrote: > The one thing this will hurt is that diff'ing shaders from before and > after an optimization becomes harder, since just printing the shader > will re-order the numbers and add spurious changes. If we want to make > the result of doing INTEL_

Re: [Mesa-dev] [PATCH 2/2] i965: Delete linked GLSL IR when using NIR.

2015-06-11 Thread Jason Ekstrand
On Thu, Jun 11, 2015 at 12:41 AM, Tapani Pälli wrote: > This is based on Kenneth's patch to delete 'most of the IR'. Due to > linker changes to clone variables, we can now free all of IR. > > Saves 58MB of memory when replaying a Dota 2 trace on Broadwell. I think we've saved ~50 MB 3 times now o

Re: [Mesa-dev] [PATCH] i965: Don't create a temp PBO when uploading data from glTexImage*

2015-06-12 Thread Jason Ekstrand
On Fri, Jun 12, 2015 at 7:34 AM, Neil Roberts wrote: > Previously when glTexImage* is called it would attempt to create a > temporary PBO if the texture is busy in order to avoid blocking when > mapping the texture. This doesn't make much sense for glTexImage > because in that case we are complete

Re: [Mesa-dev] [PATCH 02/14] meta: Fix transfer operations check in meta pbo path for readpixels

2015-06-16 Thread Jason Ekstrand
On Jun 16, 2015 11:15 AM, "Anuj Phogat" wrote: > > Without this patch, arb_color_buffer_float-readpixels test fails, when > forced to use meta pbo path. > > Signed-off-by: Anuj Phogat > Cc: > --- > src/mesa/drivers/common/meta_tex_subimage.c | 10 ++ > 1 file changed, 6 insertions(+), 4

Re: [Mesa-dev] [PATCH 03/14] mesa: Fix conditions to test signed, unsigned integer format

2015-06-16 Thread Jason Ekstrand
Please note in the commit message exactly what is broken. On Jun 16, 2015 11:15, "Anuj Phogat" wrote: > Signed-off-by: Anuj Phogat > Cc: > --- > src/mesa/main/readpix.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c > index caa2648.

Re: [Mesa-dev] [PATCH 05/14] meta: Abort meta pbo path if readpixels need signed-unsigned conversion

2015-06-16 Thread Jason Ekstrand
On Jun 16, 2015 11:15, "Anuj Phogat" wrote: > > Without this patch, piglit test fbo_integer_readpixels_sint_uint fails, when > forced to use the meta pbo path. > > Signed-off-by: Anuj Phogat > Cc: > --- > src/mesa/drivers/common/meta_tex_subimage.c | 3 +++ > 1 file changed, 3 insertions(+) > >

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

2015-06-18 Thread Jason Ekstrand
Wow... Reviewed-by: Jason Ekstrand On Thu, Jun 18, 2015 at 4:19 PM, Matt Turner wrote: > 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 ++- >

Re: [Mesa-dev] New stable-branch 10.5 candidate pushed

2015-06-18 Thread Jason Ekstrand
> Any testing reports (or general approval of the state of the branch) > will be greatly appreciated. > > > Trivial merge conflicts > --- > commit bb00457f49177d8d43417855f843887de3148e99 > Author: Jason Ekstrand > > i965/fs: Don't let the EOT send messa

[Mesa-dev] [PATCH 04/17] i965/fs: Explicitly set the exec_size on the add(32) in interpolation setup

2015-06-18 Thread Jason Ekstrand
Soon we will start using the builder to explicitly set all the execution sizes. We could make a 32-wide builder, but the builder asserts that we never grow it which is usually a reasonable assumption. Sinc this one instruction is a bit of an odd-ball, we just set the exec_size explicitly. --- sr

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

2015-06-18 Thread Jason Ekstrand
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 one register. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 +

[Mesa-dev] [PATCH 05/17] i965/fs: Set the builder group for emitting FB-write stencil/AA alpha

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index b00825e..8a43ec8 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/s

[Mesa-dev] [PATCH 01/17] i965/fs: Use a switch statement in fs_inst::regs_read()

2015-06-18 Thread Jason Ekstrand
This makes things a little simpler, more efficient, and quite a bit more readable. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 45 ++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH 03/17] i965/fs: Report the right value in fs_inst::regs_read() for PIXEL_X/Y

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index ce56657..4f98d63 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -76

[Mesa-dev] [PATCH 09/17] i965/fs: Remove fs_inst constructors that don't take an explicit exec_size

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 30 ++ src/mesa/drivers/dri/i965/brw_fs_builder.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 6 -- src/mesa/drivers/dri/i965/brw_ir_fs.h | 9 + 4 files changed, 8 insertions(+), 39 deletions(

[Mesa-dev] [PATCH 08/17] i965/fs: Make better use of the builder in shader_time

2015-06-18 Thread Jason Ekstrand
Previously, we were just depending on register widths to ensure that various things were exec_size of 1 etc. Now, we do so explicitly using the builder. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH 12/17] i965/fs: Remove exec_size guessing from fs_inst::init()

2015-06-18 Thread Jason Ekstrand
Now that all of the non-explicit constructors are gone, we don't need to guess anymore. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 22 -- 1 file changed, 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index cff27e7..d9

[Mesa-dev] [PATCH 14/17] i965/fs_builder: Use dispatch_width instead of reg.width for offset and half

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_builder.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_builder.h b/src/mesa/drivers/dri/i965/brw_fs_builder.h index 7d3c8ab..58519d7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_builder.h +++ b/s

[Mesa-dev] [PATCH 15/17] i965/fs: Use exec_size instead of dst.width for computing component size

2015-06-18 Thread Jason Ekstrand
There are a variety of places where we use dst.width / 8 to compute the size of a single logical channel. Instead, we should be using exec_size. --- src/mesa/drivers/dri/i965/brw_fs.cpp| 6 +++--- src/mesa/drivers/dri/i965/brw_fs_cse.cpp| 2 +- src/mesa/drivers

[Mesa-dev] [PATCH 10/17] i965/fs: Use exec_size for determining regs read/written and partial writes

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 61235d7..cff27e7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 13/17] i965/fs: Use the builder dispatch width instead of dst.width for pull constants

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d9b7f75..b889432 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 07/17] i965/fs: Move offset() and half() to the fs_builder

2015-06-18 Thread Jason Ekstrand
We want to move these into the builder so that they know the current builder's dispatch width. This will be needed by a later commit. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 52 ++ src/mesa/drivers/dri/i965/brw_fs_builder.h | 46 + src/mesa/drivers/dri/i965/brw_fs_c

[Mesa-dev] [PATCH 11/17] i965/fs_builder: Use the dispatch width for setting exec sizes

2015-06-18 Thread Jason Ekstrand
Previously we used dst.width but the two *should* be the same. --- src/mesa/drivers/dri/i965/brw_fs_builder.h | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_builder.h b/src/mesa/drivers/dri/i965/brw_fs_builder.h index 74f

[Mesa-dev] [PATCH 06/17] i965/blorp: Explicitly set execution sizes for new'd instructions

2015-06-18 Thread Jason Ekstrand
This doesn't affect instructions allocated using the builder. --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp index c1

[Mesa-dev] [PATCH 17/17] i965/fs: Remove the width field from fs_reg

2015-06-18 Thread Jason Ekstrand
As of now, the width field is no longer used for anything. The width field "seemed like a good idea at the time" but is actually entirely redundant with the instruction's execution size. Initially, it gave us the ability to easily set the instructions execution size based entirely on register wid

[Mesa-dev] [PATCH 16/17] i965/fs_generator: Use inst->exec_size for determining hardware reg widths

2015-06-18 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 8eb3ace..2b66acf 100644 --- a/src/mesa/drivers/dri/i965/brw_f

Re: [Mesa-dev] [PATCH 04/17] i965/fs: Explicitly set the exec_size on the add(32) in interpolation setup

2015-06-19 Thread Jason Ekstrand
On Jun 19, 2015 5:09 AM, "Iago Toral" wrote: > > On Thu, 2015-06-18 at 17:50 -0700, Jason Ekstrand wrote: > > Soon we will start using the builder to explicitly set all the execution > > sizes. We could make a 32-wide builder, but the builder asserts that we > >

[Mesa-dev] [PATCH v2 04/17] i965/fs: Explicitly set the exec_size on the add(32) in interpolation setup

2015-06-19 Thread Jason Ekstrand
Soon we will start using the builder to explicitly set all the execution sizes. We could make a 32-wide builder, but the builder asserts that we never grow it which is usually a reasonable assumption. Sinc this one instruction is a bit of an odd-ball, we just set the exec_size explicitly. v2: Ex

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

2015-06-19 Thread Jason Ekstrand
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 one register. Reviewed-by: Iago Toral Quiroga v2: Use mlen for

[Mesa-dev] [PATCH 01.9/18] i965/fs: Actually set/use the mlen for gen7 uniform pull constant loads

2015-06-19 Thread Jason Ekstrand
Previously, we were allocating the payload with different sizes per gen and then figuring out the mlen in the generator based on gen. This meant, among other things, that the higher level passes knew nothing about it. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 +- src/mes

Re: [Mesa-dev] [PATCH 05/14] meta: Abort meta pbo path if readpixels need signed-unsigned conversion

2015-06-19 Thread Jason Ekstrand
On Fri, Jun 19, 2015 at 1:40 PM, Anuj Phogat wrote: > On Tue, Jun 16, 2015 at 9:21 PM, Jason Ekstrand wrote: >> >> On Jun 16, 2015 11:15, "Anuj Phogat" wrote: >>> >>> Without this patch, piglit test fbo_integer_readpixels_sint_uint fails, &

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

2015-06-19 Thread Jason Ekstrand
On Fri, Jun 19, 2015 at 1:51 PM, Matt Turner wrote: > 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 >> SI

[Mesa-dev] [PATCH 00/16] i965: Finish removing brw_context from the compiler

2015-06-22 Thread Jason Ekstrand
I started working on this project some time ago to remove brw_context from the backend compiler. I got a bunch of refactoring done but eventualy got stuck up on shader_time and some debug logging stuff. I've finally gotten around to finishing it and here it is. Jason Ekstrand (15):

[Mesa-dev] [PATCH 02/16] mesa: Add a va_args variant of _mesa_gl_debug().

2015-06-22 Thread Jason Ekstrand
From: Kenneth Graunke This will be useful for wrapper functions. Signed-off-by: Kenneth Graunke --- src/mesa/main/errors.c | 29 + src/mesa/main/errors.h | 9 + 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mes

[Mesa-dev] [PATCH 04/16] i965: Remove the dependance on brw_context from the generators

2015-06-22 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 2 +- src/mesa/drivers/dri/i965/brw_cs.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs.h| 4 +++- src/mesa/drivers/dri/i965/brw_fs_generator.cpp| 5 +++--

[Mesa-dev] [PATCH 10/16] i965: Use a single index per shader for shader_time.

2015-06-22 Thread Jason Ekstrand
Previously, each shader took 3 shader time indices which were potentially at arbirary points in the shader time buffer. Now, each shader gets a single index which refers to 3 consecutive locations in the buffer. This simplifies some of the logic at the cost of having a magic 3 a few places. ---

[Mesa-dev] [PATCH 14/16] i965/vec4: Turn some _mesa_problem calls into asserts

2015-06-22 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_vec4_vp.cpp | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp index 92d1085..dcbd240 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp +++ b/src/

[Mesa-dev] [PATCH 11/16] i965: Pull calls to get_shader_time_index out of the visitor

2015-06-22 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_cs.cpp | 8 +++- src/mesa/drivers/dri/i965/brw_fs.cpp | 55 --- src/mesa/drivers/dri/i965/brw_fs.h| 7 ++- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 ++- src/mesa/drivers/dri/i965/brw_vec

[Mesa-dev] [PATCH 01/16] i965: Replace some instances of brw->gen with devinfo->gen

2015-06-22 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 5563c5a..ac65202 100644 --- a/src/

[Mesa-dev] [PATCH 13/16] i965/vs: Pass the current set of clip planes through run() and run_vs()

2015-06-22 Thread Jason Ekstrand
Previously, these were pulled out of the GL context conditionally based on whether we were running ff/ARB or a GLSL program. Now, we just pass them in so that the visitor doesn't have to grab them itself. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++-- src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH 09/16] i965: Add compiler options to brw_compiler

2015-06-22 Thread Jason Ekstrand
This creates the options at screen cration time and then we just copy them into the context at context creation time. We also move is_scalar to the brw_compiler structure. We also end up manually setting some values that the core would have set by default for us. Fortunately, there are only two

[Mesa-dev] [PATCH 07/16] i965/fs: Do the no16 perf logging directly in fs_visitor::no16()

2015-06-22 Thread Jason Ekstrand
While we're at it, we'll drop the note about 10-20% performance loss. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index a9d9f37..40e2c44 1006

[Mesa-dev] [PATCH 15/16] i965/vec4_vs: Add an explicit use_legacy_snorm_formula flag

2015-06-22 Thread Jason Ekstrand
This way we can stop doing is_gles3 checks inside of the compiler. --- src/mesa/drivers/dri/i965/brw_vec4.cpp| 4 +++- src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp | 9 + src/mesa/drivers/dri/i965/brw_vs.h| 5 - 3 files changed, 12 insertions(+), 6 dele

[Mesa-dev] [PATCH 03/16] i965: Plumb compiler debug logging through a function pointer in brw_compiler

2015-06-22 Thread Jason Ekstrand
v2 (Ken): Make shader_debug_log a printf-like function. v3 (Jason): Add a void * to pass the brw_context through --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 3 ++- src/mesa/drivers/dri/i965/brw_cs.cpp | 3 ++- src/mesa/drivers/dri/i965/brw_fs.cpp | 3 ++- s

[Mesa-dev] [PATCH 08/16] i965/fs: Plumb compiler debug logging through brw_compiler

2015-06-22 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 13 + src/mesa/drivers/dri/i965/brw_shader.cpp | 26 ++ src/mesa/drivers/dri/i965/brw_shader.h | 1 + 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/me

[Mesa-dev] [PATCH 05/16] i965: Move INTEL_DEBUG variable parsing to screen creation time

2015-06-22 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_context.c | 10 +- src/mesa/drivers/dri/i965/intel_debug.c | 13 ++--- src/mesa/drivers/dri/i965/intel_debug.h | 4 ++-- src/mesa/drivers/dri/i965/intel_screen.c | 2 ++ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 06/16] i965/fs: Make no16 non-variadic

2015-06-22 Thread Jason Ekstrand
We never used the fact that it was variadic anyway. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 -- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.c

[Mesa-dev] [PATCH 16/16] i965: Remove the brw_context from the visitors

2015-06-22 Thread Jason Ekstrand
As of this commit, nothing actually needs the brw_context. --- src/mesa/drivers/dri/i965/brw_cs.cpp| 6 -- src/mesa/drivers/dri/i965/brw_fs.cpp| 12 ++-- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_reg_a

[Mesa-dev] [PATCH 12/16] i965/fs: Add a do_rep_send flag to run_fs

2015-06-22 Thread Jason Ekstrand
Previously, we were pulling it from brw->do_rep_send --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9 + src/mesa/drivers/dri/i965/brw_fs.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp inde

Re: [Mesa-dev] [PATCH 07/17] i965/fs: Move offset() and half() to the fs_builder

2015-06-23 Thread Jason Ekstrand
On Tue, Jun 23, 2015 at 9:22 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> We want to move these into the builder so that they know the current >> builder's dispatch width. This will be needed by a later commit. > > I very much like the idea of this se

Re: [Mesa-dev] [PATCH 07/17] i965/fs: Move offset() and half() to the fs_builder

2015-06-23 Thread Jason Ekstrand
On Tue, Jun 23, 2015 at 1:39 AM, Pohjolainen, Topi wrote: > On Thu, Jun 18, 2015 at 05:51:36PM -0700, Jason Ekstrand wrote: >> We want to move these into the builder so that they know the current >> builder's dispatch width. This will be needed by a later commit. >> --

[Mesa-dev] [PATCH] i965/fs: Get rid of an unused variable in emit_barrier()

2015-06-23 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index ea29341..9a4bad6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++

Re: [Mesa-dev] [PATCH 07/17] i965/fs: Move offset() and half() to the fs_builder

2015-06-24 Thread Jason Ekstrand
On Wed, Jun 24, 2015 at 6:44 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Jun 24, 2015 6:29 AM, "Francisco Jerez" wrote: >>> >>> Jason Ekstrand writes: >>> >>> > On Jun 24, 2015 4:29 AM, "Francisco Jerez"

Re: [Mesa-dev] [PATCH 07/17] i965/fs: Move offset() and half() to the fs_builder

2015-06-24 Thread Jason Ekstrand
On Wed, Jun 24, 2015 at 7:56 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Wed, Jun 24, 2015 at 6:44 AM, Francisco Jerez >> wrote: >>> Jason Ekstrand writes: >>> >>>> On Jun 24, 2015 6:29 AM, "Francisco Jerez" wrote: &

Re: [Mesa-dev] ARB_arrays_of_arrays GLSL ES

2015-06-24 Thread Jason Ekstrand
On Sat, Jun 20, 2015 at 5:32 AM, Timothy Arceri wrote: > Hi all, > > The restrictions in ES make the extension easier to implement so > I thought I'd try get this stuff reviewed an committed before finishing > up the full extension. > The bits that I'm still working on for the desktop version are

Re: [Mesa-dev] [PATCH 07/17] i965/fs: Move offset() and half() to the fs_builder

2015-06-24 Thread Jason Ekstrand
On Jun 24, 2015 4:29 AM, "Francisco Jerez" wrote: > > Jason Ekstrand writes: > > > On Tue, Jun 23, 2015 at 9:22 AM, Francisco Jerez wrote: > >> Jason Ekstrand writes: > >> > >>> We want to move these into the builder so that they know th

Re: [Mesa-dev] [PATCH v2 05/14] meta: Abort meta pbo path if readpixels need signed-unsigned conversion

2015-06-24 Thread Jason Ekstrand
to use the meta pbo path. > > v2: Make need_rgb_to_luminance_conversion() a static function. (Iago) > Bump up the comment and the commit message. (Jason) > > Signed-off-by: Anuj Phogat > Reviewed-by: Jason Ekstrand > Cc: Iago Toral > Cc: > --- >

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

2015-06-25 Thread Jason Ekstrand
From Muchnick's Advanced Compiler Design and Implementation: "To determine which variables are live at each point in a flowgraph, we perform a backward data-flow analysis" Previously, we were walking the blocks forwards and updating the livein and then the liveout. However, the livein calculatio

Re: [Mesa-dev] ARB_arrays_of_arrays GLSL ES

2015-06-25 Thread Jason Ekstrand
On Thu, Jun 25, 2015 at 1:19 AM, Timothy Arceri wrote: > On Wed, 2015-06-24 at 11:17 -0700, Jason Ekstrand wrote: >> On Sat, Jun 20, 2015 at 5:32 AM, Timothy Arceri < >> t_arc...@yahoo.com.au> wrote: >> > Hi all, >> > >> > The restrictions in ES

Re: [Mesa-dev] [PATCH 08/17] i965/fs: Make better use of the builder in shader_time

2015-06-25 Thread Jason Ekstrand
On Tue, Jun 23, 2015 at 2:09 AM, Pohjolainen, Topi wrote: > On Thu, Jun 18, 2015 at 05:51:37PM -0700, Jason Ekstrand wrote: >> Previously, we were just depending on register widths to ensure that >> various things were exec_size of 1 etc. Now, we do so explicitly using

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

2015-06-25 Thread Jason Ekstrand
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 one register. Reviewed-by: Iago Toral Quiroga v2: Use mlen for

[Mesa-dev] [PATCH v2 07/19] i965/blorp: Explicitly set execution sizes for new'd instructions

2015-06-25 Thread Jason Ekstrand
This doesn't affect instructions allocated using the builder. Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_e

[Mesa-dev] [PATCH v2 06/19] i965/fs: Set the builder group for emitting FB-write stencil/AA alpha

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 8976c25..2341d02 1

[Mesa-dev] [PATCH v2 00/19] i965/fs: Remove the width field from fs_reg

2015-06-25 Thread Jason Ekstrand
ivial. 09: New. This is a complete replacement of patch 07 from the previous series. Cc: Topi Pohjolainen Cc: Iago Toral Quiroga Cc: Francisco Jerez Cc: Neil Roberts Jason Ekstrand (19): i965/fs: Use a switch statement in fs_inst::regs_read() i965/fs: Actually set/use the mlen for ge

[Mesa-dev] [PATCH v2 11/19] i965/fs: Remove fs_inst constructors that don't take an explicit exec_size

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 30 ++ src/mesa/drivers/dri/i965/brw_fs_builder.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 6 -- src/mesa/drivers/dri/i965/brw_ir_fs.h | 9 + 4 files changed,

[Mesa-dev] [PATCH v2 09/19] i965/fs: Add a builder argument to offset()

2015-06-25 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 42 src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 58 +-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 143

[Mesa-dev] [PATCH v2 08/19] i965/fs: Move offset(fs_reg, unsigned) to brw_fs.h

2015-06-25 Thread Jason Ekstrand
Shortly, offset() will depend on the builder so we need it moved to some place where it has access to that. --- src/mesa/drivers/dri/i965/brw_fs.h| 21 + src/mesa/drivers/dri/i965/brw_ir_fs.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) di

[Mesa-dev] [PATCH v2 02/19] i965/fs: Actually set/use the mlen for gen7 uniform pull constant loads

2015-06-25 Thread Jason Ekstrand
Previously, we were allocating the payload with different sizes per gen and then figuring out the mlen in the generator based on gen. This meant, among other things, that the higher level passes knew nothing about it. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 19 --- sr

[Mesa-dev] [PATCH v2 05/19] i965/fs: Explicitly set the exec_size on the add(32) in interpolation setup

2015-06-25 Thread Jason Ekstrand
Soon we will start using the builder to explicitly set all the execution sizes. We could make a 32-wide builder, but the builder asserts that we never grow it which is usually a reasonable assumption. Sinc this one instruction is a bit of an odd-ball, we just set the exec_size explicitly. Review

[Mesa-dev] [PATCH v2 10/19] i965/fs: Make better use of the builder in shader_time

2015-06-25 Thread Jason Ekstrand
Previously, we were just depending on register widths to ensure that various things were exec_size of 1 etc. Now, we do so explicitly using the builder. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[Mesa-dev] [PATCH v2 12/19] i965/fs: Use exec_size for determining regs read/written and partial writes

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d1e253a..4f56865 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH v2 04/19] i965/fs: Report the right value in fs_inst::regs_read() for PIXEL_X/Y

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 589b74c..6cf9e96 100644 --- a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH v2 01/19] i965/fs: Use a switch statement in fs_inst::regs_read()

2015-06-25 Thread Jason Ekstrand
This makes things a little simpler, more efficient, and quite a bit more readable. Reviewed-by: Iago Toral Quiroga Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 45 ++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/sr

[Mesa-dev] [PATCH v2 17/19] i965/fs: Use exec_size instead of dst.width for computing component size

2015-06-25 Thread Jason Ekstrand
There are a variety of places where we use dst.width / 8 to compute the size of a single logical channel. Instead, we should be using exec_size. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp| 6 +++--- src/mesa/drivers/dri/i965/brw_fs_cse.cpp

[Mesa-dev] [PATCH v2 13/19] i965/fs_builder: Use the dispatch width for setting exec sizes

2015-06-25 Thread Jason Ekstrand
Previously we used dst.width but the two *should* be the same. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs_builder.h | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_builder.h b/src/mesa/drivers/dri

[Mesa-dev] [PATCH v2 15/19] i965/fs: Use the builder dispatch width instead of dst.width for pull constants

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 6e45fa7..aeaa1c4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH v2 19/19] i965/fs: Remove the width field from fs_reg

2015-06-25 Thread Jason Ekstrand
As of now, the width field is no longer used for anything. The width field "seemed like a good idea at the time" but is actually entirely redundant with the instruction's execution size. Initially, it gave us the ability to easily set the instructions execution size based entirely on register wid

[Mesa-dev] [PATCH v2 14/19] i965/fs: Remove exec_size guessing from fs_inst::init()

2015-06-25 Thread Jason Ekstrand
Now that all of the non-explicit constructors are gone, we don't need to guess anymore. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 22 -- 1 file changed, 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH v2 18/19] i965/fs_generator: Use inst->exec_size for determining hardware reg widths

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 8d821ab..0a70bdc 100644 --- a/

[Mesa-dev] [PATCH v2 16/19] i965/fs: Use the builder dispatch_width for computing register offsets

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index d4cc43d..d94a842 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/d

Re: [Mesa-dev] [PATCH 1/4] nir/from_ssa: add a flag to not convert everything to SSA

2015-06-25 Thread Jason Ekstrand
l convert_everything); I don't think "convert everything" is really what we want to call it. A better idea might be to flip the bool and call it phi_webs_only. With that changed, Reviewed-by: Jason Ekstrand > > bool nir_opt_algebraic(nir_shader *shader); > bool ni

Re: [Mesa-dev] [PATCH 3/4] nir: remove nir_src_get_parent_instr()

2015-06-25 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: > It's now unused. > > Signed-off-by: Connor Abbott > --- > src/glsl/nir/nir.h | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/src/glsl/nir/nir.h b/src/g

Re: [Mesa-dev] [PATCH 4/4] nir: remove parent_instr from nir_register

2015-06-25 Thread Jason Ekstrand
Yes, please! It was nice at the time, but it was always a hack. Reviewed-by: Jason Ekstrand On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott wrote: > It's no longer used > > Signed-off-by: Connor Abbott > --- > src/glsl/nir/nir.c | 1 - > src/glsl

Re: [Mesa-dev] [PATCH 2/4] i965/fs: use SSA values directly

2015-06-25 Thread Jason Ekstrand
->parent_instr->type == nir_instr_type_load_const); > - nir_load_const_instr *load = > nir_instr_as_load_const(src.ssa->parent_instr); > - fs_reg reg = bld.vgrf(BRW_REGISTER_TYPE_D, src.ssa->num_components); > - > - for (unsigned i = 0; i < src.ssa->nu

Re: [Mesa-dev] [PATCH 0/4] i965: use SSA values when we can

2015-06-25 Thread Jason Ekstrand
And, you got some shader-db stats: total instructions in shared programs: 6078991 -> 6073118 (-0.10%) instructions in affected programs: 402221 -> 396348 (-1.46%) helped:1527 HURT: 0 GAINED:8 LOST:

[Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
In C, if you partially initialize a structure, the rest of the struct gets set to 0. C++, however, does not have this rule so GCC throws warnings whenver NIR_SRC_INIT or NIR_DEST_INIT is used in C++. Since nir.h contains a static inline that uses NIR_SRC_INIT, every C++ file that includes nir.h c

Re: [Mesa-dev] [PATCH v2 16/19] i965/fs: Use the builder dispatch_width for computing register offsets

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 8:52 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> Reviewed-by: Topi Pohjolainen >> --- >> src/mesa/drivers/dri/i965/brw_fs.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/mesa/driver

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> In C, if you partially initialize a structure, the rest of the struct gets >> set to 0. C++, however, does not have this rule so GCC throws warnings >> whenver NIR_SRC_INIT or NI

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 3:03 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez >> wrote: >>> Jason Ekstrand writes: >>> >>>> In C, if you partially initialize a structure, the rest of th

Re: [Mesa-dev] [PATCH] i965/vs: Move compute_clip_distance() out of emit_urb_writes().

2015-06-26 Thread Jason Ekstrand
struct brw_vue_prog_key *) this->key; > > + /* Bail unless some sort of legacy clipping is enabled */ > + if (!key->userclip_active || prog->UsesClipDistanceOut) > + return; > + Any reason why you changed this from a conditional call to compute_clip_distance to a

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 3:34 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Fri, Jun 26, 2015 at 3:03 PM, Francisco Jerez >> wrote: >>> Jason Ekstrand writes: >>> >>>> On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez >>>

Re: [Mesa-dev] [PATCH 7/7] nir: cleanup open-coded instruction casts

2015-06-27 Thread Jason Ekstrand
Thanks! R-B me On Jun 27, 2015 7:57 AM, "Rob Clark" wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > src/glsl/nir/nir_lower_alu_to_scalar.c | 2 +- > src/glsl/nir/nir_lower_vec_to_movs.c | 2 +- > src/glsl/nir/nir_search.c | 2 +- > 3 files changed, 3 insertions(+)

Re: [Mesa-dev] [PATCH 02/78] i965/nir/vec4: Select between new nir_vec4 or current vec4_visitor code-paths

2015-06-29 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: > The NIR->vec4 pass will be activated if ALL the following conditions are met: > > * INTEL_USE_NIR environment variable is defined and is positive (1 or true) > * The stage is vertex shader > * The HW generation is either SandyBridge (gen

Re: [Mesa-dev] [PATCH 02/78] i965/nir/vec4: Select between new nir_vec4 or current vec4_visitor code-paths

2015-06-29 Thread Jason Ekstrand
On Mon, Jun 29, 2015 at 2:49 PM, Eduardo Lima Mitev wrote: > On 06/29/2015 11:22 PM, Jason Ekstrand wrote: >> On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: >>> The NIR->vec4 pass will be activated if ALL the following conditions are >>> met: >&

Re: [Mesa-dev] [PATCH 04/78] i965/nir/vec4: Add setup of input variables in NIR->vec4 pass

2015-06-29 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: > This implementation sets up a map of input variable offsets to source > registers > that are already initialized with the corresponding register offset. > > This map will then be queried when processing load_input intrinsic operations,

Re: [Mesa-dev] [PATCH 06/78] i965/nir/vec4: Add setup of uniform variables

2015-06-29 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: > From: Iago Toral Quiroga > > This is based on similar code existing in vec4_visitor. It builds the > uniform register file iterating through each uniform variable. It > also stores the index of each register at the corresponding offset

Re: [Mesa-dev] [PATCH 07/78] i965/vec4: Overload make_reg_for_system_value() to allow reuse in NIR->vec4 pass

2015-06-29 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: > From: Alejandro Piñeiro > > The new virtual method is more flexible, it has a signature: > > dst_reg *make_reg_for_system_value(int location, const glsl_type *type); > > so the current method will be chained through this one. I just gr

Re: [Mesa-dev] [PATCH 00/78] i965: A new vec4 backend based on NIR

2015-06-29 Thread Jason Ekstrand
Good work guys! I've started reviewing but review will probably take a few days so please be patient. On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: > Hello, > > This series adds a new vec4 backend for i965 based on NIR. It is the result > of working on > https://bugs.freedesktop.o

Re: [Mesa-dev] [PATCH 08/78] i965/nir/vec4: Add setup for system values

2015-06-29 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: > From: Alejandro Piñeiro > > Similar to other variable setups, system values will initialize the > corresponding register inside a 'nir_system_values' map, which will then > be queried later when processing the different system value int

  1   2   3   4   5   6   7   8   9   10   >