Re: [Mesa-dev] [PATCH] glsl: Pick ast_conditional branch regardless of op1/2 being constant.

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

[Mesa-dev] [PATCH] glsl: Pick ast_conditional branch regardless of op1/2 being constant.

2015-01-29 Thread Kenneth Graunke
If the ?: operator's condition is a constant value, and both branches were pure expressions, we can just make the resulting value one or the other. Previously, we only did this if op[1] and op[2] were also constant values - but there's no actual reason for that restriction. No changes in shader-d

[Mesa-dev] [RFC] nir/register: Add a parent_instr field

2015-01-29 Thread Jason Ekstrand
This adds a parent_instr field similar to the one for ssa_def. The difference here is that the parent_instr field on a nir_register can be NULL if the register does not have a unique definition or if that definition does not dominate all its uses. We set this field in the out-of-SSA pass so that

[Mesa-dev] [PATCH v2 0/2] Fast mutex v2

2015-01-29 Thread Kristian Høgsberg
Here's take two of the fast mutex path. This version has a check for linux/futex.h and it split into two patches. First patch introduces full_mtx_t and updates callers. Second patch adds the inline mtx_t. Kristian Høgsberg (2): mesa: Split full featured mutex into its own type mesa: Add new

[Mesa-dev] [PATCH v2 1/2] mesa: Split full featured mutex into its own type

2015-01-29 Thread Kristian Høgsberg
Most of the mtx_t uses in mesa only use lock/unlock, but a couple of places we use a condition variable and a recursive mutex. This patch introduces a new full_mtx_t for the cases where we need a more featureful mutex and changes mtx_t to only support lock/unlock. Signed-off-by: Kristian Høgsberg

[Mesa-dev] [PATCH v2 2/2] mesa: Add new fast mtx_t mutex type for basic use cases

2015-01-29 Thread Kristian Høgsberg
While modern pthread mutexes are very fast, they still incur a call to an external DSO and overhead of the generality and features of pthread mutexes. Most mutexes in mesa only needs lock/unlock, and the idea here is that we can inline the atomic operation and make the fast case just two intruction

Re: [Mesa-dev] [PATCH 1/2] egl: Add unbound_only parameter to _eglReleaseDisplayResources()

2015-01-29 Thread Matt Turner
On Thu, Jan 29, 2015 at 6:03 PM, Chad Versace wrote: > On 01/28/2015 01:45 PM, jim.br...@linux.intel.com wrote: >> From: Jim Bride >> >> Add a EGLBoolean parameter unbound_only to _eglReleaseDisplayResources() to >> allow that function to skip releasing contexts or surfaces that are currently >>

Re: [Mesa-dev] [PATCH 14/21] main: Add entry points for MapNamedBuffer[Range].

2015-01-29 Thread Jason Ekstrand
Again, I think this would be more readable if the refactor was in its own commit with a little more explanation what's going on. Then add DSA. On Wed, Jan 21, 2015 at 5:40 PM, Laura Ekstrand wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 14 ++ > src/mesa/main/bufferobj.c

Re: [Mesa-dev] [PATCH] dir-locals.el: Don't set variables for non-programming modes

2015-01-29 Thread Michel Dänzer
On 30.01.2015 03:52, Neil Roberts wrote: > This limits the style changes to modes inherited from prog-mode. The > main reason to do this is to avoid setting fill-column for people > using Emacs to edit commit messages because 78 characters is too many > to make it wrap properly in git log. Note tha

Re: [Mesa-dev] [PATCH 12/21] main: Added entry points for ClearNamedBuffer[Sub]Data.

2015-01-29 Thread Jason Ekstrand
On Wed, Jan 21, 2015 at 5:40 PM, Laura Ekstrand wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 18 +++ > src/mesa/main/bufferobj.c | 156 > ++--- > src/mesa/main/bufferobj.h | 34 -- > src/mesa/main/tests/dispat

Re: [Mesa-dev] [PATCH] GL: Update glext.h to fix ARB_dsa function prototypes.

2015-01-29 Thread Jason Ekstrand
It might be good to say in the commit message "update glext.h to match revision X from Khronos" and then put the comment about DSA functions as a second line in the commit message. --Jason On Fri, Jan 23, 2015 at 2:23 PM, Laura Ekstrand wrote: > I checked, and all of the currently implement

Re: [Mesa-dev] [PATCH 1/2] egl: Add unbound_only parameter to _eglReleaseDisplayResources()

2015-01-29 Thread Chad Versace
On 01/28/2015 01:45 PM, jim.br...@linux.intel.com wrote: > From: Jim Bride > > Add a EGLBoolean parameter unbound_only to _eglReleaseDisplayResources() to > allow that function to skip releasing contexts or surfaces that are currently > bound to a display. Setting unbound_only to EGL_FALSE prese

Re: [Mesa-dev] [PATCH 2/2] egl/dri: Defer display destruction until the display is not in use.

2015-01-29 Thread Chad Versace
On 01/28/2015 01:45 PM, jim.br...@linux.intel.com wrote: > From: Jim Bride > > In situations where a DRI2 driver is in use and a call to eglTerminate() > is followed by a call to eglMakeCurrent() the mandatory call to glFlush() > inside of dri2_make_current() would cause a segmentation fault beca

Re: [Mesa-dev] [PATCH] i965: Add a better PRM citation for the IMS dimension mangling.

2015-01-29 Thread Chad Versace
On 01/29/2015 12:00 AM, Kenneth Graunke wrote: > Paul originally had to reverse engineer these formulas based on the > description about how the sampler works. The description here is not > the easiest to follow - especially given that it's from the Sandybridge > era, when the hardware only did 4x

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Rob Clark
On Thu, Jan 29, 2015 at 6:06 PM, Brian Paul wrote: > On 01/29/2015 02:20 PM, Roland Scheidegger wrote: >> >> Hi, >> >> the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes >> that indirections can only be done through the address reg and has quite >> some extra code to deal with

Re: [Mesa-dev] [PATCH 5/7] nir/algebraic: Support specifying variable as constant or by type

2015-01-29 Thread Dylan Baker
On Thursday, January 29, 2015 17:00:08 Kenneth Graunke wrote: > On Thursday, January 29, 2015 12:50:20 PM Jason Ekstrand wrote: > > --- > > src/glsl/nir/nir_algebraic.py | 20 +--- > > src/glsl/nir/nir_opt_algebraic.py | 12 +--- > > 2 files changed, 26 insertions(+), 6

Re: [Mesa-dev] [PATCH 5/7] nir/algebraic: Support specifying variable as constant or by type

2015-01-29 Thread Jason Ekstrand
On Thu, Jan 29, 2015 at 5:00 PM, Kenneth Graunke wrote: > On Thursday, January 29, 2015 12:50:20 PM Jason Ekstrand wrote: > > --- > > src/glsl/nir/nir_algebraic.py | 20 +--- > > src/glsl/nir/nir_opt_algebraic.py | 12 +--- > > 2 files changed, 26 insertions(+), 6 del

Re: [Mesa-dev] [PATCH v2 7/7] nir/opt_algebraic: Add some constant bcsel reductions

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 02:34:18 PM Jason Ekstrand wrote: > total instructions in shared programs: 5998190 -> 5997603 (-0.01%) > instructions in affected programs: 54276 -> 53689 (-1.08%) > helped:293 > --- > src/glsl/nir/nir_opt_algebraic.py | 30

Re: [Mesa-dev] [PATCH 1/7] nir: Add a void type

2015-01-29 Thread Jason Ekstrand
On Thu, Jan 29, 2015 at 4:13 PM, Kenneth Graunke wrote: > On Thursday, January 29, 2015 12:50:16 PM Jason Ekstrand wrote: > > This allows us to indicate a concept of an invalid type. > > --- > > src/glsl/nir/nir.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/src/glsl/nir/nir.h

Re: [Mesa-dev] [PATCH 5/7] nir/algebraic: Support specifying variable as constant or by type

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 12:50:20 PM Jason Ekstrand wrote: > --- > src/glsl/nir/nir_algebraic.py | 20 +--- > src/glsl/nir/nir_opt_algebraic.py | 12 +--- > 2 files changed, 26 insertions(+), 6 deletions(-) > > diff --git a/src/glsl/nir/nir_algebraic.py b/src/glsl

Re: [Mesa-dev] [PATCH 1/7] nir: Add a void type

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 12:50:16 PM Jason Ekstrand wrote: > This allows us to indicate a concept of an invalid type. > --- > src/glsl/nir/nir.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h > index 980fdd0..f2050de 100644 > --- a/src/glsl/n

Re: [Mesa-dev] [PATCH] mesa: fix display list 8-byte alignment issue

2015-01-29 Thread Brian Paul
Ping. I'll handle the cherry-pick to 10.4 since a small code change is needed. -Brian On 01/27/2015 08:06 PM, Brian Paul wrote: The _mesa_dlist_alloc() function is only guaranteed to return a pointer with 4-byte alignment. On 64-bit systems which don't support unaligned loads (e.g. SPARC or M

Re: [Mesa-dev] Mesa 10.5.0 release plan

2015-01-29 Thread Emil Velikov
On 29/01/15 04:05, Michel Dänzer wrote: > On 29.01.2015 00:37, Emil Velikov wrote: >> >> February 20th 2015 - Release candidate 3 >> February 20th 2015 - Release candidate 4 > > I assume you meant February 27th for rc4. :) > Sigh... will I be able to write a statement without ever making silly ty

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Brian Paul
On 01/29/2015 02:20 PM, Roland Scheidegger wrote: Hi, the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes that indirections can only be done through the address reg and has quite some extra code to deal with this. Even though hardware and apis which worked like that are defini

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Rob Clark
On Thu, Jan 29, 2015 at 5:31 PM, Rob Clark wrote: > On Thu, Jan 29, 2015 at 4:20 PM, Roland Scheidegger > wrote: >> Hi, >> >> the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes >> that indirections can only be done through the address reg and has quite >> some extra code to d

Re: [Mesa-dev] [PATCH] mesa: Add new fast mtx_t mutex type for basic use cases

2015-01-29 Thread Emil Velikov
On 29/01/15 17:14, Kristian Høgsberg wrote: > On Thu, Jan 29, 2015 at 6:36 AM, Emil Velikov > wrote: >> On 28/01/15 05:08, Kristian Høgsberg wrote: >>> While modern pthread mutexes are very fast, they still incur a call to an >>> external DSO and overhead of the generality and features of pthread

[Mesa-dev] [PATCH v2 7/7] nir/opt_algebraic: Add some constant bcsel reductions

2015-01-29 Thread Jason Ekstrand
total instructions in shared programs: 5998190 -> 5997603 (-0.01%) instructions in affected programs: 54276 -> 53689 (-1.08%) helped:293 --- src/glsl/nir/nir_opt_algebraic.py | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-)

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Rob Clark
On Thu, Jan 29, 2015 at 4:20 PM, Roland Scheidegger wrote: > Hi, > > the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes > that indirections can only be done through the address reg and has quite > some extra code to deal with this. Even though hardware and apis which > worked l

Re: [Mesa-dev] [PATCH] i965/skl: Force a BINDING_TABLE_POINTER_* command after push constant command

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 05:21:03 PM Neil Roberts wrote: > According to the SkyLake bspec the 3DSTATE_CONSTANT_* commands only take > effect on the next corresponding 3DSTATE_BINDING_TABLE_POINTER_* command. This > patch just makes it set the BRW_NEW_SURFACES state when uploading the push > co

Re: [Mesa-dev] [PATCH 2/2] main: make the intel driver obey drirc's force_glsl_version

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 11:14:27 PM Martin Peres wrote: > Signed-off-by: Martin Peres > --- > src/mesa/drivers/dri/i915/intel_screen.c | 1 + > src/mesa/drivers/dri/i965/brw_context.c | 3 +++ > src/mesa/drivers/dri/i965/intel_screen.c | 1 + > 3 files changed, 5 insertions(+) > > diff --

Re: [Mesa-dev] [PATCH 1/2] mesa: add a workaround for unigine Tropics

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 11:14:26 PM Martin Peres wrote: > While trying to understand a GLSL pass, curro and I tried running Unigine > Tropics and the GLSL compilers would not compile the shaders. > > The reason is due to the fact that the shaders do not specify the needed GLSL > version but

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Eric Anholt
Roland Scheidegger writes: > Hi, > > the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes > that indirections can only be done through the address reg and has quite > some extra code to deal with this. Even though hardware and apis which > worked like that are definitely old by

Re: [Mesa-dev] [PATCH 7/7] nir/opt_algebraic: Add some constant bcsel reductions

2015-01-29 Thread Jason Ekstrand
On Thu, Jan 29, 2015 at 12:50 PM, Jason Ekstrand wrote: > total instructions in shared programs: 8026469 -> 8026343 (-0.00%) > instructions in affected programs: 28541 -> 28415 (-0.44%) > helped:101 > HURT: 76 > These numbers a

Re: [Mesa-dev] [PATCH 6/7] nir/opt_algebraic: Add some boolean simplifications

2015-01-29 Thread Jason Ekstrand
On Thu, Jan 29, 2015 at 12:50 PM, Jason Ekstrand wrote: > total instructions in shared programs: 8026509 -> 8026469 (-0.00%) > instructions in affected programs: 6338 -> 6298 (-0.63%) > helped:11 > Ignore those numbers. they're bogus. Here are the real ones:

[Mesa-dev] [PATCH v5 2/3] i965/fs: Use NIR's scalarizing abilities and stop handling vectors

2015-01-29 Thread Jason Ekstrand
Now that we can scalarize with NIR, there's no need for all this code anymore. Let's get rid of it and just do scalar operations. v2: run copy prop before lowering phi nodes v3: Get rid of the "emit(...)->saturate = foo" pattern total instructions in shared programs: 5998321 -> 5974070 (-0.40%)

[Mesa-dev] [PATCH v5 1/3] nir: Add a pass to lower vector phi nodes to scalar phi nodes

2015-01-29 Thread Jason Ekstrand
v2 Jason Ekstrand : - Add better comments - Use nir_ssa_dest_init and nir_src_for_ssa more places - Fix some void * casts v3 Jason Ekstrand : - Rework the way we determine whether or not to sccalarize a phi node to make the recursion non-bogus - Treat load_const instructions as scalarizabl

[Mesa-dev] [PATCH v5 3/3] i965/fs_nir: Get rid of get_alu_src

2015-01-29 Thread Jason Ekstrand
Originally, get_alu_src was supposed to handle resolving swizzles and things like that. However, now that basically every instruction we have only takes scalar sources, we don't really need it anymore. The only case where it's still marginally useful is for the mov and vecN operations that are le

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Axel Davy
Hi, for Gallium Nine we use ARR and UARL. Do all cards supporting integers support indexing with an integer register ? If yes we could remove our UARL usage. As for ARR, if all cards are ok with normal registers, we could use a normal one too, as long as we can get the same rounding behaviour

[Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Roland Scheidegger
Hi, the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes that indirections can only be done through the address reg and has quite some extra code to deal with this. Even though hardware and apis which worked like that are definitely old by now. Thus, I'm proposing the address reg

[Mesa-dev] [PATCH 1/2] mesa: add a workaround for unigine Tropics

2015-01-29 Thread Martin Peres
While trying to understand a GLSL pass, curro and I tried running Unigine Tropics and the GLSL compilers would not compile the shaders. The reason is due to the fact that the shaders do not specify the needed GLSL version but also use in the same shader keywords that could never co-exist because o

[Mesa-dev] [PATCH 2/2] main: make the intel driver obey drirc's force_glsl_version

2015-01-29 Thread Martin Peres
Signed-off-by: Martin Peres --- src/mesa/drivers/dri/i915/intel_screen.c | 1 + src/mesa/drivers/dri/i965/brw_context.c | 3 +++ src/mesa/drivers/dri/i965/intel_screen.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/in

[Mesa-dev] [RFC] gallium/docs: add some freedreno compiler docs

2015-01-29 Thread Rob Clark
From: Rob Clark Enable the 'sphinx.ext.graphviz' extension, and add in a section for driver specific docs, with freedreno compiler docs beneath. The goal is for more complete compiler docs, and hopefully some docs about other parts of the driver (such as how tiling works, etc). Note that there

Re: [Mesa-dev] [PATCH] nir: Add variants of some of the comparison simplifications.

2015-01-29 Thread Jason Ekstrand
On Wed, Jan 28, 2015 at 11:20 PM, Eric Anholt wrote: > Jason Ekstrand writes: > > > I've got a patch I cooked up today that generalizes this a bit. I > haven't > > sent it yet because it lacks shader-db statistics. That said, I'm fine > > with merging this in the mean time. > > Not sure what g

[Mesa-dev] [PATCH 4/7] nir/algebraic: Fail to compile of a variable is used in a replace but not the search

2015-01-29 Thread Jason Ekstrand
--- src/glsl/nir/nir_algebraic.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/nir/nir_algebraic.py b/src/glsl/nir/nir_algebraic.py index f9b246d..75436f4 100644 --- a/src/glsl/nir/nir_algebraic.py +++ b/src/glsl/nir/nir_algebraic.py @@ -34,13 +34,18 @@ class VarSet(object):

[Mesa-dev] [PATCH 7/7] nir/opt_algebraic: Add some constant bcsel reductions

2015-01-29 Thread Jason Ekstrand
total instructions in shared programs: 8026469 -> 8026343 (-0.00%) instructions in affected programs: 28541 -> 28415 (-0.44%) helped:101 HURT: 76 --- src/glsl/nir/nir_opt_algebraic.py | 26 ++ 1 file chang

[Mesa-dev] [PATCH 6/7] nir/opt_algebraic: Add some boolean simplifications

2015-01-29 Thread Jason Ekstrand
total instructions in shared programs: 8026509 -> 8026469 (-0.00%) instructions in affected programs: 6338 -> 6298 (-0.63%) helped:11 --- src/glsl/nir/nir_opt_algebraic.py | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/nir/nir_opt_algebraic.py

[Mesa-dev] [PATCH 2/7] nir/search: Add support for matching unknown constants

2015-01-29 Thread Jason Ekstrand
There are some algebraic transformations that we want to do but only if certain things are constants. For instance, we may want to replace a * (b + c) with (a * b) + (a * c) as long as a and either b or c is constant. While this generates more instructions, some of it will get constant folded. ni

[Mesa-dev] [PATCH 5/7] nir/algebraic: Support specifying variable as constant or by type

2015-01-29 Thread Jason Ekstrand
--- src/glsl/nir/nir_algebraic.py | 20 +--- src/glsl/nir/nir_opt_algebraic.py | 12 +--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/glsl/nir/nir_algebraic.py b/src/glsl/nir/nir_algebraic.py index 75436f4..6e7973d 100644 --- a/src/glsl/nir/nir_a

[Mesa-dev] [PATCH 1/7] nir: Add a void type

2015-01-29 Thread Jason Ekstrand
This allows us to indicate a concept of an invalid type. --- src/glsl/nir/nir.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 980fdd0..f2050de 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -576,6 +576,7 @@ void nir_alu_dest_copy(nir

[Mesa-dev] [PATCH 3/7] nir/search: Allow for matching variables based on types

2015-01-29 Thread Jason Ekstrand
This allows you to match on an unknown value but only if it is of a given type. 90% of the uses of this are for matching only booleans, but adding the generality of arbitrary types is no more complex. nir_algebraic.py doesn't handle this yet but that's ok because the C language will ensure that t

Re: [Mesa-dev] [PATCH] gallium/docs: fix docs wrt ARL/ARR/FLR

2015-01-29 Thread Jose Fonseca
On 29/01/15 19:40, srol...@vmware.com wrote: From: Roland Scheidegger since the address reg holds integer values, ARL/ARR do an implicit float-to-int conversion, so clarify that. Thus it is also incorrect to say that FLR really does the same as ARL. --- src/gallium/docs/source/tgsi.rst | 18 +

Re: [Mesa-dev] [PATCH] gallium/docs: fix docs wrt ARL/ARR/FLR

2015-01-29 Thread Alex Deucher
On Thu, Jan 29, 2015 at 2:40 PM, wrote: > From: Roland Scheidegger > > since the address reg holds integer values, ARL/ARR do an implicit > float-to-int > conversion, so clarify that. Thus it is also incorrect to say that FLR really > does the same as ARL. Reviewed-by: Alex Deucher > --- >

[Mesa-dev] [PATCH] gallium/docs: fix docs wrt ARL/ARR/FLR

2015-01-29 Thread sroland
From: Roland Scheidegger since the address reg holds integer values, ARL/ARR do an implicit float-to-int conversion, so clarify that. Thus it is also incorrect to say that FLR really does the same as ARL. --- src/gallium/docs/source/tgsi.rst | 18 -- 1 file changed, 8 insertions(

Re: [Mesa-dev] meta/blit: Write gl_FragDepth only when really needed

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 04:20:59 PM Topi Pohjolainen wrote: > Currently meta blit programs unconditionally write both color and > depth values. This series introduces two flavours - with and without > gl_FragDepth - allowing simpler programs for color only blits. Ken > had observed that i965

Re: [Mesa-dev] meta/blit: Write gl_FragDepth only when really needed

2015-01-29 Thread Matt Turner
I haven't worked in meta a lot, but I didn't see anything that didn't look correct. The series is Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v4 2/3] i965/fs: Use NIR's scalarizing abilities and stop handling vectors

2015-01-29 Thread Jason Ekstrand
Matt wanted shader-db numbers and here they are: total instructions in shared programs: 5998287 -> 5974070 (-0.40%) instructions in affected programs: 732041 -> 707824 (-3.31%) helped:3135 HURT: 193 GAINED:

[Mesa-dev] [PATCH] dir-locals.el: Don't set variables for non-programming modes

2015-01-29 Thread Neil Roberts
This limits the style changes to modes inherited from prog-mode. The main reason to do this is to avoid setting fill-column for people using Emacs to edit commit messages because 78 characters is too many to make it wrap properly in git log. Note that makefile-mode also inherits from prog-mode so t

Re: [Mesa-dev] [PATCH 3/6] main: Added entry point for glTransformFeedbackBufferRange

2015-01-29 Thread Laura Ekstrand
On Thu, Jan 29, 2015 at 4:55 AM, Martin Peres wrote: > v2: review from Laura Ekstrand > - use the refactored code to lookup the objects > - improve some error messages > - factor out the gl method name computation > - better handle the spec differences between the DSA and non-DSA cases > - quote

Re: [Mesa-dev] [PATCH 2/6] main: Added entry point for glTransformFeedbackBufferBase

2015-01-29 Thread Laura Ekstrand
On Thu, Jan 29, 2015 at 4:55 AM, Martin Peres wrote: > v2: Review from Laura Ekstrand > - give more helpful error messages > - factor the lookup code for the xfb and objBuf > - replace some already-existing tabs with spaces > - add comments to explain the cases where xfb == 0 or buffer == 0 > - f

Re: [Mesa-dev] [PATCH 2/5] meta/blit: Write depth only when asked for

2015-01-29 Thread Matt Turner
On Thu, Jan 29, 2015 at 6:21 AM, Topi Pohjolainen wrote: > diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c > index ec7564a..45035b1 100644 > --- a/src/mesa/drivers/common/meta.c > +++ b/src/mesa/drivers/common/meta.c > @@ -293,13 +293,14 @@ _mesa_meta_setup_blit_shader

Re: [Mesa-dev] [PATCH] doc: break down ARB_direct_state_access in GL3.txt

2015-01-29 Thread Laura Ekstrand
Good idea. Reviewed-by: Laura Ekstrand On Thu, Jan 29, 2015 at 6:54 AM, Martin Peres wrote: > A student was wondering what was going on + I started working on it too. > > CC: Laura Ekstrand > Signed-off-by: Martin Peres > --- > docs/GL3.txt | 11 ++- > 1 file changed, 10 insertions(

[Mesa-dev] [PATCH] i965/skl: Force a BINDING_TABLE_POINTER_* command after push constant command

2015-01-29 Thread Neil Roberts
According to the SkyLake bspec the 3DSTATE_CONSTANT_* commands only take effect on the next corresponding 3DSTATE_BINDING_TABLE_POINTER_* command. This patch just makes it set the BRW_NEW_SURFACES state when uploading the push constants to ensure the binding tables will be updated. This fixes the

Re: [Mesa-dev] [PATCH] mesa: Add new fast mtx_t mutex type for basic use cases

2015-01-29 Thread Kristian Høgsberg
On Thu, Jan 29, 2015 at 6:36 AM, Emil Velikov wrote: > On 28/01/15 05:08, Kristian Høgsberg wrote: >> While modern pthread mutexes are very fast, they still incur a call to an >> external DSO and overhead of the generality and features of pthread mutexes. >> Most mutexes in mesa only needs lock/un

[Mesa-dev] [PATCH] doc: break down ARB_direct_state_access in GL3.txt

2015-01-29 Thread Martin Peres
A student was wondering what was going on + I started working on it too. CC: Laura Ekstrand Signed-off-by: Martin Peres --- docs/GL3.txt | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 648f5ac..2dc1404 100644 --- a/docs/GL3.txt +

Re: [Mesa-dev] [PATCH] mesa: Add new fast mtx_t mutex type for basic use cases

2015-01-29 Thread Emil Velikov
On 28/01/15 05:08, Kristian Høgsberg wrote: > While modern pthread mutexes are very fast, they still incur a call to an > external DSO and overhead of the generality and features of pthread mutexes. > Most mutexes in mesa only needs lock/unlock, and the idea here is that we can > inline the atomic

[Mesa-dev] [PATCH 1/5] meta/blit: Add plumbing for shaders without depth

2015-01-29 Thread Topi Pohjolainen
Currently all blit programs are unconditionally compiled with gl_FragDepth. Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/common/meta.c | 3 ++- src/mesa/drivers/common/meta.h | 1 + src/mesa/drivers/common/meta_blit.c| 2 +- src/mesa/drivers/co

[Mesa-dev] [PATCH 2/5] meta/blit: Write depth only when asked for

2015-01-29 Thread Topi Pohjolainen
Implementing an idea from Ken, on i965 the shader program for 2D blits becomes significantly simpler. Before: pln(8) g6<1>Fg4<0,1,0>Fg2<8,8,1>F { align1 1Q compacted }; pln(8) g7<1>Fg4.4<0,1,0>F g2<8,8,1>F { align1 1Q compacted }; send(8) g2<1>UW g6<8,8,1>F sampler

[Mesa-dev] [PATCH 5/5] meta: Don't write depth when decompressing tex-images

2015-01-29 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/common/meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 45035b1..6ddec73 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/m

[Mesa-dev] [PATCH 4/5] meta: Don't write depth when generating miptrees

2015-01-29 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/common/meta_generate_mipmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c index c38b46b..c1b6d3c 100644 --- a/src/mesa/driv

[Mesa-dev] meta/blit: Write gl_FragDepth only when really needed

2015-01-29 Thread Topi Pohjolainen
Currently meta blit programs unconditionally write both color and depth values. This series introduces two flavours - with and without gl_FragDepth - allowing simpler programs for color only blits. Ken had observed that i965 behaves badly emitting five unnecessary moves when the depth is included i

[Mesa-dev] [PATCH 3/5] meta/blit: Compile programs with and without depth

2015-01-29 Thread Topi Pohjolainen
When color buffers alone are concerned the depth is not needed. No regression on BDW where meta blit is used instead of blorp. I also disabled blorp temporarily for fbo-blits on IVB and saw no regressions there either. I also compared several graphics benchmarks on BDW and saw neither regressions

Re: [Mesa-dev] [PATCH 1/6] main: Added entry point for glCreateTransformFeedbacks

2015-01-29 Thread Martin Peres
On 29/01/15 15:37, Fredrik Höglund wrote: On Thursday 29 January 2015, Martin Peres wrote: v2: Review from Laura Ekstrand - generate the name of the gl method once - shorten some lines to stay in the 78 chars limit Signed-off-by: Martin Peres --- src/mapi/glapi/gen/ARB_direct_state_access.x

Re: [Mesa-dev] [PATCH 1/6] main: Added entry point for glCreateTransformFeedbacks

2015-01-29 Thread Fredrik Höglund
On Thursday 29 January 2015, Martin Peres wrote: > v2: Review from Laura Ekstrand > - generate the name of the gl method once > - shorten some lines to stay in the 78 chars limit > > Signed-off-by: Martin Peres > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ > src/mesa/main/test

[Mesa-dev] [PATCH 6/6] main: Added entry point for glGetTransformFeedbacki64_v

2015-01-29 Thread Martin Peres
v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper Signed-off-by: Martin Peres --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 ++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/transformfeedback.c | 32 +++

[Mesa-dev] [PATCH 0/6] Add 6 transform-feedback-related entry points for direct_state_access

2015-01-29 Thread Martin Peres
The corresponding piglit tests have been submited to the piglit ML. Warning: those tests will only work when forcing mesa to expose the DSA extension. Martin Peres (6): main: Added entry point for glCreateTransformFeedbacks main: Added entry point for glTransformFeedbackBufferBase main: Ad

[Mesa-dev] [PATCH 2/6] main: Added entry point for glTransformFeedbackBufferBase

2015-01-29 Thread Martin Peres
v2: Review from Laura Ekstrand - give more helpful error messages - factor the lookup code for the xfb and objBuf - replace some already-existing tabs with spaces - add comments to explain the cases where xfb == 0 or buffer == 0 - fix the condition for binding the transform buffer or not Signed-of

[Mesa-dev] [PATCH 3/6] main: Added entry point for glTransformFeedbackBufferRange

2015-01-29 Thread Martin Peres
v2: review from Laura Ekstrand - use the refactored code to lookup the objects - improve some error messages - factor out the gl method name computation - better handle the spec differences between the DSA and non-DSA cases - quote the spec a little more Signed-off-by: Martin Peres --- src/mapi/

[Mesa-dev] [PATCH 5/6] main: Added entry point for glGetTransformFeedbacki_v

2015-01-29 Thread Martin Peres
v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper Signed-off-by: Martin Peres --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/transformfeedback.c | 29 ++

[Mesa-dev] [PATCH 4/6] main: Added entry point for glGetTransformFeedbackiv

2015-01-29 Thread Martin Peres
v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper Signed-off-by: Martin Peres --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/transformfeedback.c | 25 +++

[Mesa-dev] [PATCH 1/6] main: Added entry point for glCreateTransformFeedbacks

2015-01-29 Thread Martin Peres
v2: Review from Laura Ekstrand - generate the name of the gl method once - shorten some lines to stay in the 78 chars limit Signed-off-by: Martin Peres --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/transformfeedb

Re: [Mesa-dev] [PATCH v4 2/3] i965/fs: Use NIR's scalarizing abilities and stop handling vectors

2015-01-29 Thread Kenneth Graunke
On Wednesday, January 28, 2015 04:27:23 PM Jason Ekstrand wrote: > On Wed, Jan 28, 2015 at 4:02 PM, Matt Turner wrote: > > > On Tue, Jan 27, 2015 at 5:31 PM, Jason Ekstrand > > wrote: > > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > > b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > > >

[Mesa-dev] [PATCH] i965: Add a better PRM citation for the IMS dimension mangling.

2015-01-29 Thread Kenneth Graunke
Paul originally had to reverse engineer these formulas based on the description about how the sampler works. The description here is not the easiest to follow - especially given that it's from the Sandybridge era, when the hardware only did 4x multisampling. Jordan and I recently found another pa