[Mesa-dev] [PATCH 07/11] intel: Stop doing special _NEW_STENCIL state flagging on drawbuffers.

2013-06-20 Thread Eric Anholt
2/3 packets depending on Stencil._Enabled already checked for _NEW_BUFFERS, so just add _NEW_BUFFERS to the remaining one. --- src/mesa/drivers/dri/i965/brw_cc.c| 4 ++-- src/mesa/drivers/dri/i965/brw_vtbl.c | 7 +-- src/mesa/drivers/dri/i965/brw_wm.c| 2 +- sr

[Mesa-dev] [PATCH 10/11] i965: Stop updating FBO state on drawbuffers change.

2013-06-20 Thread Eric Anholt
The computed fields are updated appropriately as part of the normal draw call path due to _NEW_BUFFERS being set. --- src/mesa/drivers/dri/i965/brw_vtbl.c | 8 1 file changed, 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 4

[Mesa-dev] [PATCH 08/11] i965: Remove _NEW_DEPTH state flagging on drawbuffers change.

2013-06-20 Thread Eric Anholt
Of the places noting a _NEW_DEPTH dependency, all were already checking for _NEW_BUFFERS if appropriate. --- src/mesa/drivers/dri/i965/brw_vtbl.c| 2 -- src/mesa/drivers/dri/i965/gen7_misc_state.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 11/11] i965: Remove the rest of brw_update_draw_buffer().

2013-06-20 Thread Eric Anholt
The last piece of code with an effect was flagging _NEW_BUFFERS. Only, that is already flagged from everything that calls this function: Mesa GL state updates flag it before even calling down into the driver, and the calls from the DRI2 window system framebuffer update path end up flagging it as p

[Mesa-dev] [PATCH 09/11] i965: Stop recomputing drawbuffer bounds on drawbuffer change.

2013-06-20 Thread Eric Anholt
For winsys FBOs, the bounds are appropriately updated immediately upon _mesa_resize_framebuffer(). For user FBOs, they're updated as part of the normal draw path state update due to _NEW_BUFFERS having been flagged. --- src/mesa/drivers/dri/i965/brw_vtbl.c | 2 -- 1 file changed, 2 deletions(-)

[Mesa-dev] [PATCH 06/11] i965: Stop flagging viewport/scissor change on drawbuffers change.

2013-06-20 Thread Eric Anholt
The viewport (ctx->Viewport._WindowMap) doesn't change with drawable size changes, and we update scissor (ctx->DrawBuffer->_Xmin and friends) on _NEW_BUFFERS in things like brw_sf_state.c. --- src/mesa/drivers/dri/i965/brw_vtbl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mesa/drive

[Mesa-dev] [PATCH 04/11] radeon: Remove gratuitous custom framebuffer resize code.

2013-06-20 Thread Eric Anholt
_mesa_resize_framebuffer(), the default value of the ResizeBuffers hook, already checks for a window system framebuffer and walks the renderbuffers calling AllocStorage(). --- src/mesa/drivers/dri/radeon/radeon_fbo.c | 31 --- 1 file changed, 31 deletions(-) diff --git

[Mesa-dev] [PATCH 05/11] i965: Stop flagging _NEW_POLYGON on drawbuffers change.

2013-06-20 Thread Eric Anholt
Things like brw_sf.c that need to know about orientation are already recomputing on _NEW_BUFFERS. --- src/mesa/drivers/dri/i965/brw_vtbl.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 96a6cd5..ba5fadf 100

[Mesa-dev] [PATCH 02/11] mesa: Remove the Initialized field from framebuffers.

2013-06-20 Thread Eric Anholt
This existed to tell the core not to call GetBufferSize, except that even if you didn't set it nothing happened because nobody had a GetBufferSize. --- src/mesa/drivers/dri/intel/intel_fbo.c | 2 -- src/mesa/drivers/dri/radeon/radeon_common.c | 2 -- src/mesa/drivers/dri/radeon/radeon_fbo.c

[Mesa-dev] [PATCH 03/11] intel: Remove gratuitous custom framebuffer resize code.

2013-06-20 Thread Eric Anholt
_mesa_resize_framebuffer(), the default value of the ResizeBuffers hook, already checks for a window system framebuffer and walks the renderbuffers calling AllocStorage(). --- src/mesa/drivers/dri/intel/intel_fbo.c | 36 ++ 1 file changed, 6 insertions(+), 30 deleti

[Mesa-dev] [PATCH 01/11] mesa: Remove Driver.GetBufferSize and its callers.

2013-06-20 Thread Eric Anholt
Only the GDI driver set it to non-NULL any more, and that driver has a Viewport hook that should keep it limping along as well as it ever has. --- src/mesa/drivers/common/driverfuncs.c| 1 - src/mesa/drivers/dri/r200/r200_context.c | 1 - src/mesa/drivers/dri/swrast/swrast.c | 1 - src/

[Mesa-dev] intel_draw_buffers overhead reduction (with mesa core changes)

2013-06-20 Thread Eric Anholt
With some of our new platforms, CPU overhead is becoming a major issue, so I started poking around the profile of cairo-gl again. I noticed some comedy in the FBO statechange path, where i965 was recomputing state multiple times up front instead of delaying it until draw time. Most it originally

Re: [Mesa-dev] [PATCH] build: remove script compatibility symlinks

2013-06-20 Thread Jonathan Gray
On Thu, Jun 20, 2013 at 08:32:03PM -0700, Kenneth Graunke wrote: > On 06/20/2013 06:45 PM, Jonathan Gray wrote: > >On Thu, Jun 20, 2013 at 04:00:04PM -0600, Brian Paul wrote: > >>On 06/20/2013 03:32 PM, Dave Airlie wrote: > >>>On Fri, Jun 21, 2013 at 2:28 AM, Jonathan Gray wrote: > The symlink

Re: [Mesa-dev] [PATCH 2/2] mesa: Move the common _mesa_glsl_compile_shader() code to glsl/.

2013-06-20 Thread Kenneth Graunke
On 06/19/2013 04:19 PM, Eric Anholt wrote: This code had no relation to ir_to_mesa.cpp, since it was also used by intel and state_tracker, and most of it was duplicated with the standalone compiler (which has periodically drifted from the Mesa copy). v2: Split from the ir_to_mesa to shaderapi.c

Re: [Mesa-dev] [PATCH] build: remove script compatibility symlinks

2013-06-20 Thread Kenneth Graunke
On 06/20/2013 06:45 PM, Jonathan Gray wrote: On Thu, Jun 20, 2013 at 04:00:04PM -0600, Brian Paul wrote: On 06/20/2013 03:32 PM, Dave Airlie wrote: On Fri, Jun 21, 2013 at 2:28 AM, Jonathan Gray wrote: The symlinks for compatibility with old scripts assumes sysv shared library versioning and

Re: [Mesa-dev] [PATCH] build: remove script compatibility symlinks

2013-06-20 Thread Jonathan Gray
On Thu, Jun 20, 2013 at 04:00:04PM -0600, Brian Paul wrote: > On 06/20/2013 03:32 PM, Dave Airlie wrote: > >On Fri, Jun 21, 2013 at 2:28 AM, Jonathan Gray wrote: > >>The symlinks for compatibility with old scripts assumes > >>sysv shared library versioning and breaks other systems. > >> > >>For ex

[Mesa-dev] New Device Driver Help‏

2013-06-20 Thread Li Andy
Hello everyone, My name is Andy. I am a university student from Canada.I am currently working on a project which I am trying to port the mesa library to another device. (the Altera DE2)I am wondering if anyone can give me some suggestions to get started.Any information would be great! My email a

[Mesa-dev] [PATCH 12/12] R600: Consolidate expansion of v2i32/v4i32 ops for EG/SI

2013-06-20 Thread Aaron Watry
By default, we expand these operations for both EG and SI. Move the duplicated code into a common space for now. If the targets ever actually implement these operations as instructions, we can override that in the relevant target. Signed-off-by: Aaron Watry --- lib/Target/R600/AMDGPUISelLowering

[Mesa-dev] [PATCH 11/12] R600: Add v2i32 test for vselect

2013-06-20 Thread Aaron Watry
Note: Only adding test for evergreen, not SI yet. When I attempted to expand vselect for SI, I got the following: llc: /home/awatry/src/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:522: llvm::SDValue llvm::DAGTypeLegalizer::PromoteIntRes_SETCC(llvm::SDNode*): Assertion `SVT.isVector() =

[Mesa-dev] [PATCH 10/12] R600/SI: Expand xor v2i32/v4i32

2013-06-20 Thread Aaron Watry
Add test cases for both vector sizes on SI and also add v2i32 test for EG. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 3 +++ test/CodeGen/R600/xor.ll | 40 +++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/l

[Mesa-dev] [PATCH 09/12] R600: Add v2i32 test for setcc on evergreen

2013-06-20 Thread Aaron Watry
No test/expansion for SI has been added yet. Attempts to expand this operation for SI resulted in a stacktrace in (IIRC) LegalizeIntegerTypes which was complaining about vector comparisons being required to return a vector type. Signed-off-by: Aaron Watry --- test/CodeGen/R600/setcc.ll | 25

[Mesa-dev] [PATCH 07/12] R600/SI: Expand udiv v[24]i32 for SI and v2i32 for EG

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Note: I followed the guidance of the v4i32 EG check... UDIV produces really complex code, so let's just check that the instruction was lowered successfully. Signed-off-by: Aaron Watry --- lib/Target/R600/R600ISelLowering.cpp | 1

[Mesa-dev] [PATCH 08/12] R600/SI: Expand urem of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Note: I followed the guidance of the v4i32 EG check... UREM produces really complex code, so let's just check that the instruction was lowered successfully. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 3 ++

[Mesa-dev] [PATCH 06/12] R600/SI: Expand ashr of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 2 ++ test/CodeGen/R600/sra.ll | 41 +++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/lib/Target/R

[Mesa-dev] [PATCH 05/12] R600/SI: Expand srl of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 2 ++ test/CodeGen/R600/srl.ll | 42 +++--- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/lib/Target/R

[Mesa-dev] [PATCH 04/12] R600/SI: Expand shl of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 3 +++ test/CodeGen/R600/shl.ll | 47 ++ 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/lib/Target

[Mesa-dev] [PATCH 03/12] R600/SI: Expand or of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 3 +++ test/CodeGen/R600/or.ll| 41 +++--- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/lib/Target/

[Mesa-dev] [PATCH 02/12] R600/SI: Expand mul of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 3 +++ test/CodeGen/R600/mul.ll | 38 -- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/lib/Target/

[Mesa-dev] [PATCH 01/12] R600/SI: Expand and of v2i32/v4i32 for SI

2013-06-20 Thread Aaron Watry
Also add lit test for both cases on SI, and v2i32 for evergreen. Signed-off-by: Aaron Watry --- lib/Target/R600/SIISelLowering.cpp | 3 +++ test/CodeGen/R600/and.ll | 37 +++-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/lib/Target/R

[Mesa-dev] R600: Expand integer operations for SI and consolidate code with EG

2013-06-20 Thread Aaron Watry
This series is intended to bring SI closer to evergreen when it comes to support for v2i32/v4i32 integer operations. It adds support for expanding the following v2i32/v4i32 operations on SI: AND, MUL, OR, SHL, SRL, ASHR, UDIV, UREM, XOR Once that's done, the setOperationAction(op,type,Expand) cal

Re: [Mesa-dev] [PATCH] build: remove script compatibility symlinks

2013-06-20 Thread Brian Paul
On 06/20/2013 03:32 PM, Dave Airlie wrote: On Fri, Jun 21, 2013 at 2:28 AM, Jonathan Gray wrote: The symlinks for compatibility with old scripts assumes sysv shared library versioning and breaks other systems. For example OpenBSD uses sunos 4 style .so.major.minor versioning so the targets wit

Re: [Mesa-dev] [PATCH 1/3] R600: Expand v2i32 load/store instead of custom lowering

2013-06-20 Thread Aaron Watry
Thanks Tom. Also as discussed on IRC, I checked the v2i32 expand change against piglits cl/program/execute/*stack*.cl test cases, as well as the v2i32 test that just sent to the piglit list. The tests were run on a Radeon 5400, and all of them passed with the Expand'ed v2i32 loads/stores. --Aaron

Re: [Mesa-dev] Mesa driver for VirtualBox

2013-06-20 Thread Dave Airlie
On Fri, Jun 21, 2013 at 12:47 AM, Michael Thayer wrote: > Hello, > > I am looking at the possibility of writing a driver for VirtualBox (ahem, > yes) which could partly live inside of the Mesa tree. My initial idea was > to have the driver in two parts, a driver/client part in the Mesa tree and a

Re: [Mesa-dev] [PATCH] build: remove script compatibility symlinks

2013-06-20 Thread Dave Airlie
On Fri, Jun 21, 2013 at 2:28 AM, Jonathan Gray wrote: > The symlinks for compatibility with old scripts assumes > sysv shared library versioning and breaks other systems. > > For example OpenBSD uses sunos 4 style .so.major.minor > versioning so the targets with ln will fail. > > Fixes bug 63269.

Re: [Mesa-dev] [PATCH 1/3] R600: Expand v2i32 load/store instead of custom lowering

2013-06-20 Thread Tom Stellard
On Wed, Jun 19, 2013 at 08:51:01AM -0700, Tom Stellard wrote: > On Mon, Jun 17, 2013 at 04:11:38PM -0500, Aaron Watry wrote: > > The custom lowering causes llc to crash with a segfault. > > > > Ideally, the custom lowering can be fixed, but this allows > > programs which load/store v2i32 to work w

[Mesa-dev] [PATCH] llvmpipe: fix wrong results for queries not in a scene

2013-06-20 Thread sroland
From: Roland Scheidegger The result isn't always 0 in this case (depends on query type), so instead of special casing this just use the ordinary path (should result in correct values thanks to initialization in query_begin/end), just skipping the fence wait. --- src/gallium/drivers/llvmpipe/lp_q

[Mesa-dev] [Bug 56710] src/mapi/glapi/glapitemp.h:1640:1: warning: no previous prototype for ‘glReadBufferNV’ [-Wmissing-prototypes]

2013-06-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=56710 Andreas Boll changed: What|Removed |Added QA Contact||mesa-dev@lists.freedesktop.

Re: [Mesa-dev] [PATCH 2/2] i965: Remove broken source type assertions from brw_alu3().

2013-06-20 Thread Anuj Phogat
On Thu, Jun 13, 2013 at 2:55 PM, Kenneth Graunke wrote: > Commit 526ffdfc033ab01cf133cb7e8290c65d12ccc9be attempted to generalize > the source register type assertions to allow D and UD. However, the > src1 and src2 assertions actually checked src0.type against D and UD due > to a copy and paste

[Mesa-dev] [PATCH] build: remove script compatibility symlinks

2013-06-20 Thread Jonathan Gray
The symlinks for compatibility with old scripts assumes sysv shared library versioning and breaks other systems. For example OpenBSD uses sunos 4 style .so.major.minor versioning so the targets with ln will fail. Fixes bug 63269. Signed-off-by: Jonathan Gray --- src/egl/main/Makefile.am

Re: [Mesa-dev] [PATCH 0/6] Eliminating unused built-in varyings

2013-06-20 Thread Stefan Dösinger
Hi, Am 19.06.2013 um 13:22 schrieb Marek Olšák : > Could somebody please review this series? I don't really know the code well enough to give a meaningful review, but I've tested the patches with Wine on r300g and they work as advertised :-) . Rendering is OK, and 3DMark2000 performance is impr

[Mesa-dev] Mesa driver for VirtualBox

2013-06-20 Thread Michael Thayer
Hello, I am looking at the possibility of writing a driver for VirtualBox (ahem, yes) which could partly live inside of the Mesa tree. My initial idea was to have the driver in two parts, a driver/client part in the Mesa tree and a server part in the VirtualBox tree which would communicate u

Re: [Mesa-dev] [PATCH 5/6] mesa: Fix missing setting of shader->IsES.

2013-06-20 Thread Kenneth Graunke
On 06/19/2013 03:57 PM, Eric Anholt wrote: Kenneth Graunke writes: On 06/17/2013 04:10 PM, Eric Anholt wrote: I noticed this while trying to merge code with the builtin compiler, which does set it. Note that this causes two regressions in piglit in default-precision-sampler.* which try to li

[Mesa-dev] [PATCH] configure.ac: make grep tests more portable

2013-06-20 Thread Jonathan Gray
Use grep -w instead of the empty string escape sequences which are less portable. Makes the grep tests function as intended on OpenBSD. Signed-off-by: Jonathan Gray --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git configure.ac configure.ac index 6832b0d..

[Mesa-dev] [PATCH] nvc0: Display an error when DRM version is too old to use performance counters

2013-06-20 Thread Samuel Pitoiset
From: Samuel --- src/gallium/drivers/nvc0/nvc0_query.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c index 75c515a..7fc1ca9 100644 --- a/src/gallium/drivers/nvc0/nvc0_query.c +++ b/src/galli