Re: [Mesa-dev] [PATCH 4/5] glsl: Implement MESA_shader_integer_mix extension.

2013-09-06 Thread Kenneth Graunke
On 09/06/2013 05:57 PM, Matt Turner wrote: Because why doesn't GLSL allow you to do this already? --- docs/specs/MESA_shader_integer_mix.spec | 125 src/glsl/builtin_functions.cpp | 15 src/glsl/glcpp/glcpp-parse.y| 3 + src/glsl/

[Mesa-dev] [PATCH 0/5] MESA_shader_integer_mix

2013-09-06 Thread Matt Turner
This series implements a small extension that adds int, uint, and bool as allowable types to the mix() built-in function. We hope to make it an EXT extension soon. I found myself wanting a per-component conditional-select operation when implementing the ldexp() and frexp() built-ins, and this exte

[Mesa-dev] [PATCH 5/5] i965: Enable MESA_shader_integer_mix.

2013-09-06 Thread Matt Turner
Could be supported on Gen5 once it supports GLSL 1.30. --- src/mesa/drivers/dri/i965/intel_extensions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 655467c..6f9955d 100644 --- a/src/mesa/dr

[Mesa-dev] [PATCH 4/5] glsl: Implement MESA_shader_integer_mix extension.

2013-09-06 Thread Matt Turner
Because why doesn't GLSL allow you to do this already? --- docs/specs/MESA_shader_integer_mix.spec | 125 src/glsl/builtin_functions.cpp | 15 src/glsl/glcpp/glcpp-parse.y| 3 + src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/

[Mesa-dev] [PATCH 3/5] glsl: Use conditional-select in mix().

2013-09-06 Thread Matt Turner
--- src/glsl/builtin_functions.cpp | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 2a3cfcf..7b7bae6 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -2223,1

[Mesa-dev] [PATCH 2/5] i965: Add support for ir_triop_cond_sel.

2013-09-06 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ 3 files changed, 13 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_exp

[Mesa-dev] [PATCH 1/5] glsl: Add conditional-select IR.

2013-09-06 Thread Matt Turner
It's a ?: that operates per-component on vectors. Will be used in upcoming lowering pass for ldexp and the implementation of frexp. cond_sel(selector, a, b): per-component result = selector ? a : b --- src/glsl/ir.cpp| 2 ++ src/glsl/ir.h

[Mesa-dev] [PATCH] mesa: Ensure gl_query_object is fully initialized.

2013-09-06 Thread Vinson Lee
278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer field gl_query_object:Label. A free of this pointer resulted in a crash. This patch fixes piglit regressions with swrast introduced by 6d8dd59cf53d2f47b817d79204a52bb3a46e8c77. Bugzilla: https://bugs.freedesktop.org/show_bug

Re: [Mesa-dev] [PATCH 4/4] glsl: Disallow relinking if a program is used by an active XFB object.

2013-09-06 Thread Kenneth Graunke
On 09/06/2013 04:40 PM, Kenneth Graunke wrote: Paused transform feedback objects may refer to a program other than the current program. If any active objects refer to a program, LinkProgram must reject the request to relink. The code to detect this is ugly since _mesa_HashWalk is awkward to use

[Mesa-dev] [PATCH 4/4] glsl: Disallow relinking if a program is used by an active XFB object.

2013-09-06 Thread Kenneth Graunke
Paused transform feedback objects may refer to a program other than the current program. If any active objects refer to a program, LinkProgram must reject the request to relink. The code to detect this is ugly since _mesa_HashWalk is awkward to use, but unfortunately we can't use hash_table_forea

[Mesa-dev] [PATCH 3/4] mesa: Reject ResumeTransformFeedback if the wrong program is bound.

2013-09-06 Thread Kenneth Graunke
This is actually a pretty important error condition: otherwise, you could set up transform feedback with one program, and resume it with a program that generates a completely different set of outputs. Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth

[Mesa-dev] [PATCH 2/4] mesa: Track the vertex program active at BeginTransformFeedback() time.

2013-09-06 Thread Kenneth Graunke
The next few patches will use this for API error checking. All of the drivers appear to CALLOC_STRUCT transform feedback objects, so this should be properly NULL initialized on creation. Signed-off-by: Kenneth Graunke --- src/mesa/main/mtypes.h| 6 ++ src/mesa/main/transformfeed

[Mesa-dev] [PATCH 1/4] mesa: Disallow TransformFeedbackVaryings when active.

2013-09-06 Thread Kenneth Graunke
Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke --- src/mesa/main/transformfeedback.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 3f8a7f4..eca0

Re: [Mesa-dev] [PATCH] gallium, intel: Implements new __DRI_IMAGE_USE_LINEAR and PIPE_BIND_LINEAR flags to enforce no tiling.

2013-09-06 Thread Kristian Høgsberg
On Sat, Aug 31, 2013 at 12:10:52AM +0200, Marek Olšák wrote: > The Gallium changes look good to me. With Mareks OK on the gallium side changes, I'll go and commit this. The intel changes look good and the DRI driver interface changes do what we need. thanks, Kristian > Marek > > On Thu, Aug 15,

[Mesa-dev] [Bug 69047] [swrast] piglit occulsion-query-discard regression

2013-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69047 Vinson Lee changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [PATCH 2/2] r600g: remove DMA padding

2013-09-06 Thread Alex Deucher
This is now handled in the winsys. Signed-off-by: Alex Deucher --- src/gallium/drivers/r600/r600_pipe.c | 9 - 1 file changed, 9 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 2be5910..c684e6b 100644 --- a/src/gallium/drivers

[Mesa-dev] [PATCH 1/2] radeon/winsys: pad IBs to a multiple of 8 DWs

2013-09-06 Thread Alex Deucher
This aligns the gfx, compute, and dma IBs to 8 DW boundries. This aligns the the IB to the fetch size of the CP for optimal performance. Additionally, r6xx hardware requires at least 4 DW alignment to avoid a hw bug. This also aligns the DMA IBs to 8 DW which is required for the DMA engine. This

Re: [Mesa-dev] [PATCH 1/3] i965: Add comments to the new brw_state_state structure's fields.

2013-09-06 Thread Eric Anholt
Kenneth Graunke writes: > These are largely based on the similar fields in brw->wm. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_context.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_context.h > b/src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH] radeonsi: fix and enable transform feedback for CIK

2013-09-06 Thread Alex Deucher
On Fri, Sep 6, 2013 at 4:04 PM, Marek Olšák wrote: > The CP_STRMOUT_CNTL register was moved again. Reviewed-by: Alex Deucher > --- > src/gallium/drivers/radeon/r600_cs.h | 14 + > src/gallium/drivers/radeon/r600_streamout.c | 46 > > src/gallium/d

[Mesa-dev] [Bug 69053] New: Account request

2013-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69053 Priority: medium Bug ID: 69053 Assignee: mesa-dev@lists.freedesktop.org Summary: Account request Severity: normal Classification: Unclassified OS: All Reporter: joh

Re: [Mesa-dev] [PATCH] mesa: Ensure gl_query_object is fully initialized.

2013-09-06 Thread Brian Paul
On 09/06/2013 01:39 PM, Vinson Lee wrote: 278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer field gl_query_object:Label. A free of this pointer resulted in a crash. This patch fixes piglit regressions with swrast introduced by 6d8dd59cf53d2f47b817d79204a52bb3a46e8c77. Bug

Re: [Mesa-dev] [PATCH 1/2] radeon/winsys: pad IBs to a multiple of 8 DWs

2013-09-06 Thread Marek Olšák
For the series: Reviewed-by: Marek Olšák Marek On Fri, Sep 6, 2013 at 11:00 PM, Alex Deucher wrote: > This aligns the gfx, compute, and dma IBs to 8 DW boundries. > This aligns the the IB to the fetch size of the CP for optimal > performance. Additionally, r6xx hardware requires at least 4 > D

[Mesa-dev] [PATCH] radeonsi: fix and enable transform feedback for CIK

2013-09-06 Thread Marek Olšák
The CP_STRMOUT_CNTL register was moved again. --- src/gallium/drivers/radeon/r600_cs.h | 14 + src/gallium/drivers/radeon/r600_streamout.c | 46 src/gallium/drivers/radeon/r600d_common.h| 6 src/gallium/drivers/radeonsi/radeonsi_pipe.c | 2 +

[Mesa-dev] [Bug 69047] [swrast] piglit occulsion-query-discard regression

2013-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69047 --- Comment #1 from Vinson Lee --- Looks like the field ql_query_object:Label was not initialized. (gdb) frame 5 #5 0x7fd3839867e4 in _mesa_delete_query (ctx=0x7fd387f4a010, q=0x268e090) at ../../../src/mesa/main/queryobj.c:129 129 fr

[Mesa-dev] [Bug 69047] New: [swrast] piglit occulsion-query-discard regression

2013-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69047 Priority: medium Bug ID: 69047 Keywords: regression CC: t_arc...@yahoo.com.au Assignee: mesa-dev@lists.freedesktop.org Summary: [swrast] piglit occulsion-query-discard regression

Re: [Mesa-dev] [PATCH 16/21] glsl: Add IR builder shortcuts for a bunch of random opcodes.

2013-09-06 Thread Kenneth Graunke
On 09/06/2013 05:58 AM, Erik Faye-Lund wrote: diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp index e12ae3c..31a457d 100644 --- a/src/glsl/ir_builder.cpp +++ b/src/glsl/ir_builder.cpp @@ -264,6 +264,46 @@ abs(operand a) return expr(ir_unop_abs, a); } +ir_expression *neg(ope

[Mesa-dev] [PATCH 1/2] st/clover: Clear the complete queue

2013-09-06 Thread Niels Ole Salscheider
Events that are already signalled can be removed from the queue, too. Signed-off-by: Niels Ole Salscheider --- src/gallium/state_trackers/clover/core/queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/queue.cpp b/src/gallium/stat

Re: [Mesa-dev] [PATCH 3/6] st/clover: Unreference fences as early as possible

2013-09-06 Thread Niels Ole Salscheider
While unreferencing fences as early as possible is not a bad idea, this patch hides the underlying problem. That is, events are never deleted from the queued_events list of the queue object if their fences are signalled before the queue is flushed. I will send a patch that fixes the problem shor

Re: [Mesa-dev] [PATCH 2/2] radeonsi: pad IBs to a multiple of 8 DWs

2013-09-06 Thread Michel Dänzer
On Fre, 2013-09-06 at 10:36 -0400, Alex Deucher wrote: > Align IBs to 8 DW to align with the fetch > size of the CP. [...] > diff --git a/src/gallium/drivers/radeonsi/r600_hw_context.c > b/src/gallium/drivers/radeonsi/r600_hw_context.c > index 55daa82..fd86383 100644 > --- a/src/gallium/drivers/

Re: [Mesa-dev] [PATCH 2/2] radeonsi: pad IBs to a multiple of 8 DWs

2013-09-06 Thread Patrick Baggett
> Any reason for this complicated logic, instead of simply: > > while (cs->cdw & 0x7) > cs->buf[cs->cdw++] = 0x8000; > > Ah, that is eloquently terse; I'm going to have to remember that. Patrick > Earthling Michel Dänzer | http://www.amd.co

[Mesa-dev] [PATCH 2/2] st/clover: Always flush the queue when waiting on an hard_event

2013-09-06 Thread Niels Ole Salscheider
The OpenCL spec says: "Any blocking commands queued in a command-queue and clReleaseCommandQueue perform an implicit flush of the command-queue. These blocking commands are [...] or clWaitForEvents." Flushing the queue unconditionally also helps to actually clear the queued_events list of the queu

[Mesa-dev] [PATCH 2/2] R600/SI: Merge offset0 and offset1 fields for single address DS instructions v2

2013-09-06 Thread Tom Stellard
From: Tom Stellard Also remove unused data fields from the DS_Load_Helper class. v2: - Merge fields for DS_WRITE --- lib/Target/R600/SIInstrInfo.td| 35 +++ lib/Target/R600/SIInstructions.td | 8 2 files changed, 27 insertions(+), 16 deletions(-)

[Mesa-dev] [PATCH 2/2] radeonsi: pad IBs to a multiple of 8 DWs

2013-09-06 Thread Alex Deucher
Align IBs to 8 DW to align with the fetch size of the CP. Signed-off-by: Alex Deucher CC: "9.2" CC: "9.1" --- src/gallium/drivers/radeonsi/r600_hw_context.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/gallium/drivers/radeonsi/r600_hw_context.c b/src/gallium/driver

[Mesa-dev] [PATCH 1/2] r600g: pad IBs to a multiple of 8 DWs (v2)

2013-09-06 Thread Alex Deucher
IBs need to be a multiple of 4 dwords on r6xx asics to avoid a hw bug. Also align IBs to 8 DW to align with the fetch size of the CP. v2: apply to all asics, increase alignment to 8 Signed-off-by: Alex Deucher CC: "9.2" CC: "9.1" --- src/gallium/drivers/r600/r600_hw_context.c | 12 +++

Re: [Mesa-dev] [PATCH 16/21] glsl: Add IR builder shortcuts for a bunch of random opcodes.

2013-09-06 Thread Erik Faye-Lund
> diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp > index e12ae3c..31a457d 100644 > --- a/src/glsl/ir_builder.cpp > +++ b/src/glsl/ir_builder.cpp > @@ -264,6 +264,46 @@ abs(operand a) > return expr(ir_unop_abs, a); > } > > +ir_expression *neg(operand a) > +{ > + return expr(ir

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-06 Thread Chia-I Wu
On Thu, Sep 5, 2013 at 9:57 PM, Chia-I Wu wrote: > On Thu, Sep 5, 2013 at 5:12 PM, Chris Forbes wrote: >> A possible explanation for the perf change is that Xonotic uses >> anisotropic filtering at this quality level. Lowering to txl defeats >> it. > I had a look at that. gl_sampler->MaxAnisotro

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-06 Thread Chia-I Wu
On Thu, Sep 5, 2013 at 11:18 PM, Roland Scheidegger wrote: > Hmm I don't think the math works out here actually, which may explain > why it's faster. > I believe the derivatives need to be transformed to cube coord system > and I don't see that being done here (this is actually something I > haven

Re: [Mesa-dev] Update: UVD status on loongson 3a platform

2013-09-06 Thread Christian König
Am 06.09.2013 04:52, schrieb cee1: 2013/9/6 Jerome Glisse : On Thu, Sep 05, 2013 at 03:29:52PM -0400, Jerome Glisse wrote: On Thu, Sep 05, 2013 at 10:14:32PM +0800, Chen Jie wrote: Hi all, This thread is about http://lists.freedesktop.org/archives/dri-devel/2013-April/037598.html. We recentl

Re: [Mesa-dev] [PATCH] r600g: pad IBs to a multiple of 4 DWs on r6xx

2013-09-06 Thread Christian König
Actually Type 2 packets are handled much faster on the R6xx compared to most type 3 packets, cause they are handled by the PFP/fetch hw and doesn't need to be forwarded to the ME. Christian. Am 06.09.2013 02:31, schrieb Dominik Behr: 0x8000 is Type 2 NOP. You could make it a little better

Re: [Mesa-dev] [PATCH 2/2] R600/SI: Merge offset0 and offset1 fields for single address DS instructions

2013-09-06 Thread Michel Dänzer
On Don, 2013-09-05 at 14:36 -0400, Tom Stellard wrote: > From: Tom Stellard > > Also remove unused data fields from the DS_Load_Helper class. [...] > diff --git a/lib/Target/R600/SIInstructions.td > b/lib/Target/R600/SIInstructions.td > index 31a5ad2..94dcf2c 100644 > --- a/lib/Target/R600/SII

Re: [Mesa-dev] [PATCH 1/2] R600/SI: Add isDS helper function to SIInstrInfo

2013-09-06 Thread Michel Dänzer
On Don, 2013-09-05 at 14:36 -0400, Tom Stellard wrote: > > diff --git a/lib/Target/R600/SILowerControlFlow.cpp > b/lib/Target/R600/SILowerControlFlow.cpp > index a6c43bb..5a8836c 100644 > --- a/lib/Target/R600/SILowerControlFlow.cpp > +++ b/lib/Target/R600/SILowerControlFlow.cpp [...] > @@ -487

Re: [Mesa-dev] Mesa (git 20130828) fails to build on MIPS

2013-09-06 Thread Matt Turner
On Thu, Sep 5, 2013 at 11:13 AM, Christophe Jarry wrote: > Then, what DRI driver should I use? You shouldn't need one. The R600 gallium driver is the only thing available for your hardware and is what you should use. To disable all the classic dri drivers, use --with-dri-drivers= ___

[Mesa-dev] [Bug 69013] piglit arb_debug_output-api_error regression

2013-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69013 Timothy Arceri changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 69013] New: piglit arb_debug_output-api_error regression

2013-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69013 Priority: medium Bug ID: 69013 Keywords: regression CC: t_arc...@yahoo.com.au Assignee: mesa-dev@lists.freedesktop.org Summary: piglit arb_debug_output-api_error regression

Re: [Mesa-dev] Mesa (git 20130828) fails to build on MIPS

2013-09-06 Thread Christophe Jarry
> I unfortunately cannot make any sense out of your build error, but if > you're building Mesa to run on an RS780E then you should just use > > --with-gallium-drivers=r600 Ok, I will try this. > and maybe swrast, but the radeon driver specified in > --with-dri-drivers is for old R100 cards, an

[Mesa-dev] Update: UVD status on loongson 3a platform

2013-09-06 Thread Chen Jie
Hi all, This thread is about http://lists.freedesktop.org/archives/dri-devel/2013-April/037598.html. We recently find some interesting thing about UVD based playback on loongson 3a plaform, and also find a way to fix the problem. First, we find memcpy in [mesa]src/gallium/drivers/radeon/radeon_u