[Mesa-dev] [PATCH v2 8/8+1] i965: Initialize batchbuffer and state modules before extensions.

2013-10-26 Thread Kenneth Graunke
We only want to enable ARB_transform_feedback2 if we can write to registers from batchbuffers. In order to test that, we need to be able to submit batches. And for batches to work, we need to program the initial pipeline state (like PIPELINE_SELECT), which is done from brw_state_init().

[Mesa-dev] [PATCH v2 9/8+1] i965: Enable ARB_transform_feedback2 on Gen7+ if register writes work.

2013-10-26 Thread Kenneth Graunke
With Linux 3.12, register writes work on Ivybridge and Baytrail, but not Haswell. That will be fixed in a future kernel revision, at which point this extension will automatically be enabled. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/intel_extensions.c |

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

2013-10-26 Thread Vinson Lee
Fixes Uninitialized pointer field defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

Re: [Mesa-dev] [PATCH 5/7] i965: relax brw_texture_offset assert

2013-10-26 Thread Kenneth Graunke
On 10/08/2013 12:31 PM, Ian Romanick wrote: On 10/08/2013 02:34 AM, Chris Forbes wrote: Some texturing ops are about to have nonconstant offset support; the offset in the header in these cases should be zero. Signed-off-by: Chris Forbes chr...@ijw.co.nz ---

[Mesa-dev] [PATCH] radeon: Reference miptree after checking if it is null.

2013-10-26 Thread Vinson Lee
Fixes Dereference before null check defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/mesa/drivers/dri/radeon/radeon_texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c

[Mesa-dev] [PATCH v2] i915, i965: Fix memory leak in intel_miptree_create_for_bo.

2013-10-26 Thread Vinson Lee
Fixes Resource leak defects reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/mesa/drivers/dri/i915/intel_mipmap_tree.c | 4 +++- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 6/7] i965/fs: add support for gather4 with nonconstant offsets

2013-10-26 Thread Kenneth Graunke
On 10/08/2013 02:35 AM, Chris Forbes wrote: Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 45 ++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

Re: [Mesa-dev] [PATCH 0/7] ARB_gpu_shader5 textureGather*, Part 2

2013-10-26 Thread Kenneth Graunke
On 10/08/2013 02:34 AM, Chris Forbes wrote: This series adds support for the following textureGather* enhancements that are part of ARB_gpu_shader5: - new textureGatherOffset variants - nonconstant offset for all textureGatherOffset variants, when GLSL 4.00 or ARB_gpu_shader5 is in use.

[Mesa-dev] [PATCH] i915: Fix logic_op check.

2013-10-26 Thread Vinson Lee
logic_op is of type GLenum (unsigned int). Fixes Macro compares unsigned to 0 defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/mesa/drivers/dri/i915/intel_blit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH] glsl: Move error message inside validation check reducing duplicate message handling

2013-10-26 Thread Timothy Arceri
On Fri, 2013-10-25 at 14:51 -0700, Paul Berry wrote: +   _mesa_glsl_error(loc, state, +    is_initializer ? initializer : value +    of type %s cannot be assigned to +    variable of type %s, +  

Re: [Mesa-dev] [PATCH V2 4/5] i965/vs: Add support for shadow comparitors with gather4

2013-10-26 Thread Kenneth Graunke
On 10/14/2013 01:30 AM, Chris Forbes wrote: gather4_c's argument layout is straightforward -- refz just goes on the end. gather4_po_c's layout however -- the array index is replaced with refz. That is really strange...especially since GLSL requires supporting textureGatherOffset with

Re: [Mesa-dev] [PATCH V2 4/4] i965: Add lowering pass for splitting textureGatherOffsets

2013-10-26 Thread Kenneth Graunke
On 10/14/2013 01:33 AM, Chris Forbes wrote: Rewrites textureGatherOffsets(s, p, offsets) into gvec4( textureGatherOffset(s, p, offsets[0]).w, textureGatherOffset(s, p, offsets[1]).w, textureGatherOffset(s, p, offsets[2]).w, textureGatherOffset(s, p, offsets[3]).w

[Mesa-dev] [PATCH] svga: Remove svga_hwtnl_simple_draw_range_elements dead code.

2013-10-26 Thread Vinson Lee
Remove dead code left behind by commit 8d7b913e4e089cc8b0b800cbcf80737d0be0a0f7. Fixes Logically dead code defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/gallium/drivers/svga/svga_draw_elements.c | 6 -- 1 file changed, 6 deletions(-) diff --git

Re: [Mesa-dev] [PATCH V2 1/3] i965: Add lowering pass to fold offset into unnormalized coords

2013-10-26 Thread Kenneth Graunke
On 10/14/2013 01:36 AM, Chris Forbes wrote: It turns out that nonzero offsets with gsampler2DRect don't work -- they just return garbage. Work around this by folding the offset into the coord. Done as an IR pass rather than yet another hack in the visitors because it's clear what's going on

Re: [Mesa-dev] [PATCH V2 2/3] i965: Generalize coord+offset lowering pass for ir_txf

2013-10-26 Thread Kenneth Graunke
On 10/14/2013 01:36 AM, Chris Forbes wrote: ir_txf expects an ivec* coordinate, and may be larger than ivec2; shuffle things around so that this will work. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- .../dri/i965/brw_lower_unnormalized_offset.cpp | 51 ++ 1

Re: [Mesa-dev] [PATCH] i965: Do not set bilinear_filter flag in case of multisample blits

2013-10-26 Thread Armin K.
On 10/20/2013 08:12 PM, Armin K. wrote: On 10/19/2013 02:24 AM, Anuj Phogat wrote: Setting bilinear_filter flag in case of multisample blits with GL_LINEAR filter causes incorrect behavior in translate_dst_to_src() function. This broke Modern Warfare (1, 2 and 3) on SNB, IVB and HSW. Tested

[Mesa-dev] [PATCH] RFC: gallium/dri2/st: start adding support for GLX_MESA_query_renderer

2013-10-26 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com + nvc0 support for demo purposes, will split up later. So I've done this by just adding pipe cap queries for this stuff, we might want to add another high level query to say if we are bothered exposing this stuff. nouveau can't get the pci device id as it

Re: [Mesa-dev] [PATCH] svga: Remove svga_hwtnl_simple_draw_range_elements dead code.

2013-10-26 Thread Brian Paul
On 10/26/2013 02:12 AM, Vinson Lee wrote: Remove dead code left behind by commit 8d7b913e4e089cc8b0b800cbcf80737d0be0a0f7. Fixes Logically dead code defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/gallium/drivers/svga/svga_draw_elements.c | 6 -- 1

Re: [Mesa-dev] [PATCH V2 02/12] mesa: Add new functions and enums required by GL_ARB_sample_shading

2013-10-26 Thread Brian Paul
On 10/25/2013 05:44 PM, Anuj Phogat wrote: New functions added by GL_ARB_sample_shading: glMinSampleShadingARB() New enums: GL_SAMPLE_SHADING_ARB GL_MIN_SAMPLE_SHADING_VALUE_ARB V2: Update comments. Create new GL4x.xml. Remove redundant code in get.c. Update the API_XML list in

Re: [Mesa-dev] [PATCH V2 03/12] mesa: Pass number of samples as a program state variable

2013-10-26 Thread Brian Paul
On 10/25/2013 05:45 PM, Anuj Phogat wrote: Number of samples will be required in fragment shader program by new GLSL builtin uniform gl_NumSamples. V2: Use state.numsamples in place of state.num.samples Use _NEW_BUFFERS flag in place of _NEW_MULTISAMPLE Signed-off-by: Anuj Phogat

Re: [Mesa-dev] [PATCH] RFC: gallium/dri2/st: start adding support for GLX_MESA_query_renderer

2013-10-26 Thread Brian Paul
On 10/26/2013 05:55 AM, Dave Airlie wrote: From: Dave Airlie airl...@redhat.com + nvc0 support for demo purposes, will split up later. So I've done this by just adding pipe cap queries for this stuff, we might want to add another high level query to say if we are bothered exposing this stuff.

Re: [Mesa-dev] [PATCH 2/2] implement NV_vdpau_interop v3

2013-10-26 Thread Christian König
Merged the fixes and pushed the result this morning. Thanks for the help, Christian. Am 26.10.2013 01:25, schrieb Marek Olšák: On Sun, Oct 20, 2013 at 11:57 AM, Christian König deathsim...@vodafone.de wrote: Hi Marek, I've just send out a v6 of the patch, please take a second look. Most

Re: [Mesa-dev] [PATCH v2 1/8] mesa: Separate transform feedback object initialization from allocation.

2013-10-26 Thread Marek Olšák
For patches 1 2: Reviewed-by: Marek Olšák marek.ol...@amd.com Marek On Sat, Oct 26, 2013 at 7:35 AM, Kenneth Graunke kenn...@whitecape.org wrote: Both Gallium and i965 subclass gl_transform_feedback_object, which requires implementing a custom NewTransformFeedback hook. Creating a helper

Re: [Mesa-dev] [PATCH v2 5/8] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-26 Thread Marek Olšák
This looks good. I recommend porting all_varyings_in_vbos from st_draw.c to vbo_all_varyings_in_vbos, because it also takes instanced arrays into account. Reviewed-by: Marek Olšák marek.ol...@amd.com Marek On Sat, Oct 26, 2013 at 7:35 AM, Kenneth Graunke kenn...@whitecape.org wrote:

Re: [Mesa-dev] Patch for include/GL/gl.h

2013-10-26 Thread Baptist BENOIST
Sorry for the weekly delay to answer, I am currently very busy. Hello, You can find attached a patch to apply on the include/GL/gl.h file. This patch aims to fix a build issue with GCC when using the -DGL_GLEXT_LEGACY, -Werror and -Wundef flags. I have remarked the problem with Qt 5.1.1

[Mesa-dev] Decode hi10p with mesa uvd vdpau

2013-10-26 Thread Peter Frühberger
Hi, I looked at the openmax decoder posted yesterday and have seen that only two fields are missing to also decode hi10p with the current vdpau uvd infrastructure in place. I mailed two patches to the vdpau mailing list in order to get the API bumped to ship those two fields via the h264

Re: [Mesa-dev] Patch for include/GL/gl.h

2013-10-26 Thread Brian Paul
On Fri, Oct 25, 2013 at 10:02 AM, Baptist BENOIST retur...@live.com wrote: Sorry for the weekly delay to answer, I am currently very busy. Hello, You can find attached a patch to apply on the include/GL/gl.h file. This patch aims to fix a build issue with GCC when using the

Re: [Mesa-dev] [PATCH] RFC: gallium/dri2/st: start adding support for GLX_MESA_query_renderer

2013-10-26 Thread Marek Olšák
FYI, the flags psp-max_gl_xxx_version are incorrect for most (all?) Gallium drivers. Marek On Sat, Oct 26, 2013 at 1:55 PM, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com + nvc0 support for demo purposes, will split up later. So I've done this by just adding pipe

Re: [Mesa-dev] Decode hi10p with mesa uvd vdpau

2013-10-26 Thread Grigori Goronzy
On 26.10.2013 16:31, Peter Frühberger wrote: Hi, I looked at the openmax decoder posted yesterday and have seen that only two fields are missing to also decode hi10p with the current vdpau uvd infrastructure in place. I mailed two patches to the vdpau mailing list in order to get the API

[Mesa-dev] [PATCH] Ensure we find the linker scripts in out-of-tree builds.

2013-10-26 Thread Kai Wasserbäch
Signed-off-by: Kai Wasserbäch k...@dev.carbon-project.org Cc: thomas.stell...@amd.com --- Hi Tom, the patches you sent seem to work, but only for in-tree builds. If you push them out, please also fold the following patch into that series, that ensures out-of-tree builds work as well. If ran a

[Mesa-dev] [PATCH] glsl: Generalize MSVC fix for strcasecmp().

2013-10-26 Thread Paul Berry
This will let us use strcasecmp() from anywhere inside Mesa without having to worry about the fact that it doesn't exist in MSVC. --- src/glsl/glsl_parser.yy | 8 +--- src/mesa/main/imports.h | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/glsl/glsl_parser.yy

Re: [Mesa-dev] [PATCH 2/2] implement NV_vdpau_interop v3

2013-10-26 Thread Paul Berry
On 26 October 2013 07:26, Christian König deathsim...@vodafone.de wrote: Merged the fixes and pushed the result this morning. Did you by any chance run make check? I'm seeing the following failure: === Mesa 10.0.0-devel:

Re: [Mesa-dev] [PATCH] glsl: Add a CSE pass.

2013-10-26 Thread Paul Berry
On 18 October 2013 15:44, Eric Anholt e...@anholt.net wrote: This only operates on constant/uniform values for now, because otherwise I'd have to deal with killing my available CSE entries when assignments happen, and getting even this working in the tree ir was painful enough. As is, it

[Mesa-dev] Possible Sandybridge GPU hang fixes

2013-10-26 Thread Kenneth Graunke
These patches add some missing flushing, which appears to help. I'm still getting GPU hangs, but they're much less frequent, and now have an IPEHR of MI_SEMAPHORE_MBOX. I suspect those may be due to bugs in my performance monitoring code, rather than upstream problems. Xinkai Chen reported that

[Mesa-dev] [PATCH 2/7] i965: Emit post-sync non-zero flush before 3DSTATE_GS_SVB_INDEX.

2013-10-26 Thread Kenneth Graunke
From the comments above intel_emit_post_sync_nonzero_flush: [DevSNB-C+{W/A}] Before any depth stall flush (including those produced by non-pipelined state commands), software needs to first send a PIPE_CONTROL with no bits set except Post-Sync Operation != 0. This suggests that every

[Mesa-dev] [PATCH 1/7] i965: CS writes/reads should use I915_GEM_INSTRUCTION

2013-10-26 Thread Kenneth Graunke
From: Daniel Vetter daniel.vet...@ffwll.ch Otherwise the gen6 w/a in the kernel won't kick in and the write will land nowhere. Inspired by a patch Ken pointed me at which had the same issue (but isn't yet merged and also for a gen7+ feature). An audit of the entire driver didn't reveal any other

[Mesa-dev] [PATCH 4/7] i965: Also guard 3DSTATE_DRAWING_RECTANGLE with a flush in blorp.

2013-10-26 Thread Kenneth Graunke
Non-pipelined commands need this flush. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen6_blorp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp index

[Mesa-dev] [PATCH 3/7] i965: Emit post-sync non-zero flush before 3DSTATE_DRAWING_RECTANGLE.

2013-10-26 Thread Kenneth Graunke
This is another non-pipelined command that needs a flush on Sandybridge. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_misc_state.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c

[Mesa-dev] [PATCH 5/7] i965: Move post-sync non-zero flush for 3DSTATE_MULTISAMPLE.

2013-10-26 Thread Kenneth Graunke
For some reason, we put the flush in the caller, rather than just before emitting the packet. This is more than a cosmetic problem: BLORP calls gen6_emit_3dstate_multisample() directly, and so it missed the flush. Signed-off-by: Kenneth Graunke kenn...@whitecape.org ---

[Mesa-dev] [PATCH 7/7] i965: Also emit HiZ and Stencil packets when disabling depth on Gen6.

2013-10-26 Thread Kenneth Graunke
The normal drawing path does this, and it's necessary on Ivybridge, so let's try it on Sandybridge too. It's not explicitly documented as necessary, but might help with hangs. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen6_blorp.cpp | 12 1

[Mesa-dev] [PATCH 6/7] i965: Also emit HIER_DEPTH and STENCIL packets when disabling depth.

2013-10-26 Thread Kenneth Graunke
From the documentation: [DevIVB] 3DSTATE_DEPTH_BUFFER must always be programmed along with the other Depth/Stencil state commands(i.e. 3DSTATE_CLEAR_PARAMS, 3DSTATE_STENCIL_BUFFER, or 3DSTATE_HIER_DEPTH_BUFFER). We normally do this, but BLORP was failing to do so in the case where it disables

Re: [Mesa-dev] [PATCH] glsl: Generalize MSVC fix for strcasecmp().

2013-10-26 Thread Kenneth Graunke
On 10/26/2013 10:32 AM, Paul Berry wrote: This will let us use strcasecmp() from anywhere inside Mesa without having to worry about the fact that it doesn't exist in MSVC. --- src/glsl/glsl_parser.yy | 8 +--- src/mesa/main/imports.h | 1 + 2 files changed, 2 insertions(+), 7

[Mesa-dev] [PATCH 1/5] i965: Create a temporary for transform feedback output components.

2013-10-26 Thread Kenneth Graunke
This is a bit shorter. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen7_sol_state.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index

[Mesa-dev] [PATCH 2/5] i965: Explicitly maintain a count of SO_DECL structures emitted.

2013-10-26 Thread Kenneth Graunke
Currently, we emit one SO_DECL structure per output, so we use the index in the Outputs[] array as the index into the so_decl[] array as well. In order to support the fake gl_SkipComponents[1234] varyings from ARB_transform_feedback3, we'll need to emit SO_DECLs to fill in the holes between

[Mesa-dev] [PATCH 5/5] i965: Enable the ARB_transform_feedback_instanced extension on Gen7+.

2013-10-26 Thread Kenneth Graunke
This depends on ARB_transform_feedback2, so I've predicated it on the ability to do register writes. It also depends on ARB_transform_feedback3, which is the only reason we couldn't expose it previously. Signed-off-by: Kenneth Graunke kenn...@whitecape.org ---

[Mesa-dev] [Bug 70900] New: DispatchSanity_test.GL31_CORE regression

2013-10-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70900 Priority: medium Bug ID: 70900 Keywords: regression CC: deathsim...@vodafone.de Assignee: mesa-dev@lists.freedesktop.org Summary: DispatchSanity_test.GL31_CORE regression