Re: [Mesa-dev] [PATCH 1/4] i965: Split out brw__populate_key into their own functions

2015-03-20 Thread Carl Worth
On Fri, Mar 20 2015, Ian Romanick wrote: >> +brw_gs_populate_key(struct brw_context *brw, >> +struct brw_gs_prog_key *key) > > Tabs. There may be some in other places too. Thunderbird's editor > isn't "too smart" to be able to search for tabs... it matches any > whitespace. Sorry

Re: [Mesa-dev] [PATCH 3/4] i965: Rename do__prog to brw__compile

2015-03-20 Thread Carl Worth
On Fri, Mar 20 2015, Chris Forbes wrote: > I think that having both the existing `struct brw_vs_compile` and a > function with the same name is going to cause confusion. (same with > the other non-fs stages) In an earlier version of the patch I had brw_vs_do_compile, (there is a "do" precedent in

Re: [Mesa-dev] [PATCH 3/3] radeonsi/compute: Default to the same PIPE_SHADER_CAP values as other shader types

2015-03-20 Thread Laurent Carlier
Le samedi 21 mars 2015, 00:35:08 Tom Stellard a écrit : > --- > src/gallium/drivers/radeonsi/si_pipe.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/radeonsi/si_pipe.c > b/src/gallium/drivers/radeonsi/si_pipe.c index f1a5388..545c156 100644 > --

Re: [Mesa-dev] [PATCH 2/3] clover: Add all the mandatory 1.1 extensions to the extension string

2015-03-20 Thread Jan Vesely
On Sat, 2015-03-21 at 00:35 +, Tom Stellard wrote: > --- > src/gallium/state_trackers/clover/api/device.cpp | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/api/device.cpp > b/src/gallium/state_trackers/clover/api/device.cpp >

Re: [Mesa-dev] [PATCH 1/3] clover: Add a space at the end of CL_DEVICE_OPENCL_C_VERSION

2015-03-20 Thread Jan Vesely
On Sat, 2015-03-21 at 00:35 +, Tom Stellard wrote: > This is required by the spec. > --- > src/gallium/state_trackers/clover/api/device.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/api/device.cpp > b/src/gallium/state_trackers

Re: [Mesa-dev] [PATCH] clover: The unit for CL_DEVICE_MEM_BASE_ADDR_ALIGN is bits not bytes

2015-03-20 Thread Jan Vesely
On Sat, 2015-03-21 at 02:08 +, Tom Stellard wrote: > --- > src/gallium/state_trackers/clover/api/device.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/gallium/state_trackers/clover/api/device.cpp > b/src/gallium/state_trackers/clover/api/device.cpp > index 43e7475..bc93f

Re: [Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set

2015-03-20 Thread Jan Vesely
On Fri, 2015-03-20 at 23:29 +, Tom Stellard wrote: > The storage size for local kernel args can be queried before the > arguments are set by using the CL_KERNEL_LOCAL_MEM_SIZE param > of clGetKernelWorkGroupInfo(). > > The spec says that if local kernel arguments have not been specified, > the

[Mesa-dev] [Bug 89689] [Regression] Weston on DRM backend won't start with new version of mesa

2015-03-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89689 --- Comment #3 from Boyan Ding --- Created attachment 114500 --> https://bugs.freedesktop.org/attachment.cgi?id=114500&action=edit dri/i965: Add XRGB to dri config I hacked the i965 driver and wrote this patch. After applying this to mesa,

[Mesa-dev] [Bug 89689] [Regression] Weston on DRM backend won't start with new version of mesa

2015-03-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89689 --- Comment #2 from Boyan Ding --- It seems that commit 65c8965d is doing nothing wrong and the problem lies in the i965 dri driver. The function intel_screen_make_config in src/mesa/drivers/dri/i965/intel_screen.c only adds ARGB and RGB565

[Mesa-dev] [PATCH] clover: The unit for CL_DEVICE_MEM_BASE_ADDR_ALIGN is bits not bytes

2015-03-20 Thread Tom Stellard
--- src/gallium/state_trackers/clover/api/device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 43e7475..bc93f91 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++

Re: [Mesa-dev] [PATCH 09/23] glsl: Distribute multiply over b2f

2015-03-20 Thread Ian Romanick
On 03/20/2015 01:58 PM, Ian Romanick wrote: > From: Ian Romanick > > Convert cases like (x * bool(b)) to 'mix(0, x, b)'. > > Note: This may hurt the code generated for GPUs that represent Boolean > values using floating point. shader-db doesn't play well with i915, so > I haven't been able to c

Re: [Mesa-dev] [PATCH 3/4] i965: Rename do__prog to brw__compile

2015-03-20 Thread Ian Romanick
On 03/20/2015 06:15 PM, Chris Forbes wrote: > I think that having both the existing `struct brw_vs_compile` and a > function with the same name is going to cause confusion. (same with > the other non-fs stages) That's a good point... and I agree. We should be able to come up with reasonable names

[Mesa-dev] [PATCH 1/3] clover: Add a space at the end of CL_DEVICE_OPENCL_C_VERSION

2015-03-20 Thread Tom Stellard
This is required by the spec. --- src/gallium/state_trackers/clover/api/device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 5d1f4ab..04f293d 100644 --- a/src/galliu

[Mesa-dev] [PATCH 3/3] radeonsi/compute: Default to the same PIPE_SHADER_CAP values as other shader types

2015-03-20 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_pipe.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index f1a5388..545c156 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/

[Mesa-dev] [PATCH 2/3] clover: Add all the mandatory 1.1 extensions to the extension string

2015-03-20 Thread Tom Stellard
--- src/gallium/state_trackers/clover/api/device.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 04f293d..43e7475 100644 --- a/src/gallium/state_trackers/clover

Re: [Mesa-dev] [PATCH 3/4] i965: Rename do__prog to brw__compile

2015-03-20 Thread Chris Forbes
I think that having both the existing `struct brw_vs_compile` and a function with the same name is going to cause confusion. (same with the other non-fs stages) On Sat, Mar 21, 2015 at 2:04 PM, Ian Romanick wrote: > On 03/20/2015 06:02 PM, Ian Romanick wrote: >> On 03/20/2015 05:49 PM, Carl Worth

Re: [Mesa-dev] [PATCH 3/4] i965: Rename do__prog to brw__compile

2015-03-20 Thread Ian Romanick
On 03/20/2015 06:02 PM, Ian Romanick wrote: > On 03/20/2015 05:49 PM, Carl Worth wrote: >> The rename here is in preparation for these functions to be exported >> to other files. > > I think I'd wait on this until you're also going to make them > non-static. Otherwise it's just extra churn. Whic

Re: [Mesa-dev] [PATCH 1/4] i965: Split out brw__populate_key into their own functions

2015-03-20 Thread Ian Romanick
On 03/20/2015 05:49 PM, Carl Worth wrote: > This commit splits portions of the existing brw_upload_vs_prog and > brw_upload_gs_prog function into new brw_vs_populate_key and > brw_gs_populate_key functions. This follows the same style as is > already present for all other stages, (see brw_wm_popula

Re: [Mesa-dev] [PATCH 2/4] i965: Split out per-stage dirty-bit checking into separate functions

2015-03-20 Thread Ian Romanick
With the tabs converted to spaces, this patch is Reviewed-by: Ian Romanick On 03/20/2015 05:49 PM, Carl Worth wrote: > The dirty-bit checking from each brw_upload__prog function is > split out into its a new brw__state_dirty function. > > This commit is intended to have no functional change. It

Re: [Mesa-dev] [PATCH 3/4] i965: Rename do__prog to brw__compile

2015-03-20 Thread Ian Romanick
On 03/20/2015 05:49 PM, Carl Worth wrote: > The rename here is in preparation for these functions to be exported > to other files. I think I'd wait on this until you're also going to make them non-static. Otherwise it's just extra churn. And tabs. :) One other comment below. > This commit is in

[Mesa-dev] Mesa 10.4.7

2015-03-20 Thread Emil Velikov
Mesa 10.4.7 has been released. Mesa 10.4.7 is a bug fix release fixing bugs since the 10.4.6 release, (see below for a list of changes). The tag in the git repository for Mesa 10.4.7 is 'mesa-10.4.7'. Mesa 10.4.7 is available for download at ftp://freedesktop.org/pub/mesa/10.4.7/ SHA-256 checksu

[Mesa-dev] [PATCH 2/4] i965: Split out per-stage dirty-bit checking into separate functions

2015-03-20 Thread Carl Worth
The dirty-bit checking from each brw_upload__prog function is split out into its a new brw__state_dirty function. This commit is intended to have no functional change. It exists in preparation for some upcoming code movement in preparation for the shader cache. --- src/mesa/drivers/dri/i965/brw_f

[Mesa-dev] [PATCH 3/4] i965: Rename do__prog to brw__compile

2015-03-20 Thread Carl Worth
The rename here is in preparation for these functions to be exported to other files. This commit is intended to have no functional change. It exists in preparation for some upcoming code movement in preparation for the shader cache. --- src/mesa/drivers/dri/i965/brw_ff_gs.c | 7 --- src/mesa

[Mesa-dev] [RFC: PATCH 4/4] i965: Refactor all upload__prog functions up into brw_upload_programs

2015-03-20 Thread Carl Worth
This completes the refactoring being prepared for in the previous commits. The function bodies of all brw_upadload__prog functions are pulled up into brw_upload_programs where there are unified with loops and switch statements. The purpose of this refactoring is to allow for new code to be added a

[Mesa-dev] [PATCH 1/4] i965: Split out brw__populate_key into their own functions

2015-03-20 Thread Carl Worth
This commit splits portions of the existing brw_upload_vs_prog and brw_upload_gs_prog function into new brw_vs_populate_key and brw_gs_populate_key functions. This follows the same style as is already present for all other stages, (see brw_wm_populate_key, etc.). This commit is intended to have no

Re: [Mesa-dev] [PATCH 06/14] mesa: reorder prog_instruction

2015-03-20 Thread Ian Romanick
On 03/20/2015 12:30 AM, Dave Airlie wrote: > From: Dave Airlie > > reduces size from 64 to 56 bytes. > > Signed-off-by: Dave Airlie > --- > src/mesa/program/prog_instruction.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/program/prog_instruction.h >

[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set

2015-03-20 Thread Tom Stellard
The storage size for local kernel args can be queried before the arguments are set by using the CL_KERNEL_LOCAL_MEM_SIZE param of clGetKernelWorkGroupInfo(). The spec says that if local kernel arguments have not been specified, then we should assume their size is 0. --- src/gallium/state_trackers

[Mesa-dev] [PATCH v3 3/9] i965/state: Support multiple pipelines in brw->num_atoms

2015-03-20 Thread Jordan Justen
brw->num_atoms is converted to an array, but currently just an array of length 1. Adds brw_copy_pipeline_atoms which copies the atoms for a pipeline, and sets brw->num_atoms[p] for pipeline p. v2: * Rename brw->atoms[] to render_atoms * Rename brw_add_pipeline_atoms to brw_copy_pipeline_atoms

[Mesa-dev] [PATCH v3 7/9] i965/state: Don't use brw->state.dirty.brw

2015-03-20 Thread Jordan Justen
Now, we only use ctx->NewDriverState. I used this bash & sed command in the i965 directory: for file in *.[ch] *.[ch]pp; do sed -i -e 's/state\.dirty\.brw/ctx.NewDriverState/g' $file done Followed by manual changes to brw_state_upload.c. Signed-off-by: Jordan Justen --- src/mesa/driver

[Mesa-dev] [PATCH v3 4/9] i965/state: Create separate dirty state bits for each pipeline

2015-03-20 Thread Jordan Justen
When clearing the state for a pipeline, we will save changed state for the other pipelines. v3: * Adjust brw_upload_pipeline_state * Don't pull pipeline state bits into common state bits * Don't clear pipeline state bits * Adjust 'clear' phase * brw_clear_dirty_bits is now brw_render_st

[Mesa-dev] [PATCH v3 5/9] i965/state: Only upload render programs for render state uploads

2015-03-20 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_state_upload.c | 45 +++- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index df31906..bc5112e 1006

[Mesa-dev] [PATCH v3 9/9] i965/state: Remove brw->state.dirty

2015-03-20 Thread Jordan Justen
We now use brw->NewGLState and brw->ctx.NewDriverState instead. Suggested-by: Kenneth Graunke Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_context.h | 1 - src/mesa/drivers/dri/i965/brw_state_upload.c | 6 -- 2 files changed, 7 deletions(-) diff --git a/src/mesa/driv

[Mesa-dev] [PATCH v3 0/9] Support multiple state pipelines for i965

2015-03-20 Thread Jordan Justen
git://people.freedesktop.org/~jljusten/mesa i965-pipelines-v3 v2: * Rename brw->atoms[] to render_atoms * Add brw->compute_atoms[] * Replace brw_pipeline_first_atom with brw_get_pipeline_atoms v3: * Avoid changing pipelines' state bits in upload path * brw_clear_dirty_bits => brw_render_s

[Mesa-dev] [PATCH v3 6/9] i965/state: Add compute pipeline with empty atom lists

2015-03-20 Thread Jordan Justen
Signed-off-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_context.h | 2 ++ src/mesa/drivers/dri/i965/brw_state.h| 2 ++ src/mesa/drivers/dri/i965/brw_state_upload.c | 34 +++- 3 files changed, 37 insertions(+), 1 deletio

[Mesa-dev] [PATCH v3 2/9] i965/state: Rename brw_clear_dirty_bits to brw_render_state_finished

2015-03-20 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_draw.c | 2 +- src/mesa/drivers/dri/i965/brw_state.h| 2 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/sr

[Mesa-dev] [PATCH v3 8/9] i965/state: Don't use brw->state.dirty.mesa

2015-03-20 Thread Jordan Justen
Now, we only use brw->NewGLState. I used this bash & sed command in the i965 directory: for file in *.[ch] *.[ch]pp; do sed -i -e 's/brw->state\.dirty\.mesa/brw->NewGLState/g' $file done Followed by manual changes to brw_state_upload.c. Signed-off-by: Jordan Justen --- src/mesa/drivers

[Mesa-dev] [PATCH v3 1/9] i965/state: Rename brw_upload_state to brw_upload_render_state

2015-03-20 Thread Jordan Justen
Signed-off-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_draw.c | 7 --- src/mesa/drivers/dri/i965/brw_state.h| 2 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 12 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) dif

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 4:59 PM, Ian Romanick wrote: > On 03/20/2015 04:26 PM, Ian Romanick wrote: >> On 03/20/2015 03:10 PM, Jason Ekstrand wrote: >>> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: There are a couple commits that hurt a fair number of shaders with NIR. It doesn't

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Ian Romanick
On 03/20/2015 04:26 PM, Ian Romanick wrote: > On 03/20/2015 03:10 PM, Jason Ekstrand wrote: >> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >>> There are a couple commits that hurt a fair number of shaders with NIR. >>> It doesn't seem like this should be the case, and it seems like there

[Mesa-dev] [Bug 89699] Regression in 10.5.1 causes flickering/artifacting in a particular video game

2015-03-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89699 --- Comment #2 from andre35...@yahoo.com --- Created attachment 114499 --> https://bugs.freedesktop.org/attachment.cgi?id=114499&action=edit dmesg output dmesg output after running the game, experiencing the artifacts/flickering/issues listed i

[Mesa-dev] [Bug 89699] Regression in 10.5.1 causes flickering/artifacting in a particular video game

2015-03-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89699 --- Comment #1 from andre35...@yahoo.com --- Created attachment 114498 --> https://bugs.freedesktop.org/attachment.cgi?id=114498&action=edit Xorg Log Xorg Log after running the game -- You are receiving this mail because: You are the QA Conta

Re: [Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Ian Romanick
On 03/20/2015 04:33 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 4:14 PM, Ian Romanick wrote: >> On 03/20/2015 02:51 PM, Matt Turner wrote: >>> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: From: Ian Romanick An expression like -(x * 8) becomes (x * -8). Much

Re: [Mesa-dev] [PATCH 15/23] glsl: Distribute binary operations over ir_triop_csel

2015-03-20 Thread Ian Romanick
On 03/20/2015 03:09 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> If the both result operands of the ir_triop_csel are constants and the >> other operand of the binary operation is constant, distributing the >> unary operation allows con

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 4:26 PM, Ian Romanick wrote: > On 03/20/2015 03:10 PM, Jason Ekstrand wrote: >> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >>> This is a series that I've been working on for quite some time. Some of >>> these patches data from as long ago as July 2014. It's fin

Re: [Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Matt Turner
On Fri, Mar 20, 2015 at 4:14 PM, Ian Romanick wrote: > On 03/20/2015 02:51 PM, Matt Turner wrote: >> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> An expression like -(x * 8) becomes (x * -8). >>> >>> Much of the hurt caused by this change appears to be from

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Ian Romanick
On 03/20/2015 03:13 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >> This is a series that I've been working on for quite some time. Some of >> these patches data from as long ago as July 2014. It's finally time to >> just send it out. I have felt like I have bee

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Ian Romanick
On 03/20/2015 03:10 PM, Jason Ekstrand wrote: > On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >> This is a series that I've been working on for quite some time. Some of >> these patches data from as long ago as July 2014. It's finally time to >> just send it out. I have felt like I have

Re: [Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 4:14 PM, Ian Romanick wrote: > On 03/20/2015 02:51 PM, Matt Turner wrote: >> On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> An expression like -(x * 8) becomes (x * -8). >>> >>> Much of the hurt caused by this change appears to be from

Re: [Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Ian Romanick
On 03/20/2015 02:51 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> An expression like -(x * 8) becomes (x * -8). >> >> Much of the hurt caused by this change appears to be from CSE not being >> able to see (x * -8) and (x * 8) as common.

Re: [Mesa-dev] [PATCH v3 5/7] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 3:41 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 2:23 PM, Jason Ekstrand wrote: >> v2: Fix the spelling of analyze and re-arrange code for better readability >> as per Connor's comments. >> v3: Make the naming of things more consistent and add a pile of comments >

[Mesa-dev] [Bug 89699] Regression in 10.5.1 causes flickering/artifacting in a particular video game

2015-03-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89699 Bug ID: 89699 Summary: Regression in 10.5.1 causes flickering/artifacting in a particular video game Product: Mesa Version: 10.5 Hardware: Other OS: Linux (

Re: [Mesa-dev] [PATCH 21/22] mesa: Implement GetVertexArrayIndexed[64]iv

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 14 +++ > src/mesa/main/tests/dispatch_sanity.cpp| 2 + > src/mesa/main/varray.c | 117 > + > src/mesa/main/varray.h

Re: [Mesa-dev] [PATCH v3 5/7] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-20 Thread Matt Turner
On Fri, Mar 20, 2015 at 2:23 PM, Jason Ekstrand wrote: > v2: Fix the spelling of analyze and re-arrange code for better readability > as per Connor's comments. > v3: Make the naming of things more consistent and add a pile of comments > --- > src/mesa/drivers/dri/i965/Makefile.sources

Re: [Mesa-dev] [PATCH 20/22] mesa: Add support for quering GL_VERTEX_ATTRIB_ARRAY_LONG

2015-03-20 Thread Laura Ekstrand
You misspelled "Querying" in the commit message. On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > This parameter was added in OpenGL 4.3 and GL_ARB_direct_state_access. > --- > src/mesa/main/varray.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/mesa/main/varray.c b

Re: [Mesa-dev] [PATCH 18/22] mesa: Add a vao parameter to get_vertex_array_attrib

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > This is needed to implement glGetVertexArrayIndexediv and > glGetVertexArrayIndexed64iv. > --- > src/mesa/main/varray.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/src/mesa/main/varray.

Re: [Mesa-dev] [PATCH 10/22] mesa: Refactor VertexAttrib[I|L]Format

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > The only difference between these functions is the legal types and > sizes, so consolidate the code into a single vertex_attrib_format() > function and call it from all three entry points. > --- > src/mesa/main/varray.c | 143 > ++

Re: [Mesa-dev] [PATCH 06/22] mesa: Implement VertexArrayElementBuffer

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 > src/mesa/main/arrayobj.c | 34 > ++ > src/mesa/main/arrayobj.h | 2 ++ > src/mesa/main/tests/dispatch_s

Re: [Mesa-dev] [PATCH 02/22] mesa: Add _mesa_lookup_vao_err

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > --- > src/mesa/main/arrayobj.c | 50 > > src/mesa/main/arrayobj.h | 3 +++ > 2 files changed, 53 insertions(+) > > diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c > index

Re: [Mesa-dev] [PATCH 01/22] mesa: Implement CreateVertexArrays

2015-03-20 Thread Laura Ekstrand
On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ > src/mesa/main/arrayobj.c | 20 +++- > src/mesa/main/arrayobj.h | 2 ++ > src/mesa/main/tests/dispatch_sanity

Re: [Mesa-dev] [PATCH 00/22] Add DSA support for vertex array objects

2015-03-20 Thread Laura Ekstrand
Except for a few minor nits on patches 1 2, 6, 10, 18, 20, and 21, this looks good. With those fixed, Reviewed-by: Laura Ekstrand On Wed, Mar 18, 2015 at 4:18 PM, Fredrik Höglund wrote: > This series implements the VAO portion of GL_ARB_direct_state_access. > > I started working on this befor

Re: [Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 2:51 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> An expression like -(x * 8) becomes (x * -8). >> >> Much of the hurt caused by this change appears to be from CSE not being >> able to see (x * -8) and (x * 8) a

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Matt Turner
On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: > This is a series that I've been working on for quite some time. Some of > these patches data from as long ago as July 2014. It's finally time to > just send it out. I have felt like I have been shaving an infinite yak, > and I have some add

Re: [Mesa-dev] [PATCH 00/23] Handle Booleans and things better

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: > This is a series that I've been working on for quite some time. Some of > these patches data from as long ago as July 2014. It's finally time to > just send it out. I have felt like I have been shaving an infinite yak, > and I have some add

Re: [Mesa-dev] mesa vs pahole

2015-03-20 Thread Dave Airlie
On 21 March 2015 at 00:13, Brian Paul wrote: > On 03/20/2015 01:29 AM, Dave Airlie wrote: >> >> I started running pahole on stuff today and mesa had a bunch of low >> hanging fruit all over the types, the main thing all of this >> does is reduce the mesa context size considerably. >> >> before: >>

Re: [Mesa-dev] [PATCH 15/23] glsl: Distribute binary operations over ir_triop_csel

2015-03-20 Thread Matt Turner
On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: > From: Ian Romanick > > If the both result operands of the ir_triop_csel are constants and the > other operand of the binary operation is constant, distributing the > unary operation allows constant folding to eliminate it. > > Shader-db resul

Re: [Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Matt Turner
On Fri, Mar 20, 2015 at 1:58 PM, Ian Romanick wrote: > From: Ian Romanick > > An expression like -(x * 8) becomes (x * -8). > > Much of the hurt caused by this change appears to be from CSE not being > able to see (x * -8) and (x * 8) as common. Previously -(x * 8) and (x > * 8) would have had a

Re: [Mesa-dev] [PATCH v2 2/7] i965/nir: Use emit_lrp for emitting flrp

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 2:28 PM, Ian Romanick wrote: > On 03/20/2015 02:26 PM, Jason Ekstrand wrote: >> On Fri, Mar 20, 2015 at 2:24 PM, Ian Romanick wrote: >>> On 03/20/2015 11:24 AM, Jason Ekstrand wrote: --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 +-- 1 file changed, 1 in

Re: [Mesa-dev] [PATCH v2 2/7] i965/nir: Use emit_lrp for emitting flrp

2015-03-20 Thread Ian Romanick
On 03/20/2015 02:26 PM, Jason Ekstrand wrote: > On Fri, Mar 20, 2015 at 2:24 PM, Ian Romanick wrote: >> On 03/20/2015 11:24 AM, Jason Ekstrand wrote: >>> --- >>> src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletions(-) >>> >>> diff --git a/src/mesa/driv

Re: [Mesa-dev] [PATCH v2 2/7] i965/nir: Use emit_lrp for emitting flrp

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 2:24 PM, Ian Romanick wrote: > On 03/20/2015 11:24 AM, Jason Ekstrand wrote: >> --- >> src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp >> b/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH v2 2/7] i965/nir: Use emit_lrp for emitting flrp

2015-03-20 Thread Ian Romanick
On 03/20/2015 11:24 AM, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 +-- > 1 file changed, 1 insertion(+), 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 5d88fe7..a059dbb 100644 > --- a/

[Mesa-dev] [PATCH v3 5/7] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-20 Thread Jason Ekstrand
v2: Fix the spelling of analyze and re-arrange code for better readability as per Connor's comments. v3: Make the naming of things more consistent and add a pile of comments --- src/mesa/drivers/dri/i965/Makefile.sources | 2 + src/mesa/drivers/dri/i965/brw_nir.h| 78

Re: [Mesa-dev] [PATCH v2 1/7] i965/fs: Make emit_lrp return an fs_inst

2015-03-20 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 03/20/2015 11:24 AM, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs.h | 4 ++-- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/mesa/drivers/d

Re: [Mesa-dev] [PATCH 02/15] glsl: Disable MSVC switch warning on a per-file basis.

2015-03-20 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 03/20/2015 06:59 AM, Jose Fonseca wrote: > This addresses > > ...\glsl_parser.cpp(...) : warning C4065: switch statement contains > 'default' but no 'case' labels > > This is on code generated by bison, which we have little control. > > It seems u

Re: [Mesa-dev] [PATCH v2 7/7] i965/nir: Use signed integer type for booleans

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 1:56 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 1:37 PM, Jason Ekstrand wrote: >> On Fri, Mar 20, 2015 at 1:12 PM, Matt Turner wrote: >>> On Fri, Mar 20, 2015 at 11:24 AM, Jason Ekstrand >>> wrote: - emit(MOV(result, masked)); + emit(MOV(retype

Re: [Mesa-dev] [PATCH 01/15] glsl: Avoid GLboolean vs bool arithmetic MSVC warnings.

2015-03-20 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 03/20/2015 06:59 AM, Jose Fonseca wrote: > Note that GLboolean is an alias for unsigned char, which lacks the > implicit true/false semantics that C++/C99 bool have. > > Reviewed-by: Brian Paul > > v2: Change gl_shader::IsES and gl_shader_program::Is

[Mesa-dev] [PATCH] gallium/targets/d3dadapter9: drop the libdrm prefix for drm.h

2015-03-20 Thread Emil Velikov
The path is provided by libdrm.pc and already used appropriately by the build system. Signed-off-by: Emil Velikov --- src/gallium/targets/d3dadapter9/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9

[Mesa-dev] [Bug 89670] cmod_propagation_test.andnz_one regression

2015-03-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89670 Ian Romanick changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH v2 5/7] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-20 Thread Jason Ekstrand
On Fri, Mar 20, 2015 at 1:26 PM, Matt Turner wrote: > On Fri, Mar 20, 2015 at 11:24 AM, Jason Ekstrand wrote: >> v2: Fix the spelling of analyze and re-arrange code for better readability >> as per Connor's comments. >> --- >> src/mesa/drivers/dri/i965/Makefile.sources | 2 + >> sr

[Mesa-dev] [PATCH 04/23] i965/fs: Don't emit dumb SEL

2015-03-20 Thread Ian Romanick
From: Ian Romanick With previous changes to emit more ir_triop_csel, the i965 channel expressions pass can generate sequences like: mov(8) g45<1>F 1F (+f0) sel(8)g40<1>F g45<8,8,1>F 1F There are no shader-db changes now, but this prevents a large number of regress

[Mesa-dev] [PATCH 07/23] ir_to_mesa: Add support for ir_triop_csel

2015-03-20 Thread Ian Romanick
From: Ian Romanick The only drivers that use this path are i915 and swrast. Both of these support the CMP opcode. This is untested, but it is similar to existing code in st_glsl_to_tgsi.cpp. Without this change, a later commits "glsl: Distribute multiply over b2f" and "glsl: Optimize certain i

[Mesa-dev] [PATCH 06/23] i965/fs: Optimize gl_FrontFacing used alone as a condition

2015-03-20 Thread Ian Romanick
From: Ian Romanick Shader-db results: Ivy Bridge (0x0166): total instructions in shared programs: 6291662 -> 6291642 (-0.00%) instructions in affected programs: 3383 -> 3363 (-0.59%) helped:20 Haswell (0x0426): total instructions in shared programs: 5779036 -

[Mesa-dev] [PATCH 19/23] glsl: Add a negative_equals method

2015-03-20 Thread Ian Romanick
From: Ian Romanick Like equals(), but it determines that an expression has the negative value of another expression. Signed-off-by: Ian Romanick --- src/glsl/ir.h | 17 ++ src/glsl/ir_equals.cpp | 64 ++ 2 files changed, 81 i

[Mesa-dev] [PATCH 16/23] glsl: Rewrite mix(constant_bool, constant_bool, condition) as condition or !condition

2015-03-20 Thread Ian Romanick
From: Ian Romanick An expression like 'mix(false, true, condition)' is the same as just 'condition'. Similarly, an expression like 'mix(true, false, condition)' is the same as just '!condition'. Expressions like 'mix(true, true, condition)' should already be handled elsewhere. Many, many more

[Mesa-dev] [PATCH 18/23] glsl: Constify ir_instruction::equals

2015-03-20 Thread Ian Romanick
From: Ian Romanick The casts to remove const from ir are ugly. The alternative was to add const versions of all the as_foo functions, and I just couldn't get up the motivation to do that. If there's a third option that is better, I would love to hear about it. :) Signed-off-by: Ian Romanick C

[Mesa-dev] [PATCH 14/23] glsl: Distribute unary operations over ir_triop_csel

2015-03-20 Thread Ian Romanick
From: Ian Romanick If the both result operands of the ir_triop_csel are constants, distributing the unary operation allows constant folding to eliminate it. This change fixes may of the shaders most hurt by "glsl: Optimize certain if-statements to ir_triop_csel". Shader-db results: GM45 (0x2A4

[Mesa-dev] [PATCH 17/23] glsl: Distribute ir_unop_neg over ir_binop_mul of a constant

2015-03-20 Thread Ian Romanick
From: Ian Romanick An expression like -(x * 8) becomes (x * -8). Much of the hurt caused by this change appears to be from CSE not being able to see (x * -8) and (x * 8) as common. Previously -(x * 8) and (x * 8) would have had a common subexpression. Later patches address this at the GLSL IR

[Mesa-dev] [PATCH 20/23] glsl/cse: Recognize negated expressions as common

2015-03-20 Thread Ian Romanick
From: Ian Romanick For example (x * 43) and (x * -43) should be considered common. v2: Fix a problem where the x in -x would get replaced with -x producing -(-x). Oops. Shader-db results: GM45 (0x2A42): total instructions in shared programs: 3544158 -> 3544133 (-0.00%) instructions in affecte

[Mesa-dev] [PATCH 21/23] glsl: Recognize double negated multiplies and divides as equal

2015-03-20 Thread Ian Romanick
From: Ian Romanick For example (-x * 43) and (x * -43) should be considered common. No shader-db changes. I'll probably drop this patch, but I wanted to send it out to show that I tried this too. Signed-off-by: Ian Romanick --- src/glsl/ir_equals.cpp | 10 ++ 1 file changed, 10 inser

[Mesa-dev] [PATCH 05/23] i965: Emit AND instead of SEL if the false value is zero on GEN6+

2015-03-20 Thread Ian Romanick
From: Ian Romanick A ir_triop_select like "ir_triop_sel condition 0 value" could be implemented using a CMP and a SEL instruction, as is currently done. It could also be impelmented using a CMP and an AND instruction using the compare result as one of the operands. This is basically how we impl

[Mesa-dev] [PATCH 11/23] glsl: Distribute multiply over csel with sources {-1, 0, 1}

2015-03-20 Thread Ian Romanick
From: Ian Romanick If one of the multiplicands is an ir_triop_csel and the the possible results of that csel are limited to {-1, 0, 1}, we can distribute the multiply over the csel to eliminate the multiply: x * mix( 0, 1, condition) => mix( 0, x, condition) x * mix( 0, -1, condition)

[Mesa-dev] [PATCH 23/23] glsl: Rewrite ir_triop_csel when condition is ir_unop_logic_not

2015-03-20 Thread Ian Romanick
From: Ian Romanick An expression like x = !condition ? a : b; will get rewritten as x = condition ? b : a; This has two immediate advantages. First, it saves a (very small) amount of memory. Second, and more importantly, it means that transformations that look at the condition of an

[Mesa-dev] [PATCH 15/23] glsl: Distribute binary operations over ir_triop_csel

2015-03-20 Thread Ian Romanick
From: Ian Romanick If the both result operands of the ir_triop_csel are constants and the other operand of the binary operation is constant, distributing the unary operation allows constant folding to eliminate it. Shader-db results: GM45 (0x2A42): total instructions in shared programs: 3545351

[Mesa-dev] [PATCH 22/23] i965/fs: Don't do AND-instead-of-SEL optimization for a comparison of an expression with zero

2015-03-20 Thread Ian Romanick
From: Ian Romanick Shader-db results: Ivy Bridge (0x0166): total instructions in shared programs: 6274041 -> 6273868 (-0.00%) instructions in affected programs: 30913 -> 30740 (-0.56%) helped:121 No change on any other platform or with NIR. Weird. Signed-of

[Mesa-dev] [PATCH 13/23] glsl: Rewrite (-abs(x) < 0) and (-abs(x) < abs(x)) as (x != 0)

2015-03-20 Thread Ian Romanick
From: Ian Romanick Shader-db results: GM45 (0x2A42): total instructions in shared programs: 3545713 -> 3545712 (-0.00%) instructions in affected programs: 141 -> 140 (-0.71%) helped:1 Iron Lake (0x0046): total instructions in shared programs: 4976069 -> 49760

[Mesa-dev] [PATCH 10/23] glsl: Optimize certain if-statements to ir_triop_csel

2015-03-20 Thread Ian Romanick
From: Ian Romanick Some shaders end up with code that looks something like: if (condition) result = ; else result = ; This pass converts those if-statements to result = mix(, , condition); Quite a few of the helped shaders are vertex shaders, mostly from Warsow an

[Mesa-dev] [PATCH 03/23] i965/fs: Use MOV.nz instead of AND.nz to generate flag on GEN6+

2015-03-20 Thread Ian Romanick
From: Ian Romanick On SNB+, the Boolean result is always 0 or ~0, so MOV.nz produces the same effect as AND.nz. However, later cmod propagation passes can handle the MOV.nz, but they cannot handle the AND.nz because the source is not generated by a CMP. It's worth noting that this commit was a

[Mesa-dev] [PATCH 12/23] glsl: Rewrite (-abs(x) >= 0) and (-abs(x) >= abs(x)) as (x == 0)

2015-03-20 Thread Ian Romanick
From: Ian Romanick v2: Use existing op_expr and op_const data. v3: Add support for (-abs(x) >= abs(x)). Shader-db results: GM45 (0x2A42): total instructions in shared programs: 3545720 -> 3545713 (-0.00%) instructions in affected programs: 3911 -> 3904 (-0.18%) helped:

[Mesa-dev] [PATCH 09/23] glsl: Distribute multiply over b2f

2015-03-20 Thread Ian Romanick
From: Ian Romanick Convert cases like (x * bool(b)) to 'mix(0, x, b)'. Note: This may hurt the code generated for GPUs that represent Boolean values using floating point. shader-db doesn't play well with i915, so I haven't been able to check it. On at least BDW shaders/warsow/85.shader_test is

[Mesa-dev] [PATCH 01/23] i965/fs: Refactor out guts of fs_visitor::try_opt_frontfacing_ternary

2015-03-20 Thread Ian Romanick
From: Ian Romanick The next patch will add a second user. Signed-off-by: Ian Romanick Cc: Abdiel Janulgue --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 105 +++ 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visito

[Mesa-dev] [PATCH 08/23] glsl: Optimize certain if-statements to just casts from the condition

2015-03-20 Thread Ian Romanick
From: Ian Romanick Some shaders end up with code that looks something like: if (condition) result = 1.0; else result = 0.0; This pass converts those if-statements to result = float(condition); Of the shaders hurt, 12 of them are vertex shaders "hurt" by virtue of

  1   2   3   >