[Mesa-dev] [PATCH 2/2] i965/vec4: Drop extra MOVs for MATH operands on Broadwell.

2014-05-28 Thread Kenneth Graunke
Broadwell can handle MATH on immediates, and can also handle source modifiers. Signed-off-by: Kenneth Graunke Cc: "10.2" --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/

[Mesa-dev] [PATCH 1/2] i965/fs: Drop extra MOVs for MATH operands on Broadwell.

2014-05-28 Thread Kenneth Graunke
Broadwell can handle MATH on immediates, and can also handle source modifiers. Signed-off-by: Kenneth Graunke Cc: "10.2" --- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH 0.5/1] i965: Pass brw to translate_wrap_mode().

2014-05-28 Thread Kenneth Graunke
This lets us do generation checks. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_state.h| 3 ++- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 8 src/mesa/drivers/dri/i965/gen7_sampler_state.c | 6 +++--- 3 files changed, 9 insertions(+), 8 deletion

[Mesa-dev] [PATCH] i965: Support GL_CLAMP natively on Broadwell.

2014-05-28 Thread Kenneth Graunke
The new hardware actually supports this OpenGL 1.x feature natively, so we can finally drop our shader workarounds. Not many applications use GL_CLAMP, and most use it unintentionally, but it's trivial to do right, so we should. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_d

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Connor Abbott
On Wed, May 28, 2014 at 8:50 PM, Eric Anholt wrote: > Connor Abbott writes: > >> On Wed, May 28, 2014 at 2:37 PM, Eric Anholt wrote: >>> Here's a series I started back in January as a little experiment. >>> Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd >>> just fixed

[Mesa-dev] [PATCH V2 10/11] Wayland/egl: Add Gpu offloading support

2014-05-28 Thread Axel Davy
Signed-off-by: Axel Davy --- src/egl/drivers/dri2/egl_dri2.h | 5 +- src/egl/drivers/dri2/platform_wayland.c | 171 ++-- 2 files changed, 142 insertions(+), 34 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index

[Mesa-dev] [PATCH V2 11/11] Radeonsi: Use dma_copy when possible for si_blit.

2014-05-28 Thread Axel Davy
This improves GLX DRI3 Gpu offloading significantly on cpu bound benchmarks particularly. No performance impact for DRI2 Gpu offloading. v2: Add missing tests Signed-off-by: Axel Davy --- src/gallium/drivers/radeonsi/si_blit.c | 20 1 file changed, 20 insertions(+) diff --

[Mesa-dev] [PATCH V2 03/11] gallium: Use base.stamp for all drawable invalidation checks.

2014-05-28 Thread Axel Davy
From: Keith Packard Upper levels of the stack use base.stamp to tell when a drawable needs to be revalidated, but the dri state tracker was using dPriv->lastStamp. Those two, along with dri2.stamp, all get simultaneously incremented when a dri2 invalidate event was delivered, and so end up contai

[Mesa-dev] [PATCH V2 04/11] Loader: Add gpu selection code via DRI_PRIME.

2014-05-28 Thread Axel Davy
v2: Fix the leak of device_name Signed-off-by: Axel Davy --- src/loader/loader.c | 189 src/loader/loader.h | 7 ++ 2 files changed, 196 insertions(+) diff --git a/src/loader/loader.c b/src/loader/loader.c index 666d015..7a4015c 100644 ---

[Mesa-dev] [PATCH V2 07/11] DRIimage: add blitImage to the specification

2014-05-28 Thread Axel Davy
It allows to blit two __DRIimages. Signed-off-by: Axel Davy --- include/GL/internal/dri_interface.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 4d57d0b..2ee3164 100644 --- a/inclu

[Mesa-dev] [PATCH V2 06/11] loader: Use drirc device_id parameter in complement to DRI_PRIME

2014-05-28 Thread Axel Davy
DRI_PRIME is not very handy, because you have to launch the executable with it set, which is not always easy to do. By using drirc, the user specifies the target executable and the device to use. After that the program will be launched everytime on the target device. v2: fix compilation issue Sig

[Mesa-dev] [PATCH V2 08/11] Gallium/dri2: implement blitImage

2014-05-28 Thread Axel Davy
Signed-off-by: Axel Davy --- src/gallium/state_trackers/dri/drm/dri2.c | 43 --- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index eefbe42..f4db3d8 100644 --- a/sr

[Mesa-dev] [PATCH V2 09/11] GLX/DRI3: Add Gpu offloading support.

2014-05-28 Thread Axel Davy
Signed-off-by: Axel Davy --- src/glx/dri3_glx.c | 235 +++- src/glx/dri3_priv.h | 2 + 2 files changed, 200 insertions(+), 37 deletions(-) diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 3d8a662..54030bb 100644 --- a/src/glx/dri3_glx.

[Mesa-dev] [PATCH V2 05/11] drirc: Add string support

2014-05-28 Thread Axel Davy
Signed-off-by: Axel Davy --- src/mesa/drivers/dri/common/xmlconfig.c | 29 + src/mesa/drivers/dri/common/xmlconfig.h | 7 ++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlc

[Mesa-dev] [PATCH V2 01/11] gallium: Add __DRIimageDriverExtension support to gallium

2014-05-28 Thread Axel Davy
From: Keith Packard Provide the hook to pull textures out of __DRIimage structures and use them as renderbuffers. Signed-off-by: Keith Packard --- v2: Added the image->flushFrontBuffer fix. src/gallium/state_trackers/dri/drm/dri2.c | 238 +- 1 file changed, 230 ins

[Mesa-dev] [PATCH V2 02/11] gallium/dri: fix unsetting of format when encountering depth/stencil

2014-05-28 Thread Axel Davy
From: Ben Skeggs Signed-off-by: Ben Skeggs Signed-off-by: Keith Packard --- src/gallium/state_trackers/dri/drm/dri2.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri

Re: [Mesa-dev] [PATCH 17/21] glsl: Make ir_variable::num_state_slots and ir_variable::state_slots private

2014-05-28 Thread Tapani
On 05/28/2014 10:20 PM, Ian Romanick wrote: On 05/28/2014 07:22 AM, Tapani wrote: On 05/28/2014 05:49 AM, Ian Romanick wrote: From: Ian Romanick Also move num_state_slots inside ir_variable_data for better packing. The payoff for this will come in a few more patches. Signed-off-by: Ian Roma

Re: [Mesa-dev] [PATCH] st/egl: do not link against libloader

2014-05-28 Thread Michel Dänzer
On 29.05.2014 11:43, Emil Velikov wrote: > Move the link to the final targets, like any other place in > mesa/gallium. This allows better visibilty and will prevent > us from including the library archive twice. > > Resolves multiple definition of `loader_get_pci_id_for_fd' > > Bugzilla: https://

Re: [Mesa-dev] [PATCH] st/egl: do not link against libloader

2014-05-28 Thread Chia-I Wu
On Thu, May 29, 2014 at 10:43 AM, Emil Velikov wrote: > Move the link to the final targets, like any other place in > mesa/gallium. This allows better visibilty and will prevent > us from including the library archive twice. > > Resolves multiple definition of `loader_get_pci_id_for_fd' Thanks for

[Mesa-dev] [PATCH] st/egl: do not link against libloader

2014-05-28 Thread Emil Velikov
Move the link to the final targets, like any other place in mesa/gallium. This allows better visibilty and will prevent us from including the library archive twice. Resolves multiple definition of `loader_get_pci_id_for_fd' Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263 Bugzilla: ht

Re: [Mesa-dev] [PATCH 2/2] glsl: reduce size of swizzle field in ir_state_slot

2014-05-28 Thread Tapani
On 05/28/2014 08:15 PM, Ian Romanick wrote: This won't actually do anything because the compiler still rounds the size of the structure upto a multiple of sizeof(int) for alignment purposes. With your v2 patch applied, I still get (gdb) print sizeof(ir_state_slot) $1 = 24 which is 6*sizeof(int

Re: [Mesa-dev] [PATCH 01/11] gallium: Add __DRIimageDriverExtension support to gallium

2014-05-28 Thread Michel Dänzer
On 28.05.2014 21:13, Axel Davy wrote: > On 28/05/2014 03:47, Michel Dänzer wrote : >> On 28.05.2014 09:55, Axel Davy wrote: >>> From: Keith Packard >>> >>> Provide the hook to pull textures out of __DRIimage structures and >>> use them as >>> renderbuffers. >>> >>> Signed-off-by: Keith Packard >>

Re: [Mesa-dev] [PATCH 1/2] glsl: reduce size of glsl_type::base_type

2014-05-28 Thread Tapani
On 05/28/2014 08:11 PM, Ian Romanick wrote: Types are fly-weights, so there aren't that many of them allocated... maybe a couple hundred, tops. Have you measured the memory savings? Nope, I was mainly looking at this with 'shader cache' hat on, there I'm trying to write things as small as pos

Re: [Mesa-dev] [PATCH 06/11] loader: Use drirc device_id parameter in complement to DRI_PRIME

2014-05-28 Thread Axel Davy
On 28/05/2014 08:12, Axel Davy a écrit : On 27/05/2014 23:46, Michel Dänzer wrote : This breaks the build for me, see below. That's an out-of-tree build FWIW. Replacing -I$(top_srcdir)/src/mesa/drivers/dri/common/ \ by -I$(top_builddir)/src/mesa/drivers/dri/common \ in the patch should solv

Re: [Mesa-dev] [PATCH 11/11] Radeonsi: Use dma_copy when possible for si_blit.

2014-05-28 Thread Michel Dänzer
On 29.05.2014 10:49, Axel Davy wrote: > On 28/05/2014 04:40, Michel Dänzer wrote : >> Might be safer to fall back for info->render_condition_enable as well. > Do you know exactly what are the implications of this flag ? > > The commit message adding it and the comment near its definition don't hel

Re: [Mesa-dev] [PATCH 2/2] egl-static: resolve library linking

2014-05-28 Thread Chia-I Wu
On Wed, May 28, 2014 at 10:58 PM, Emil Velikov wrote: > With DRM_PLATFORM libloader.la in linked into libEGL pleading > to multiple defition of the loader* symbols. For every other > platform we need to explicitly link against it. I would prefer to see libloader.la removed from st/egl, and added t

[Mesa-dev] [Bug 79382] build error: multiple definition of `loader_get_pci_id_for_fd'

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79382 --- Comment #2 from Michel Dänzer --- (In reply to comment #1) > Does the following patch help ? http://patchwork.freedesktop.org/patch/26746/ Works for me. -- You are receiving this mail because: You are the assignee for the bug.

Re: [Mesa-dev] [PATCH 11/11] Radeonsi: Use dma_copy when possible for si_blit.

2014-05-28 Thread Axel Davy
On 28/05/2014 04:40, Michel Dänzer wrote : Might be safer to fall back for info->render_condition_enable as well. Do you know exactly what are the implications of this flag ? The commit message adding it and the comment near its definition don't help me to understand it. This flag is always set

[Mesa-dev] [PATCH 2/2] glsl: Eliminate unused built-in variables after compilation

2014-05-28 Thread Ian Romanick
From: Ian Romanick After compilation (and before linking) we can eliminate quite a few built-in variables. Basically, any uniform or constant (e.g., gl_MaxVertexTextureImageUnits) that isn't used (with one exception) can be eliminated. System values, vertex shader inputs (with one exception), a

[Mesa-dev] [PATCH 0/2] Eliminate unused built-in variables

2014-05-28 Thread Ian Romanick
This series goes on top of my previous series, but I wish I had done it first. I was getting ready to move on to ir_rvalue, when I looked at the set of variables in the shaders in the dota2 trace. When I saw all the built-ins, I recalled a suggestion that Eric had made about dead-code eliminating

[Mesa-dev] [PATCH 1/2] glsl: Validate that built-in uniforms have backing state

2014-05-28 Thread Ian Romanick
From: Ian Romanick All built-in uniforms are supposed to be backed by some GL state. The state_slots field describes this backing state. This helped me track down a bug in a later patch. Signed-off-by: Ian Romanick --- src/glsl/ir_validate.cpp | 8 1 file changed, 8 insertions(+) d

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Eric Anholt
Connor Abbott writes: > On Wed, May 28, 2014 at 2:37 PM, Eric Anholt wrote: >> Here's a series I started back in January as a little experiment. >> Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd >> just fixed up Mesa IR back in the day. But, given that we're still >>

Re: [Mesa-dev] [PATCH v2 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-28 Thread Connor Abbott
On Wed, May 28, 2014 at 6:18 PM, Kenneth Graunke wrote: > On 05/28/2014 01:17 PM, Matt Turner wrote: >> On Wed, May 28, 2014 at 1:09 PM, Kenneth Graunke >> wrote: >>> On 05/27/2014 06:23 PM, Connor Abbott wrote: This way, when someone modifies create_test_cases.py and forgets to commit

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Ian Romanick
On 05/28/2014 12:44 PM, Ilia Mirkin wrote: > On Wed, May 28, 2014 at 3:39 PM, Ian Romanick wrote: >> On 05/28/2014 12:17 PM, Ian Romanick wrote: >>> On 05/27/2014 08:28 PM, Matt Turner wrote: On Tue, May 27, 2014 at 7:49 PM, Ian Romanick wrote: > From: Ian Romanick > > No change

Re: [Mesa-dev] [PATCH 00/19] i965/fs: load_payload on Gen7+.

2014-05-28 Thread Connor Abbott
On Tue, May 27, 2014 at 9:47 PM, Matt Turner wrote: > Here's a respin of my load_payload series from mid-April with some > feedback from Ken addressed and some bugs fixed. > > This series is available in my tree (with a few unrelated patches > before it) > >git://people.freedesktop.org/~mattst

[Mesa-dev] [PATCH 2/3] llvmpipe: honor the render_condition_enable bit in blits.

2014-05-28 Thread sroland
From: Roland Scheidegger This fixes piglit nv_conditional_render-blitframebuffer. --- src/gallium/drivers/llvmpipe/lp_surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index ac8ee26..09ca39d 100

[Mesa-dev] [PATCH 3/3] softpipe: honor the render_condition_enable bit in blits.

2014-05-28 Thread sroland
From: Roland Scheidegger --- src/gallium/drivers/softpipe/sp_surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/softpipe/sp_surface.c b/src/gallium/drivers/softpipe/sp_surface.c index 102e8e8..768e898 100644 --- a/src/gallium/drivers/softpipe/sp_surface.c +++ b

[Mesa-dev] [PATCH 1/3] gallium/docs: improve documentation of render condition wrt blits.

2014-05-28 Thread sroland
From: Roland Scheidegger --- src/gallium/docs/source/context.rst | 10 +++--- src/gallium/include/pipe/p_state.h | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index 571ee87..a9625f3 100644

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Kenneth Graunke
On 05/28/2014 11:37 AM, Eric Anholt wrote: > Here's a series I started back in January as a little experiment. > Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd > just fixed up Mesa IR back in the day. But, given that we're still > feeding Mesa IR into drivers as well (A

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Fredrik Höglund
On Wednesday 28 May 2014, Matt Turner wrote: > On Tue, May 27, 2014 at 7:49 PM, Ian Romanick wrote: > > From: Ian Romanick > > > > No change in the peak ir_variable memory usage in a trimmed apitrace of > > dota2 on 64-bit. > > > > No change in the peak ir_variable memory usage in a trimmed apitr

[Mesa-dev] [Bug 79382] build error: multiple definition of `loader_get_pci_id_for_fd'

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79382 --- Comment #1 from Emil Velikov --- Does the following patch help ? http://patchwork.freedesktop.org/patch/26746/ -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-de

[Mesa-dev] [Bug 79263] Linking error in egl_gallium.la when compiling 32 bit on multiarch

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79263 --- Comment #3 from Emil Velikov --- Jose has pushed a patch that adds the symbol back, although it causes a multiple definition of loader* as expected - bug 79382. Proper fix is available http://patchwork.freedesktop.org/patch/26746/ -- You a

Re: [Mesa-dev] [PATCH v2 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-28 Thread Kenneth Graunke
On 05/28/2014 01:17 PM, Matt Turner wrote: > On Wed, May 28, 2014 at 1:09 PM, Kenneth Graunke > wrote: >> On 05/27/2014 06:23 PM, Connor Abbott wrote: >>> This way, when someone modifies create_test_cases.py and forgets to >>> commit their changes again, people will notice. >>> >>> v2: make sure

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Connor Abbott
On Wed, May 28, 2014 at 2:37 PM, Eric Anholt wrote: > Here's a series I started back in January as a little experiment. > Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd > just fixed up Mesa IR back in the day. But, given that we're still > feeding Mesa IR into drivers

Re: [Mesa-dev] [PATCH 12/19] i965/fs: Apply cube map array fixup and restore the payload.

2014-05-28 Thread Chris Forbes
Oh, ignore that -- I had misread your lowering code. On Thu, May 29, 2014 at 9:40 AM, Chris Forbes wrote: > It looks like the special handling of sources[0] in lowering > LOAD_PAYLOAD would break this -- or does it never see this? > > On Wed, May 28, 2014 at 1:47 PM, Matt Turner wrote: >> So tha

Re: [Mesa-dev] [PATCH 12/19] i965/fs: Apply cube map array fixup and restore the payload.

2014-05-28 Thread Chris Forbes
It looks like the special handling of sources[0] in lowering LOAD_PAYLOAD would break this -- or does it never see this? On Wed, May 28, 2014 at 1:47 PM, Matt Turner wrote: > So that we don't have partial writes to a large VGRF. Will be cleaned up > by register coalescing. > --- > src/mesa/drive

Re: [Mesa-dev] [PATCH 09/19] i965/fs: Add SHADER_OPCODE_LOAD_PAYLOAD.

2014-05-28 Thread Pohjolainen, Topi
On Wed, May 28, 2014 at 10:06:03AM -0700, Matt Turner wrote: > On Wed, May 28, 2014 at 7:43 AM, Pohjolainen, Topi > wrote: > > On Tue, May 27, 2014 at 06:47:40PM -0700, Matt Turner wrote: > >> Will be used to simplify the handling of large virtual GRFs in SSA form. > >> --- > >> src/mesa/drivers/

Re: [Mesa-dev] [PATCH 05/14] i965: Merge variable hashtables of fs and vec4 visitors

2014-05-28 Thread Pohjolainen, Topi
On Wed, May 28, 2014 at 10:46:42AM -0700, Matt Turner wrote: > On Wed, May 28, 2014 at 10:43 AM, Matt Turner wrote: > > Doesn't backend_visitor need to have a destructor that calls > > hash_table_dtor? > > Ah, next patch. Good catch, it is a rebase error of mine. It definitely belongs here. ___

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Eric Anholt
Ian Romanick writes: > On 05/28/2014 11:37 AM, Eric Anholt wrote: >> Here's a series I started back in January as a little experiment. >> Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd >> just fixed up Mesa IR back in the day. But, given that we're still >> feeding Me

Re: [Mesa-dev] [PATCH 06/16] mesa: Fix a "1" vs "i" typo in MVP setup.

2014-05-28 Thread Eric Anholt
Ian Romanick writes: > This should also get tagged for stable... probably 10.1 and 10.2. Did you note the commit message where it said that it's a no-op change? pgpAPvCa02_7Q.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.fre

[Mesa-dev] [PATCH] mesa: Free the compiled shader IR after it has been linked.

2014-05-28 Thread Eric Anholt
If the shader compiled once, then we can compile it again. Compiled shaders almost always get used in just one program, so holding that compiled IR until the program is freed is just a waste of memory. On the other hand, if they are either reusing shader objects to compile multiple times, or link

Re: [Mesa-dev] [PATCH 07/19] i965/fs: Add a function to resize fs_inst's sources array.

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 12:50 AM, Tapani Pälli wrote: > On 05/28/2014 04:47 AM, Matt Turner wrote: >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp | 9 + >> src/mesa/drivers/dri/i965/brw_fs.h | 2 ++ >> 2 files changed, 11 insertions(+) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs

[Mesa-dev] [Bug 77161] [softpipe] piglit fbo-generatemipmap-cubemap S3TC_DXT1 regression

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77161 Kenneth Graunke changed: What|Removed |Added Blocks|79039 | --- Comment #5 from Kenneth Graunke

[Mesa-dev] [Bug 79039] [TRACKER] Mesa 10.2 release tracker

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79039 Kenneth Graunke changed: What|Removed |Added Depends on|77161 | -- You are receiving this mail becau

[Mesa-dev] [Bug 78318] [swrast] piglit glsl-kwin-blur-1 regression

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=78318 --- Comment #1 from Kenneth Graunke --- This is the first broken commit: commit ca21cffebd063354291d561eadc2ded8795a5333 Author: Ian Romanick Date: Tue Mar 25 18:34:31 2014 -0700 meta: Fix saving the program pipeline state This code

Re: [Mesa-dev] [PATCH v2 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 1:09 PM, Kenneth Graunke wrote: > On 05/27/2014 06:23 PM, Connor Abbott wrote: >> This way, when someone modifies create_test_cases.py and forgets to >> commit their changes again, people will notice. >> >> v2: make sure we parse the right directories and check for existanc

Re: [Mesa-dev] [PATCH v2 3/4] glsl/tests: call create_test_cases.py in optimization-test

2014-05-28 Thread Kenneth Graunke
On 05/27/2014 06:23 PM, Connor Abbott wrote: > This way, when someone modifies create_test_cases.py and forgets to > commit their changes again, people will notice. > > v2: make sure we parse the right directories and check for existance the > right way. > > Signed-off-by: Connor Abbott > --- >

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Ilia Mirkin
On Wed, May 28, 2014 at 3:39 PM, Ian Romanick wrote: > On 05/28/2014 12:17 PM, Ian Romanick wrote: >> On 05/27/2014 08:28 PM, Matt Turner wrote: >>> On Tue, May 27, 2014 at 7:49 PM, Ian Romanick wrote: From: Ian Romanick No change in the peak ir_variable memory usage in a trimmed

Re: [Mesa-dev] [PATCH 2/3] i965: Add runtime checks for line antialiasing in Gen < 6.

2014-05-28 Thread Kenneth Graunke
On 05/27/2014 03:50 AM, Iago Toral Quiroga wrote: > In Gen < 6 the hardware generates a runtime bit that indicates whether AA data > has to be sent as part of the framebuffer write SEND message. This affects the > specific case where we have setup antialiased line rendering and we render > polygons

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Ian Romanick
On 05/28/2014 12:17 PM, Ian Romanick wrote: > On 05/27/2014 08:28 PM, Matt Turner wrote: >> On Tue, May 27, 2014 at 7:49 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> No change in the peak ir_variable memory usage in a trimmed apitrace of >>> dota2 on 64-bit. >>> >>> No change in the pea

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Ian Romanick
On 05/28/2014 12:20 PM, Patrick Baggett wrote: > On Wed, May 28, 2014 at 2:17 PM, Ian Romanick > wrote: > > On 05/27/2014 08:28 PM, Matt Turner wrote: > > On Tue, May 27, 2014 at 7:49 PM, Ian Romanick > wrote: > >> From: I

Re: [Mesa-dev] [PATCH 17/21] glsl: Make ir_variable::num_state_slots and ir_variable::state_slots private

2014-05-28 Thread Ian Romanick
On 05/28/2014 07:22 AM, Tapani wrote: > On 05/28/2014 05:49 AM, Ian Romanick wrote: >> From: Ian Romanick >> >> Also move num_state_slots inside ir_variable_data for better packing. >> >> The payoff for this will come in a few more patches. >> >> Signed-off-by: Ian Romanick > > looks good to me,

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Patrick Baggett
On Wed, May 28, 2014 at 2:17 PM, Ian Romanick wrote: > On 05/27/2014 08:28 PM, Matt Turner wrote: > > On Tue, May 27, 2014 at 7:49 PM, Ian Romanick > wrote: > >> From: Ian Romanick > >> > >> No change in the peak ir_variable memory usage in a trimmed apitrace of > >> dota2 on 64-bit. > >> > >>

Re: [Mesa-dev] [PATCH 06/16] mesa: Fix a "1" vs "i" typo in MVP setup.

2014-05-28 Thread Ian Romanick
This should also get tagged for stable... probably 10.1 and 10.2. On 05/28/2014 11:37 AM, Eric Anholt wrote: > It doesn't matter, because the instructions were initialized to noop > swizzles anyway. > --- > src/mesa/program/programopt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [Mesa-dev] [PATCH 11/21] glsl: Store ir_variable::ir_type in 8 bits instead of 32

2014-05-28 Thread Ian Romanick
On 05/27/2014 08:28 PM, Matt Turner wrote: > On Tue, May 27, 2014 at 7:49 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> No change in the peak ir_variable memory usage in a trimmed apitrace of >> dota2 on 64-bit. >> >> No change in the peak ir_variable memory usage in a trimmed apitrace of >

Re: [Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Ian Romanick
On 05/28/2014 11:37 AM, Eric Anholt wrote: > Here's a series I started back in January as a little experiment. > Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd > just fixed up Mesa IR back in the day. But, given that we're still > feeding Mesa IR into drivers as well (A

Re: [Mesa-dev] [PATCH 1/2] glxinfo: move reusable, non-GLX code into glinfo_common.[ch]

2014-05-28 Thread Ian Romanick
The code changes look good, but I know approximately jack about cmake. Reviewed-by: Ian Romanick On 05/22/2014 07:53 PM, Brian Paul wrote: > So that we can share some of the code with wglinfo. > --- > src/xdemos/CMakeLists.txt |4 +- > src/xdemos/Makefile.am |4 + > src/xdemos/glin

Re: [Mesa-dev] [PATCH] i965: Fix repeated usage of rectangle texture coordinate scaling.

2014-05-28 Thread Eric Anholt
Kenneth Graunke writes: > Previously, we set up new entries in the params[] array on every access > of a rectangle texture. Unfortunately, we only reserve space for > (2 * MaxTextureImageUnits) extra entries, so programs which accessed > rectangle textures more times than that would write off th

Re: [Mesa-dev] [PATCH 08/10] glsl: parser changes for GL_ARB_explicit_uniform_location

2014-05-28 Thread Ian Romanick
On 05/22/2014 09:37 PM, Tapani Pälli wrote: > On 05/21/2014 07:52 PM, Ian Romanick wrote: >> On 05/21/2014 08:11 AM, Tapani wrote: >>> On 05/21/2014 05:43 PM, Tapani wrote: On 05/21/2014 01:27 AM, Ian Romanick wrote: > On 05/19/2014 10:08 PM, Tapani wrote: >> On 05/19/2014 08:18 PM, Ia

[Mesa-dev] [PATCH 11/16] mesa: Simplify _mesa_find_temp_intervals().

2014-05-28 Thread Eric Anholt
Since there are no other callers, we can make it static and propagate some types around, removing one of the giant stack allocations. --- src/mesa/program/prog_optimize.c | 77 ++-- src/mesa/program/prog_optimize.h | 7 2 files changed, 34 insertions(+), 5

[Mesa-dev] [PATCH 13/16] mesa: Remove the last REG_ALLOCATE_MAX_TEMPS user.

2014-05-28 Thread Eric Anholt
--- src/mesa/program/prog_optimize.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index d76a15d..88dc177 100644 --- a/src/mesa/program/prog_optimize.c +++ b/src/mesa/program/prog_optimize

[Mesa-dev] [PATCH 09/16] mesa: Slightly change instruction walking behavior for prog_optimize.

2014-05-28 Thread Eric Anholt
I was going to change this when I moved to lists of instructions, and wanted to call the behavior change out here. Note that the last instruction is always OPCODE_END, and can_upward_mov_be_modified will notice that it's not a MOV and take the continue path (to the exit of the loop). --- src/mesa

[Mesa-dev] [PATCH 03/16] mesa: Fix find_next_use() in the presence of RelAddr.

2014-05-28 Thread Eric Anholt
Both callers of this function are doing dead code elimintation: "is this reg completely rewritten before any of these components are used?". If there's reladdr on this write, then we don't know if the write landed in our channels or not, but assuming that it didn't is conservative and safe. This

[Mesa-dev] [PATCH 02/16] ir_to_mesa: Dump the optimized Mesa IR as well.

2014-05-28 Thread Eric Anholt
We were dumping the intial code generated before optimization, with annotation, because we don't have support for tracking the annotation info across optimization. It's still really useful to see the optimized code, though. --- src/mesa/program/ir_to_mesa.cpp | 8 1 file changed, 8 inser

[Mesa-dev] [PATCH 06/16] mesa: Fix a "1" vs "i" typo in MVP setup.

2014-05-28 Thread Eric Anholt
It doesn't matter, because the instructions were initialized to noop swizzles anyway. --- src/mesa/program/programopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c index 92a8831..ee822be 100644 --- a/src/mesa/pro

[Mesa-dev] [PATCH 08/16] mesa: Remove stale comment (and fix grammar in the remainder).

2014-05-28 Thread Eric Anholt
_mesa_add_state_reference() already checks to see if you've already got that state referenced. --- src/mesa/program/programopt.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c index 39a83b4..bcc0b75 10064

[Mesa-dev] [PATCH 04/16] mesa: Make prog_optimize() consistently use stderr.

2014-05-28 Thread Eric Anholt
Note that _mesa_print_program() and _mesa_print_instruction() both used stderr, so this stdout stuff would get mixed up with it. --- src/mesa/program/prog_optimize.c | 64 +--- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/src/mesa/program/prog

[Mesa-dev] Mesa IR as a list of instructions

2014-05-28 Thread Eric Anholt
Here's a series I started back in January as a little experiment. Basically, I feel guilty for pushing GLSL IR into the driver, and wish I'd just fixed up Mesa IR back in the day. But, given that we're still feeding Mesa IR into drivers as well (ARB programs and fixed function vertex programs), it

[Mesa-dev] [PATCH 07/16] mesa: Drop some redundant Mesa IR instruction setup for MVP.

2014-05-28 Thread Eric Anholt
Since we've got them already initialized by _mesa_init_instructions(), I think this helps make the code more obvious (only set a writemask when you've got a non-default writemask). Ideally, we'd probably reuse one of those piles of helper code for emitting Mesa IR instructions, though. --- src/me

[Mesa-dev] [PATCH 16/16] mesa: Expand the Mesa IR register index to a full int.

2014-05-28 Thread Eric Anholt
With this, we can stop worrying about overflowing the tiny 4k temps we used to be limited to. --- src/mesa/program/ir_to_mesa.cpp | 1 - src/mesa/program/prog_instruction.h | 25 ++--- src/mesa/program/program.c | 17 - src/mesa/program/program_par

[Mesa-dev] [PATCH 12/16] mesa: Dynamically allocate memory for _mesa_reallocate_registers().

2014-05-28 Thread Eric Anholt
No more nasty stack allocations in this path. --- src/mesa/program/prog_optimize.c | 51 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index 20c6dd9..d76a15d 100644 --- a/

[Mesa-dev] [PATCH 05/16] mesa: Fix debug printing of live ranges for dead values.

2014-05-28 Thread Eric Anholt
We'd loop for approximately forever trying to get to (GLuint)-1. --- src/mesa/program/prog_optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index 1ab54ec..e877497 100644 --- a/src/mesa/program/prog_op

[Mesa-dev] [PATCH 10/16] mesa: Remove REG_ALLOCATE_MAX_PROGRAM_TEMPS from global dead code.

2014-05-28 Thread Eric Anholt
--- src/mesa/program/prog_optimize.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index ce53937..f0d279b 100644 --- a/src/mesa/program/prog_optimize.c +++ b/src/mesa/program/prog_op

[Mesa-dev] [PATCH 01/16] ir_to_mesa: Move Mesa IR debug to stderr as well.

2014-05-28 Thread Eric Anholt
Half the debug was in stderr, and this bit was in stdout. --- src/mesa/program/ir_to_mesa.cpp | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 59cf123..978b6cf 100644 --- a/src/mesa/program/ir_t

[Mesa-dev] [PATCH 14/16] mesa: Change program parser instruction storage.

2014-05-28 Thread Eric Anholt
This is in preparation for making prog_instruction be a list element -- I'm going to want to allocate the final instruction at this point, and this gets a bunch of pointer type changes out of the way for that big commit. --- src/mesa/program/prog_parameter_layout.c | 16 src/mesa/program/

Re: [Mesa-dev] [PATCH] i965: Fix repeated usage of rectangle texture coordinate scaling.

2014-05-28 Thread Ian Romanick
On 05/27/2014 06:16 PM, Kenneth Graunke wrote: > Previously, we set up new entries in the params[] array on every access > of a rectangle texture. Unfortunately, we only reserve space for > (2 * MaxTextureImageUnits) extra entries, so programs which accessed > rectangle textures more times than th

Re: [Mesa-dev] [PATCH 13/14] i965/fs: Split LIR emission ouf of ir-visitor

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 5:36 AM, Topi Pohjolainen wrote: > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/Makefile.sources | 1 + > src/mesa/drivers/dri/i965/brw_fs.cpp | 44 --- > src/mesa/drivers/dri/i965/brw_fs.h | 19 + > src/mesa/driver

Re: [Mesa-dev] [PATCH 12/14] i965/fs: Split declarations of fs_reg and fs_inst out of brw_fs.h

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 5:36 AM, Topi Pohjolainen wrote: > + * Authors: > + *Eric Anholt I think Eric said he wanted to stop using Author lists. Probably use this opportunity to drop it. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

[Mesa-dev] [Bug 79382] New: build error: multiple definition of `loader_get_pci_id_for_fd'

2014-05-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79382 Priority: high Bug ID: 79382 CC: jfons...@vmware.com Assignee: mesa-dev@lists.freedesktop.org Summary: build error: multiple definition of `loader_get_pci_id_for_fd'

Re: [Mesa-dev] [PATCH 05/14] i965: Merge variable hashtables of fs and vec4 visitors

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 10:43 AM, Matt Turner wrote: > Doesn't backend_visitor need to have a destructor that calls hash_table_dtor? Ah, next patch. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/m

Re: [Mesa-dev] [PATCH 05/14] i965: Merge variable hashtables of fs and vec4 visitors

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 5:36 AM, Topi Pohjolainen wrote: > Now empty destructors are dropped allowing compiler to generate the > defaults (calling base class). > > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/brw_fs.h | 2 -- > src/mesa/drivers/dri/i965/brw_fs_vi

Re: [Mesa-dev] [PATCH 2/2] wglinfo: use common code from glinfo_common.c

2014-05-28 Thread Jose Fonseca
This is a nice cleanup. You can use ${CMAKE_SOURCE_DIR}/src/xdemos/glinfo_common.c instead. Jose - Original Message - > I'm not a cmake expert so I'm not sure my changes to CMakeLists.txt are > ideal. Doing ../somewhere always feels like a hack. > > -Brian > > > On 05/22/2014

Re: [Mesa-dev] [PATCH 2/2] glsl: replace strncmp("gl_") calls with new is_gl_identifier() helper

2014-05-28 Thread Ian Romanick
Reviewed-by: Ian Romanick On 05/23/2014 02:22 PM, Brian Paul wrote: > Makes things a little easier to read. > --- > src/glsl/ast_to_hir.cpp |8 > src/glsl/ir.h |9 + > src/glsl/ir_print_visitor.cpp |2 +- > src/glsl/link_uniforms.cpp|4 +

Re: [Mesa-dev] [PATCH 1/2] glsl: fix use-after free bug/crash in ast_declarator_list::hir()

2014-05-28 Thread Ian Romanick
On 05/23/2014 02:22 PM, Brian Paul wrote: > The call to get_variable_being_redeclared() may delete 'var' so we > can't reference var->name afterward. We fix that by examining the > var's name before making that call. > > Fixes valgrind warnings and possible crash when running the piglit > tests/s

Re: [Mesa-dev] [PATCH 2/2] glsl: reduce size of swizzle field in ir_state_slot

2014-05-28 Thread Ian Romanick
This won't actually do anything because the compiler still rounds the size of the structure upto a multiple of sizeof(int) for alignment purposes. With your v2 patch applied, I still get (gdb) print sizeof(ir_state_slot) $1 = 24 which is 6*sizeof(int). On 05/27/2014 10:09 PM, Tapani Pälli wrote

Re: [Mesa-dev] [PATCH] targets/opencl: Fix (static) linking with LLVM

2014-05-28 Thread Kai Wasserbäch
[Just a short note, as I can't test Mesa any longer, since I have a new Radeon, which is "no business case" for the FLOSS driver.] terminfo rings a bell, IIRC there was a Mesa bug about this some while back; for myself at least I just added the terminfo stuff to my Mesa build (again IIRC, that pro

Re: [Mesa-dev] [PATCH 1/2] glsl: reduce size of glsl_type::base_type

2014-05-28 Thread Ian Romanick
Types are fly-weights, so there aren't that many of them allocated... maybe a couple hundred, tops. Have you measured the memory savings? On 05/27/2014 10:09 PM, Tapani Pälli wrote: > Signed-off-by: Tapani Pälli > --- > src/glsl/glsl_types.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletio

Re: [Mesa-dev] [PATCH 09/19] i965/fs: Add SHADER_OPCODE_LOAD_PAYLOAD.

2014-05-28 Thread Matt Turner
On Wed, May 28, 2014 at 7:43 AM, Pohjolainen, Topi wrote: > On Tue, May 27, 2014 at 06:47:40PM -0700, Matt Turner wrote: >> Will be used to simplify the handling of large virtual GRFs in SSA form. >> --- >> src/mesa/drivers/dri/i965/brw_defines.h| 2 ++ >> src/mesa/drivers/dri/i965/brw_f

Re: [Mesa-dev] [PATCH 06/11] loader: Use drirc device_id parameter in complement to DRI_PRIME

2014-05-28 Thread Emil Velikov
On 28/05/14 14:24, Axel Davy wrote: > On 28/05/2014 08:40, Emil Velikov wrote : >> On 28/05/14 01:55, Axel Davy wrote: >>> Signed-off-by: Axel Davy >> Hi Axel >> >> Can you give the scons build a try. I suspect that this patch will leave it >> in >> somewhat broken state. > I'll give a try. >> >>

Re: [Mesa-dev] [PATCH 10/19] i965/fs: Lower LOAD_PAYLOAD and clean up.

2014-05-28 Thread Pohjolainen, Topi
On Tue, May 27, 2014 at 06:47:41PM -0700, Matt Turner wrote: > Clean up with with register_coalesce()/dead_code_eliminate(). > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 42 > > src/mesa/drivers/dri/i965/brw_fs.h | 1 + > 2 files changed, 43 insertions(+)

  1   2   >