Re: [Mesa-dev] [PATCH] gallium: add bits for clipping points as tris (d3d-style)

2014-01-10 Thread Lauri Kasanen
On Fri, 10 Jan 2014 03:57:45 +0100 srol...@vmware.com wrote: > From: Roland Scheidegger > > OpenGL does whole-point clipping, that is a large point is either fully > clipped or fully unclipped (the latter means it may extend beyond the > viewport as long as the center is inside the viewport). d3

Re: [Mesa-dev] GPU lockup CP stall when calling clBuildProgram on Cayman&In-Reply-To=

2014-01-10 Thread christophe choquet
I have been digging into this, and I was wrong it occurred at clBuildProgram (was just the logs printing was deferred - sorry). Using gdb, I have been able to see that the crash occurs inside the call pipe_semaphore_signal(&ws->cs_queued); Here is the calling stack just before the hang: (gdb) bt

Re: [Mesa-dev] [PATCH] gallium: add bits for clipping points as tris (d3d-style)

2014-01-10 Thread Erik Faye-Lund
On Fri, Jan 10, 2014 at 10:33 AM, Lauri Kasanen wrote: > On Fri, 10 Jan 2014 03:57:45 +0100 > srol...@vmware.com wrote: > >> From: Roland Scheidegger >> >> OpenGL does whole-point clipping, that is a large point is either fully >> clipped or fully unclipped (the latter means it may extend beyond

[Mesa-dev] [PATCH 2/2] mesa: Add extra null check in _mesa_GenerateMipmap()

2014-01-10 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/fbobject.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 2892784..6b88e7d 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3024,6 +3024,12 @@ _mesa_Ge

[Mesa-dev] [PATCH 1/2] glsl: Fix memcpy size in ir_constant

2014-01-10 Thread Juha-Pekka Heikkila
ir_constant::ir_constant(const struct glsl_type, const ir_constant_data *) was copying too much memory. Signed-off-by: Juha-Pekka Heikkila --- src/glsl/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index ba6903d..83feb49 100644 --- a

Re: [Mesa-dev] [PATCH 1/2] loader: refactor duplicated code into loader util lib

2014-01-10 Thread Rob Clark
On Thu, Jan 9, 2014 at 10:36 PM, Eric Anholt wrote: > Rob Clark writes: > >> From: Rob Clark >> >> All the various window system integration layers duplicate roughly the >> same code for figuring out device and driver name, pci-id's, etc. Which >> is sad. So extract it out into a loader util l

Re: [Mesa-dev] [PATCH 05/30] glsl/linker: Refactor in preparation for adding more shader stages.

2014-01-10 Thread Paul Berry
On 9 January 2014 22:17, Chris Forbes wrote: > This is a nice cleanup; I like that this brings both writes to > prog->LastClipDistanceArraySize together -- but it looks like the > behavior changes slightly. > > Previously, if there was no VS and no GS, then we would never write > prog->LastClipDi

Re: [Mesa-dev] [PATCH 11/30] mesa: Change redundant code into loops in shaderapi.c.

2014-01-10 Thread Paul Berry
On 9 January 2014 20:03, Chris Forbes wrote: > This is a slightly odd construction (although copied from the existing > code): > > > + if ((shProg == NULL) || (shProg->_LinkedShaders[stage] == NULL)) > > +shProg = NULL; > You're right. This would be much better as: if ((shProg != NUL

Re: [Mesa-dev] [PATCH 19/30] mesa/cs: Handle compute shaders in _mesa_use_program().

2014-01-10 Thread Paul Berry
On 9 January 2014 22:32, Chris Forbes wrote: > Minor nit, but could CS be done after the ordered pipeline stages, for > consistency? > Sure, no problem. In fact, I just realized that if I change the "type" parameter of use_shader_program to gl_shader_stage, I can call it in a loop. I'll do tha

Re: [Mesa-dev] [PATCH 10/30] mesa: Remove ad-hoc arrays of gl_shader_program.

2014-01-10 Thread Brian Paul
On 01/09/2014 07:19 PM, Paul Berry wrote: Now that we have a ctx->Shader.CurrentProgram array, we can just use it directly. --- src/mesa/main/context.c | 6 +- src/mesa/state_tracker/st_draw.c| 6 +- src/mesa/state_tracker/st_program.c | 6 +- 3 files changed, 3 i

Re: [Mesa-dev] [PATCH 21/30] mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_SIZE constant.

2014-01-10 Thread Brian Paul
On 01/09/2014 07:19 PM, Paul Berry wrote: --- src/glsl/builtin_variables.cpp | 27 +++ src/glsl/glsl_parser_extras.cpp | 4 src/glsl/glsl_parser_extras.h | 3 +++ src/glsl/main.cpp | 3 +++ src/glsl/standalone_scaffolding.cpp

Re: [Mesa-dev] [PATCH] gallium: add bits for clipping points as tris (d3d-style)

2014-01-10 Thread Roland Scheidegger
Am 10.01.2014 12:04, schrieb Erik Faye-Lund: > On Fri, Jan 10, 2014 at 10:33 AM, Lauri Kasanen wrote: >> On Fri, 10 Jan 2014 03:57:45 +0100 >> srol...@vmware.com wrote: >> >>> From: Roland Scheidegger >>> >>> OpenGL does whole-point clipping, that is a large point is either fully >>> clipped or f

Re: [Mesa-dev] [PATCH 2/2] dri: set yInverted default to GL_TRUE

2014-01-10 Thread Chad Versace
For both patches, Reviewed-by: Chad Versace ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 06/16] i965/fs: Assert that var < num_vars.

2014-01-10 Thread Jordan Justen
Patches 1-6 Reviewed-by: Jordan Justen On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: > Helped to track down a problem in a version of the next commit. > --- > src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH 16/16] i965/fs: Print the maximum register pressure.

2014-01-10 Thread Jordan Justen
On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 606e21a..e1edd0f 100644 > --- a/src/m

Re: [Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-10 Thread Chad Versace
On Thu, Jan 09, 2014 at 11:32:10AM -0800, Jose Fonseca wrote: > This series is pretty much what I proposed several months ago, rebased on top > of master, with minor if any tweaks. > > Still to do is remove the deprecated abstractions (which now are mere > wrappers of the c11 ones). > > That sai

[Mesa-dev] [Bug 70410] egl-static/Makefile: linking fails with llvm >= 3.4

2014-01-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70410 Kai changed: What|Removed |Added CC||k...@dev.carbon-project.org --- Comment #17 from K

[Mesa-dev] [PATCH] mesa: use _mesa_shader_stage_to_string() to generate file extension

2014-01-10 Thread Emil Velikov
Signed-off-by: Emil Velikov --- Hi Paul, Here is another small cleanup inspired by your work. Not entirely sure that the last hunk is correct though. Cheers, Emil --- src/mesa/program/prog_print.c | 26 +- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/

Re: [Mesa-dev] Plans for 10.0.3 release

2014-01-10 Thread Chad Versace
On Thu, Jan 09, 2014 at 01:07:58PM -0800, Carl Worth wrote: > Hi folks, > > I just released Mesa 10.0.2 (a bit late) and followed it by immediately > working through my queue of commits nominated for the stable branch, > which I've just pushed out. > > Since the code for 10.0.2 was done and pushe

[Mesa-dev] [PATCH] nouveau: add framebuffer validation callback

2014-01-10 Thread Ilia Mirkin
Fixes assertions when trying to attach textures to fbs with formats not supported by the render engines. See https://bugs.freedesktop.org/show_bug.cgi?id=73459 Signed-off-by: Ilia Mirkin --- In a perfect world I'd have separate callbacks for depth and color, but given the list of supported valu

Re: [Mesa-dev] [PATCH 07/16] i965/fs: Support coalescing registers of size > 1.

2014-01-10 Thread Jordan Justen
On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: > total instructions in shared programs: 1550048 -> 1549880 (-0.01%) > instructions in affected programs: 1896 -> 1728 (-8.86%) > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 80 > ++-- > 1 file changed, 58 i

Re: [Mesa-dev] [PATCH 12/30] mesa: Change redundant code into loops in texstate.c.

2014-01-10 Thread Kenneth Graunke
On 01/09/2014 06:19 PM, Paul Berry wrote: > This is possible now that ctx->Shader.CurrentProgram is an array. > --- > src/mesa/main/texstate.c | 75 > +++- > 1 file changed, 29 insertions(+), 46 deletions(-) > > diff --git a/src/mesa/main/texstate.c b/

[Mesa-dev] [PATCH] mesa: Set the correct error in _mesa_BeginConditionalRender

2014-01-10 Thread Ian Romanick
From: Ian Romanick Piglit was recently changed to expect the correct error code (piglit commit 271b998), so it started failing on Mesa. This corrects that failing and adds some spec quotations to justify the errrors set. The code was rearranged a little bit to match the order listed in the spec

Re: [Mesa-dev] [PATCH 1/2] loader: refactor duplicated code into loader util lib

2014-01-10 Thread Chad Versace
On Fri, Jan 10, 2014 at 08:14:19AM -0500, Rob Clark wrote: > On Thu, Jan 9, 2014 at 10:36 PM, Eric Anholt wrote: > > Rob Clark writes: > > > >> From: Rob Clark > >> static int > >> droid_open_device(void) > >> { > >> @@ -773,7 +672,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay >

Re: [Mesa-dev] [PATCH 07/16] i965/fs: Support coalescing registers of size > 1.

2014-01-10 Thread Jordan Justen
On Fri, Jan 10, 2014 at 11:12 AM, Jordan Justen wrote: > On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: >> total instructions in shared programs: 1550048 -> 1549880 (-0.01%) >> instructions in affected programs: 1896 -> 1728 (-8.86%) >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp | 80

[Mesa-dev] [PATCH] mesa: fix GL_COLOR_SUM enum for drivers without ARB_vertex_program

2014-01-10 Thread Ilia Mirkin
Commit c13970808 (mesa: GL_EXT_secondary_color is not optional) changed CHECK_EXTENSION2(EXT_secondary_color, ARB_vetex_program, cap) to CHECK_EXTENSION(ARB_vertex_program, cap) However CHECK_EXTENSION2 checks that either extension is available, not both. Remove the extension check entirely sin

Re: [Mesa-dev] [PATCH] mesa: Set the correct error in _mesa_BeginConditionalRender

2014-01-10 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 03/10] i965: Create a helper function for emitting PIPE_CONTROL flushes.

2014-01-10 Thread Kenneth Graunke
On 01/08/2014 04:27 PM, Chris Forbes wrote: >> + OUT_BATCH(0); >> + ADVANCE_BATCH(); >> + } else { >> + BEGIN_BATCH(4); >> + OUT_BATCH(_3DSTATE_PIPE_CONTROL | flags | (4 - 2)); > > If the PRM is to believed, then ILK has two of its flag bits in dw1 > [Stall at scoreboard, and

Re: [Mesa-dev] [PATCH 03/10] i965: Create a helper function for emitting PIPE_CONTROL flushes.

2014-01-10 Thread Kenneth Graunke
On 01/09/2014 07:52 PM, Eric Anholt wrote: > Kenneth Graunke writes: > >> These days, we need to emit PIPE_CONTROL flushes all over the place. >> Being able to do that via a single function call seems convenient. >> >> Broadwell will also increase the length of these packets by 1; with the >> ref

Re: [Mesa-dev] [PATCH 07/16] i965/fs: Support coalescing registers of size > 1.

2014-01-10 Thread Matt Turner
On Fri, Jan 10, 2014 at 11:12 AM, Jordan Justen wrote: > On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: >> total instructions in shared programs: 1550048 -> 1549880 (-0.01%) >> instructions in affected programs: 1896 -> 1728 (-8.86%) >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp | 80

Re: [Mesa-dev] [PATCH 12/30] mesa: Change redundant code into loops in texstate.c.

2014-01-10 Thread Paul Berry
On 10 January 2014 11:41, Kenneth Graunke wrote: > On 01/09/2014 06:19 PM, Paul Berry wrote: > > This is possible now that ctx->Shader.CurrentProgram is an array. > > --- > > src/mesa/main/texstate.c | 75 > +++- > > 1 file changed, 29 insertions(+), 4

Re: [Mesa-dev] [PATCH 09/16] i965/fs: Calculate interference better in register_coalesce.

2014-01-10 Thread Matt Turner
On Wed, Dec 25, 2013 at 2:11 AM, Pohjolainen, Topi wrote: > On Thu, Dec 19, 2013 at 01:40:23PM -0800, Matt Turner wrote: >> Previously we simply considered two registers whose live ranges >> overlapped to interfere. Cases such as >> >>set A -- >>... | >>mov B, A --

Re: [Mesa-dev] [PATCH 05/10] i965: Use Global GTT for Sandybridge post-sync non-zero workaround.

2014-01-10 Thread Kenneth Graunke
On 01/09/2014 10:03 PM, Eric Anholt wrote: > Eric Anholt writes: > >> Kenneth Graunke writes: >> >>> The kernel doesn't even set up the aliasing PPGTT on Sandybridge, so any >>> writes marked as PPGTT will likely just get dropped on the floor. >> >> The hardware bug is that writes not marked as

Re: [Mesa-dev] [PATCH 1/2] st/mesa: simplify shader limit initialization code

2014-01-10 Thread Marek Olšák
On Thu, Jan 9, 2014 at 8:21 PM, Brian Paul wrote: > Make use of the new gl_constants::Program[] array. > --- > src/mesa/state_tracker/st_extensions.c | 31 > > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 20 +- > src/mesa/state_tracker/st_pro

Re: [Mesa-dev] [PATCH 13/16] i965/fs: Add a saturation propagation optimization pass.

2014-01-10 Thread Matt Turner
On Thu, Dec 26, 2013 at 5:54 AM, Pohjolainen, Topi wrote: > On Thu, Dec 19, 2013 at 01:40:27PM -0800, Matt Turner wrote: >> Transforms, for example, >> >> mul vgrf3, vgrf2, vgrf1 >> mov.sat vgrf4, vgrf3 >> >> into >> >> mul.sat vgrf3, vgrf2, vgrf1 >> mov vgrf4, vgrf3 >> >> which gives regi

Re: [Mesa-dev] [PATCH 2/2] st/mesa: remove _min(), _maxf(), _clamp()

2014-01-10 Thread Marek Olšák
I guess we should make MIN2 and friends inline functions to prevent evaluating its parameters multiple times. For example, MIN2(get_param(), Y) calls get_param() twice. It's not very important in this case though. Reviewed-by: Marek Olšák Marek On Thu, Jan 9, 2014 at 8:21 PM, Brian Paul wrote:

Re: [Mesa-dev] [PATCH 1/2] st/mesa: simplify shader limit initialization code

2014-01-10 Thread Brian Paul
On 01/10/2014 03:50 PM, Marek Olšák wrote: On Thu, Jan 9, 2014 at 8:21 PM, Brian Paul wrote: Make use of the new gl_constants::Program[] array. --- src/mesa/state_tracker/st_extensions.c | 31 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 20 +-

Re: [Mesa-dev] [PATCH 2/2] st/mesa: remove _min(), _maxf(), _clamp()

2014-01-10 Thread Brian Paul
On 01/10/2014 03:59 PM, Marek Olšák wrote: I guess we should make MIN2 and friends inline functions to prevent evaluating its parameters multiple times. But MIN2, MAX2, etc. are used for uint, int and float. For example, MIN2(get_param(), Y) calls get_param() twice. It's not very important i

Re: [Mesa-dev] [PATCH 08/10] i965: Introduce an OUT_RELOC64 macro.

2014-01-10 Thread Kenneth Graunke
On 01/09/2014 09:31 PM, Eric Anholt wrote: > Kenneth Graunke writes: > >> On 12/13/2013 09:28 AM, Daniel Vetter wrote: >>> On Thu, Dec 12, 2013 at 01:26:40AM -0800, Kenneth Graunke wrote: Broadwell uses 48-bit addresses. The first DWord is the low 32 bits, and the second DWord is the h

Re: [Mesa-dev] [PATCH 4/5] glsl: Vectorize multiple scalar assignments

2014-01-10 Thread Matt Turner
On Thu, Jan 9, 2014 at 11:28 AM, Ian Romanick wrote: > On 01/08/2014 12:43 PM, Matt Turner wrote: >> +/** >> + * \file opt_vectorize.cpp >> + * >> + * Combines scalar assignments of the same expression (modulo swizzle) to >> + * multiple channels of the same variable into a single vectorized >> e

Re: [Mesa-dev] [PATCH 07/16] i965/fs: Support coalescing registers of size > 1.

2014-01-10 Thread Jordan Justen
Patches 7 & 8 Reviewed-by: Jordan Justen On Fri, Jan 10, 2014 at 1:41 PM, Matt Turner wrote: > On Fri, Jan 10, 2014 at 11:12 AM, Jordan Justen wrote: >> On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: >>> total instructions in shared programs: 1550048 -> 1549880 (-0.01%) >>> instructions i

[Mesa-dev] [PATCH 0/3 v2] More valgrind fixes

2014-01-10 Thread Aaron Watry
v2: Dropped r200 patch Moved gfx/dma cleanup to r600_common_context_cleanup Fixed comment style in one of the patches Aaron Watry (3): radeon: Move gfx/dma cs cleanup to r600_common_context_cleanup st/dri: prevent leak of dri option default values mesa/main: Free ctx->DrawIndirectBu

[Mesa-dev] [PATCH 3/3] mesa/main: Free ctx->DrawIndirectBuffer during teardown

2014-01-10 Thread Aaron Watry
ctx->DrawIndirectBuffer wasn't being free'd in _mesa_free_buffer_objects With this patch, "valgrind --leak-check=full glxgears" on evergreen (CEDAR) now shows: LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks

[Mesa-dev] [PATCH 1/3] radeon: Move gfx/dma cs cleanup to r600_common_context_cleanup

2014-01-10 Thread Aaron Watry
The radeonsi code was not cleaning up either of these items leading to leaked memory. v2: Move cleanup to r600_common_context_cleanup instead of duplicating the logic for SI CC: "10.0" --- src/gallium/drivers/r600/r600_pipe.c | 7 --- src/gallium/drivers/radeon/r600_pipe_common

[Mesa-dev] [PATCH 2/3] st/dri: prevent leak of dri option default values

2014-01-10 Thread Aaron Watry
v2: Change comment style CC: "10.0" Reviewed-by: Marek Olšák --- src/gallium/state_trackers/dri/common/dri_screen.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 7410dbe..b

Re: [Mesa-dev] Plans for 10.0.3 release

2014-01-10 Thread Aaron Watry
On Thu, Jan 9, 2014 at 3:07 PM, Carl Worth wrote: > Hi folks, > > I just released Mesa 10.0.2 (a bit late) and followed it by immediately > working through my queue of commits nominated for the stable branch, > which I've just pushed out. > > Since the code for 10.0.2 was done and pushed a week ag

Re: [Mesa-dev] [PATCH 09/16] i965/fs: Calculate interference better in register_coalesce.

2014-01-10 Thread Jordan Justen
On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: > Previously we simply considered two registers whose live ranges > overlapped to interfere. Cases such as > >set A -- >... | >mov B, A --| >... | B | A >use B --| >...

Re: [Mesa-dev] [PATCH] i965: Use sample barycentric coordinates with per sample shading

2014-01-10 Thread Anuj Phogat
On Thu, Jan 9, 2014 at 4:34 PM, Chris Forbes wrote: > Hi Anuj, > > There's one fiddly interaction that I don't think this handles quite > right, although I think it does conform. > > Suppose we have this fragment shader: > >#version 330 >#extension ARB_gpu_shader5: require > >sample in

[Mesa-dev] [PATCH 07/40] mesa: Add new constants related to GL_ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Ian Romanick These limits will be queryable by GL_MAX_VIEWPORTS, GL_VIEWPORT_SUBPIXEL_BITS, and GL_VIEWPORT_BOUNDS_RANGE. Drivers that actually implement the extension must set values for these constants that comply with the minimum-maximums from the spec. Most of these changes were part

[Mesa-dev] [PATCH 35/40] i965: Consider all scissor rectangles in noop_scissor

2014-01-10 Thread Ian Romanick
From: Ian Romanick v2: Use '& 1' instead of '& i'. Noticed by Ken. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_clear.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_c

[Mesa-dev] [PATCH 27/40] mesa: Add new viewport and depth-range entry points for GL_ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter v2 (idr): Use set_viewport_no_notify / set_depth_range_no_notify (and manually notify the driver) instead of calling _mesa_set_viewporti / _mesa_set_depthrangei. Refactor bodies of _mesa_ViewportIndexed and _mesa_ViewportIndexedv into a shared function. Remove sp

[Mesa-dev] [PATCH 13/40] mesa: Refactor depth range setting even more

2014-01-10 Thread Ian Romanick
From: Ian Romanick Create an internal function that just writes data into the depth range. In future patches this will see more use because we only want to call dd_function_table::DepthRange once after setting all of the depth ranges instead of once per depth range. Signed-off-by: Ian Romanick

[Mesa-dev] [PATCH 10/40] mesa: Update viewport state for viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter Include DepthRange as well since it's state is lumped together with viewport state. Updates all the drivers that reference Viewport state in gl_context. v2 (idr): Rebase fixes. Also, don't have meta call _mesa_Viewport. We don't want the extra validation overhe

[Mesa-dev] [PATCH 03/40] mesa: Eliminate parameters to dd_function_table::Viewport

2014-01-10 Thread Ian Romanick
From: Ian Romanick No driver uses them. They will just be annoying in future patches. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i915/intel_context.c | 15 ++- src/mesa/drivers/dri/i965/brw_context.c| 7 +-- src/mesa/drivers/dri/r200/r200_state.c | 8 +

[Mesa-dev] [PATCH 26/40] mesa: Add new scissor entry points for GL_ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter v2 (idr): Use set_scissor_no_notify (and manually notify the driver) instead of calling _mesa_set_scissori. Refactory bodies of _mesa_ScissorIndexed and _mesa_ScissorIndexedv into a shared function. Perform parameter validation in the same order in all three funct

[Mesa-dev] [PATCH 04/40] mesa: Eliminate parameters to dd_function_table::DepthRange

2014-01-10 Thread Ian Romanick
From: Ian Romanick No driver uses them. They will just be annoying in future patches. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i915/i830_state.c | 2 +- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/r200/r200_state.c | 3 +-- src/mesa/drivers/d

[Mesa-dev] [PATCH 01/40] i915: Remove spurious calls to DepthRange

2014-01-10 Thread Ian Romanick
From: Ian Romanick For both i830 and i915, the driver DepthRange function just calls intelCalcViewport. Signed-off-by: Ian Romanick Cc: Eric Anholt --- src/mesa/drivers/dri/i915/i830_vtbl.c | 6 +- src/mesa/drivers/dri/i915/i915_vtbl.c | 5 + 2 files changed, 2 insertions(+), 9 deleti

[Mesa-dev] [PATCH 18/40] mesa: Restore all the scissor rectangles in _mesa_PopAttrib

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/attrib.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index f55433e..db659ad 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c

[Mesa-dev] [PATCH 09/40] mesa: Move parameter validation from _mesa_set_viewport to _mesa_Viewport

2014-01-10 Thread Ian Romanick
From: Ian Romanick Internal callers should do the right thing. Signed-off-by: Ian Romanick --- src/mesa/main/viewport.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c index 3aaab2d..3bc89ab 100644 ---

[Mesa-dev] [PATCH 14/40] mesa: Refactor viewport setting even more

2014-01-10 Thread Ian Romanick
From: Ian Romanick Create an internal function that just writes data into the viewport. In future patches this will see more use because we only want to call dd_function_table::Viewport once after setting all of the viewport instead of once per viewport. Signed-off-by: Ian Romanick --- src/me

[Mesa-dev] [PATCH 05/40] mesa: Eliminate parameters to dd_function_table::Scissor

2014-01-10 Thread Ian Romanick
From: Ian Romanick The i830 and i915 drivers used them, but they didn't really need to. They will just be annoying in future patches. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/driverfuncs.c | 3 +-- src/mesa/drivers/dri/i915/i830_state.c | 22 -- s

[Mesa-dev] [PATCH 25/40] mesa: Add custom get function for SCISSOR_TEST to _mesa_IsEnabledi

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter Now that the scissor enable state is a bitfield need a custom function to extract the correct value from gl_context. Modeled Scissor.EnableFlags after Color.BlendEnabled. --- src/mesa/main/enable.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/me

[Mesa-dev] [PATCH 20/40] mesa: Set all viewports from _mesa_Viewport and _mesa_DepthRange

2014-01-10 Thread Ian Romanick
From: Ian Romanick In _mesa_Viewport and _mesa_DepthRange, make sure that ctx->Driver.Viewport is only called once instead of once per viewport or depth range. Signed-off-by: Ian Romanick --- src/mesa/main/viewport.c | 30 -- 1 file changed, 28 insertions(+), 2 dele

[Mesa-dev] [PATCH 30/40] glsl: Add gl_ViewportIndex built-in variable

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter v2 (idr): Fix copy-and-paste bug... s/LAYER/VIEWPORT/ Signed-off-by: Ian Romanick --- src/glsl/builtin_variables.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index f630923..d6bc3c0 1006

[Mesa-dev] [PATCH 06/40] mesa: Add extension tracking bit for ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter v2 (idr): Split these changes out from the original patch. Only advertise GL_ARB_viewport_array in a core profile because it requires geometry shaders. --- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff

[Mesa-dev] [PATCH 32/40] i965: Set the maximum VPIndex

2014-01-10 Thread Ian Romanick
From: Ian Romanick At various stages the hardware clamps the gl_ViewportIndex to these values. Setting them to zero effectively makes gl_ViewportIndex be ignored. This is acutally useful in blorp (so that we don't have to modify all of the viewport / scissor state). Signed-off-by: Ian Romanick

[Mesa-dev] [PATCH 11/40] i965: Add / remove casts around viewport width and height

2014-01-10 Thread Ian Romanick
From: Ian Romanick Now that gl_viewport_attrib::Width and gl_viewport_attrib::Height are float, we don't need explicit casts to float in the driver. However, we do need some casts when comparing with integer variables. (This could probably be squashed with the previous commit where the gl_viewp

[Mesa-dev] [PATCH 19/40] mesa: Restore all the viewports in _mesa_PopAttrib

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/attrib.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index db659ad..7b7cf0e 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1357

[Mesa-dev] [PATCH 31/40] mesa: Add ARB_viewport_array plumbing

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter Define API connections to extension entry points added in previous commits. Update entry points to use floating point arguments as required by the extension. Add get tokens for ARB_viewport_array state. v2: Include review feedback. v3 (idr): Fix 'make check'. Ad

[Mesa-dev] [PATCH 36/40] mesa: Refactor bounding-box calculation out of _mesa_update_draw_buffer_bounds

2014-01-10 Thread Ian Romanick
From: Ian Romanick Drivers that currently use _Xmin and friends to set their scissor rectangle will need to use this code directly once they are updated for GL_ARB_viewport_array. Signed-off-by: Ian Romanick --- src/mesa/main/framebuffer.c | 85 + sr

[Mesa-dev] [PATCH 33/40] i965: Emit writes to viewport index

2014-01-10 Thread Ian Romanick
From: Ian Romanick This variable is handled in a fashion identical to gl_Layer. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 src/mesa/drivers/dri/i965/brw_vs.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 29/40] glsl: Add extension infrastructure for ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/glsl/glcpp/glcpp-parse.y| 3 +++ src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ src/glsl/standalone_scaffolding.cpp | 1 + 4 files changed, 7 insertions(+) diff --git a/src/glsl/glcpp/glcpp-p

[Mesa-dev] [PATCH 39/40] i965: Enable ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter v2 (idr): Only enable the extension on GEN7+ w/core profile because it requires geometry shaders. v3 (idr): Add some casting to fix setting of ViewportBounds.Min. Negating an unsigned value, then casting to float doesn't do what you might think it does. Signed-of

[Mesa-dev] [PATCH 37/40] i965: Set all the supported scissor rectangles for GEN7

2014-01-10 Thread Ian Romanick
From: Ian Romanick Currently MaxViewports is still 1, so this won't affect any change. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/gen6_scissor_state.c | 61 ++ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_

[Mesa-dev] [PATCH 28/40] mesa: Add varying slot for viewport index

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/mtypes.h| 2 ++ src/mesa/program/prog_print.c | 10 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 305b752..0d85f9d 100644 --- a/src/mesa/ma

[Mesa-dev] [PATCH 16/40] mesa: Add an index parameter to _mesa_set_scissor

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/main/attrib.c | 2 +- src/mesa/main/context.c | 2 +- src/mesa/main/scissor.c | 6 +++--- src/mesa/main/scissor.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c i

[Mesa-dev] [PATCH 08/40] mesa: Update gl_scissor_attrib to support ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter Update Mesa and drivers to access updated gl_scissor_attrib. Now have an enable bitfield and array of gl_scissor_rects. Drivers have been updated to the new scissor enable state attribute (gl_context.scissor.EnableFlags) but still treat it as a single boolean which

[Mesa-dev] [PATCH 22/40] meta: Restore all scissor state

2014-01-10 Thread Ian Romanick
From: Ian Romanick Previously the restore code would enable all scissor rectangles if any scissor rectangles were enabled on entry to meta. When there is only one scissor rectangle, this is fine. As soon as a driver supports multiple viewports, this will be a problem. Signed-off-by: Ian Romani

[Mesa-dev] [PATCH 12/40] mesa: Add an index parameter to _mesa_set_viewport

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 14 +++--- src/mesa/main/context.c| 2 +- src/mesa/main/viewport.c | 24 ++-- src/mesa/main/viewport.h | 2 +- 4 files changed, 23 insertions(+), 19 deletions(-)

[Mesa-dev] [PATCH 15/40] mesa: Refactor scissor rectangle setting even more

2014-01-10 Thread Ian Romanick
From: Ian Romanick Create an internal function that just writes data into the scissor rectangle. In future patches this will see more use because we only want to call dd_function_table::Scissor once after setting all of the scissor rectangles instead of once per scissor rectangle. Signed-off-by

[Mesa-dev] [PATCH 17/40] mesa: Initialize all the viewports

2014-01-10 Thread Ian Romanick
From: Ian Romanick v2: Use MAX_VIEWPORTS instead of ctx->Const.MaxViewports because the driver may not set ctx->Const.MaxViewports yet. Signed-off-by: Ian Romanick --- src/mesa/main/context.c | 10 +- src/mesa/main/viewport.c | 33 + 2 files changed, 30

[Mesa-dev] [PATCH 21/40] mesa: Set all scissor rects

2014-01-10 Thread Ian Romanick
From: Ian Romanick In _mesa_Scissor, make sure that ctx->Driver.Scissor is only called once instead of once per scissor rectangle. v2: Use MAX_VIEWPORTS instead of ctx->Const.MaxViewports because the driver may not set ctx->Const.MaxViewports yet. Signed-off-by: Ian Romanick --- src/mesa/main

[Mesa-dev] [PATCH 38/40] i965: Consider all viewports before enabling guardband clipping

2014-01-10 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/gen6_clip_state.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c index 3499e37..ed7afd7 100

[Mesa-dev] [PATCH 34/40] i965: Set all the supported viewports for GEN7

2014-01-10 Thread Ian Romanick
From: Ian Romanick Currently MaxViewports is still 1, so this won't affect any change. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_cc.c | 21 + src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965/gen7_viewport_state.c | 63 ++

[Mesa-dev] [PATCH 23/40] mesa: Change parameter to _mesa_set_viewport to float

2014-01-10 Thread Ian Romanick
From: Ian Romanick This matches the expectations of GL_ARB_viewport_array and the storage type where the values will land. Signed-off-by: Ian Romanick --- src/mesa/main/viewport.c | 13 +++-- src/mesa/main/viewport.h | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --g

[Mesa-dev] [PATCH 40/40] docs: Note that GL_ARB_viewport_array is done on i965

2014-01-10 Thread Ian Romanick
From: Ian Romanick At least for GEN7+, anyway. Signed-off-by: Ian Romanick --- docs/GL3.txt| 2 +- docs/relnotes/10.1.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index f98a54a..eda44a3 100644 --- a/docs/GL3.txt +++ b/docs/GL

[Mesa-dev] [PATCH 0/40] Implement GL_ARB_viewport_array

2014-01-10 Thread Ian Romanick
(Sent after the fact... sorry.) This represents a medling of GL_ARB_viewport_array code written by Courtney Goeltzenleuchter (LunarG) and myself over the last couple months. It implements all of the core Mesa code for the extension and enables it in the i965 driver. Like layered rendering, this

[Mesa-dev] [PATCH 24/40] mesa: Add new get entrypoints for ARB_viewport_array

2014-01-10 Thread Ian Romanick
From: Courtney Goeltzenleuchter v2 (idr): Fix several "comparison between signed and unsigned integer expressions" warnings. --- src/mesa/main/get.c | 189 src/mesa/main/get.h | 6 ++ 2 files changed, 195 insertions(+) diff --git a/src/mesa

[Mesa-dev] [PATCH 02/40] radeon: Remove dead code

2014-01-10 Thread Ian Romanick
From: Ian Romanick A future patch will rename some of the fields of gl_viewport_attrib, and I don't want to update dead code that I can't test. Signed-off-by: Ian Romanick Cc: Dave Airlie --- src/mesa/drivers/dri/radeon/radeon_common.c | 9 - 1 file changed, 9 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 4/5] glsl: Vectorize multiple scalar assignments

2014-01-10 Thread Ian Romanick
On 01/10/2014 03:27 PM, Matt Turner wrote: > On Thu, Jan 9, 2014 at 11:28 AM, Ian Romanick wrote: >> On 01/08/2014 12:43 PM, Matt Turner wrote: >>> +/** >>> + * \file opt_vectorize.cpp >>> + * >>> + * Combines scalar assignments of the same expression (modulo swizzle) to >>> + * multiple channels

Re: [Mesa-dev] [PATCH 10/40] mesa: Update viewport state for viewport_array

2014-01-10 Thread Kenneth Graunke
On 01/10/2014 05:40 PM, Ian Romanick wrote: > From: Courtney Goeltzenleuchter > > Include DepthRange as well since it's state is lumped together with > viewport state. Updates all the drivers that reference Viewport state > in gl_context. > > v2 (idr): Rebase fixes. Also, don't have meta call

Re: [Mesa-dev] [PATCH 4/5] glsl: Vectorize multiple scalar assignments

2014-01-10 Thread Matt Turner
On Fri, Jan 10, 2014 at 5:53 PM, Ian Romanick wrote: > On 01/10/2014 03:27 PM, Matt Turner wrote: >> On Thu, Jan 9, 2014 at 11:28 AM, Ian Romanick wrote: >>> On 01/08/2014 12:43 PM, Matt Turner wrote: +/** + * \file opt_vectorize.cpp + * + * Combines scalar assignments of the

Re: [Mesa-dev] [PATCH 09/16] i965/fs: Calculate interference better in register_coalesce.

2014-01-10 Thread Matt Turner
On Fri, Jan 10, 2014 at 5:19 PM, Jordan Justen wrote: > On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner wrote: >> Previously we simply considered two registers whose live ranges >> overlapped to interfere. Cases such as >> >>set A -- >>... | >>mov B, A --| >>

Re: [Mesa-dev] [PATCH 32/40] i965: Set the maximum VPIndex

2014-01-10 Thread Kenneth Graunke
On 01/10/2014 05:40 PM, Ian Romanick wrote: > From: Ian Romanick > > At various stages the hardware clamps the gl_ViewportIndex to these > values. Setting them to zero effectively makes gl_ViewportIndex be > ignored. This is acutally useful in blorp (so that we don't have to > modify all of the

Re: [Mesa-dev] [PATCH 35/40] i965: Consider all scissor rectangles in noop_scissor

2014-01-10 Thread Kenneth Graunke
On 01/10/2014 05:40 PM, Ian Romanick wrote: > From: Ian Romanick > > v2: Use '& 1' instead of '& i'. Noticed by Ken. > > Signed-off-by: Ian Romanick > --- > src/mesa/drivers/dri/i965/brw_clear.c | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/src/mesa

Re: [Mesa-dev] [PATCH 17/42] i965/blorp: reduce the scope of the explicit compression control

2014-01-10 Thread Ian Romanick
On 12/20/2013 06:38 AM, Topi Pohjolainen wrote: > By highlighting these special cases makes it clearer to switch > to the fs-generator as the wider scoped compression control > settings used in the current implementation can be simply > dropped. > > No regressions on IVB (piglit quick + unit tests

Re: [Mesa-dev] [PATCH 16/42] i965/blorp: remove dependency to compression control state

2014-01-10 Thread Ian Romanick
On 01/09/2014 10:05 AM, Matt Turner wrote: > On Fri, Dec 20, 2013 at 6:38 AM, Topi Pohjolainen > wrote: >> Effectively only the mask control bit gets altered for the single >> addition in question and hence there is no real need to use a >> fresh state control level for it -- that is more useful w

Re: [Mesa-dev] [PATCH 0/40] Implement GL_ARB_viewport_array

2014-01-10 Thread Ian Romanick
On 01/10/2014 05:44 PM, Ian Romanick wrote: > (Sent after the fact... sorry.) > > This represents a medling of GL_ARB_viewport_array code written by > Courtney Goeltzenleuchter (LunarG) and myself over the last couple > months. It implements all of the core Mesa code for the extension and > enabl

Re: [Mesa-dev] [PATCH 36/40] mesa: Refactor bounding-box calculation out of _mesa_update_draw_buffer_bounds

2014-01-10 Thread Kenneth Graunke
On 01/10/2014 05:40 PM, Ian Romanick wrote: > From: Ian Romanick > > Drivers that currently use _Xmin and friends to set their scissor > rectangle will need to use this code directly once they are updated for > GL_ARB_viewport_array. > > Signed-off-by: Ian Romanick > --- > src/mesa/main/frameb

Re: [Mesa-dev] [PATCH 37/40] i965: Set all the supported scissor rectangles for GEN7

2014-01-10 Thread Kenneth Graunke
On 01/10/2014 05:40 PM, Ian Romanick wrote: > From: Ian Romanick > > Currently MaxViewports is still 1, so this won't affect any change. > > Signed-off-by: Ian Romanick > --- > src/mesa/drivers/dri/i965/gen6_scissor_state.c | 61 > ++ > 1 file changed, 34 insertions(+)

  1   2   >