Re: [Mesa-dev] [PATCH] i965: Fix streamed state dumping/annotation after the blorp-flush change.

2013-11-20 Thread Kenneth Graunke
On 11/20/2013 04:50 PM, Eric Anholt wrote: > I think I was thinking of the batch command packet cache when I pasted > this in, but this counter is only used for dumping out streamed state for > INTEL_DEBUG=batch and for putting annotations in our aub files. > > Cc: "10.0" > --- > src/mesa/driver

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Kenneth Graunke
On 11/20/2013 10:36 PM, Tapani Pälli wrote: > On 11/21/2013 12:04 AM, Kenneth Graunke wrote: >> On 11/20/2013 09:45 AM, Ian Romanick wrote: >>> On 11/20/2013 09:08 AM, Kenneth Graunke wrote: On 11/20/2013 03:27 AM, Tapani Pälli wrote: > Earlier comments suggest this was removed from GL cor

[Mesa-dev] [PATCH] gallium/dri: Support DRI Image extension version 7 (v3)

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers v2: Fix up queryImage return for ATTRIB_FD Use driver_descriptor.configuration to determine whether the driver supports DMA-BUF import/export. v3: Really, truly, fix up queryImage return for ATTRIB_FD --- Now actually contains all the changes describe

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Tapani Pälli
On 11/21/2013 12:04 AM, Kenneth Graunke wrote: On 11/20/2013 09:45 AM, Ian Romanick wrote: On 11/20/2013 09:08 AM, Kenneth Graunke wrote: On 11/20/2013 03:27 AM, Tapani Pälli wrote: Earlier comments suggest this was removed from GL core spec but it is still there. Enabling makes 'texture_lod_b

[Mesa-dev] [PATCH 0/9] DRI Image 7 support for gallium

2013-11-20 Thread christopher . halse . rogers
Now includes support for Image 6 as a bonus feature, and 7 is only exposed on the gallium drivers which support dma-buf import/export. Still useful for Wayland-Prime and Mir, now also useful for DRI3000 ___ mesa-dev mailing list mesa-dev@lists.freedeskt

[Mesa-dev] [PATCH 9/9] svga/winsys: Implement surface sharing using prime fd handles

2013-11-20 Thread christopher . halse . rogers
From: Thomas Hellstrom This needs a prime-aware vmwgfx kernel module to work properly. (With additions by Christopher James Halse Rogers ) --- src/gallium/targets/dri-vmwgfx/target.c | 13 + src/gallium/winsys/svga/drm/vmw_screen_dri.c | 79 +--- 2 files changed

[Mesa-dev] [PATCH 4/9] gallium/dri: Support DRI Image extension version 7 (v2)

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers v2: Fix up queryImage return for ATTRIB_FD Use driver_descriptor.configuration to determine whether the driver supports DMA-BUF import/export. --- src/gallium/include/state_tracker/drm_driver.h | 2 + src/gallium/state_trackers/dri/drm/dri2.c |

[Mesa-dev] [PATCH 8/9] gallium/radeon: Implement hooks for DRI Image 7

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers --- src/gallium/targets/r300/common/drm_target.c | 27 +- src/gallium/targets/r600/common/drm_target.c | 16 src/gallium/targets/radeonsi/common/drm_target.c | 16 src/gallium/winsys/radeon/drm/radeon_drm_bo.c| 107 +++

[Mesa-dev] [PATCH 7/9] radeon: Rename bo_handles hashtable to match its actual contents.

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers It's a map of GEM name->bo, so identify it as such --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeo

[Mesa-dev] [PATCH 5/9] nouveau: Support DRI Image 7 extension

2013-11-20 Thread christopher . halse . rogers
From: Maarten Lankhorst --- src/gallium/drivers/nouveau/nouveau_screen.c | 11 +-- src/gallium/targets/dri-nouveau/target.c | 18 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nou

[Mesa-dev] [PATCH 1/9] gallium/dri: Support DRI Image extension version 6

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers --- src/gallium/state_trackers/dri/drm/dri2.c | 72 ++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 868cd25..bc6ca0a 100

[Mesa-dev] [PATCH 6/9] ilo: Support DRI Image 7

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers --- src/gallium/targets/dri-ilo/target.c| 19 ++- src/gallium/winsys/intel/drm/intel_drm_winsys.c | 2 -- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/gallium/targets/dri-ilo/target.c b/src/gallium/targets/

[Mesa-dev] [PATCH 3/9] gallium/dri2: Set winsys_handle type to KMS for stride query.

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers Otherwise the default is TYPE_SHARED, which will flink the bo. This seems rather unnecessary for a simple stride query. --- src/gallium/state_trackers/dri/drm/dri2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c

[Mesa-dev] [PATCH 2/9] gallium/winsys/drm: Prepare for passing prime fds in winsys_handle

2013-11-20 Thread christopher . halse . rogers
From: Christopher James Halse Rogers --- src/gallium/drivers/freedreno/freedreno_screen.c | 5 + src/gallium/drivers/nouveau/nouveau_screen.c | 6 ++ src/gallium/include/state_tracker/drm_driver.h| 9 ++--- src/gallium/state_trackers/dri/drm/dri2.c |

Re: [Mesa-dev] [PATCH 15/18] mesa: Add ARB_viewport_array plumbing

2013-11-20 Thread Chris Forbes
Oops -- the 8E4E is obviously correct. Artifact of me switching how I was commenting halfway through. On Thu, Nov 21, 2013 at 3:25 PM, Chris Forbes wrote: > These are bogus: > > + > + > + > + > + > > 0x8E4D > > + > > 0x8E4E > > add: > > + > > 0x8260 __

Re: [Mesa-dev] [PATCH 15/18] mesa: Add ARB_viewport_array plumbing

2013-11-20 Thread Chris Forbes
These are bogus: + + + + + 0x8E4D + 0x8E4E add: + 0x8260 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] mesa: Fix texture target validation for glFramebufferTexture()

2013-11-20 Thread Paul Berry
On 20 November 2013 11:13, Ian Romanick wrote: > On 11/19/2013 11:02 PM, Paul Berry wrote: > > Previously we were using the code path for validating > > glFramebufferTextureLayer(). But glFramebufferTexture() allows > > additional texture types. > > > > Fixes piglit tests: > > - spec/!OpenGL 3.2

[Mesa-dev] [PATCH] i965: Fix streamed state dumping/annotation after the blorp-flush change.

2013-11-20 Thread Eric Anholt
I think I was thinking of the batch command packet cache when I pasted this in, but this counter is only used for dumping out streamed state for INTEL_DEBUG=batch and for putting annotations in our aub files. Cc: "10.0" --- src/mesa/drivers/dri/i965/brw_blorp.cpp | 1 - 1 file changed, 1 deletio

Re: [Mesa-dev] [PATCH 00/15] Add ARB_viewport_array extension

2013-11-20 Thread Courtney Goeltzenleuchter
On Wed, Nov 20, 2013 at 5:06 PM, Ian Romanick wrote: > On 11/20/2013 02:59 PM, Courtney Goeltzenleuchter wrote: > > This series starts by updating the driver interface for > > scissor, viewport and DepthRange. This includes removing > > unused arguments from the Scissor, Viewport and DepthRange.

Re: [Mesa-dev] [PATCH] llvmpipe: support 8bit subpixel precision

2013-11-20 Thread Brian Paul
Looks great, Zack. That was a fun project, huh? :) [...] diff --git a/src/gallium/tests/graw/tri-large.c b/src/gallium/tests/graw/tri-large.c new file mode 100644 index 000..3fbbfb3 --- /dev/null +++ b/src/gallium/tests/graw/tri-large.c @@ -0,0 +1,173 @@ +/* Display a cleared blue window

Re: [Mesa-dev] [PATCH] mesa: Fix setup of LocalParams array.

2013-11-20 Thread Eric Anholt
Brian Paul writes: > On 11/18/2013 08:57 PM, Michel Dänzer wrote: >> On Mon, 2013-11-18 at 17:27 -0800, Eric Anholt wrote: >>> i965 passed piglit, but swrast and gallium both segfaulted without this. >>> i965 happened to work because it never ran _mesa_load_state_parameters() >>> on the new progr

[Mesa-dev] [PATCH] svga: remove special-case code for texkil w component

2013-11-20 Thread Brian Paul
Not actually needed. Fixes piglit ARB_fragment_program/kil-swizzle test. --- src/gallium/drivers/svga/svga_tgsi_insn.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_in

Re: [Mesa-dev] [PATCH 00/15] Add ARB_viewport_array extension

2013-11-20 Thread Ian Romanick
On 11/20/2013 02:59 PM, Courtney Goeltzenleuchter wrote: > This series starts by updating the driver interface for > scissor, viewport and DepthRange. This includes removing > unused arguments from the Scissor, Viewport and DepthRange. > I kept the index argument, although it is not used, it may >

[Mesa-dev] [PATCH] llvmpipe: support 8bit subpixel precision

2013-11-20 Thread Zack Rusin
8 bit precision is required by d3d10 but unfortunately requires 64 bit rasterizer. This commit implements 64 bit rasterization with full support for 8bit subpixel precision. It's a combination of all individual commits from the llvmpipe-rast-64 branch. Signed-off-by: Zack Rusin --- src/gallium/d

Re: [Mesa-dev] [PATCH v2] glsl: Prohibit illegal mixing of redeclarations inside/outside gl_PerVertex.

2013-11-20 Thread Ian Romanick
On 11/20/2013 01:41 PM, Paul Berry wrote: > On 20 November 2013 11:26, Ian Romanick > wrote: > > On 11/19/2013 05:55 PM, Paul Berry wrote: > > From section 7.1 (Built-In Language Variables) of the GLSL 4.10 > > spec: > > > > Also, if a built-in

Re: [Mesa-dev] [PATCH] glsl: Fix cross-version linking between VS and GS.

2013-11-20 Thread Ian Romanick
On 11/20/2013 02:15 PM, Paul Berry wrote: > On 20 November 2013 11:35, Ian Romanick > wrote: > > On 11/19/2013 06:11 PM, Paul Berry wrote: > > Previously, when attempting to link a vertex shader and a geometry > > shader that use different GLSL versions, w

Re: [Mesa-dev] [PATCH 01/18] mesa: Change scissor dd interface for viewport_array

2013-11-20 Thread Chris Forbes
For patches 1/2/3, I think you should add explicit (void) idx; to the various implementations, at least when the surrounding code uses that convention for marking other parameters unused. On Thu, Nov 21, 2013 at 11:59 AM, Courtney Goeltzenleuchter wrote: > > Signed-off-by: Courtney Goeltzenle

[Mesa-dev] [PATCH 16/18] mesa: Remove unused arguments from driver->Scissor

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/common/driverfuncs.c | 4 +--- src/mesa/drivers/dri/i915/i830_state.c | 24 ++-- src/mesa/drivers/dri/i915/i830_vtbl.c | 3 +-- src/mesa/drivers/dri/i915/i915_state.c | 24 ++

[Mesa-dev] [PATCH 17/18] mesa: Remove unused arguments from driver->Viewport

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/dri/i915/intel_context.c | 14 ++ src/mesa/drivers/dri/i965/brw_context.c | 7 +-- src/mesa/drivers/dri/r200/r200_state.c | 9 + src/mesa/drivers/dri/radeon/radeon_common.c | 4 +--- src/mesa/driv

Re: [Mesa-dev] [PATCH] i965/fs: Use source's original type in register_coalesce().

2013-11-20 Thread Kenneth Graunke
On 11/16/2013 03:23 PM, Matt Turner wrote: > Previously, register_coalesce() would modify > >mov vgrf1:f vgrf2:f >cmp null vgrf3:d vgrf1:d > > to be > >cmp null vgrf3:d vgrf2:f > > and incorrectly use vgrf2's type in the instruction that the mov was > coalesced into

[Mesa-dev] [PATCH 11/18] mesa: Add ARB_viewport_array state to gl_context

2013-11-20 Thread Courtney Goeltzenleuchter
Add ARB_viewport_array in extensions.c and a flag in gl_extensions. Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/context.c| 3 +++ src/mesa/main/extensions.c | 1 + src/mesa/main/get.c| 1 + src/mesa/main/mtypes.h | 10 -- 4 files changed, 13 insertions(+

[Mesa-dev] [PATCH 11/18] mesa: Add custom get function for SCISSOR

2013-11-20 Thread 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. Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/context.c| 3 +++ src/mesa/main/extensions.c | 1 + src/mesa/m

[Mesa-dev] [PATCH 18/18] mesa: Remove unused arguments from driver->DepthRange

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/dri/i915/i830_state.c | 2 +- src/mesa/drivers/dri/i915/i830_vtbl.c | 2 +- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i915/i915_vtbl.c | 2 +- src/mesa/drivers/dri/r200/r200_state.c

[Mesa-dev] [PATCH 04/18] mesa: Update gl_scissor_attrib to support ARB_viewport_array

2013-11-20 Thread 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 is okay as mesa will only use bit

[Mesa-dev] [PATCH 09/18] mesa: Add new get entrypoints for ARB_viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/get.c | 189 src/mesa/main/get.h | 6 ++ 2 files changed, 195 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index b8929a5..9e5c04a 100644 --- a/src/mesa/main/

[Mesa-dev] [PATCH 06/18] mesa: Update viewport state for viewport_array

2013-11-20 Thread 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. Have meta driver call _mesa_Viewport as that interface is not changing. Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/common/m

[Mesa-dev] [PATCH 08/18] mesa: Add indexed version of mesa_scissor

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/attrib.c | 17 ++--- src/mesa/main/context.c | 10 +- src/mesa/main/scissor.c | 46 ++ src/mesa/main/scissor.h | 2 +- 4 files changed, 50 insertions(+), 25 deletions(-)

[Mesa-dev] [PATCH 10/18] mesa: Add custom get function for SCISSOR

2013-11-20 Thread 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. Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/enable.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[Mesa-dev] [PATCH 13/18] mesa: Add ARB_viewport_array viewport entry points

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/context.c | 2 +- src/mesa/main/scissor.c | 2 +- src/mesa/main/viewport.c | 316 +++ src/mesa/main/viewport.h | 22 +++- 4 files changed, 287 insertions(+), 55 deletions(-) diff --git

[Mesa-dev] [PATCH 14/18] mesa: Add gl_ViewportIndex variable to GLSL

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/glsl/builtin_variables.cpp | 2 ++ src/glsl/glsl_parser_extras.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 4d44104..862d255 100644 --- a/src/glsl/builtin_variables.

[Mesa-dev] [PATCH 15/18] mesa: Add ARB_viewport_array plumbing

2013-11-20 Thread 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. Signed-off-by: Courtney Goeltzenleuchter --- src/mapi/glapi/gen/ARB_viewport_array.xml | 79 +

[Mesa-dev] [PATCH 12/18] mesa: Add scissor entry points for viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/main/scissor.c | 113 src/mesa/main/scissor.h | 8 2 files changed, 121 insertions(+) diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index 3187ab1..580558e 100644 --- a/

[Mesa-dev] [PATCH 07/18] meta: Update meta driver to use API entry point

2013-11-20 Thread Courtney Goeltzenleuchter
Using Mesa's GL entry point allows the meta driver to ignore interface changes due to ARB_viewport_array Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/common/meta.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b

[Mesa-dev] [PATCH 03/18] mesa: Change DepthRange dd interface

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/dri/i915/i830_state.c | 2 +- src/mesa/drivers/dri/i915/i830_vtbl.c | 2 +- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i915/i915_vtbl.c | 2 +- src/mesa/drivers/dri/r200/r200_state.c

[Mesa-dev] [PATCH 05/18] mesa: Update viewport driver args for ARB_viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
Change the Driver viewport method arguments to be floats instead of ints. Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/dri/i915/intel_context.c | 7 --- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri/r200/r200_state.c | 5 +++-- src/mesa/driv

[Mesa-dev] [PATCH 01/18] mesa: Change scissor dd interface for viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/drivers/dri/i915/i830_state.c | 2 +- src/mesa/drivers/dri/i915/i830_vtbl.c | 2 +- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i915/i915_vtbl.c

[Mesa-dev] [PATCH 00/15] Add ARB_viewport_array extension

2013-11-20 Thread Courtney Goeltzenleuchter
This series starts by updating the driver interface for scissor, viewport and DepthRange. This includes removing unused arguments from the Scissor, Viewport and DepthRange. I kept the index argument, although it is not used, it may be useful to the dri driver to know which array element is being up

[Mesa-dev] [PATCH 02/18] mesa: Update viewport dd interface for viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
Signed-off-by: Courtney Goeltzenleuchter --- src/mesa/drivers/dri/i915/intel_context.c | 4 ++-- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri/r200/r200_state.c | 2 +- src/mesa/drivers/dri/radeon/radeon_common.c | 4 ++-- src/mesa/drivers/dri/radeon/radeon_stat

Re: [Mesa-dev] [PATCH] mesa: Change driver interface for ARB_viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
I've got st_atom_viewport.c covered, that one is easy. Marek's comment is what I'm looking for. As I was looking at the possibility of removing the Driver::Viewport I wanted to make sure I understood possible ramifications. I will not include the removal of Driver::Viewport or Driver::Scissor in m

[Mesa-dev] [PATCH v2 0/5] i965: Fix glClear of layered framebuffers.

2013-11-20 Thread Paul Berry
This is a re-spin of the series based on Chris Forbes' comments on patch 1. There was some minor impact on the other patches (elimination of gl_framebuffer::Layered meant that the other patches had to consult gl_framebuffer::NumLayers instead), so I decided to go ahead and send the series out agai

[Mesa-dev] [PATCH v2 1/5] mesa: Track number of layers in layered framebuffers.

2013-11-20 Thread Paul Berry
In order to properly clear layered framebuffers, we need to know how many layers they have. The easiest way to do this is to record it in the gl_framebuffer struct when we check framebuffer completeness. This patch replaces the gl_framebuffer::Layered boolean with a gl_framebuffer::NumLayers inte

[Mesa-dev] [PATCH v2 2/5] meta: fix meta clear of layered framebuffers

2013-11-20 Thread Paul Berry
>From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes meta clears to properly clear all layers of a layered framebuffer att

[Mesa-dev] [PATCH v2 4/5] i965: Fix blorp clear of layered framebuffers.

2013-11-20 Thread Paul Berry
>From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes the blorp clear path for color buffers. Fixes piglit test "spec/!Ope

[Mesa-dev] [PATCH v2 5/5] i965: Fix fast clear of depth buffers.

2013-11-20 Thread Paul Berry
>From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes the fast depth clear path. Fixes piglit test "spec/!OpenGL 3.2/layer

[Mesa-dev] [PATCH v2 3/5] i965: refactor blorp clear code in preparation for layered clears.

2013-11-20 Thread Paul Berry
Cc: "10.0" --- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 119 ++ 1 file changed, 66 insertions(+), 53 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index d1933ce..c7f485e 100644 --- a/src/mes

Re: [Mesa-dev] [PATCH 2/5] meta: fix meta clear of layered framebuffers

2013-11-20 Thread Paul Berry
On 20 November 2013 01:28, Chris Forbes wrote: > If I'm reading this right, there is now *always* a GS in the clear > program, if the driver can support it -- is this possibly silly, given > that most clears will be nonlayered? > > My understanding is that switching the GS stage on and off carrie

Re: [Mesa-dev] [PATCH] glsl: Fix cross-version linking between VS and GS.

2013-11-20 Thread Paul Berry
On 20 November 2013 11:35, Ian Romanick wrote: > On 11/19/2013 06:11 PM, Paul Berry wrote: > > Previously, when attempting to link a vertex shader and a geometry > > shader that use different GLSL versions, we would sometimes generate a > > link error due to the implicit declaration of gl_PerVert

[Mesa-dev] [PATCH 1/3] i965: Terminate brw_supported_msaa_modes() list with -1, not 0

2013-11-20 Thread Chad Versace
This simplifies the loop logic in a subsqequent patch that refactors intel_quantize_num_samples() to use brw_supported_msaa_modes(). Signed-off-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_context.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/dr

[Mesa-dev] [PATCH 3/3] i965: Let driconf clamp_max_samples affect context version

2013-11-20 Thread Chad Versace
Commit 2f89662 added the driconf option 'clamp_max_samples'. In that commit, the option did not alter the context version. The neglect to alter the context version is a fatal issue for some apps. For example, consider running Chromium with clamp_max_samples=0. Pre-patch, Mesa creates a GL 3.0 con

[Mesa-dev] [PATCH 2/3] i965: Share code between intel_quantize_num_samples and clamp_max_samples

2013-11-20 Thread Chad Versace
clamp_max_samples() and intel_quantize_num_samples() each maintained their own list of which MSAA modes the hardware supports. This patch removes the duplication by making intel_quantize_num_samples() use the same list as clamp_max_samples(), the list maintained in brw_supported_msaa_modes(). By r

[Mesa-dev] [PATCH 0/3] i965: Let driconf clamp_max_samples affect context version

2013-11-20 Thread Chad Versace
This series makes clamp_max_samples actually useful enabling/disabling MSAA on Chromium. Without this series, clamp_max_samples=0 makes WebGL context creation fail on Chromium. Eric complained that brw_clamp_max_samples() too closely resembled intel_quantize_num_samples(), so this series removes t

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Roland Scheidegger
On 11/20/2013 10:04 PM, Kenneth Graunke wrote: On 11/20/2013 09:45 AM, Ian Romanick wrote: On 11/20/2013 09:08 AM, Kenneth Graunke wrote: On 11/20/2013 03:27 AM, Tapani Pälli wrote: Earlier comments suggest this was removed from GL core spec but it is still there. Enabling makes 'texture_lod_b

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Kenneth Graunke
On 11/20/2013 09:45 AM, Ian Romanick wrote: > On 11/20/2013 09:08 AM, Kenneth Graunke wrote: >> On 11/20/2013 03:27 AM, Tapani Pälli wrote: >>> Earlier comments suggest this was removed from GL core spec but it is >>> still there. Enabling makes 'texture_lod_bias_getter' Khronos >>> conformance tes

Re: [Mesa-dev] [PATCH v2] glsl: Prohibit illegal mixing of redeclarations inside/outside gl_PerVertex.

2013-11-20 Thread Paul Berry
On 20 November 2013 11:26, Ian Romanick wrote: > On 11/19/2013 05:55 PM, Paul Berry wrote: > > From section 7.1 (Built-In Language Variables) of the GLSL 4.10 > > spec: > > > > Also, if a built-in interface block is redeclared, no member of > > the built-in declaration can be redeclared o

[Mesa-dev] [PATCH] mesa: Portably detect the availability of fpclassify.

2013-11-20 Thread Jonas 'Sortie' Termansen
POSIX 2008 mandates fpclassify, FP_INFINITE, FP_NAN, FP_NORMAL, FP_SUBNORMAL, and FP_ZERO are all macros and we can therefore detect them through simple preprocessor conditionals on compliant platforms. This avoids further growth of the current preprocessor list of platforms that has fpclassify. I

Re: [Mesa-dev] [PATCH] mesa: initialize gl_renderbuffer::Depth in core

2013-11-20 Thread Ian Romanick
On 11/20/2013 04:27 AM, Marek Olšák wrote: > From: Marek Olšák It seems weird that it wasn't already there. No piglit regressions on IVB. Reviewed-by: Ian Romanick Tested-by: Ian Romanick > --- > src/mesa/drivers/dri/i915/intel_fbo.c | 2 -- > src/mesa/drivers/dri/i965/intel_fbo.c | 2 -- >

Re: [Mesa-dev] [PATCH 0/1]: Preparing for ARB_viewport_array

2013-11-20 Thread Courtney Goeltzenleuchter
Hi Ian, I see that you have a shadow Viewport and Scissor attribute structure. I was trying to avoid managing two copies of the data so I just updated all the drivers to use index 0 of the array directly. You'd probably want to do the same thing with the scissor enable flag that becomes a bitfield

Re: [Mesa-dev] [PATCH] glsl: Fix interstage uniform interface block link error detection.

2013-11-20 Thread Jordan Justen
On Fri, Nov 15, 2013 at 2:56 PM, Paul Berry wrote: > Previously, we checked for interstage uniform interface block link > errors in validate_interstage_interface_blocks(), which is only called > on pairs of adjacent shader stages. Therefore, we failed to detect > uniform interface block mismatche

Re: [Mesa-dev] [PATCH 1/5] mesa: Track number of layers in layered framebuffers.

2013-11-20 Thread Chris Forbes
With those two changes, this is Reviewed-by: Chris Forbes On Thu, Nov 21, 2013 at 8:05 AM, Paul Berry wrote: > On 20 November 2013 03:18, Marek Olšák wrote: >> >> On Wed, Nov 20, 2013 at 5:47 AM, Paul Berry >> wrote: >> > >> > + /** >> > +* If Layered is true, the number of layers in th

Re: [Mesa-dev] [PATCH 1/2] egl: Kill macro _EGL_DECLARE_MUTEX

2013-11-20 Thread Ian Romanick
On 10/11/2013 07:08 PM, Chad Versace wrote: > Replace all occurences of the macro with its expansion. > > It seems that the macro intended to provide cross-platform static mutex > intialization. However, it had the same definition in all pre-processor > paths: > #define _EGL_DECLARE_MUTEX(m) _

Re: [Mesa-dev] [PATCH 2/2] egl: Enable EGL_EXT_client_extensions

2013-11-20 Thread Ian Romanick
On 10/11/2013 07:08 PM, Chad Versace wrote: > Insert two fields into _egl_global to hold the client extensions: > > _egl_global::ClientExtensions /*struct of bools*/ > _egl_global::ClientExtensionString > > Post-patch, Mesa supports exactly one client extension, > EGL_EXT_client_extension

Re: [Mesa-dev] [PATCH] glsl: Fix cross-version linking between VS and GS.

2013-11-20 Thread Ian Romanick
On 11/19/2013 06:11 PM, Paul Berry wrote: > Previously, when attempting to link a vertex shader and a geometry > shader that use different GLSL versions, we would sometimes generate a > link error due to the implicit declaration of gl_PerVertex being > different between the two GLSL versions. > >

Re: [Mesa-dev] [PATCH] glsl: Use more portable bash invocation construct.

2013-11-20 Thread Ian Romanick
On 11/19/2013 11:26 PM, Vinson Lee wrote: > Fixes 'make check' on distros where bash is not at /bin/bash. > > Signed-off-by: Vinson Lee Reviewed-by: Ian Romanick Tested-by: Ian Romanick I just tested it on plain ol' Linux, and it didn't break. > --- > src/glsl/tests/lower_jumps/create_test_

Re: [Mesa-dev] [PATCH v2] glsl: Prohibit illegal mixing of redeclarations inside/outside gl_PerVertex.

2013-11-20 Thread Ian Romanick
On 11/19/2013 05:55 PM, Paul Berry wrote: > From section 7.1 (Built-In Language Variables) of the GLSL 4.10 > spec: > > Also, if a built-in interface block is redeclared, no member of > the built-in declaration can be redeclared outside the block > redeclaration. > > We have been rega

Re: [Mesa-dev] [PATCH 2/2] mesa: Implement GL_FRAMEBUFFER_ATTACHMENT_LAYERED query.

2013-11-20 Thread Ian Romanick
On 11/19/2013 11:02 PM, Paul Berry wrote: > From section 6.1.18 (Renderbuffer Object Queries) of the GL 3.2 spec, > under the heading "If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE > is TEXTURE, then": > > If pname is FRAMEBUFFER_ATTACHMENT_LAYERED, then params will > contain TRUE if

Re: [Mesa-dev] [PATCH 1/2] mesa: Fix texture target validation for glFramebufferTexture()

2013-11-20 Thread Ian Romanick
On 11/19/2013 11:02 PM, Paul Berry wrote: > Previously we were using the code path for validating > glFramebufferTextureLayer(). But glFramebufferTexture() allows > additional texture types. > > Fixes piglit tests: > - spec/!OpenGL 3.2/layered-rendering/gl-layer-cube-map > - spec/!OpenGL 3.2/laye

Re: [Mesa-dev] [PATCH 1/5] mesa: Track number of layers in layered framebuffers.

2013-11-20 Thread Paul Berry
On 19 November 2013 22:22, Chris Forbes wrote: > + if (layer_count > 0) { > + fb->NumLayers = layer_count; > > It seems like in the nonlayered case there will just be junk left in > fb->NumLayers, which might trip people up in future? > Yeah, that's a fair critique. On further reflection

Re: [Mesa-dev] [PATCH 1/5] mesa: Track number of layers in layered framebuffers.

2013-11-20 Thread Paul Berry
On 20 November 2013 03:18, Marek Olšák wrote: > On Wed, Nov 20, 2013 at 5:47 AM, Paul Berry > wrote: > > > > + /** > > +* If Layered is true, the number of layers in the framebuffer. For > cube > > +* maps and cube map arrays, this includes the factor of 6. > > +*/ > > + GLuint

Re: [Mesa-dev] [PATCH] llvmpipe: calculate more accurate interpolation value at origin

2013-11-20 Thread Jose Fonseca
Looks good to me. Thanks Roland. Jose - Original Message - > From: Roland Scheidegger > > Some rounding errors could crop up when calculating a0. Use a more accurate > method (barycentric interpolation essentially) to fix this, though to fix > the REAL problem (which is that our interpo

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Ian Romanick
On 11/20/2013 09:08 AM, Kenneth Graunke wrote: > On 11/20/2013 03:27 AM, Tapani Pälli wrote: >> Earlier comments suggest this was removed from GL core spec but it is >> still there. Enabling makes 'texture_lod_bias_getter' Khronos >> conformance tests pass, also removes some errors from Metro Last

Re: [Mesa-dev] [PATCH] tgsi_exec: Fix mask calculation for emit_kill_if.

2013-11-20 Thread Roland Scheidegger
On 11/20/2013 05:32 PM, jfons...@vmware.com wrote: From: José Fonseca Same as Si Chen's commit e7a5905d8a3960b0981750f8131e3af9acbfcdb8 for tgsi_exec module. Not actually tested, because softpipe is failing the test that caught this bug due to unrelated issues. --- src/gallium/auxiliary/tgsi

[Mesa-dev] [PATCH] tgsi_exec: Fix mask calculation for emit_kill_if.

2013-11-20 Thread jfonseca
From: José Fonseca Same as Si Chen's commit e7a5905d8a3960b0981750f8131e3af9acbfcdb8 for tgsi_exec module. Not actually tested, because softpipe is failing the test that caught this bug due to unrelated issues. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 3 +++ 1 file changed, 3 insertions(+)

[Mesa-dev] [PATCH] llvmpipe: calculate more accurate interpolation value at origin

2013-11-20 Thread sroland
From: Roland Scheidegger Some rounding errors could crop up when calculating a0. Use a more accurate method (barycentric interpolation essentially) to fix this, though to fix the REAL problem (which is that our interpolation will give very bad results with small triangles far away from the origin

Re: [Mesa-dev] [PATCH] glsl: Link glcpp with math library.

2013-11-20 Thread Matt Turner
On Tue, Nov 19, 2013 at 11:24 PM, Vinson Lee wrote: > This patch fixes this build error with Oracle Solaris Studio. > > libtool: link: /opt/solarisstudio12.3/bin/cc -g -o glcpp/glcpp glcpp.o > prog_hash_table.o ./.libs/libglcpp.a > Undefined first referenced > symbol

Re: [Mesa-dev] [PATCH] mesa: enable GL_TEXTURE_LOD_BIAS set/get v2

2013-11-20 Thread Kenneth Graunke
On 11/20/2013 03:27 AM, Tapani Pälli wrote: > Earlier comments suggest this was removed from GL core spec but it is > still there. Enabling makes 'texture_lod_bias_getter' Khronos > conformance tests pass, also removes some errors from Metro Last Light > game which is using this API. > > v2: leave

Re: [Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread Jose Fonseca
- Original Message - > - Original Message - > > IIRC, all Radeons older than HD 7700 or so can do fixed-function fog, > > but Gallium doesn't have a proper interface for it. There is no > > dedicated shader output though, so r300g and r600g use a texcoord slot > > if there is any

Re: [Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread Jose Fonseca
- Original Message - > IIRC, all Radeons older than HD 7700 or so can do fixed-function fog, > but Gallium doesn't have a proper interface for it. There is no > dedicated shader output though, so r300g and r600g use a texcoord slot > if there is any left. I think all drivers except > softpi

Re: [Mesa-dev] [PATCH] glxinfo: handle no fbconfigs case better

2013-11-20 Thread Brian Paul
On 11/18/2013 04:33 PM, Dave Airlie wrote: From: Dave Airlie If we get a server that has only GLX1.2 and no SGIX_fbconfig, we can print stuff we shouldn't. If we have no fbconfigs then we don't have core profile, so don't bother trying visual path when doing core profile. Signed-off-by: Dave A

Re: [Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread Marek Olšák
IIRC, all Radeons older than HD 7700 or so can do fixed-function fog, but Gallium doesn't have a proper interface for it. There is no dedicated shader output though, so r300g and r600g use a texcoord slot if there is any left. I think all drivers except softpipe/llvmpipe/svga already do the X001 sw

Re: [Mesa-dev] [PATCH] glsl: Link glcpp with math library.

2013-11-20 Thread Brian Paul
On 11/20/2013 12:24 AM, Vinson Lee wrote: This patch fixes this build error with Oracle Solaris Studio. libtool: link: /opt/solarisstudio12.3/bin/cc -g -o glcpp/glcpp glcpp.o prog_hash_table.o ./.libs/libglcpp.a Undefined first referenced symbol

Re: [Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread Roland Scheidegger
On 11/20/2013 03:23 PM, jfons...@vmware.com wrote: From: José Fonseca D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce

Re: [Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread Jose Fonseca
- Original Message - > - Original Message - > > From: José Fonseca > > > > +t->outputs[i] = ureg_writemask(t->outputs[i], > > TGSI_WRITEMASK_X); > > What happens when the application decides to write to any component other > than X? The application writemask combined

Re: [Mesa-dev] [PATCH] DRI Image v7 support for gallium drivers

2013-11-20 Thread Thomas Hellstrom
On 10/08/2013 12:48 AM, christopher.halse.rog...@canonical.com wrote: This is a prerequisite for the Mir EGL platform, which I'm sure everyone is excited about. It's also necessary for Wayland hybrid graphics support. Sorry for replying this late, I just started looking at this patch series. I

Re: [Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread Michal Krol
- Original Message - > From: José Fonseca > > +t->outputs[i] = ureg_writemask(t->outputs[i], TGSI_WRITEMASK_X); What happens when the application decides to write to any component other than X? The application writemask combined with the one above will yield an empty one. A

Re: [Mesa-dev] [PATCH] gallivm: Ignore unknown file type in non-debug builds.

2013-11-20 Thread Jose Fonseca
- Original Message - > Fixes "Uninitialized pointer read" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c > b/src

[Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread jfonseca
From: José Fonseca D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce that. So this change: - lifts the single-component

Re: [Mesa-dev] [PATCH] r600g/compute: Add a work-around for flushing issues on Cayman

2013-11-20 Thread Alex Deucher
On Tue, Nov 19, 2013 at 10:39 PM, Tom Stellard wrote: > From: Tom Stellard > > https://bugs.freedesktop.org/show_bug.cgi?id=69321 > > CC: "10.0" Reviewed-by: Alex Deucher > --- > src/gallium/drivers/r600/evergreen_compute.c | 4 > src/gallium/drivers/r600/r600_hw_context.c | 4 +++-

[Mesa-dev] [PATCH 2/2] radeonsi: implement MSAA for CIK

2013-11-20 Thread Marek Olšák
From: Marek Olšák There are also some changes to the printfs. --- src/gallium/drivers/radeon/r600_texture.c| 10 +++--- src/gallium/drivers/radeonsi/radeonsi_pipe.c | 4 +++- src/gallium/drivers/radeonsi/si_state.c | 25 ++--- 3 files changed, 28 insertions(+),

[Mesa-dev] [PATCH 1/2] radeonsi: enable 2D tiling on CIK

2013-11-20 Thread Marek Olšák
From: Marek Olšák libdrm does the DRM version check and decides if 2D tiling is used. TODO: bump the libdrm version requirement --- src/gallium/drivers/radeon/r600_texture.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/r

Re: [Mesa-dev] [PATCH] mesa: Fix setup of LocalParams array.

2013-11-20 Thread Brian Paul
On 11/18/2013 08:57 PM, Michel Dänzer wrote: On Mon, 2013-11-18 at 17:27 -0800, Eric Anholt wrote: i965 passed piglit, but swrast and gallium both segfaulted without this. i965 happened to work because it never ran _mesa_load_state_parameters() on the new program before the test called glProgram

  1   2   >