[Mesa-dev] [PATCH] glsl: add buffer block number information to atomic counter variables.

2015-10-22 Thread Samuel Iglesias Gonsalvez
Atomic counter variables can have a 'binding' layout modifier. Unfortunately, the atomic counter buffers are not sorted by binding value in gl_shader_program's AtomicBuffers. Save the atomic counter buffer block index into the variable, so we can use it inside the drivers. Fixes 298 dEQP-GLES31.f

Re: [Mesa-dev] [PATCH] glsl: remove excess location qualifier validation

2015-10-22 Thread Timothy Arceri
On Fri, 2015-10-23 at 08:01 +0300, Tapani Pälli wrote: > On 10/22/2015 11:07 AM, Timothy Arceri wrote: > > On Thu, 2015-10-22 at 09:56 +0300, Tapani Pälli wrote: > > > On 10/22/2015 09:41 AM, Timothy Arceri wrote: > > > > On Thu, 2015-10-22 at 08:55 +0300, Tapani Pälli wrote: > > > > > On 10/22/201

[Mesa-dev] [PATCH] nvc0: respect edgeflag attribute width

2015-10-22 Thread Ilia Mirkin
The edgeflag comes in as ubyte with glEdgeFlagPointer but as float with plain immediate glEdgeFlag. Avoid reading bytes that weren't meant for the edgeflag in the pointer case. Fixes intermittent failures with gl-2.0-edgeflag piglit (and valgrind complaints about reading uninitialized memory). Si

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Iago Toral
On Thu, 2015-10-22 at 09:09 -0700, Jason Ekstrand wrote: > On Thu, Oct 22, 2015 at 4:21 AM, Iago Toral Quiroga wrote: > > I implemented this first as a separate optimization pass in GLSL IR [1], but > > Curro pointed out that this being pretty much a restricted form of a CSE > > pass > > it would

Re: [Mesa-dev] [PATCH] glsl: remove excess location qualifier validation

2015-10-22 Thread Tapani Pälli
On 10/22/2015 11:07 AM, Timothy Arceri wrote: On Thu, 2015-10-22 at 09:56 +0300, Tapani Pälli wrote: On 10/22/2015 09:41 AM, Timothy Arceri wrote: On Thu, 2015-10-22 at 08:55 +0300, Tapani Pälli wrote: On 10/22/2015 08:29 AM, Timothy Arceri wrote: Location has never been able to be a negative

Re: [Mesa-dev] [PATCH 2/2] i965: Set Y-tiling for qualified rotated scanout buffers

2015-10-22 Thread Ben Widawsky
On Thu, Oct 22, 2015 at 06:44:53PM -0700, Vivek Kasireddy wrote: > On newer hardware platforms that support rotation, if the gbm > interface requests to create a rotated scanout buffer via the > flag __DRI_IMAGE_USE_SCANOUT_ROTATED_90_270, set Y-tiling > while creating the buffer. > > Cc: Kristian

[Mesa-dev] [Bug 92630] fatal error: error in backend: symbol 'x86_64_entry_start' is already defined

2015-10-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92630 Bug ID: 92630 Summary: fatal error: error in backend: symbol 'x86_64_entry_start' is already defined Product: Mesa Version: git Hardware: x86-64 (AMD64) OS:

[Mesa-dev] [Bug 92629] lp_bld_debug.cpp:141: undefined reference to `llvm::sys::getProcessTriple()'

2015-10-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92629 Bug ID: 92629 Summary: lp_bld_debug.cpp:141: undefined reference to `llvm::sys::getProcessTriple()' Product: Mesa Version: git Hardware: x86-64 (AMD64) OS:

Re: [Mesa-dev] [PATCH 1/2] gbm: Add a flag to enable creation of rotated scanout buffers

2015-10-22 Thread Michel Dänzer
On 23.10.2015 10:44, Vivek Kasireddy wrote: > For certain platforms that support rotated scanout buffers, currently, > there is no way to create them with the GBM DRI interface. This flag > will instruct the DRI driver to create the buffer by setting > additional requirements. > > Cc: Kristian Hog

Re: [Mesa-dev] [PATCH 0/7] RadeonSI: Unbind shaders properly

2015-10-22 Thread Michel Dänzer
On 23.10.2015 08:12, Marek Olšák wrote: > This series unbinds shaders properly in bind_(vs/fs/etc.)_state, because any > context can release them now, therefore we can't rely on unbinding in > delete_shader. This is basically a fix for sharable shader. > > It also gets rid of the dummy pixel sha

Re: [Mesa-dev] [PATCH 1/2] radeonsi: add support for Stoney asics (v2)

2015-10-22 Thread Michel Dänzer
On 23.10.2015 01:09, Alex Deucher wrote: > From: Samuel Li > > v2 (agd): rebase on mesa master, split pci ids to > separate commit > > Signed-off-by: Samuel Li [...] > @@ -540,6 +541,7 @@ const char *r600_get_llvm_processor_name(enum > radeon_family family) > case CHIP_ICELAND: return

[Mesa-dev] [PATCH 1/2] gbm: Add a flag to enable creation of rotated scanout buffers

2015-10-22 Thread Vivek Kasireddy
For certain platforms that support rotated scanout buffers, currently, there is no way to create them with the GBM DRI interface. This flag will instruct the DRI driver to create the buffer by setting additional requirements. Cc: Kristian Hogsberg Signed-off-by: Vivek Kasireddy --- include/GL/i

[Mesa-dev] [PATCH 2/2] i965: Set Y-tiling for qualified rotated scanout buffers

2015-10-22 Thread Vivek Kasireddy
On newer hardware platforms that support rotation, if the gbm interface requests to create a rotated scanout buffer via the flag __DRI_IMAGE_USE_SCANOUT_ROTATED_90_270, set Y-tiling while creating the buffer. Cc: Kristian Hogsberg Signed-off-by: Vivek Kasireddy --- src/mesa/drivers/dri/i965/int

Re: [Mesa-dev] [PATCH 0/7] RadeonSI: Fixes for IA_MULTI_VGT_PARAM

2015-10-22 Thread Michel Dänzer
On 23.10.2015 08:20, Marek Olšák wrote: > These are from internal documentation. It doesn't say why things must be done > this way, just that drivers should do it. > > Please review. The series is Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www

[Mesa-dev] [Bug 92626] [BYT] piglit glx@glx-query-drawable subtests failing

2015-10-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92626 Bug ID: 92626 Summary: [BYT] piglit glx@glx-query-drawable subtests failing Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Severit

Re: [Mesa-dev] [PATCH 1/2] util/format: add helper util_format_is_snorm8

2015-10-22 Thread Michel Dänzer
On 23.10.2015 08:20, Marek Olšák wrote: > From: Marek Olšák This series is Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _

Re: [Mesa-dev] [PATCH] nir/validate: Add better validation of load/store types

2015-10-22 Thread Connor Abbott
Reviewed-by: Connor Abbott On Thu, Oct 22, 2015 at 7:53 PM, Jason Ekstrand wrote: > --- > src/glsl/nir/nir_validate.c | 16 ++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > > diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c > index c6fedf9..a42e830 100

[Mesa-dev] [Bug 92625] [BYT] piglit glx_arb_sync_control@timing subtests fail

2015-10-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92625 Bug ID: 92625 Summary: [BYT] piglit glx_arb_sync_control@timing subtests fail Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Sever

[Mesa-dev] [PATCH] nir/validate: Add better validation of load/store types

2015-10-22 Thread Jason Ekstrand
--- src/glsl/nir/nir_validate.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c index c6fedf9..a42e830 100644 --- a/src/glsl/nir/nir_validate.c +++ b/src/glsl/nir/nir_validate.c @@ -398,15 +398,27 @@ va

Re: [Mesa-dev] [RFC 20/21] mesa: Remove gl_extensions::dummy

2015-10-22 Thread Nanley Chery
On Thu, Oct 22, 2015 at 3:40 AM, Emil Velikov wrote: > On 19 October 2015 at 23:44, Nanley Chery wrote: > > From: Nanley Chery > > > > This variable existed to provide an unsigned error value for > > name_to_offset(). Since o(extension_sentinel) is also a valid unsigned > > error value, save sp

Re: [Mesa-dev] [RFC 03/21] mesa/extensions: Wrap array entries in macros

2015-10-22 Thread Marek Olšák
On Fri, Oct 23, 2015 at 12:22 AM, Nanley Chery wrote: > > > On Thu, Oct 22, 2015 at 3:06 AM, Emil Velikov > wrote: >> >> On 20 October 2015 at 16:43, Nanley Chery wrote: >> > On Tue, Oct 20, 2015 at 8:16 AM, Marek Olšák wrote: >> >> >> >> Also, the FIXME comment should be on its own line. >> >>

[Mesa-dev] [PATCH] st/mesa: fix mipmap generation for immutable textures with incomplete pyramids

2015-10-22 Thread Nicolai Hähnle
(This is an alternative to my previous patch, "mesa: clamp MaxLevel for immutable textures at initialization"; this patch has no opinion about how the spec should be interpreted.) Without the clamping by NumLevels, the state tracker would reallocate the texture storage (incorrect) and even fail to

Re: [Mesa-dev] [RFC 04/21] mesa/extensions: Move entries entries to seperate file

2015-10-22 Thread Nanley Chery
On Thu, Oct 22, 2015 at 3:13 AM, Emil Velikov wrote: > On 19 October 2015 at 23:36, Nanley Chery wrote: > > From: Nanley Chery > > > > With this infrastructure set in place, we can now reuse the entries to > > generate useful code. > > > > Signed-off-by: Nanley Chery > > --- > > src/mesa/main

[Mesa-dev] [PATCH 1/2] util/format: add helper util_format_is_snorm8

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/auxiliary/util/u_format.c | 19 +++ src/gallium/auxiliary/util/u_format.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.c index c1ce408..79630bf 100644 --- a

[Mesa-dev] [PATCH 2/2] radeonsi: only apply the SNORM blit workaround to *8_SNORM

2015-10-22 Thread Marek Olšák
From: Marek Olšák Like the comment says. This fixes DCC, which doesn't like blitting RG16 as RGBA8. --- src/gallium/drivers/radeonsi/si_blit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c inde

[Mesa-dev] [PATCH 3/7] radeonsi: only apply the instancing bug workaround to Bonaire

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_draw.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 96448ee..1aa5456 100644 --- a/src/gallium/drivers/r

[Mesa-dev] [PATCH 6/7] radeonsi: merge two ifs setting WD_SWITCH_ON_EOP

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_draw.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 3962003..e58e474 100644 --- a/src/gallium/drivers/radeo

[Mesa-dev] [PATCH 7/7] radeonsi: add another requirement for PARTIAL_ES_WAVE

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_pipe.c | 29 +++- src/gallium/drivers/radeonsi/si_pipe.h | 2 ++ src/gallium/drivers/radeonsi/si_state.c | 2 +- src/gallium/drivers/radeonsi/si_state_draw.c | 4 4 files changed, 35 insertions

[Mesa-dev] [PATCH 5/7] radeonsi: make PARTIAL_ES_WAVE globally dependent on SWITCH_ON_EOI

2015-10-22 Thread Marek Olšák
From: Marek Olšák This catches the other cases that enable SWITCH_ON_EOI. --- src/gallium/drivers/radeonsi/si_state_draw.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c

[Mesa-dev] [PATCH 2/7] radeonsi: add SWITCH_ON_EOI requirement for 4 SE parts

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_draw.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 635fb5f..96448ee 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c

[Mesa-dev] [PATCH 1/7] radeonsi: remove unnecessary PARTIAL_VS_WAVE setting for streamout

2015-10-22 Thread Marek Olšák
From: Marek Olšák hardware does this automatically --- src/gallium/drivers/radeonsi/si_state_draw.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 59845c4..635fb5f 100644 --- a/src/gallium/

[Mesa-dev] [PATCH 0/7] RadeonSI: Fixes for IA_MULTI_VGT_PARAM

2015-10-22 Thread Marek Olšák
These are from internal documentation. It doesn't say why things must be done this way, just that drivers should do it. Please review. Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 4/7] radeonsi: add one more SWITCH_ON_EOI requirement for Hawaii and VI

2015-10-22 Thread Marek Olšák
From: Marek Olšák The VI condition depends on geometry shaders and MAX_PRIMGRP_IN_WAVE. --- src/gallium/drivers/radeonsi/si_state_draw.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si

Re: [Mesa-dev] [PATCH] st/mesa: don't load state parameters if there are none

2015-10-22 Thread Brian Paul
On 10/22/2015 05:02 PM, Marek Olšák wrote: From: Marek Olšák Out of 7063 shaders from my shader-db: - 6564 (93%) shaders don't have any state parameters. - 347 (5%) shaders have 1 state parameter for WPOS lowering. - The remaining 2% have more state parameters, usually matrices. --- src/mesa/

[Mesa-dev] [PATCH 5/7] radeonsi: allow unbinding vertex shaders

2015-10-22 Thread Marek Olšák
From: Marek Olšák Draw calls without a vertex shader are skipped. --- src/gallium/drivers/radeonsi/si_state_shaders.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 2

[Mesa-dev] [PATCH 4/7] radeonsi: allow unbinding pixel shaders and remove the dummy shader

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_pipe.c | 2 -- src/gallium/drivers/radeonsi/si_pipe.h | 3 --- src/gallium/drivers/radeonsi/si_state_shaders.c | 18 +- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/gallium/drivers/rad

[Mesa-dev] [PATCH 7/7] radeonsi: don't unbind shaders in delete_shader_selector

2015-10-22 Thread Marek Olšák
From: Marek Olšák It's moot with shaders that any context can use and release. --- src/gallium/drivers/radeonsi/si_shader.c| 3 ++ src/gallium/drivers/radeonsi/si_state_shaders.c | 40 - 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/src/gallium/

[Mesa-dev] [PATCH 1/7] gallium/util: add a test for NULL fragment shaders

2015-10-22 Thread Marek Olšák
From: Marek Olšák Just to validate that radeonsi doesn't crash. --- src/gallium/auxiliary/util/u_tests.c | 38 1 file changed, 38 insertions(+) diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index a94e5cc..006dfa9 1

[Mesa-dev] [PATCH 6/7] radeonsi: properly unbind shader states

2015-10-22 Thread Marek Olšák
From: Marek Olšák Any context can release a shader now, so we can't rely on unbinding in delete_shader_selector. --- src/gallium/drivers/radeonsi/si_state_shaders.c | 34 + 1 file changed, 34 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/s

[Mesa-dev] [PATCH 0/7] RadeonSI: Unbind shaders properly

2015-10-22 Thread Marek Olšák
This series unbinds shaders properly in bind_(vs/fs/etc.)_state, because any context can release them now, therefore we can't rely on unbinding in delete_shader. This is basically a fix for sharable shader. It also gets rid of the dummy pixel shader. Instead, the driver just skips draw calls th

[Mesa-dev] [PATCH 2/7] radeonsi: add checks for a NULL pixel shader

2015-10-22 Thread Marek Olšák
From: Marek Olšák This will allow removing the dummy PS. --- src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/drivers/radeonsi/si_state_shaders.c | 73 ++--- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_st

[Mesa-dev] [PATCH 3/7] radeonsi: add draw_vbo check for a NULL pixel shader

2015-10-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/drivers/radeonsi/si_state.h | 1 + src/gallium/drivers/radeonsi/si_state_draw.c | 7 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gal

Re: [Mesa-dev] [PATCH 1/4] llvmpipe: fix using non-zero layer in non-array view from array resource

2015-10-22 Thread Dave Airlie
For all 4: Reviewed-by: Dave Airlie On 23 October 2015 at 08:42, wrote: > From: Roland Scheidegger > > Just need to use resource target not view target when calculating > first-layer based mip offsets. (This is a gl specific problem since > d3d10 does not distinguish between non-array and arr

[Mesa-dev] [PATCH] st/mesa: don't load state parameters if there are none

2015-10-22 Thread Marek Olšák
From: Marek Olšák Out of 7063 shaders from my shader-db: - 6564 (93%) shaders don't have any state parameters. - 347 (5%) shaders have 1 state parameter for WPOS lowering. - The remaining 2% have more state parameters, usually matrices. --- src/mesa/state_tracker/st_atom_constbuf.c | 3 ++- 1 fi

Re: [Mesa-dev] [RFC 06/21] mesa/extensions: Create _mesa_extension_supported()

2015-10-22 Thread Nanley Chery
On Thu, Oct 22, 2015 at 11:08 AM, Chad Versace wrote: > On Thu 22 Oct 2015, Emil Velikov wrote: > > On 19 October 2015 at 23:36, Nanley Chery wrote: > > > From: Nanley Chery > > > > > > Create a function which determines if an extension is supported in the > > > current context. > > > > > > Sig

Re: [Mesa-dev] [RFC 06/21] mesa/extensions: Create _mesa_extension_supported()

2015-10-22 Thread Nanley Chery
On Thu, Oct 22, 2015 at 3:19 AM, Emil Velikov wrote: > On 19 October 2015 at 23:36, Nanley Chery wrote: > > From: Nanley Chery > > > > Create a function which determines if an extension is supported in the > > current context. > > > > Signed-off-by: Nanley Chery > > --- > > src/mesa/main/exte

[Mesa-dev] [PATCH 1/4] llvmpipe: fix using non-zero layer in non-array view from array resource

2015-10-22 Thread sroland
From: Roland Scheidegger Just need to use resource target not view target when calculating first-layer based mip offsets. (This is a gl specific problem since d3d10 does not distinguish between non-array and array resources neither at the resource nor view level, only at the shader level.) Fixes

[Mesa-dev] [PATCH 3/4] gallivm: fix sampling with texture offsets in SoA path

2015-10-22 Thread sroland
From: Roland Scheidegger When using nearest filtering and clamp / clamp to edge wrapping results could be wrong for negative offsets. Fix this by adding the offset before doing the conversion to int coords (could also use floor instead of trunc int conversion but probably more complex on "typical

[Mesa-dev] [Bug 38869] Cannot create a valid pBuffer with height and/or width of zero

2015-10-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38869 --- Comment #5 from Corentin Wallez --- Bumping this as I've run into this bug (feature?) while porting ANGLE to run on GLX. When ANGLE is initialized we make the context current on a dummy PBuffer created with {None} as attributes, which makes i

[Mesa-dev] [PATCH 4/4] gallivm: fix tex offsets with mirror repeat linear

2015-10-22 Thread sroland
From: Roland Scheidegger Can't see why anyone would ever want to use this, but it was clearly broken. This fixes the piglit texwrap offset test using this combination. --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 2/4] softpipe: fix using non-zero layer in non-array view from array resource

2015-10-22 Thread sroland
From: Roland Scheidegger For vertex/geometry shader sampling, this is the same as for llvmpipe - just use the original resource target. For fragment shader sampling though (which does not use first-layer based mip offsets) adjust the sampling code to use first_layer in the non-array cases. While

Re: [Mesa-dev] [RFC 03/21] mesa/extensions: Wrap array entries in macros

2015-10-22 Thread Nanley Chery
On Thu, Oct 22, 2015 at 3:06 AM, Emil Velikov wrote: > On 20 October 2015 at 16:43, Nanley Chery wrote: > > On Tue, Oct 20, 2015 at 8:16 AM, Marek Olšák wrote: > >> > >> Also, the FIXME comment should be on its own line. > >> > > > > I moved it aside to make editing the table easier. However, s

Re: [Mesa-dev] [PATCH 2/3] i965/fs: Make emit_uniformize a no-op for immediates

2015-10-22 Thread Kristian Høgsberg
On Tue, Oct 20, 2015 at 11:56 AM, Francisco Jerez wrote: > Kristian Høgsberg writes: > >> On Tue, Oct 20, 2015 at 3:16 AM, Francisco Jerez >> wrote: >>> Kristian Høgsberg writes: >>> On Mon, Oct 19, 2015 at 4:19 AM, Francisco Jerez wrote: > Neil Roberts writes: > >> Ju

Re: [Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

2015-10-22 Thread Kristian Høgsberg
On Thu, Oct 22, 2015 at 12:24 PM, Matt Turner wrote: > On Thu, Oct 22, 2015 at 11:37 AM, Kristian Høgsberg Kristensen > wrote: >> The scalar destination registers break copy propagation. Instead compute >> the results to a regular register and then reference a component when we >> later use the r

Re: [Mesa-dev] Introducing OpenSWR: High performance software rasterizer

2015-10-22 Thread Jose Fonseca
On 22/10/15 00:43, Rowley, Timothy O wrote: On Oct 20, 2015, at 5:58 PM, Jose Fonseca wrote: Thanks for the explanations. It's closer now, but still a bit of gap: $ KNOB_MAX_THREADS_PER_CORE=0 ./gloss SWR create screen! This processor supports AVX2. --> numThreads = 3 1102 frames in 5.002 s

[Mesa-dev] [PATCH] i965: check inst->predicate when clearing flag_live at dead code eliminate

2015-10-22 Thread Alejandro Piñeiro
Detected by Matt Turner while reviewing commit a59359ecd22154cc2b3f88bb8c599f21af8a3934 --- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/

Re: [Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v3)

2015-10-22 Thread Christian König
On 22.10.2015 21:35, Alex Deucher wrote: The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. v3: handle encode checking as well. Encode is already checked in the top case st

[Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v3)

2015-10-22 Thread Alex Deucher
The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. v3: handle encode checking as well. Encode is already checked in the top case statement, so drop encode checks in the lower

Re: [Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:37 AM, Kristian Høgsberg Kristensen wrote: > The scalar destination registers break copy propagation. Instead compute > the results to a regular register and then reference a component when we > later use the result as a source. It might be hairy to get it working, but

Re: [Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v2)

2015-10-22 Thread Christian König
On 22.10.2015 19:50, Alex Deucher wrote: The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. Signed-off-by: Alex Deucher Cc: mesa-sta...@lists.freedesktop.org --- src/gal

Re: [Mesa-dev] [PATCH 1/4] i965/fs: Use type-W for immediate in SampleID setup.

2015-10-22 Thread Anuj Phogat
On Wed, Oct 21, 2015 at 10:05 AM, Matt Turner wrote: > Not a functional difference, but register is loaded with a signed > immediate (V) and added to a signed type (D) producing a signed result > (D). > > Also change the type of g0 to allow for compaction. > --- > src/mesa/drivers/dri/i965/brw_fs

Re: [Mesa-dev] [RFC 16/21] mesa: Fix ARB_texture_compression_bptc functionality leaks

2015-10-22 Thread Chad Versace
On Tue 20 Oct 2015, Nanley Chery wrote: > On Tue, Oct 20, 2015 at 8:37 AM, Marek Olšák wrote: > > > NAK. I'd like this extension in compatibility contexts. The fact the > > spec requires OpenGL 3.1 was just authors' laziness. > > > > > I had thought it might be the case that some specs may uneces

Re: [Mesa-dev] [RFC 15/21] mesa: Fix EXT_texture_sRGB functionality leaks

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Stop leaks into the following contexts: >* GLES in _mesa_base_tex_format() and lookup_view_class(). >* Pre-1.1 GL legacy contexts in all uses. > > Stop allowing compressed sRGB formats as valid formats in GLES3 > contexts.

Re: [Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

2015-10-22 Thread Kristian Høgsberg
On Thu, Oct 22, 2015 at 12:11 PM, Matt Turner wrote: > On Thu, Oct 22, 2015 at 11:36 AM, Kristian Høgsberg Kristensen > wrote: >> The emit_untyped_read and emit_untyped_write helpers already uniformize >> the surface index argument. No need to do it before calling them. >> >> Signed-off-by: Krist

Re: [Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:36 AM, Kristian Høgsberg Kristensen wrote: > The emit_untyped_read and emit_untyped_write helpers already uniformize > the surface index argument. No need to do it before calling them. > > Signed-off-by: Kristian Høgsberg Kristensen > --- > src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH v2] i965/vec4: track and use independently each flag channel

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:19 AM, Matt Turner wrote: > On Mon, Oct 19, 2015 at 10:38 AM, Alejandro Piñeiro > wrote: >> vec4_live_variables tracks now each flag channel independently, so >> vec4_dead_code_eliminate can update the writemask of null registers, >> based on which component are alive a

Re: [Mesa-dev] [PATCH v2 3/8] i965/fs: Use unsigned immediate 0 when eliminating SHADER_OPCODE_FIND_LIVE_CHANNEL

2015-10-22 Thread Matt Turner
Reviewed-by: Matt Turner (though, there's really no reason for copy propagation to be this stupid :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [RFC 08/21] mesa/extensions: Replace extension::api_set with ::version

2015-10-22 Thread Chad Versace
On Thu 22 Oct 2015, Matt Turner wrote: > On Thu, Oct 22, 2015 at 11:24 AM, Chad Versace wrote: > > On Mon 19 Oct 2015, Nanley Chery wrote: > >> From: Nanley Chery > >> > >> The api_set field has no users outside of _mesa_extension_supported(). > >> Remove it and allow the version field to take it

[Mesa-dev] [PATCH v2 2/8] i965/fs: Read all components of a SSBO field with one send

2015-10-22 Thread Kristian Høgsberg Kristensen
Instead of looping through single-component reads, read all components in one go. Reviewed-by: Iago Toral Quiroga Reviewed-by: Jordan Justen Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 25 +++-- 1 file changed, 7 insertions(+),

[Mesa-dev] [PATCH v2 6/8] i965/fs: Drop offset_reg temporary in ssbo load

2015-10-22 Thread Kristian Høgsberg Kristensen
Now that we don't read each component one-by-one, we don't need the temoprary vgrf for the offset. More importantly, this register was type UD while the nir source was type D. This broke copy propagation and left a redundant MOV in the generated code. Signed-off-by: Kristian Høgsberg Kristensen -

[Mesa-dev] [PATCH v2 3/8] i965/fs: Use unsigned immediate 0 when eliminating SHADER_OPCODE_FIND_LIVE_CHANNEL

2015-10-22 Thread Kristian Høgsberg Kristensen
The destination for SHADER_OPCODE_FIND_LIVE_CHANNEL is always a UD register. When we replace the opcode with a MOV, make sure we use a UD immediate 0 so copy propagation doesn't bail because of non-matching types. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs.

[Mesa-dev] [PATCH v2 8/8] i965/fs: Allow copy propagating into new surface access opcodes

2015-10-22 Thread Kristian Høgsberg Kristensen
Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 5589716..

[Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

2015-10-22 Thread Kristian Høgsberg Kristensen
The scalar destination registers break copy propagation. Instead compute the results to a regular register and then reference a component when we later use the result as a source. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_builder.h | 8 1 file chan

[Mesa-dev] [PATCH v2 4/8] i965/fs: Don't uniformize surface index twice

2015-10-22 Thread Kristian Høgsberg Kristensen
The emit_untyped_read and emit_untyped_write helpers already uniformize the surface index argument. No need to do it before calling them. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH v2 0/8] SSBO optimizations

2015-10-22 Thread Kristian Høgsberg Kristensen
Here's an updated and expanded ssbo optimization series. I found a bit of low-hanging fruit around dynamic ssbo array indexing. I removed the IMM shortcut in emit_uniformize() and added the constant propagation for the read and write opcodes. The result is the same for constant indexing, and it hel

[Mesa-dev] [PATCH v2 7/8] i965/fs: Optimize ssbo stores

2015-10-22 Thread Kristian Høgsberg Kristensen
Write groups of enabled components together. Signed-off-by: Kristian Høgsberg Kristensen --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 56 +++- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/driver

[Mesa-dev] [PATCH v2 1/8] i965: Don't use message headers for untyped reads

2015-10-22 Thread Kristian Høgsberg Kristensen
We always set the mask to 0x, which is what it defaults to when no header is present. Let's drop the header instead. v2: Only remove header for untyped reads. Typed reads always need the header. Reviewed-by: Francisco Jerez Reviewed-by: Jordan Justen Signed-off-by: Kristian Høgsberg Kri

Re: [Mesa-dev] [RFC 07/21] mesa/extensions: Use _mesa_extension_supported()

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:15 AM, Chad Versace wrote: > On Mon 19 Oct 2015, Nanley Chery wrote: >> From: Nanley Chery >> >> Replace open-coded checks for extension support with >> _mesa_extension_supported(). >> >> Signed-off-by: Nanley Chery >> --- >> src/mesa/main/extensions.c | 54 >>

Re: [Mesa-dev] [RFC 10/21] mesa: Remove equality check in helper functions

2015-10-22 Thread Chad Versace
On Thu 22 Oct 2015, Emil Velikov wrote: > On 22 October 2015 at 07:43, Erik Faye-Lund wrote: > > On Tue, Oct 20, 2015 at 12:44 AM, Nanley Chery > > wrote: > >> From: Nanley Chery > >> > >> Since the version numbers being compared are integral and we don't ever > >> expect gl_context::Version to

Re: [Mesa-dev] [RFC 09/21] mesa: Generate a helper function for each extension

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Generate functions which determine if an extension is supported in the > current context. Initially, enums were going to be explicitly used with > _mesa_extension_supported(). The idea to embed the function and enums > into generate

Re: [Mesa-dev] [RFC 08/21] mesa/extensions: Replace extension::api_set with ::version

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 11:24 AM, Chad Versace wrote: > On Mon 19 Oct 2015, Nanley Chery wrote: >> From: Nanley Chery >> >> The api_set field has no users outside of _mesa_extension_supported(). >> Remove it and allow the version field to take its place. >> >> The brunt of the transformation was

Re: [Mesa-dev] [PATCH 7/9] i965: Add initial assembly validation pass.

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 4:15 AM, Emil Velikov wrote: > On 21 October 2015 at 23:58, Matt Turner wrote: >> Initially just checks that sources are non-NULL, which would have >> alerted us to the problem fixed by commit 6c846dc5. > > What are the chances of combining this with and/or removing > fs_v

Re: [Mesa-dev] [PATCH 2/9] i965: Fill out instruction list.

2015-10-22 Thread Matt Turner
On Thu, Oct 22, 2015 at 3:58 AM, Emil Velikov wrote: > On 21 October 2015 at 23:58, Matt Turner wrote: >> Add some instructions: illegal, movi, sends, sendsc. >> >> Remove some instructions with reused opcodes: msave, mrestore, push, >> pop, goto. I did have some gross code for disassembling opco

Re: [Mesa-dev] [RFC 08/21] mesa/extensions: Replace extension::api_set with ::version

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > The api_set field has no users outside of _mesa_extension_supported(). > Remove it and allow the version field to take its place. > > The brunt of the transformation was performed with the following vim commands: > s/\(GL [^,]\+\),

Re: [Mesa-dev] [PATCH v2] i965/vec4: track and use independently each flag channel

2015-10-22 Thread Matt Turner
On Mon, Oct 19, 2015 at 10:38 AM, Alejandro Piñeiro wrote: > vec4_live_variables tracks now each flag channel independently, so > vec4_dead_code_eliminate can update the writemask of null registers, > based on which component are alive at the moment. This would allow > vec4_cmod_propagation to opt

Re: [Mesa-dev] [RFC 07/21] mesa/extensions: Use _mesa_extension_supported()

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Replace open-coded checks for extension support with > _mesa_extension_supported(). > > Signed-off-by: Nanley Chery > --- > src/mesa/main/extensions.c | 54 > > src/mesa/main/extens

Re: [Mesa-dev] [RFC 06/21] mesa/extensions: Create _mesa_extension_supported()

2015-10-22 Thread Chad Versace
On Thu 22 Oct 2015, Emil Velikov wrote: > On 19 October 2015 at 23:36, Nanley Chery wrote: > > From: Nanley Chery > > > > Create a function which determines if an extension is supported in the > > current context. > > > > Signed-off-by: Nanley Chery > > --- > > src/mesa/main/extensions.c | 17 +

Re: [Mesa-dev] [RFC 05/21] mesa/extensions: Add extension::version

2015-10-22 Thread Chad Versace
On Mon 19 Oct 2015, Nanley Chery wrote: > From: Nanley Chery > > Enable limiting advertised extension support by context version with > finer granularity. GLuint is chosen over smaller datatypes because, > when this field is eventually used, usage of this datatype provides > the smallest .text si

[Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw (v2)

2015-10-22 Thread Alex Deucher
The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. v2: integrate the UVD2 and older checks into the main switch statement. Signed-off-by: Alex Deucher Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/radeon/radeon_video.c | 46

Re: [Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw

2015-10-22 Thread Roland Scheidegger
Am 22.10.2015 um 18:27 schrieb Alex Deucher: > The section for UVD 2 and older was not updated > when HEVC support was added. Reported by Kano > on irc. > > Signed-off-by: Alex Deucher > Cc: mesa-sta...@lists.freedesktop.org > --- > src/gallium/drivers/radeon/radeon_video.c | 3 ++- > 1 file cha

Re: [Mesa-dev] [PATCH v3 5/7] radeonsi: Implement DCC fast clear.

2015-10-22 Thread Bas Nieuwenhuizen
On Thu, Oct 22, 2015 at 12:12 PM, Marek Olšák wrote: > On Wed, Oct 21, 2015 at 12:10 AM, Bas Nieuwenhuizen > wrote: >> Uses the DCC buffer instead of the CMASK buffer. The ELIMINATE_FAST_CLEAR >> still works. Furthermore, with DCC compression we can directly clear >> to a limited set of colors su

[Mesa-dev] [PATCH v2 6/8] st/va: handle Video Post Processing for configs

2015-10-22 Thread Julien Isorce
Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/config.c | 20 src/galliu

[Mesa-dev] [PATCH v2 7/8] st/va: add colospace conversion through Video Post Processing

2015-10-22 Thread Julien Isorce
Add support for VPP in the following functions: vlVaCreateContext vlVaDestroyContext vlVaBeginPicture vlVaRenderPicture vlVaEndPicture Add support for VAProcFilterNone in: vlVaQueryVideoProcFilters vlVaQueryVideoProcFilterCaps vlVaQueryVideoProcPipelineCaps Add handleVAProcPipelineParameterBuffer

[Mesa-dev] [PATCH] radeon/uvd: don't expose HEVC on old UVD hw

2015-10-22 Thread Alex Deucher
The section for UVD 2 and older was not updated when HEVC support was added. Reported by Kano on irc. Signed-off-by: Alex Deucher Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/radeon/radeon_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/

Re: [Mesa-dev] [PATCH] mesa: clamp MaxLevel for immutable textures at initialization

2015-10-22 Thread Ilia Mirkin
On Thu, Oct 22, 2015 at 12:03 PM, Nicolai Hähnle wrote: > On 22.10.2015 15:57, Fredrik Höglund wrote: >> >> On Thursday 22 October 2015, Nicolai Hähnle wrote: >>> >>> The same clamping already happens for glTexParameteri. This change >>> also fixes a bug in mipmap generation, see >>> https://bugs.

Re: [Mesa-dev] [PATCH 6/7] st/va: add initial Video Post Processing support

2015-10-22 Thread Julien Isorce
On 19 October 2015 at 18:10, Emil Velikov wrote: > On 17 October 2015 at 00:14, Julien Isorce > wrote: > > + > > + if (!(picture_width && picture_height) && !is_vpp) > >return VA_STATUS_ERROR_INVALID_IMAGE_FORMAT; > > > > drv = VL_VA_DRIVER(ctx); > > @@ -163,38 +177,48 @@ vlVaCreat

[Mesa-dev] [PATCH 2/2] radeonsi: add Stoney pci ids

2015-10-22 Thread Alex Deucher
From: Samuel Li Signed-off-by: Samuel Li --- include/pci_ids/radeonsi_pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pci_ids/radeonsi_pci_ids.h b/include/pci_ids/radeonsi_pci_ids.h index 52eada1..bcf15a1 100644 --- a/include/pci_ids/radeonsi_pci_ids.h +++ b/include/pci

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Jason Ekstrand
On Thu, Oct 22, 2015 at 4:21 AM, Iago Toral Quiroga wrote: > I implemented this first as a separate optimization pass in GLSL IR [1], but > Curro pointed out that this being pretty much a restricted form of a CSE pass > it would probably make more sense to do it inside CSE (and we no longer have >

[Mesa-dev] [PATCH 1/2] radeonsi: add support for Stoney asics (v2)

2015-10-22 Thread Alex Deucher
From: Samuel Li v2 (agd): rebase on mesa master, split pci ids to separate commit Signed-off-by: Samuel Li --- src/gallium/drivers/radeon/r600_pipe_common.c | 2 ++ src/gallium/drivers/radeon/radeon_winsys.h| 1 + src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/winsys/amdg

Re: [Mesa-dev] [PATCH 0/2] Nir: Allow CSE of SSBO loads

2015-10-22 Thread Ilia Mirkin
On Thu, Oct 22, 2015 at 9:39 AM, Connor Abbott wrote: > 2. Add a special "load-combining" pass that does some dataflow > analysis or similar (or, for now, only looks at things within a single > block). FYI nouveau does this at a local level (i.e. per-bb), if you're interested take a look at: http

  1   2   >