[Mesa-dev] [PATCH 10.5/15] i965/fs: Extend SEL peephole to handle only matching MOVs.

2013-10-29 Thread Matt Turner
Before this patch, the following code would not be optimized even though the final two instructions were common to the then and else blocks: (+f0) IF MOV dst2 ... MOV dst1 ... MOV dst0 ... ELSE MOV dst3 ... MOV dst1 ... MOV dst0 ... ENDIF This commit extends the peephol

[Mesa-dev] [PATCH 10/15] i965/fs: Add a pass to remove dead control flow.

2013-10-29 Thread Matt Turner
Removes if/endif and if/else/endif. total instructions in shared programs: 1366420 -> 1356988 (-0.69%) instructions in affected programs: 160818 -> 151386 (-5.87%) --- Split mistakenly squashed patch. src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_fs

Re: [Mesa-dev] OpenGL 4 drivers

2013-10-29 Thread Timothy Arceri
On Tue, 2013-10-29 at 13:13 -0700, Eric Anholt wrote: > Josh Klint writes: > > > Hi, > > > > As I understand it, Mesa is in charge of providing OpenGL drivers for > > Intel graphics hardware running on Linux. I'm in the process of > > porting our game engine over to Linux, and have been pleasant

Re: [Mesa-dev] [PATCH V2 09/12] i965: Add FS backend for builtin gl_SampleMask[]

2013-10-29 Thread Paul Berry
On 29 October 2013 19:22, Anuj Phogat wrote: > > > > On Mon, Oct 28, 2013 at 5:10 PM, Paul Berry wrote: > >> On 25 October 2013 16:45, Anuj Phogat wrote: >> >>> V2: >>>- Update comments >>>- Use fs_reg(0x) in AND instruction to get the 16 bit >>> sample_mask. >>>- Add a spec

Re: [Mesa-dev] [PATCH V2 11/12] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-29 Thread Paul Berry
On 29 October 2013 21:28, Paul Berry wrote: > On 29 October 2013 17:16, Anuj Phogat wrote: > >> >> >> >> On Tue, Oct 29, 2013 at 4:31 PM, Paul Berry wrote: >> >> >>> I think the right thing to do is to add: >>> >>> if (dispatch_width == 16) >>> fail("..."); >>> >>> to whatever parts of the v

Re: [Mesa-dev] [PATCH V2 11/12] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-29 Thread Paul Berry
On 29 October 2013 17:16, Anuj Phogat wrote: > > > > On Tue, Oct 29, 2013 at 4:31 PM, Paul Berry wrote: > > >> I think the right thing to do is to add: >> >> if (dispatch_width == 16) >> fail("..."); >> >> to whatever parts of the visitor you aren't confident will work properly >> in SIMD16.

Re: [Mesa-dev] [PATCH V2 09/12] i965: Add FS backend for builtin gl_SampleMask[]

2013-10-29 Thread Anuj Phogat
On Mon, Oct 28, 2013 at 5:10 PM, Paul Berry wrote: > On 25 October 2013 16:45, Anuj Phogat wrote: > >> V2: >>- Update comments >>- Use fs_reg(0x) in AND instruction to get the 16 bit >> sample_mask. >>- Add a special backend instructions to compute sample_mask. >>- Add a

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #8 from Bryce Harrington --- Yep, that does the trick. Tested-by: Bryce Harrington -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mes

[Mesa-dev] [PATCH 01/10] mesa: Remove gl_context::ResetStatus

2013-10-29 Thread Ian Romanick
From: Ian Romanick This isn't going to be used in the actual implemenation of glGetGraphicsResetStatus. Signed-off-by: Ian Romanick --- src/mesa/main/context.c | 1 - src/mesa/main/getstring.c | 2 +- src/mesa/main/mtypes.h| 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --

[Mesa-dev] [PATCH 08/10] i965: Add function to query the GPU reset status for a context

2013-10-29 Thread Ian Romanick
From: Ian Romanick v2: Update based on kernel interface / libdrm changes. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_context.h| 3 ++ src/mesa/drivers/dri/i965/brw_reset.c | 67 ++ 3 fil

[Mesa-dev] [PATCH 02/10] mesa: Add dd_function_table::GetGraphicsResetStatus

2013-10-29 Thread Ian Romanick
From: Ian Romanick This allows drivers to determine whether a GPU reset has occured. It should return non-zero status if a reset was observed by the specified context. Another mechanism will be used to observe resets occuring in other contexts in the share group. Signed-off-by: Ian Romanick -

[Mesa-dev] [PATCH 09/10] i965: Propagate the GPU reset notifiction strategy down into the driver

2013-10-29 Thread Ian Romanick
From: Ian Romanick If the application requests reset notifiction, connect up the reset status query method and set gl_context::ResetStrategy. v2: Update based on kernel interface / libdrm changes. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_context.c | 26 +++

[Mesa-dev] [PATCH 10/10] i965: Enable DRI_Robustness extension

2013-10-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/intel_screen.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index eafafa2..6adcd34 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 06/10] mesa/dri: Move context flag validation down into the drivers

2013-10-29 Thread Ian Romanick
From: Ian Romanick Soon some drivers will support a different set of flags than other drivers. If some flags have to be filtered in the driver, we might as well filter all of them in the driver. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. Signed-of

[Mesa-dev] [PATCH 07/10] i965: Handle __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag

2013-10-29 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_context.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 2bb52b6..9d5f348 100644 --- a/src/mesa/dr

[Mesa-dev] [PATCH 05/10] mesa/dri: Add basic plumbing for GLX_ARB_robustness reset notification strategy

2013-10-29 Thread Ian Romanick
From: Ian Romanick No drivers advertise the DRI2 extension yet, so no driver should ever see a value other than false for notify_reset. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. Signed-off-by: Ian Romanick --- src/gallium/state_trackers/dri/comm

[Mesa-dev] [PATCH 03/10] mesa: Add gl_shared_state::ShareGroupReset and gl_context::ShareGroupReset

2013-10-29 Thread Ian Romanick
From: Ian Romanick These will be used to determine whether to signal a GPU reset after another context in the share group has observed a reset. Signed-off-by: Ian Romanick --- src/mesa/main/context.c | 1 + src/mesa/main/mtypes.h | 18 ++ 2 files changed, 19 insertions(+) di

[Mesa-dev] [PATCH 04/10] mesa: Implement proper tracking logic for glGetGraphicsResetStatusARB

2013-10-29 Thread Ian Romanick
From: Ian Romanick Drivers still have to implement dd_function_table::GetGraphicsResetStatus. Signed-off-by: Ian Romanick --- src/mesa/main/getstring.c | 47 +++ 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/getstring.c

[Mesa-dev] [PATCH 00/10] Enable GLX_ARB_robustness

2013-10-29 Thread Ian Romanick
There are three parts this series: - The first part cleans up some code that was speculatively added to implement context reset noficition. This code didn't really work, so it needed to be replaced. - The second part wires up some necessary DRI2 bits so that drivers can tell the loader tha

Re: [Mesa-dev] [PATCH] clover: Calculate the optimal work group size when local_size is NULL

2013-10-29 Thread Aaron Watry
On Tue, Oct 29, 2013 at 7:06 PM, Niels Ole Salscheider wrote: > Hi Tom, > > this has been on my todo list for quite a while. > > Your patch looks good to me, but in my experience a block with approximately > the same size for each dimension gives slightly better performance in many > cases when co

Re: [Mesa-dev] [PATCH 08/15] i965/fs: Add fs_inst copy constructor.

2013-10-29 Thread Matt Turner
On Tue, Oct 29, 2013 at 2:32 AM, Pohjolainen, Topi wrote: > On Mon, Oct 28, 2013 at 11:31:32AM -0700, Matt Turner wrote: >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp | 30 ++ >> src/mesa/drivers/dri/i965/brw_fs.h | 1 + >> 2 files changed, 31 insertions(+) >> >> d

[Mesa-dev] [PATCH] automake: handle expat version pre 2.1

2013-10-29 Thread Emil Velikov
Commit aec20d66d9d13e0acd6a7199b63e1383e1e9900a (automake: properly handle non-default expat installation), assumed that up-to date distributions use a recent version of expat that handles security vunerabilities CVE-2012-1147 and CVE-2012-1148. Seems like this is not always the case and they prefe

Re: [Mesa-dev] [PATCH 09/15] i965/fs: New peephole optimization to generate SEL.

2013-10-29 Thread Matt Turner
On Tue, Oct 29, 2013 at 4:57 AM, Pohjolainen, Topi wrote: > On Mon, Oct 28, 2013 at 11:31:33AM -0700, Matt Turner wrote: >> fs_visitor::try_replace_with_sel optimizes only if statements whose >> "then" and "else" bodies contain a single MOV instruction. It also did >> could not handle constant arg

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #7 from Emil Velikov --- Created attachment 88329 --> https://bugs.freedesktop.org/attachment.cgi?id=88329&action=edit handle expat versions pre 2.1 (In reply to comment #6) > CVE-2012-1147 was determined not to be relevant on Ubun

Re: [Mesa-dev] [PATCH V2 11/12] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-29 Thread Anuj Phogat
On Tue, Oct 29, 2013 at 4:31 PM, Paul Berry wrote: > On 29 October 2013 15:59, Anuj Phogat wrote: > >> >> >> >> On Mon, Oct 28, 2013 at 6:48 PM, Paul Berry wrote: >> >>> On 25 October 2013 16:45, Anuj Phogat wrote: >>> - Enable GEN7_WM_MSDISPMODE_PERSAMPLE, GEN7_WM_POSOFFSET_SAMPLE,

[Mesa-dev] [PATCH 04/15] i965/fs: Don't emit null MOVs in CSE.

2013-10-29 Thread Matt Turner
We'd like to CSE some instructions, like CMP, that often have null destinations. Instead of replacing them with MOVs to null, just don't emit the MOV. --- Updated version: Replaced two comments with Eric's suggested comment. Left the comment about the basic block boundary in place. Let me know if

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #6 from Bryce Harrington --- CVE-2012-1147 was determined not to be relevant on Ubuntu: http://people.canonical.com/~ubuntu-security/cve/2012/CVE-2012-1147.html -- You are receiving this mail because: You are the assignee for the b

Re: [Mesa-dev] [PATCH] clover: Calculate the optimal work group size when local_size is NULL

2013-10-29 Thread Niels Ole Salscheider
Hi Tom, this has been on my todo list for quite a while. Your patch looks good to me, but in my experience a block with approximately the same size for each dimension gives slightly better performance in many cases when compared to one where one dimension is significantly larger. Maybe you coul

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #5 from Bryce Harrington --- Created attachment 88328 --> https://bugs.freedesktop.org/attachment.cgi?id=88328&action=edit Hardcode EXPAT in configure.ac expat 2.0 does not provide the pkgconfig file. Hardcoding EXPAT as suggested

Re: [Mesa-dev] [PATCH 05/15] i965/fs: Don't dead code eliminate CMP(N).

2013-10-29 Thread Matt Turner
On Mon, Oct 28, 2013 at 11:08 PM, Eric Anholt wrote: > Matt Turner writes: > >> Since compare instructions write the flag register, they should not be >> considered dead even if their destination is never read. Instead of >> removing them if found to be dead, set their destination to null to free

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #4 from Emil Velikov --- (In reply to comment #3) > expat-2.1.0 was released March 24 2012. That's kind of a long time for it to > not be in your distribution. > > I'm personally okay with requiring 2.1.0, but I suppose people want n

Re: [Mesa-dev] [PATCH 13/15] i965/fs: Optimize OR with identical sources into a MOV.

2013-10-29 Thread Matt Turner
On Tue, Oct 29, 2013 at 2:26 PM, Matt Turner wrote: > But hopefully your patch just avoids this problem entirely. I'll > provide an update later. 7 shader helped, 4 shaders hurt by going from my series and your patch, to my series, your patch, and disabling the original SEL-generating function fo

[Mesa-dev] [PATCH 1/2] winsys/radeon: use type-3 NOPs for CS padding on CIK

2013-10-29 Thread Marek Olšák
From: Marek Olšák The type-2 NOPs are said to be unstable. It doesn't make a difference here. --- src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/

[Mesa-dev] [PATCH 2/2] radeonsi: try to fix IA_MULTI_VGT_PARAM programming

2013-10-29 Thread Marek Olšák
From: Marek Olšák This doesn't make any difference on Bonaire, but it might help on Hawaii. --- src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/drivers/radeonsi/si_state.h | 1 + src/gallium/drivers/radeonsi/si_state_draw.c | 8 ++-- 3 files changed, 8 insertions(+), 2 d

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #3 from Matt Turner --- expat-2.1.0 was released March 24 2012. That's kind of a long time for it to not be in your distribution. I'm personally okay with requiring 2.1.0, but I suppose people want new Mesa on old things. I might su

[Mesa-dev] [PATCH 5/6] i965/gen7: Handle atomic instructions from the VEC4 back-end.

2013-10-29 Thread Francisco Jerez
This can deal with all the 15 32-bit untyped atomic operations the hardware supports, but only INC and PREDEC are going to be exposed through the API for now. v2: Represent atomics as GLSL intrinsics. Add support for variably indexed atomic counter arrays. --- src/mesa/drivers/dri/i965/brw_v

[Mesa-dev] [PATCH 6/6] i965/gen7: Add instruction latency estimates for untyped atomics and reads.

2013-10-29 Thread Francisco Jerez
The latency information has been obtained empirically from measurements taken on Haswell and Ivy Bridge. --- .../drivers/dri/i965/brw_schedule_instructions.cpp | 41 ++ 1 file changed, 41 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src

[Mesa-dev] [PATCH 4/6] i965/gen7: Handle atomic instructions from the FS back-end.

2013-10-29 Thread Francisco Jerez
This can deal with all the 15 32-bit untyped atomic operations the hardware supports, but only INC and PREDEC are going to be exposed through the API for now. v2: Represent atomics as GLSL intrinsics. Add support for variably indexed atomic counter arrays. Fix interaction with fragment d

[Mesa-dev] [PATCH 2/6] glsl: Linker support for ARB_shader_atomic_counters.

2013-10-29 Thread Francisco Jerez
v2: Add comments on the purpose of the auxiliary data structures. Check for atomic counter overlaps. Use the contains_atomic() convenience method. Add static assert with the number of expected shader stages. v3: Don't resize atomic arrays. --- src/glsl/Makefile.sources | 1 + src/

[Mesa-dev] Unreviewed patches from the ARB_shader_atomic_counters series.

2013-10-29 Thread Francisco Jerez
I merged most of my atomic-counters branch a few hours ago, however some of the patches haven't received much attention and I don't feel confident enough with pushing them yet, even though they have been sitting on the mailing list for more than six weeks. I'm resending only those patches that I'd

[Mesa-dev] [PATCH 1/6] glsl: Implement parser support for atomic counters.

2013-10-29 Thread Francisco Jerez
v2: Mark atomic counters as read-only variables. Move offset overlap code to the linker. Use the contains_atomic() convenience method. v3: Use pointer to integer instead of non-const reference. Add comment so we remember to add a spec quotation from the next GLSL release once the iss

[Mesa-dev] [PATCH 3/6] i965: Add a 'has_side_effects' back-end instruction predicate.

2013-10-29 Thread Francisco Jerez
This patch fixes the three dead code elimination passes and the VEC4/FS instruction scheduling passes so they leave instructions with side effects alone. At some point it might be interesting to have the instruction scheduler calculate the exact memory dependencies between atomic ops, but they're

Re: [Mesa-dev] [PATCH V2 11/12] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-29 Thread Paul Berry
On 29 October 2013 15:59, Anuj Phogat wrote: > > > > On Mon, Oct 28, 2013 at 6:48 PM, Paul Berry wrote: > >> On 25 October 2013 16:45, Anuj Phogat wrote: >> >>> - Enable GEN7_WM_MSDISPMODE_PERSAMPLE, GEN7_WM_POSOFFSET_SAMPLE, >>> GEN7_WM_OMASK_TO_RENDER_TARGET as per extension's specification.

Re: [Mesa-dev] [PATCH 10/15] i965/fs: Add a pass to remove dead control flow.

2013-10-29 Thread Matt Turner
Crap. Two patches were mistakenly squashed together resulting in this. I'll resend. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #2 from Bryce Harrington --- Reverting patch aec20d66 enables it to pass the configure check. commit aec20d66d9d13e0acd6a7199b63e1383e1e9900a Author: Emil Velikov Date: Tue Oct 29 21:14:41 2013 + automake: properly handle

[Mesa-dev] [Bug 71022] configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 --- Comment #1 from Bryce Harrington --- Same error on ubuntu 12.04 $ apt-cache policy expat expat: Installed: 2.0.1-7.2ubuntu1.1 Candidate: 2.0.1-7.2ubuntu1.1 Looks like expat.pc was added in expat 2.1. 2.0 doesn't install it, so mesa's p

Re: [Mesa-dev] [PATCH V2 11/12] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-29 Thread Anuj Phogat
On Mon, Oct 28, 2013 at 6:48 PM, Paul Berry wrote: > On 25 October 2013 16:45, Anuj Phogat wrote: > >> - Enable GEN7_WM_MSDISPMODE_PERSAMPLE, GEN7_WM_POSOFFSET_SAMPLE, >> GEN7_WM_OMASK_TO_RENDER_TARGET as per extension's specification. >> - Only enable one of GEN7_WM_8_DISPATCH_ENABLE or >> GE

[Mesa-dev] [Bug 71022] New: configure: error: Expat required for DRI.

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71022 Priority: medium Bug ID: 71022 Keywords: regression CC: emil.l.veli...@gmail.com Assignee: mesa-dev@lists.freedesktop.org Summary: configure: error: Expat required for DRI.

Re: [Mesa-dev] st/xorg targets/xorg cleanups v2

2013-10-29 Thread Emil Velikov
On 28/09/13 15:46, Emil Velikov wrote: > Slight extension over the previous two patches, removing unused variables > and headers. Last two patches do not strictly below in this series, as > they provide more consistent automake/configure usage of pkg-config > (PKG_CHECK_MODULES). > > Please commen

Re: [Mesa-dev] [PATCH 13/15] i965/fs: Optimize OR with identical sources into a MOV.

2013-10-29 Thread Matt Turner
On Tue, Oct 29, 2013 at 12:36 PM, Eric Anholt wrote: > Matt Turner writes: > >> Helps a lot of Steam games. >> >> total instructions in shared programs: 1287432 -> 1287130 (-0.02%) >> instructions in affected programs: 21447 -> 21145 (-1.41%) > > 13-15 are also: > > Reviewed-by: Eric Anholt

[Mesa-dev] [PATCH 1/2] winsys/radeon: Add a work around for drmGetVersion() when using render nodes

2013-10-29 Thread Tom Stellard
From: Tom Stellard DRM_IOCTL_VERSION is not currently a legal ioctl for render nodes, so we need to hard code the drm version when drmGetVersion() returns NULL. --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 36 --- 1 file changed, 25 insertions(+), 11 deletions(-)

[Mesa-dev] [PATCH 2/2] pipe-loader: Add support for render nodes

2013-10-29 Thread Tom Stellard
From: Tom Stellard You can use the --enable-pipe-loader-render-nodes configure flag to make the pipe-loader use render nodes for talking with the device. --- configure.ac | 6 ++ src/gallium/auxiliary/pipe-loader/Makefile.am | 5 ++ .../auxiliary/pipe

[Mesa-dev] gen7 scratch read + simd16 spilling v2

2013-10-29 Thread Eric Anholt
This is a resend of the series after updates for Paul's review feedback. This time I've done a full piglit run with spilling forced on and no regressions were found. It can also be found at gen7-scratch-read of my tree. ___ mesa-dev mailing list mesa-de

[Mesa-dev] [PATCH 6/8] i965/fs: Fix register unspills from a reg_offset.

2013-10-29 Thread Eric Anholt
We were clearing the reg_offset before trying to use it. Oops. Fixes glsl-fs-texture2drect with the reg spilling debug enabled. Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drive

[Mesa-dev] [PATCH 4/8] i965/fs: Exit the compile if spilling would overwrite in-use MRFs.

2013-10-29 Thread Eric Anholt
I believe this will never happen in SIMD8 mode, but it could for SIMD16 when we fix it. --- src/mesa/drivers/dri/i965/brw_fs.h| 1 + src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 23 +++ src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 ++ 3 files c

[Mesa-dev] [PATCH 3/8] i965/fs: Fix broken register spilling debug code.

2013-10-29 Thread Eric Anholt
Now that reg spilling generates new vgrfs, we were looping forever if you ever turned it on. Instead, move the debug code into the register allocator right near where we'd be doing spilling anyway, which should more accurately reflect how register spilling occurs in the wild. Reviewed-by: Paul Be

[Mesa-dev] [PATCH 2/8] i965/fs: Split "find what MRFs were used" to a helper function.

2013-10-29 Thread Eric Anholt
I'm going to need to reuse this for fixing register spilling on SIMD16. Note that BRW_MAX_MRF is 16, which is the same as BRW_MAX_GRF - GEN7_MRF_HACK_START. --- src/mesa/drivers/dri/i965/brw_fs.h| 1 + src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 33 ---

[Mesa-dev] [PATCH 5/8] i965/fs: Fix register spilling for 16-wide.

2013-10-29 Thread Eric Anholt
Things blew up when I enabled the debug register spill code without disabling 16-wide, so I decided to just fix 16-wide spilling. We still don't generate 16-wide when register spilling happens as part of allocation (since we expect it to be slower), but now we can experiment with allowing it in so

[Mesa-dev] [PATCH 8/8] i965/fs: Use the gen7 scratch read opcode when possible.

2013-10-29 Thread Eric Anholt
This avoids a lot of message setup we had to do otherwise. Improves GLB2.7 performance with register spilling force enabled by 1.6442% +/- 0.553218% (n=4). v2: Use BRW_PREDICATE_NONE, improve a comment (by Paul). Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_defines.h|

[Mesa-dev] [PATCH 7/8] i965: Merge together opcodes for SHADER_OPCODE_GEN4_SCRATCH_READ/WRITE

2013-10-29 Thread Eric Anholt
I'm going to be introducing gen7 variants, and the previous naming was going to get confusing. Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_defines.h | 7 +++ src/mesa/drivers/dri/i965/brw_fs.cpp| 4 ++-- src/mesa/drivers/dri/i965/brw_fs.h

[Mesa-dev] [PATCH 1/8] i965/fs: Update an ancient, wrong comment about reg_offset.

2013-10-29 Thread Eric Anholt
This hasn't been true since SIMD16 mode was added. --- src/mesa/drivers/dri/i965/brw_fs.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 5b78313..5f331e1 100644 --- a/src/mesa/drivers/dri/i9

Re: [Mesa-dev] [PATCH 2/3] gallium/auxiliary/indices: add u_primconvert

2013-10-29 Thread Brian Paul
On 10/29/2013 02:10 PM, Rob Clark wrote: From: Rob Clark A convenient front end to indices generate/translate code, for emulating primitives which are not supported natively by the driver. This handles saving/restoring index buffer state, etc. Signed-off-by: Rob Clark Reviewed-by: Brian Paul

Re: [Mesa-dev] OpenGL 4 drivers

2013-10-29 Thread Eric Anholt
Josh Klint writes: > Hi, > > As I understand it, Mesa is in charge of providing OpenGL drivers for > Intel graphics hardware running on Linux. I'm in the process of > porting our game engine over to Linux, and have been pleasantly > surprised so far that the OpenGL 4 drivers for Nvidia and ATI o

[Mesa-dev] [PATCH 4/6] mesa: fix some MSVC signed/unsigned compiler warnings

2013-10-29 Thread Brian Paul
--- src/mesa/main/performance_monitor.c |6 +++--- src/mesa/main/uniforms.c|2 +- src/mesa/main/vdpau.c |6 -- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c index 8

[Mesa-dev] [PATCH 6/6] vbo: fix MSVC double->float conversion warnings

2013-10-29 Thread Brian Paul
--- src/mesa/vbo/vbo_attrib_tmp.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h index 02c283d..bbc0205 100644 --- a/src/mesa/vbo/vbo_attrib_tmp.h +++ b/src/mesa/vbo/vbo_attrib_tmp.h @@ -140,7 +140,7 @@ stati

[Mesa-dev] [PATCH 1/6] st/draw: silence Mingw warning in pointer_to_offset()

2013-10-29 Thread Brian Paul
Fixes "warning: cast from pointer to integer of different size" for 64-bit builds. --- src/mesa/state_tracker/st_draw.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h index 3313fc8..394473b 100644 --- a/src

[Mesa-dev] [PATCH 2/6] glsl: fix MSVC int->bool conversion warning

2013-10-29 Thread Brian Paul
--- src/glsl/glsl_types.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index fdb1f3a..96eee5e 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -459,7 +459,7 @@ struct glsl_type { */ bool contains_atom

[Mesa-dev] [PATCH 3/6] meta: fix assorted MSVC int/float conversion warnings

2013-10-29 Thread Brian Paul
--- src/mesa/drivers/common/meta.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 798efa6..aa50dde 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/m

[Mesa-dev] [PATCH 5/6] swrast: fix MSVC double->float conversion warnings

2013-10-29 Thread Brian Paul
--- src/mesa/swrast/s_texfetch_tmp.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h index 7a68753..e2521b5 100644 --- a/src/mesa/swrast/s_texfetch_tmp.h +++ b/src/mesa/swrast/s_texfetch_tmp.h @@ -1537,7

[Mesa-dev] [PATCH 0/3] Add u_primconvert front-end to u_indices (v2)

2013-10-29 Thread Rob Clark
From: Rob Clark This patchset (compared to RFC I sent previously) changes u_primconvert to just be a front-end to the u_indices stuff. It handles binding/ restoring new index buffer state, etc. So driver using it just has to put this at the top of their pipe->draw_vbo(): if (prim_needs_emula

[Mesa-dev] [PATCH 1/3] gallium/auxiliary/indices: add start param

2013-10-29 Thread Rob Clark
From: Rob Clark Add 'start' parameter to generator/translator. Signed-off-by: Rob Clark Reviewed-by: Brian Paul --- v1: original v2: add comments src/gallium/auxiliary/indices/u_indices.c | 6 -- src/gallium/auxiliary/indices/u_indices.h | 21 - src

[Mesa-dev] [PATCH 3/3] freedreno: emulated unsupported primitive types

2013-10-29 Thread Rob Clark
From: Rob Clark Use u_primconvert to convert unsupported primitives into supported primitive plus index buffer. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a2xx/fd2_context.c | 24 ++- src/gallium/drivers/freedreno/a3xx/fd3_context.c | 12 +- src/galliu

[Mesa-dev] [PATCH 2/3] gallium/auxiliary/indices: add u_primconvert

2013-10-29 Thread Rob Clark
From: Rob Clark A convenient front end to indices generate/translate code, for emulating primitives which are not supported natively by the driver. This handles saving/restoring index buffer state, etc. Signed-off-by: Rob Clark Reviewed-by: Brian Paul --- v1: original v2: re-indent, fix initi

[Mesa-dev] OpenGL 4 drivers

2013-10-29 Thread Josh Klint
Hi, As I understand it, Mesa is in charge of providing OpenGL drivers for Intel graphics hardware running on Linux. I'm in the process of porting our game engine over to Linux, and have been pleasantly surprised so far that the OpenGL 4 drivers for Nvidia and ATI on Linux work perfectly: http:

Re: [Mesa-dev] [PATCH 13/15] i965/fs: Optimize OR with identical sources into a MOV.

2013-10-29 Thread Eric Anholt
Matt Turner writes: > Helps a lot of Steam games. > > total instructions in shared programs: 1287432 -> 1287130 (-0.02%) > instructions in affected programs: 21447 -> 21145 (-1.41%) 13-15 are also: Reviewed-by: Eric Anholt I'm spending a while thinking about the if->sel passes. Having 2

Re: [Mesa-dev] [PATCH] radeonsi: Allow longer intrinsic names

2013-10-29 Thread Kai Wasserbäch
Tom Stellard schrieb am 29.10.2013 17:48: > On Sun, Oct 27, 2013 at 07:36:07PM +0100, Kai Wasserbäch wrote: >> Fixes a boat load of Piglit tests for me, which crashed like fdo#70913 >> before. >> >> Thanks to Michel Dänzer for the tip. >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70

Re: [Mesa-dev] [PATCH] glsl: break the gl_FragData array into separate gl_FragData[i] variables

2013-10-29 Thread Paul Berry
On 29 October 2013 12:04, Eric Anholt wrote: > Paul Berry writes: > > > On 29 October 2013 11:20, Eric Anholt wrote: > > > >> Paul Berry writes: > >> > >> > On 27 October 2013 12:58, Marek Olšák wrote: > >> > > >> >> On Sun, Oct 27, 2013 at 4:19 PM, Paul Berry > > >> >> wrote: > >> >> > On 2

Re: [Mesa-dev] [PATCH] glsl: break the gl_FragData array into separate gl_FragData[i] variables

2013-10-29 Thread Eric Anholt
Paul Berry writes: > On 29 October 2013 11:20, Eric Anholt wrote: > >> Paul Berry writes: >> >> > On 27 October 2013 12:58, Marek Olšák wrote: >> > >> >> On Sun, Oct 27, 2013 at 4:19 PM, Paul Berry >> >> wrote: >> >> > On 20 October 2013 09:20, Marek Olšák wrote: >> >> >> >> >> >> From: Mare

Re: [Mesa-dev] [PATCH V2 07/12] i965: Add FS backend for builtin gl_SamplePosition

2013-10-29 Thread Anuj Phogat
On Tue, Oct 29, 2013 at 12:36 AM, Eric Anholt wrote: > Anuj Phogat writes: > > > V2: > >- Update comments. > >- Make changes to support simd16 mode. > >- Add compute_pos_offset variable in brw_wm_prog_key. > >- Add variable uses_omask in brw_wm_prog_data. > > > > Signed-off-by: A

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Fix register spilling for 16-wide.

2013-10-29 Thread Eric Anholt
Paul Berry writes: > On 21 October 2013 17:48, Eric Anholt wrote: > >> Things blew up when I enabled the debug register spill code without >> disabling 16-wide, so I decided to just fix 16-wide spilling. >> >> We still don't generate 16-wide when register spilling happens as part of >> allocatio

Re: [Mesa-dev] [PATCH] android: add megadriver_stub

2013-10-29 Thread Chad Versace
On 10/28/2013 04:29 PM, Emil Velikov wrote: On 28/10/13 08:07, Adrian Negreanu wrote: From: Adrian Negreanu Fixes linker error: ld: .../libmesa_dri_common_intermediates/libmesa_dri_common.a(dri_util.o): in function globalDriverAPI:dri_util.c(.data.rel+0x0): error: undefined reference

Re: [Mesa-dev] [PATCH] glsl: break the gl_FragData array into separate gl_FragData[i] variables

2013-10-29 Thread Paul Berry
On 29 October 2013 11:20, Eric Anholt wrote: > Paul Berry writes: > > > On 27 October 2013 12:58, Marek Olšák wrote: > > > >> On Sun, Oct 27, 2013 at 4:19 PM, Paul Berry > >> wrote: > >> > On 20 October 2013 09:20, Marek Olšák wrote: > >> >> > >> >> From: Marek Olšák > >> >> > >> >> This avo

[Mesa-dev] [PATCH] clover: Calculate the optimal work group size when local_size is NULL

2013-10-29 Thread Tom Stellard
From: Tom Stellard This results in huge performance improvements for applications like pyrit, which depend on the implementation to determine the optimal work group size. --- src/gallium/state_trackers/clover/api/kernel.cpp | 9 - src/gallium/state_trackers/clover/core/device.cpp | 19

[Mesa-dev] [PATCH] clover: Calculate the optimal work group size when local_size is NULL

2013-10-29 Thread Tom Stellard
From: Tom Stellard This results in huge performance improvements for applications like pyrit, which depend on the implementation to determine the optimal work group size. --- src/gallium/state_trackers/clover/api/kernel.cpp | 9 - src/gallium/state_trackers/clover/core/device.cpp | 19

Re: [Mesa-dev] [PATCH] glsl: break the gl_FragData array into separate gl_FragData[i] variables

2013-10-29 Thread Eric Anholt
Paul Berry writes: > On 27 October 2013 12:58, Marek Olšák wrote: > >> On Sun, Oct 27, 2013 at 4:19 PM, Paul Berry >> wrote: >> > On 20 October 2013 09:20, Marek Olšák wrote: >> >> >> >> From: Marek Olšák >> >> >> >> This avoids a defect in lower_output_reads. >> >> >> >> The problem is lower

Re: [Mesa-dev] [PATCH V2 10/12] i965/gen6: Enable the features required for GL_ARB_sample_shading

2013-10-29 Thread Anuj Phogat
On Mon, Oct 28, 2013 at 7:00 PM, Paul Berry wrote: > On 28 October 2013 18:14, Paul Berry wrote: > >> On 25 October 2013 16:45, Anuj Phogat wrote: >> >>> - Enable GEN6_WM_MSDISPMODE_PERSAMPLE, GEN6_WM_POSOFFSET_SAMPLE, >>> GEN6_WM_OMASK_TO_RENDER_TARGET as per extension's specification. >>> -

Re: [Mesa-dev] [PATCH 6/6] glsl: Move layout(location) checks to AST-to-HIR conversion

2013-10-29 Thread Paul Berry
On 27 October 2013 14:59, Ian Romanick wrote: > From: Ian Romanick > > This will simplify the addition of layout(location) qualifiers for > separate shader objects. This was validated with new piglit tests > arb_explicit_attrib_location/1.30/compiler/not-enabled-01.vert and > arb_explicit_attri

Re: [Mesa-dev] [PATCH 2/6] glsl: Extract explicit location code from apply_type_qualifier_to_variable

2013-10-29 Thread Paul Berry
On 27 October 2013 14:59, Ian Romanick wrote: > From: Ian Romanick > > Future patches will add some extra code to this path, and some of that > code will want to exit from the explicit location code early. > > Signed-off-by: Ian Romanick > --- > src/glsl/ast_to_hir.cpp | 159 >

Re: [Mesa-dev] [PATCH 4/6] glsl: Make mode_string function globally available

2013-10-29 Thread Paul Berry
On 27 October 2013 14:59, Ian Romanick wrote: > From: Ian Romanick > > I made this a function (instead of a method of ir_variable) because it > made the change set smaller, and I expect that there will be an overload > that takes an ir_var_mode enum. Having both functions used the same way > se

Re: [Mesa-dev] [PATCH 1/6] mesa: Drop unused return value from use_shader_program

2013-10-29 Thread Paul Berry
On 27 October 2013 14:59, Ian Romanick wrote: > From: Gregory Hainaut > > The return value has been unused since commit d348b0c. This was > originally included in another patch, but it was split out by Ian > Romanick. > > Reviewed-by: Ian Romanick > Cc: Eric Anholt > --- > src/mesa/main/shad

Re: [Mesa-dev] [PATCH] clover: mark gcc 4.7.0 as broken

2013-10-29 Thread Tom Stellard
On Sat, Oct 26, 2013 at 07:54:27PM +0200, David Heidelberger wrote: > From f188c10862f30205a7838a2e5f09d3e3a9b18f59 Mon Sep 17 00:00:00 2001 > From: David Heidelberger > Date: Fri, 25 Oct 2013 18:07:05 +0200 > Subject: [PATCH v2] clover: mark gcc 4.7.0 as broken > > It certainly not compile on 4.

[Mesa-dev] [PATCH] clover: Don't install headers when using the icd

2013-10-29 Thread Tom Stellard
From: Tom Stellard The ICD loader should be responsible for installing headers. --- src/gallium/state_trackers/clover/Makefile.am | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_tracker

Re: [Mesa-dev] [PATCH] radeonsi: Allow longer intrinsic names

2013-10-29 Thread Tom Stellard
On Sun, Oct 27, 2013 at 07:36:07PM +0100, Kai Wasserbäch wrote: > Fixes a boat load of Piglit tests for me, which crashed like fdo#70913 > before. > > Thanks to Michel Dänzer for the tip. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70913 > Signed-off-by: Kai Wasserbäch This looks

Re: [Mesa-dev] [PATCH] R600: Expand vector FSQRT ops

2013-10-29 Thread Tom Stellard
On Fri, Oct 25, 2013 at 05:46:38PM -0500, Aaron Watry wrote: > Reviewed-by: Aaron Watry > > I have tested this on a Radeon 5400 (Cedar), and I just sent a few > generated tests to the piglit list. > > --Aaron Thanks for testing, I have committed this patch. -Tom > > On Wed, Oct 23, 2013 at 6

Re: [Mesa-dev] [PATCH] glsl: break the gl_FragData array into separate gl_FragData[i] variables

2013-10-29 Thread Paul Berry
On 27 October 2013 12:58, Marek Olšák wrote: > On Sun, Oct 27, 2013 at 4:19 PM, Paul Berry > wrote: > > On 20 October 2013 09:20, Marek Olšák wrote: > >> > >> From: Marek Olšák > >> > >> This avoids a defect in lower_output_reads. > >> > >> The problem is lower_output_reads treats the gl_FragD

Re: [Mesa-dev] [PATCH] i965: Initialize vec4_visitor member variables.

2013-10-29 Thread Paul Berry
On 26 October 2013 00:13, Vinson Lee wrote: > Fixes "Uninitialized pointer field" defect reported by Coverity. > > Signed-off-by: Vinson Lee > Reviewed-by: Paul Berry > --- > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > dif

Re: [Mesa-dev] [PATCH 1/2] winsys: Correct Haiku winsys display target code

2013-10-29 Thread Brian Paul
On 10/28/2013 06:01 PM, Alexander von Gluck IV wrote: * Instead of assuming the displaytarget is the same stride / colorspace as the destination, lets actually check the source bitmap. * Fixes random stride issues in rendering --- src/gallium/winsys/sw/hgl/bitmap_wrapper.cpp | 20 ++

Re: [Mesa-dev] [PATCH 3/4] glsl: add ir_cache class and functions for shader serialization

2013-10-29 Thread Paul Berry
On 29 October 2013 00:53, Tapani wrote: > On 10/28/2013 10:09 PM, Paul Berry wrote: > > +static uint32_t _unique_id(ir_variable *var) >> +{ >> + char buffer[256]; >> + _mesa_snprintf(buffer, 256, "%s_%p", var->name, var); >> + return _mesa_str_checksum(buffer); >> > > Two problems: > > 1.

Re: [Mesa-dev] [PATCH] i965/vec4: Reduce working set size of live variables computation.

2013-10-29 Thread Paul Berry
On 29 October 2013 00:28, Eric Anholt wrote: > Paul Berry writes: > > > On 21 October 2013 11:20, Eric Anholt wrote: > > > >> Orbital Explorer was generating a 4000 instruction geometry shader, > which > >> was taking 275 trips through dead code elimination and register > >> coalescing, each of

Re: [Mesa-dev] [PATCH 09/15] i965/fs: New peephole optimization to generate SEL.

2013-10-29 Thread Pohjolainen, Topi
On Mon, Oct 28, 2013 at 11:31:33AM -0700, Matt Turner wrote: > fs_visitor::try_replace_with_sel optimizes only if statements whose > "then" and "else" bodies contain a single MOV instruction. It also did > could not handle constant arguments, since they cause an extra MOV > immediate to be generate

  1   2   >