[Mesa-dev] [PATCH] st/mesa: fix levels in initial texture creation

2013-04-06 Thread Dave Airlie
From: Dave Airlie calim pointed out we were getting mipmap levels for array multisamples, this didn't make sense. So then I noticed this function takes last_level so we are passing in a too high value here. I think this should fix the case he was seeing. Signed-off-by: Dave Airlie --- src/mes

[Mesa-dev] [PATCH] tgsi: Ensure struct tgsi_ind_register field Index is initialized.

2013-04-06 Thread Vinson Lee
Fixes uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/auxiliary/tgsi/tgsi_build.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index 509bc5c..523430b 100

Re: [Mesa-dev] [PATCH] glsl: Fix ir_print_visitor's handling of interpolation qualifiers.

2013-04-06 Thread Jordan Justen
Reviewed-by: Jordan Justen On Sat, Apr 6, 2013 at 7:20 PM, Paul Berry wrote: > This patch updates the interp[] array to match the enum > glsl_interp_qualifier. > --- > src/glsl/ir_print_visitor.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/glsl/ir_print_visito

[Mesa-dev] [PATCH] i965: Use software primitive restart when transform feedback active.

2013-04-06 Thread Paul Berry
When transform feedback is active, the driver manually counts the number of primitives that run through the pipeline, so that if a batch buffer flush happens, the next batch buffer can pick up transform feedback where the last batch buffer left off. Hardware-accelerated primitive restart interfere

[Mesa-dev] [PATCH 3/3] glsl/linker: Adapt flat varying handling in preparation for geometry shaders.

2013-04-06 Thread Paul Berry
When a varying is consumed by transform feedback, but is not used by the fragment shader, assign_varying_locations() sets its interpolation type to "flat" in order to ensure that lower_packed_varyings never has to deal with non-flat integral varyings (the GLSL spec doesn't require integral vertex o

[Mesa-dev] [PATCH 2/3] glsl: Document lower_packed_varyings' "flat" requirement with an assert.

2013-04-06 Thread Paul Berry
To minimize the variety of type conversions that lower_packed_varyings needs to perform, it assumes that integral varyings are always qualified as "flat". link_varyings.cpp takes care of ensuring that this is the case (even in the circumstances where GLSL doesn't require it). This patch documents

[Mesa-dev] [PATCH 1/3] glsl/linker: fix varying packing for non-flat integer varyings.

2013-04-06 Thread Paul Berry
Commit dfb57e7 (glsl: Fix error checking on "flat" keyword to match GLSL ES 3.00, GLSL 1.50) relaxed the rules for integral varyings: they only need to be declared as "flat" if they are a fragment shader inputs. This allowed for the possibility of a vertex shader output being a non-flat integer, p

Re: [Mesa-dev] [PATCH] clover: change image class to inherit from buffer

2013-04-06 Thread Francisco Jerez
Dmitry Cherkassov writes: > image2d is dynamic_cast-ed down from buffer, but is not it's > direct subclass. Make it inhernit buffer. Hm, nope, you're not supposed to be able to dynamic_cast a buffer into an image2d. If you found this problem in clEnqueueCopyBufferToImage() try the attached patc

[Mesa-dev] [PATCH] glsl: Fix ir_print_visitor's handling of interpolation qualifiers.

2013-04-06 Thread Paul Berry
This patch updates the interp[] array to match the enum glsl_interp_qualifier. --- src/glsl/ir_print_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index 597d281..8b445dc 100644 --- a/src/glsl/ir_print_v

[Mesa-dev] [PATCH 2/2] mesa: update derived framebuffer state in GetMultisamplefv

2013-04-06 Thread Marek Olšák
This makes sure that ctx->DrawBuffer->Visual.samples is up-to-date. --- src/mesa/main/multisample.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index b0f45d9..a1edb52 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/m

[Mesa-dev] [PATCH 1/2] mesa: fix glGet queries depending on derived framebuffer state

2013-04-06 Thread Marek Olšák
"ctx->DrawBuffer->Visual" might be invalid if (NewState &_NEW_BUFFERS) != 0. NOTE: This is a candidate for stable branches. --- src/mesa/main/get_hash_params.py |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash

[Mesa-dev] [PATCH] clover: change image class to inherit from buffer

2013-04-06 Thread Dmitry Cherkassov
image2d is dynamic_cast-ed down from buffer, but is not it's direct subclass. Make it inhernit buffer. Signed-off-by: Dmitry Cherkassov --- src/gallium/state_trackers/clover/core/memory.cpp |4 ++-- src/gallium/state_trackers/clover/core/memory.hpp |2 +- 2 files changed, 3 insertions(+)

Re: [Mesa-dev] Mismatch between Mesas dispatch table and the one used by the X server

2013-04-06 Thread Stefan Brüns
Am Freitag, 22. März 2013, 11:46:52 schrieben Sie: > To call glFoo, the xserver (or libGL) does > > (dispatch_table[offset_of_glFoo])(...); > > To set the pointer for the glFoo function, the driver does > > dispatch_table[remap_table[remap_offset_of_glFoo]] = driver_glFoo; Thanks fo

Re: [Mesa-dev] Mesa 9.1.2? (was Re: Mesa (9.1): 21 new commits)

2013-04-06 Thread Kenneth Graunke
On 04/05/2013 07:51 PM, Jordan Justen wrote: On Fri, Apr 5, 2013 at 7:03 PM, Ian Romanick wrote: I just cherry picked (almost) all of the marked patches from master that have been out for two weeks or more. There are a couple that I did not pick. With all that out of the way... how does a M

Re: [Mesa-dev] [PATCH 5/5] intel: Remove check for kernel 2.6.29.

2013-04-06 Thread Kenneth Graunke
On 04/06/2013 05:09 AM, Daniel Vetter wrote: On Sat, Apr 06, 2013 at 12:26:40AM -0700, Kenneth Graunke wrote: Now that we require 2.6.39, there's no need to also check for 2.6.29. Calling drm_intel_bufmgr_gem_enable_fenced_relocs() without checking should be safe, as it simply sets a flag. This

[Mesa-dev] [Bug 56542] [bisected] Piglit gl_select tests crash on exit

2013-04-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=56542 --- Comment #2 from Pavel Ondračka --- (In reply to comment #1) > It's a freeglut bug, they should not close X connection in an atexit > handler. This is really bad. So it is a known bug, or should I report this with freeglut? -- You are recei

Re: [Mesa-dev] [PATCH 05/12] sso: replace Shader binding point with _Shader

2013-04-06 Thread Brian Paul
One more comment for now below. I may not get to review the rest for a few days. -Brian On 04/05/2013 03:27 PM, gregory wrote: To avoid NULL pointer check a default pipeline object is installed in _Shader when no program is current The spec say that UseProgram/UseShaderProgramEXT/ActiveProg

Re: [Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram & GetProgramPipelineiv

2013-04-06 Thread Brian Paul
On 04/05/2013 03:27 PM, gregory wrote: --- src/mesa/main/pipelineobj.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index e50416c..7a56c67 100644 --- a/src/mesa/main/pipelineobj.c ++

Re: [Mesa-dev] [PATCH 03/12] sso: add support of GL_PROGRAM_SEPARABLE and CreateShaderProgramv

2013-04-06 Thread Brian Paul
On 04/05/2013 03:26 PM, gregory wrote: CreateShaderProgramv is similar as CreateShaderProgramEXT. The 2 differences are 1/ it an array of strings 2/ it support the GL_PROGRAM_SEPARABLE (aka SeparateShader) flag --- src/mesa/main/mtypes.h|5 +++ src/mesa/main/shaderapi.c | 90

Re: [Mesa-dev] [PATCH 02/12] sso: Add pipeline container/state

2013-04-06 Thread Brian Paul
A bunch of other nits below... On 04/05/2013 03:26 PM, gregory wrote: * Extend gl_shader_state as pipeline object state * Add a new container gl_pipeline_shader_state that contains binding point of the previous object * Update mesa init/free shader state due to the extension of the attibu

Re: [Mesa-dev] [PATCH 01/12] sso: Create extensions entry points

2013-04-06 Thread Brian Paul
Hi Gregory, Just a bunch of formatting nits below... On 04/05/2013 03:25 PM, gregory wrote: Nothings implemented yet but glProgramUniform* which are mostly a copy/paste of the older function glUniform* I create dedicated pipelineobj.[ch] file that will contains function related to the "new" p

Re: [Mesa-dev] [PATCH 5/5] intel: Remove check for kernel 2.6.29.

2013-04-06 Thread Daniel Vetter
On Sat, Apr 06, 2013 at 12:26:40AM -0700, Kenneth Graunke wrote: > Now that we require 2.6.39, there's no need to also check for 2.6.29. > Calling drm_intel_bufmgr_gem_enable_fenced_relocs() without checking > should be safe, as it simply sets a flag. > > This does remove the check for zero fences

Re: [Mesa-dev] gallium ARB_texture_multisample support + r600g

2013-04-06 Thread Dave Airlie
On Sat, Apr 6, 2013 at 8:05 PM, Dave Airlie wrote: > I sent these before, and Marek reviewed them (the first 3 at least). Oh calim pointed out I'd missed some comments from before, I've pushed these to a branch with get_sample_position documented in p_context.h, and switching to using unsigned sa

Re: [Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions

2013-04-06 Thread gregory hainaut
On Fri, 05 Apr 2013 14:44:54 -0700 Ian Romanick wrote: > On 04/05/2013 02:25 PM, gregory wrote: > > Hello, > > > > Please find an implementation of the ARB_separate_shader_objects > > extensions. I concentrate mostly on the state part of > > the extensions aka the pipeline object. I think GLSL a

[Mesa-dev] [PATCH 4/4] r600g: add get_sample_position support

2013-04-06 Thread Dave Airlie
From: Dave Airlie I rewrote this to use the sample positions properly. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 269 + src/gallium/drivers/r600/r600_state.c | 67 +-- 2 files changed, 214 insertions(+), 122 deletions(-)

[Mesa-dev] [PATCH 3/4] st/mesa: add support for ARB_texture_multisample

2013-04-06 Thread Dave Airlie
From: Dave Airlie This adds support to the mesa state tracker for ARB_texture_multisample. hardware doesn't seem to use a different texture instructions, so I don't think we need to create one for TGSI at this time. Thanks to Marek for fixes to sample number picking. Reviewed-by: Marek Olšák

[Mesa-dev] [PATCH 2/4] st/mesa: add support for get sample position

2013-04-06 Thread Dave Airlie
From: Dave Airlie This just calls into the gallium interface. Reviewed-by: Marek Olšák Signed-off-by: Dave Airlie --- src/mesa/sources.mak| 1 + src/mesa/state_tracker/st_cb_msaa.c | 52 + src/mesa/state_tracker/st_cb_msaa.h | 39 ++

[Mesa-dev] [PATCH 1/4] gallium: add get_sample_position interface

2013-04-06 Thread Dave Airlie
From: Dave Airlie This is to be used to implement glGet GL_SAMPLE_POSITION. Reviewed-by: Marek Olšák Signed-off-by: Dave Airlie --- src/gallium/include/pipe/p_context.h | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_c

[Mesa-dev] gallium ARB_texture_multisample support + r600g

2013-04-06 Thread Dave Airlie
I sent these before, and Marek reviewed them (the first 3 at least). But I'd like to have the r600g one looked at before I pushed it, I rewrote it to properly return the sample positions from the correct place. One other issue is all the 2D MS Array sampler tests fail on r600g, not sure why, I've

[Mesa-dev] [PATCH 5/5] intel: Remove check for kernel 2.6.29.

2013-04-06 Thread Kenneth Graunke
Now that we require 2.6.39, there's no need to also check for 2.6.29. Calling drm_intel_bufmgr_gem_enable_fenced_relocs() without checking should be safe, as it simply sets a flag. This does remove the check for zero fences available, but that doesn't seem worth checking. Signed-off-by: Kenneth G

[Mesa-dev] [PATCH 4/5] intel: Require kernel 2.6.39 for relaxed relocation support.

2013-04-06 Thread Kenneth Graunke
Chris Wilson's relaxed relocation patch landed in March 2011. Anyone running pre-3.0 kernels probably isn't going to get the latest Mesa anyway. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 2 -- src/mesa/drivers/dri/intel/intel_screen.c | 7 --- 2 file

[Mesa-dev] [PATCH 3/5] i965: Remove a few BRW_STATE_... enum values.

2013-04-06 Thread Kenneth Graunke
These were likely used for BRW_NEW_... dirty bit flags at one point, but they're unused now. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_co

[Mesa-dev] [PATCH 2/5] i965: Remove brw->vb.info and struct brw_vertex_info.

2013-04-06 Thread Kenneth Graunke
Nobody uses this value, so there's no need to set it. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 7 --- src/mesa/drivers/dri/i965/brw_draw.c| 6 -- 2 files changed, 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/dri

[Mesa-dev] [PATCH 1/5] i965: Remove the BRW_NEW_INPUT_DIMENSIONS flag.

2013-04-06 Thread Kenneth Graunke
When I removed the proj_attrib_mask optimization, I also removed the last consumer of this bit without realizing it. Since nobody uses it, there's no point in flagging it. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 2 -- src/mesa/drivers/dri/i965/brw_draw.