Re: [Mesa-dev] [PATCH 01/10] i965: Add functions to convert float <-> VF.

2014-10-24 Thread Ville Syrjälä
On Thu, Oct 23, 2014 at 11:19:04PM -0700, Matt Turner wrote: > On Thu, Oct 23, 2014 at 11:01 PM, Ville Syrjälä wrote: > > On Thu, Oct 23, 2014 at 04:44:03PM -0700, Matt Turner wrote: > >> --- > >> src/mesa/drivers/dri/i965/Makefile.sources | 1 + > >> src/mesa/drivers/dri/i965/brw_packed_float

[Mesa-dev] [PATCH 1/5] mesa: Refactor viewport transform computation.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich This is for preparation of ARB_clip_control. v3: Add comments. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/dri/i915/i915_state.c| 26 ++-- src/mesa/main/state.c | 9 +++--- src/mesa/main/viewport.c | 52 +++

[Mesa-dev] [PATCH 5/5] gallium: Enable ARB_clip_control for gallium drivers.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Gallium should be prepared fine for ARB_clip_control. So enable this and mention it in the release notes. v2: Only enable for drivers announcing the freshly introduced PIPE_CAP_CLIP_HALFZ capability. v3: Use extension enable infrastructure to connect PIPE_CAP_CLIP_HALFZ w

[Mesa-dev] [PATCH 0/5] Implement clip control v3

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The next approach to bring decent depth buffer precision to mesa. The patch series implements ARB_clip_control in mesa and enables the extension for the gallium drivers. v2: Only enable on those gallium drivers that already support clip_halfz. v3: Add more comments.

[Mesa-dev] [PATCH 4/5] gallium: introduce PIPE_CAP_CLIP_HALFZ.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich In preparation of ARB_clip_control. Let the driver decide if it supports pipe_rasterizer_state::clip_halfz being set to true. v3: Initially enable on ilo. Signed-off-by: Mathias Froehlich http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 2/5] mesa: Implement ARB_clip_control.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Implement the mesa parts of ARB_clip_control. So far no driver enables this. v3: Restrict getting clip control state to the availability of ARB_clip_control. Move to transformation state. Handle clip control state with the GL_TRANSFORM_BIT. Move _FrontBit update into state

[Mesa-dev] [PATCH 3/5] mesa: Handle clip control in meta operations.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Restore clip control to the default state if MESA_META_VIEWPORT or MESA_META_DEPTH_TEST is requested. v3: Handle clip control state with MESA_META_TRANSFORM. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/common/meta.c | 6 ++ src/mesa/drivers/common/meta.h |

Re: [Mesa-dev] [PATCH 01/10] i965: Add functions to convert float <-> VF.

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > --- > src/mesa/drivers/dri/i965/Makefile.sources | 1 + > src/mesa/drivers/dri/i965/brw_packed_float.c | 74 > > src/mesa/drivers/dri/i965/brw_packed_float.h | 25 ++ > 3 files changed, 100 insertions(+) > create mode 100644 src/mes

Re: [Mesa-dev] [PATCH 02/10] i965: Disassemble vector float immediates properly.

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > --- > src/mesa/drivers/dri/i965/brw_disasm.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c > b/src/mesa/drivers/dri/i965/brw_disasm.c > index 53ec767..6f5290e 100644 > --- a/src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH 02/10] i965: Disassemble vector float immediates properly.

2014-10-24 Thread Francisco Jerez
Francisco Jerez writes: > Matt Turner writes: > >> --- >> src/mesa/drivers/dri/i965/brw_disasm.c | 7 ++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c >> b/src/mesa/drivers/dri/i965/brw_disasm.c >> index 53ec767..6f5290e 100644

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 20 > src/mesa/drivers/dri/i965/brw_fs.h | 1 + > src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 +++ > 3 files changed, 24 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [Bug 84566] Unify the format conversion code

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 --- Comment #40 from Iago Toral --- Jason, I think we may want to be a bit more conservative with the pack/unpack fast paths when we consider the internal base format. Right now, if the src or dst formats are RGBA we will try the pack/unpack fas

Re: [Mesa-dev] [PATCH 00/10] i965: Silly vec4 un/packing optimizations

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > When I implemented these built-ins couple of years ago, I thought there > must be a neat way to optimize them. I tried a couple of things with the > different vector immediates i965 provides, but the V/UV types are too > small to represent the appropriate shift values, and s

Re: [Mesa-dev] [PATCH] i965: Fix an off-by-1 error in the draw upload code's size calculation.

2014-10-24 Thread Petri Latvala
On 10/16/2014 05:01 AM, Ian Romanick wrote: That seems very likely. This may be an optimization / work-around to enable via driconf. If two games make that mistake, you can be sure there are others. :( Some data points: Dungeon Defenders is another Unreal Engine 3 game, but it doesn't give

[Mesa-dev] [PATCH] Releasing a surfaceless EGL context doesn't release underlying DRI context.

2014-10-24 Thread Kalyan Kondapally
From: Alexandros Frantzis driUnbindContext() checks for valid drawables before calling the driver unbind function. In case of Surfaceless contexts, the drawables are always Null and we end up not releasing the underlying DRI context. Moving the call to the driver function before the drawable vali

Re: [Mesa-dev] [PATCH] Releasing a surfaceless EGL context doesn't release underlying DRI context.

2014-10-24 Thread Daniel Stone
Hi, On 24 October 2014 11:03, Kalyan Kondapally < kondapallykalyancontrib...@gmail.com> wrote: > driUnbindContext() checks for valid drawables before calling the driver > unbind function. In case of Surfaceless contexts, the drawables are always > Null and we end up not releasing the underlying D

Re: [Mesa-dev] [PATCH] Releasing a surfaceless EGL context doesn't release underlying DRI context.

2014-10-24 Thread Daniel Stone
On 24 October 2014 11:18, Daniel Stone wrote: > Yep, that looks good to me; seems like you've found the only possible case > that would trigger this breakage. Calling DestroyContext will always unbind > if it's current in that thread (see the end _mesa_free_context_data); it's > only when you fol

[Mesa-dev] [Bug 74563] Surfaceless contexts are not properly released by DRI drivers

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=74563 Daniel Stone changed: What|Removed |Added CC||dan...@fooishbar.org -- You are receivin

Re: [Mesa-dev] [PATCH RFC] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Timothy Arceri
On Thu, 2014-10-23 at 09:20 -0600, Brian Paul wrote: > Nice, just a few comments below. > > > On 10/22/2014 10:02 PM, Timothy Arceri wrote: > > Makes use of SSE to speed up compute of min and max elements > > > > Callgrind cpu usage results from pts benchmarks: > > > > Openarena 0.8.8: 3.67% -> 1

[Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Timothy Arceri
Makes use of SSE to speed up compute of min and max elements Callgrind cpu usage results from pts benchmarks: Openarena 0.8.8: 3.67% -> 1.03% UrbanTerror: 2.36% -> 0.81% Signed-off-by: Timothy Arceri --- src/mesa/Android.libmesa_dricore.mk | 3 +- src/mesa/Makefile.am| 3 +-

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Timothy Arceri
On Fri, 2014-10-24 at 23:47 +1100, Timothy Arceri wrote: > +#ifdef __SSE4_1__ > +#include "main/glheader.h" Just noticed this extra header after sending out the patch. Fixed now. > +#include "main/sse_minmax.h" > +#include > + > +void > +_mesa_uint_array_min_max(const unsigned *ui_indices, unsi

[Mesa-dev] [PATCH] glsl: Standardize names and fix typos

2014-10-24 Thread Andres Gomez
--- src/glsl/linker.cpp | 4 ++-- src/glsl/lower_offset_array.cpp | 10 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 47a722d..c3f435c 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1679,7 +167

Re: [Mesa-dev] [PATCH 3/8] dri: Change __DriverApiRec::CreateContext to take a struct for attribs

2014-10-24 Thread Neil Roberts
Ian Romanick writes: > Hmm... There's a flag. The flag says whether a field is valid. When > the field is valid, there is only one possible value for that field. > This seems weird to me. If the field can have only one value, we don't > really need it. This applies to the next patch as well. I'm

Re: [Mesa-dev] [PATCH 2/5] mesa: Implement ARB_clip_control.

2014-10-24 Thread Brian Paul
On 10/24/2014 01:26 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich Implement the mesa parts of ARB_clip_control. So far no driver enables this. v3: Restrict getting clip control state to the availability of ARB_clip_control. Move to transformation state. Handle clip control state

Re: [Mesa-dev] [PATCH RFC] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Brian Paul
On 10/24/2014 06:28 AM, Timothy Arceri wrote: On Thu, 2014-10-23 at 09:20 -0600, Brian Paul wrote: Nice, just a few comments below. On 10/22/2014 10:02 PM, Timothy Arceri wrote: Makes use of SSE to speed up compute of min and max elements Callgrind cpu usage results from pts benchmarks: Ope

Re: [Mesa-dev] [PATCH 2/5] mesa: Implement ARB_clip_control.

2014-10-24 Thread Mathias Fröhlich
Hi, On Friday, October 24, 2014 09:00:02 Brian Paul wrote: > Sorry to be pedantic, but I think some better names and comments would > be helpful. How about this: > > /** GL_ARB_clip_control */ > GLenum ClipOrigin; /**< GL_LOWER_LEFT or GL_UPPER_LEFT */ > GLenum ClipDepthMode;

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 5:47 AM, Timothy Arceri wrote: > Makes use of SSE to speed up compute of min and max elements > > Callgrind cpu usage results from pts benchmarks: > > Openarena 0.8.8: 3.67% -> 1.03% > UrbanTerror: 2.36% -> 0.81% > > Signed-off-by: Timothy Arceri > --- > src/mesa/Android.

Re: [Mesa-dev] [RFC] egl: Add DRI3 support to the EGL backend.

2014-10-24 Thread Emil Velikov
Hi Joonas, On 22/10/14 18:17, Joonas Lahtinen wrote: > Hi, > > This patch introduced DRI3 support to the EGL backend. > > Patch is on top of current master. With the patch you can observe > reduced CPU stress when many glViewport calls are made. > > Notice that the DRI3 extension is only expose

Re: [Mesa-dev] [PATCH 01/10] i965: Add functions to convert float <-> VF.

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 1:17 AM, Francisco Jerez wrote: > Matt Turner writes: >> +float >> +brw_vf_to_float(unsigned char vf) >> +{ >> + union fu fu; >> + >> + /* ±0.0f is special cased. */ >> + if (vf == 0x00 || vf == 0x80) { >> + fu.u = vf << 24; >> + return fu.f; >> + } > > N

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Emil Velikov
Hi Timothy, On 24/10/14 12:47, Timothy Arceri wrote: > Makes use of SSE to speed up compute of min and max elements > > Callgrind cpu usage results from pts benchmarks: > > Openarena 0.8.8: 3.67% -> 1.03% > UrbanTerror: 2.36% -> 0.81% > Sigh... why can't everyone be like Gentoo - set compiler fl

Re: [Mesa-dev] [PATCH 02/10] i965: Disassemble vector float immediates properly.

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 1:27 AM, Francisco Jerez wrote: > Francisco Jerez writes: > >> Matt Turner writes: >> >>> --- >>> src/mesa/drivers/dri/i965/brw_disasm.c | 7 ++- >>> 1 file changed, 6 insertions(+), 1 deletion(-) >>> >>> diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c >>> b/src

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez wrote: > Matt Turner writes: > >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp | 20 >> src/mesa/drivers/dri/i965/brw_fs.h | 1 + >> src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 +++ >> 3 files cha

[Mesa-dev] [Bug 84566] Unify the format conversion code

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 --- Comment #41 from Jason Ekstrand --- (In reply to Iago Toral from comment #39) > From your explanations I think this is what we should do too. For example, > when the source type is RGBA ubyte, we will do something like this: > > if (src_arra

[Mesa-dev] [Bug 84566] Unify the format conversion code

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 --- Comment #42 from Jason Ekstrand --- (In reply to Iago Toral from comment #40) > Jason, I think we may want to be a bit more conservative with the > pack/unpack fast paths when we consider the internal base format. > > Right now, if the src o

Re: [Mesa-dev] [PATCH 00/10] i965: Silly vec4 un/packing optimizations

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 1:45 AM, Francisco Jerez wrote: > Matt Turner writes: > >> When I implemented these built-ins couple of years ago, I thought there >> must be a neat way to optimize them. I tried a couple of things with the >> different vector immediates i965 provides, but the V/UV types a

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Daniel Stone
Hi, On 24 October 2014 18:51, Emil Velikov wrote: > Sigh... why can't everyone be like Gentoo - set compiler flags and > rebuild for your machine/cpu :P > > Apart from the Makefile.sources change spotted by Matt, can you make use > of USE_SSE41 ? Take a look at commit b3121bfd413 for the whys an

[Mesa-dev] [GLX] Multiple GLXFBConfigs have the same fbconfigID

2014-10-24 Thread Neil Monday
Can anyone tell me where the fbconfigID is generated from? I am seeing glxinfo report multiple configs that all use the same ID. I also would like to know if this is normal or if it is a problem. Thanks, Neil ___ mesa-dev mailing list mesa-dev@lists.fre

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez > wrote: >> Matt Turner writes: >> >>> --- >>> src/mesa/drivers/dri/i965/brw_fs.cpp | 20 >>> src/mesa/drivers/dri/i965/brw_fs.h | 1 + >>> src/mesa/drivers/dri/i965/brw_fs_gener

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Kenneth Graunke
On Friday, October 24, 2014 08:47:03 PM Francisco Jerez wrote: > Matt Turner writes: > > > On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez wrote: > >> Matt Turner writes: > >> > >>> --- > >>> src/mesa/drivers/dri/i965/brw_fs.cpp | 20 > >>> src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 10:47 AM, Francisco Jerez wrote: > Matt Turner writes: > >> On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez >> wrote: >>> Matt Turner writes: >>> --- src/mesa/drivers/dri/i965/brw_fs.cpp | 20 src/mesa/drivers/dri/i965/brw

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 11:12 AM, Matt Turner wrote: > On Fri, Oct 24, 2014 at 10:47 AM, Francisco Jerez > wrote: >> Matt Turner writes: >> >>> On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez >>> wrote: Matt Turner writes: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > On Fri, Oct 24, 2014 at 10:47 AM, Francisco Jerez > wrote: >> Matt Turner writes: >> >>> On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez >>> wrote: Matt Turner writes: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 20

[Mesa-dev] [PATCH 1.5/10] i965: Add unit test for float <-> VF conversions.

2014-10-24 Thread Matt Turner
Using Eric's original VF -> float conversion code to initialize the table. --- src/mesa/drivers/dri/i965/Makefile.am | 7 ++ .../drivers/dri/i965/test_vf_float_conversions.cpp | 84 ++ 2 files changed, 91 insertions(+) create mode 100644 src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 03/10] i965/fs: Add vector float immediate infrastructure.

2014-10-24 Thread Francisco Jerez
Matt Turner writes: > On Fri, Oct 24, 2014 at 11:12 AM, Matt Turner wrote: >> On Fri, Oct 24, 2014 at 10:47 AM, Francisco Jerez >> wrote: >>> Matt Turner writes: >>> On Fri, Oct 24, 2014 at 1:34 AM, Francisco Jerez wrote: > Matt Turner writes: > >> --- >> src/mes

[Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index d4b72d8..49b50ee 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 1/5] i965/fs: Use instruction execution sizes when generating scratch reads/writes

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index c2010c0..c95beb6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_gener

[Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Jason Ekstrand
I thought this would be a clever way to make spilling less expensive. However, it appears that the oword read/write messages we are using for spilling ignore the execution size and assume SIMD16 whenever working with more than one register. --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 6

[Mesa-dev] [PATCH 3/5] i965: Use the spill destination for the message header on GEN >= 7

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_eu_emit.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 92f19e2..bb6334b 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/

[Mesa-dev] [PATCH 5/5] i965/fs: Make scratch write instructions use the correct execution size

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 49b50ee..3dedfa7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_

[Mesa-dev] [PATCH 1/2] llvmpipe: Flush stdout on lp_test_* unit tests.

2014-10-24 Thread jfonseca
From: José Fonseca So that the order of test messages and gallivm/llvmpipe debug output is preserved. Trivial. --- src/gallium/drivers/llvmpipe/lp_test_arit.c | 1 + src/gallium/drivers/llvmpipe/lp_test_format.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gallium/drivers/llvmpi

[Mesa-dev] [PATCH 2/2] llvmpipe: Ensure the packed input of the lp_test_format is aligned.

2014-10-24 Thread jfonseca
From: José Fonseca https://bugs.freedesktop.org/show_bug.cgi?id=85377 http://llvm.org/bugs/show_bug.cgi?id=21365 --- src/gallium/drivers/llvmpipe/lp_test_format.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/sr

Re: [Mesa-dev] [PATCH 5/5] gallium: Enable ARB_clip_control for gallium drivers.

2014-10-24 Thread Marek Olšák
I think the Mesa flag should be _NEW_TRANSFORM and not _NEW_VIEWPORT. This should be corrected in one of the previous patches. Using _NEW_TRANSFORM will avoid the dependency on _NEW_VIEWPORT in the rasterizer state. Marek On Fri, Oct 24, 2014 at 9:26 AM, wrote: > From: Mathias Fröhlich > > Gal

[Mesa-dev] [PATCH 1.5/10] i965: Add unit test for float <-> VF conversions.

2014-10-24 Thread Matt Turner
Using Eric's original VF -> float conversion code to initialize the table. --- v2: Add tests for the ??0.0f/??0.125f special case. Simplify stuff using f2u() function. src/mesa/drivers/dri/i965/Makefile.am | 7 ++ .../drivers/dri/i965/test_vf_float_conversions.cpp | 98 +

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand wrote: > I thought this would be a clever way to make spilling less expensive. > However, it appears that the oword read/write messages we are using for > spilling ignore the execution size and assume SIMD16 whenever working with > more than one reg

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Jason Ekstrand
On Oct 24, 2014 12:51 PM, "Matt Turner" wrote: > > On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand wrote: > > I thought this would be a clever way to make spilling less expensive. > > However, it appears that the oword read/write messages we are using for > > spilling ignore the execution size a

Re: [Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand wrote: Without some more information -- like what was actually wrong, I have no idea how to review this. Looks like mostly some changes reg_size -> REG_SIZE. > --- > src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +-- > 1 file ch

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 12:55 PM, Jason Ekstrand wrote: > On Oct 24, 2014 12:51 PM, "Matt Turner" wrote: >> On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand >> wrote: >> > I thought this would be a clever way to make spilling less expensive. >> > However, it appears that the oword read/write mes

Re: [Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

2014-10-24 Thread Jason Ekstrand
On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp > b/src/mesa/drivers/dri/i965/brw_fs_reg_alloca

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Jason Ekstrand
On Fri, Oct 24, 2014 at 1:00 PM, Matt Turner wrote: > On Fri, Oct 24, 2014 at 12:55 PM, Jason Ekstrand > wrote: > > On Oct 24, 2014 12:51 PM, "Matt Turner" wrote: > >> On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand > >> wrote: > >> > I thought this would be a clever way to make spilling less

Re: [Mesa-dev] [PATCH 2/2] llvmpipe: Ensure the packed input of the lp_test_format is aligned.

2014-10-24 Thread Roland Scheidegger
For the series: Reviewed-by: Roland Scheidegger Am 24.10.2014 um 21:34 schrieb jfons...@vmware.com: > From: José Fonseca > > https://bugs.freedesktop.org/show_bug.cgi?id=85377 > http://llvm.org/bugs/show_bug.cgi?id=21365 > --- > src/gallium/drivers/llvmpipe/lp_test_format.c | 12 ++-- >

Re: [Mesa-dev] [PATCH 00/15] Lots of little clean ups

2014-10-24 Thread Ian Romanick
On 10/23/2014 10:55 AM, Matt Turner wrote: > On Thu, Oct 23, 2014 at 9:35 AM, Ian Romanick wrote: >> This is just a big pile of clean up patches that I accumulated while >> working on something else. These have been mostly stable for a few >> days, and the other work is starting to settle. I fig

[Mesa-dev] [Bug 85419] New: Assertion fail with triangle strips

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85419 Bug ID: 85419 Summary: Assertion fail with triangle strips Product: Mesa Version: unspecified Hardware: x86 (IA32) OS: Linux (All) Status: NEW Severity: n

[Mesa-dev] [Bug 85419] Assertion fail with triangle strips

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85419 --- Comment #1 from Roland Scheidegger --- Do you have a full test program or can you supply an apitrace capture? I suspect there's something wrong with restart index handling though it generally seems to work otherwise (as I side note, I'd advis

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Ian Romanick
On 10/24/2014 05:47 AM, Timothy Arceri wrote: > Makes use of SSE to speed up compute of min and max elements > > Callgrind cpu usage results from pts benchmarks: > > Openarena 0.8.8: 3.67% -> 1.03% > UrbanTerror: 2.36% -> 0.81% > > Signed-off-by: Timothy Arceri > --- > src/mesa/Android.libmesa

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Matt Turner
On Fri, Oct 24, 2014 at 2:06 PM, Ian Romanick wrote: > On 10/24/2014 05:47 AM, Timothy Arceri wrote: >> + vec_count = count & ~0x3; >> + ui_indices_ptr = (__m128i*)ui_indices; >> + for (i = 0; i < vec_count / 4; i++) { >> + ui_indices4 = _mm_loadu_si128(&ui_indices_ptr[i]);

Re: [Mesa-dev] [PATCH] mesa/main: Fix unpack_R5G6B5_UNORM.

2014-10-24 Thread Iago Toral
El 2014-10-08 07:11, Jason Ekstrand escribió: On Oct 8, 2014 6:36 AM, "Iago Toral" wrote: > > El 2014-10-07 21:46, Jason Ekstrand escribió: > >> On Oct 7, 2014 12:04 PM, "Iago Toral Quiroga" >> wrote: >>  > >>  > There is a comment warning about the fact that this is not doing >> what w

[Mesa-dev] [PATCH 4/4] i965/fs: Compute q-values for register allocation manually

2014-10-24 Thread Jason Ekstrand
Previously, we were allowing the register allocation code to do the computation for us in ra_set_finalize. However, the runtime for this computation is O(c^4 * g) where c is the number of classes and g is the number of GRF registers. However, these q-values are directly computable based on the wa

Re: [Mesa-dev] [PATCH] Revert "configure: ask vdpau.pc for the default location of the vdpau drivers"

2014-10-24 Thread Christian König
Am 07.10.2014 um 15:19 schrieb Ilia Mirkin: On Tue, Oct 7, 2014 at 9:13 AM, Christian König wrote: Am 07.10.2014 um 15:07 schrieb Ilia Mirkin: On Tue, Oct 7, 2014 at 9:04 AM, Christian König wrote: Am 07.10.2014 um 03:11 schrieb Ilia Mirkin: I'm under the assumption that OMX/etc don't do a

[Mesa-dev] [PATCH] mesa: cleanup _mesa_valid_to_render code

2014-10-24 Thread Tapani Pälli
Patch moves shader_linked_or_absent functionality as part of _mesa_valid_to_render function. Function contained code marked as "not normally enabled" which would not work any more and removing that made it small enough to justify the move. Signed-off-by: Tapani Pälli --- src/mesa/main/context.c

[Mesa-dev] [PATCH 13/13] gallium/docs: Add minor info about Ilo, Freedreno, VC4, Noop drivers

2014-10-24 Thread Alexander Troosh
--- src/gallium/docs/source/distro.rst | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/gallium/docs/source/distro.rst b/src/gallium/docs/source/distro.rst index d69c186..7cbd7c7 100644 --- a/src/gallium/docs/source/distro.rst +++ b/src/galli

Re: [Mesa-dev] [PATCH 3/3] clover: add clCompile

2014-10-24 Thread Francisco Jerez
I'm attaching a somewhat cleaned up version of this patch, does it look OK to you? Tom, do you have any comments on the LLVM changes? It looks good to me. EdB writes: > --- > src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- > src/gallium/state_trackers/clover/api/program.cpp | 39

Re: [Mesa-dev] TGSI and Tessellation Control Shader outputs

2014-10-24 Thread Marek Olšák
I have been thinking about this more and I actually like the way OpenGL does it. The indexing with InvocationID can be lowered with a copy propagation pass for drivers that cannot do it - or they can just ignore the innermost index and assume it's always equal to InvocationID. I also prefer having

Re: [Mesa-dev] [PATCH] clover: Add support for compiling to native object code v2

2014-10-24 Thread Tom Stellard
On Wed, Oct 08, 2014 at 12:06:20PM +0300, Francisco Jerez wrote: > Tom Stellard writes: > > > v2: > > - Split build_module_native() into three separate functions. > > - Code cleanups. > > --- > > .../state_trackers/clover/llvm/invocation.cpp | 200 > > - > > src/gal

[Mesa-dev] [PATCH 1/2] clover: add allow_empty_tag

2014-10-24 Thread EdB
to allow empty objs() list checks --- src/gallium/state_trackers/clover/core/object.hpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/gallium/state_trackers/clover/core/object.hpp b/src/gallium/state_trackers/clover/core/object.hpp index 697565c..01fa779 100644 --- a

[Mesa-dev] [PATCH 11/17] i965/fs: don't use ir->type in emit_texture_gen4()

2014-10-24 Thread Kenneth Graunke
From: Connor Abbott We already have the type from the original destination. Signed-off-by: Connor Abbott --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH] i965: Fix an off-by-1 error in the draw upload code's size calculation.

2014-10-24 Thread Ilia Mirkin
On Tue, Oct 14, 2014 at 7:42 PM, Kenneth Graunke wrote: > According to INTEL_DEBUG=perf, "Borderlands: The Pre-Sequel" was > stalling on nearly every glBufferSubData call, with very slightly > overlapping busy ranges. > > It turns out the draw upload code was accidentally including an extra > stri

[Mesa-dev] Trivial fix for ChromeOS unit test

2014-10-24 Thread Lionel Landwerlin
Hey there, While enabling LibVA on ChromeOS with their Ozone backend (EGL/GLES2 without X), I stumbled upon a crash. Here is a simple patch to fix it. It's pretty much a copy/paste of a snippet already in EGL/wayland. Cheers, - Lionel ___ mesa-dev ma

Re: [Mesa-dev] [PATCH] mesa: validate sampler uniforms during gluniform calls

2014-10-24 Thread Francisco Jerez
Tapani Pälli writes: > Patch fixes 'glsl-2types-of-textures-on-same-unit' in WebGL conformance > test suite, no Piglit regressions. > > To avoid adding potentially heavy check during draw (valid_to_render), > check is done during uniform updates by inspecting TexturesUsed mask. > > A new boolean

[Mesa-dev] [Bug 84566] Unify the format conversion code

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 --- Comment #23 from Iago Toral --- (In reply to Jason Ekstrand from comment #21) > (In reply to Iago Toral from comment #19) > > Jason, for conversions where we cannot use a fast path in the master > > converter (that is, where we need to unpack

Re: [Mesa-dev] [PATCH 6/8] intel: Don't flush the old context in intelMakeCurrent

2014-10-24 Thread Ian Romanick
On 10/01/2014 12:00 PM, Neil Roberts wrote: > It shouldn't be necessary to flush the context within the driver > implementation because the old context is explicitly flushed in > _mesa_make_current before the driver code is reached. It is useful to only > have a single place that flushes the contex

[Mesa-dev] [PATCH 08/10] radeonsi: load ring resource descriptors only once

2014-10-24 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 73 +--- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 0373f34..007041a 100644 --- a/src/galli

[Mesa-dev] [Bug 85189] New: llvm/invocation.cpp: In function 'void {anonymous}::optimize(llvm::Module*, unsigned int, const std::vector&)': llvm/invocation.cpp:324:18: error: expected

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85189 Bug ID: 85189 Summary: llvm/invocation.cpp: In function 'void {anonymous}::optimize(llvm::Module*, unsigned int, const std::vector&)': llvm/invocation.cpp:324:18: e

[Mesa-dev] [PATCH 02/10] radeonsi: make pm4 state generation for shaders independent of the context

2014-10-24 Thread Marek Olšák
From: Marek Olšák The si_pm4_delete_state calls became useless, because the pm4 state is always generated only once. --- src/gallium/drivers/radeonsi/si_state_draw.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_st

[Mesa-dev] [PATCH 2/4] st/mesa: add ST_DEBUG=wf option which enables wireframe rendering

2014-10-24 Thread Marek Olšák
From: Marek Olšák Useful for tessellation. --- src/mesa/state_tracker/st_atom_rasterizer.c | 11 +-- src/mesa/state_tracker/st_debug.c | 1 + src/mesa/state_tracker/st_debug.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_trac

[Mesa-dev] [Bug 79706] [TRACKER] Mesa regression tracker

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79706 Bug 79706 depends on bug 49713, which changed state. Bug 49713 Summary: piglit glsl-const-folding-01 regression https://bugs.freedesktop.org/show_bug.cgi?id=49713 What|Removed |Added

[Mesa-dev] [WIP 14/25] i965/fs: Add support for ir_unop_pack_double_2x32

2014-10-24 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_fs.h | 2 ++ .../drivers/dri/i965/brw_fs_channel_expressions.cpp | 3 +++ src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 20 3 files changed, 25 insertions(+) diff --git a/src/mesa

[Mesa-dev] [WIP 23/25] i965/fs: Lower double precision scalars into vectors

2014-10-24 Thread Topi Pohjolainen
On gen7 the hardware supports only single precision scalar operands. This patch modifies fs_visitor to allocate temporary general registers and to manually copy the original 64-bits into the temporary 8- or 16-wide vector depending on the execution size. Signed-off-by: Topi Pohjolainen --- src/m

Re: [Mesa-dev] [PATCH] glsl: Lower constant arrays to uniform arrays.

2014-10-24 Thread Tom Stellard
On Wed, Oct 15, 2014 at 05:32:11PM -0700, Kenneth Graunke wrote: > Consider GLSL code such as: > >const ivec2 offsets[] = > ivec2[](ivec2(-1, -1), ivec2(-1, 0), ivec2(-1, 1), > ivec2(0, -1), ivec2(0, 0), ivec2(0, 1), > ivec2(1, -1), ivec2(1, 0), ivec2(1, 1

[Mesa-dev] [PATCH 04/16] winsys/sw/wrapper: hook up is_displaytarget_format_supported

2014-10-24 Thread David Heidelberger
From: Christoph Bumiller Looks like no one's using this thing. Signed-off-by: David Heidelberger --- src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/

[Mesa-dev] [PATCH 04/10] radeonsi: revert hack for random failures in glsl-max-varyings

2014-10-24 Thread Marek Olšák
From: Marek Olšák This reverts commit 032e5548b3d4b5efa52359218725cb8e31b622ad. I've run glsl-max-varyings 30 times and it always passed. --- src/gallium/drivers/radeonsi/si_state_draw.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_s

[Mesa-dev] [Bug 84570] Borderlands 2/Pre-Sequel: Constant frame rate drops while playing; really bad with additionl lighting

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84570 --- Comment #29 from Kenneth Graunke --- (In reply to Ian C. Bullard from comment #27) > > The buffer wait time might be at least partially due to a game bug (though > > there might be a workaround in Mesa at some point): > > http://lists.freedes

[Mesa-dev] [PATCH 04/14] winsys/sw/wrapper: hook up is_displaytarget_format_supported

2014-10-24 Thread David Heidelberger
From: Christoph Bumiller Gallium Nine make use of it, because we wrapping around sw screen. Signed-off-by: David Heidelberger --- src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsy

[Mesa-dev] [PATCH 11/16] gallium/auxiliary: add inc and dec alternative with return

2014-10-24 Thread David Heidelberger
From: Christoph Bumiller Signed-off-by: David Heidelberger --- src/gallium/auxiliary/util/u_atomic.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/gallium/auxiliary/util/u_atomic.h b/src/gallium/auxiliary/util/u_atomic.h index b99ccc9..3f58504 100644 --- a

[Mesa-dev] [PATCH 1/1] configure: fix typos

2014-10-24 Thread Jan Vesely
Signed-off-by: Jan Vesely --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 93b25a2..a588d55 100644 --- a/configure.ac +++ b/configure.ac @@ -1970,7 +1970,7 @@ if test -n "$with_gallium_drivers"; then fi dnl Set LLVM_L

Re: [Mesa-dev] [PATCH 2/5] mesa: Implement ARB_clip_control.

2014-10-24 Thread Ilia Mirkin
On Wed, Oct 22, 2014 at 1:13 PM, wrote: > From: Mathias Fröhlich > > Implement the mesa parts of ARB_clip_control. > So far no driver enables this. > > Signed-off-by: Mathias Froehlich > --- > src/mapi/glapi/gen/ARB_clip_control.xml | 25 +++ > src/mapi/glapi/gen/gl_API.xml |

Re: [Mesa-dev] [PATCH 1/2] clover: Factor input validation of clCompileProgram into a new function

2014-10-24 Thread Francisco Jerez
A couple of minor nit-picks below, with those fixed: Reviewed-by: Francisco Jerez Tom Stellard writes: > This factors out the validation that is common with clBuildProgram(). > --- > src/gallium/state_trackers/clover/api/program.cpp | 36 > --- > 1 file changed, 26 insert

Re: [Mesa-dev] [PATCH RFC] mesa: add SSE optimisation for glDrawElements

2014-10-24 Thread Brian Paul
Nice, just a few comments below. On 10/22/2014 10:02 PM, Timothy Arceri wrote: Makes use of SSE to speed up compute of min and max elements Callgrind cpu usage results from pts benchmarks: Openarena 0.8.8: 3.67% -> 1.03% UrbanTerror: 2.36% -> 0.81% Signed-off-by: Timothy Arceri --- src/me

[Mesa-dev] [PATCH 04/15] linker: Rely on _mesa_clear_shader_program_data to clear link information

2014-10-24 Thread Ian Romanick
From: Ian Romanick _mesa_link_shader_program already calls _mesa_clear_shader_program_data before calling link_shaders, so this is already done. Signed-off-by: Ian Romanick --- src/glsl/linker.cpp | 14 -- src/glsl/main.cpp | 2 ++ src/glsl/standa

[Mesa-dev] [PATCH 4/4] u_blitter: put a comment on util_blitter_cache_all_shaders()

2014-10-24 Thread Brian Paul
--- src/gallium/auxiliary/util/u_blitter.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index ea9094e..e59fa04 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_bl

[Mesa-dev] [Bug 79706] [TRACKER] Mesa regression tracker

2014-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79706 Bug 79706 depends on bug 85189, which changed state. Bug 85189 Summary: llvm/invocation.cpp: In function 'void {anonymous}::optimize(llvm::Module*, unsigned int, const std::vector&)': llvm/invocation.cpp:324:18: error: expected type-specifier h

  1   2   >