Re: [Mesa-dev] [PATCH 20/21] i965/ir: Make BROADCAST emit an unmasked single-channel move.

2016-05-24 Thread Francisco Jerez
Jason Ekstrand writes: > On Tue, May 24, 2016 at 12:18 AM, Francisco Jerez > wrote: > >> Alternatively we could have extended the current semantics to 32-wide >> mode by changing brw_broadcast() to emit multiple indexed MOV >> instructions in the generator copying the selected value to all >> de

Re: [Mesa-dev] [PATCH v2] mesa: Add support for GL_CONTEXT_LOST

2016-05-24 Thread Ian Romanick
On 05/24/2016 04:58 PM, Kristian Høgsberg wrote: > From: Kristian Høgsberg Kristensen > > As per GL_KHR_robustness, we have to return GL_CONTEXT_LOST from all > entry points when we lose a context. We do this by creating a new > dispatch table and setting that when we learn that we've lost the >

Re: [Mesa-dev] [PATCH 18/21] i965/fs: Allow specifying arbitrary execution sizes up to 32 to FIND_LIVE_CHANNEL.

2016-05-24 Thread Francisco Jerez
Jason Ekstrand writes: > On Tue, May 24, 2016 at 12:18 AM, Francisco Jerez > wrote: > >> Due to a Gen7-specific hardware bug native 32-wide instructions get >> the lower 16 bits of the execution mask applied incorrectly to both >> halves of the instruction, so the MOV trick we currently use woul

Re: [Mesa-dev] [PATCH 18/21] i965/fs: Allow specifying arbitrary execution sizes up to 32 to FIND_LIVE_CHANNEL.

2016-05-24 Thread Kenneth Graunke
On Tuesday, May 24, 2016 5:27:59 PM PDT Francisco Jerez wrote: > Jason Ekstrand writes: > > > On Tue, May 24, 2016 at 12:18 AM, Francisco Jerez > > wrote: > > > >> Due to a Gen7-specific hardware bug native 32-wide instructions get > >> the lower 16 bits of the execution mask applied incorrectly

[Mesa-dev] [PATCH 2/2] tgsi: print TGSI_PROPERTY_NEXT_SHADER value as string, not an integer

2016-05-24 Thread Brian Paul
Print "GEOM" instead of "2", for example. v2: also update the text parsing code, per Ilia. --- src/gallium/auxiliary/tgsi/tgsi_dump.c | 3 +++ src/gallium/auxiliary/tgsi/tgsi_text.c | 22 ++ 2 files changed, 25 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.

[Mesa-dev] [PATCH 1/2] tgsi: s/6/PIPE_SHADER_TYPES/ for tgsi_processor_type_names array size

2016-05-24 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_strings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.h b/src/gallium/auxiliary/tgsi/tgsi_strings.h index 031d322..9a9362e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.h +++ b/src/gallium/a

Re: [Mesa-dev] [PATCH] i965/urb: fixes division by zero

2016-05-24 Thread Ben Widawsky
On Tue, May 17, 2016 at 11:50:28AM -0700, Matt Turner wrote: > On Mon, May 16, 2016 at 4:27 PM, Ardinartsev Nikita > wrote: > > Fixes regression introduced by af5ca43f2676bff7499f93277f908b681cb821d0 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95419 > > Thank you very much for the

Re: [Mesa-dev] [PATCH 18/21] i965/fs: Allow specifying arbitrary execution sizes up to 32 to FIND_LIVE_CHANNEL.

2016-05-24 Thread Francisco Jerez
Kenneth Graunke writes: > On Tuesday, May 24, 2016 5:27:59 PM PDT Francisco Jerez wrote: >> Jason Ekstrand writes: >> >> > On Tue, May 24, 2016 at 12:18 AM, Francisco Jerez >> > wrote: >> > >> >> Due to a Gen7-specific hardware bug native 32-wide instructions get >> >> the lower 16 bits of the

Re: [Mesa-dev] [PATCH 12/21] i965/fs: Clean up remaining uses of dispatch_width in the generator.

2016-05-24 Thread Francisco Jerez
Jason Ekstrand writes: > Does this mean we can delete the field from brw_fs_generator? > Almost, there is still one use left in fire_fb_write() (for the dual source blend last-rt hack) which we will be able to get rid of eventually, but it cannot simply be replaced with inst->exec_size because it

Re: [Mesa-dev] [PATCH v2] mesa: Add support for GL_CONTEXT_LOST

2016-05-24 Thread Matt Turner
On Tue, May 24, 2016 at 4:58 PM, Kristian Høgsberg wrote: > diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c > b/src/mesa/drivers/dri/i965/intel_extensions.c > index feea6ca..b8d7517 100644 > --- a/src/mesa/drivers/dri/i965/intel_extensions.c > +++ b/src/mesa/drivers/dri/i965/intel_exten

Re: [Mesa-dev] [PATCH 01/11] i965/compute: Fix uniform init issue when SIMD8 is skipped

2016-05-24 Thread Kenneth Graunke
On Tuesday, May 24, 2016 1:37:46 AM PDT Jordan Justen wrote: > In d8347f12ead89c5a58f69ce9283a54ac8487159c, we added support for > skipping SIMD8 generation when the program local size is too large for > SIMD8 to be usable. This change was missed in that commit. > > This bug would impact gen7 plat

Re: [Mesa-dev] [PATCH] egl: Additional attribute validation for eglCreatePbufferSurface

2016-05-24 Thread Ben Widawsky
On Tue, May 17, 2016 at 06:39:02PM +0100, Plamena Manolova wrote: > eglCreatePbufferSurface should generate an EGL_BAD_MATCH error if: > 1: The EGL_TEXTURE_FORMAT attribute is EGL_NO_TEXTURE and EGL_TEXTURE_TARGET > is something other than EGL_NO_TEXTURE > 2: EGL_TEXTURE_FORMAT is something other t

Re: [Mesa-dev] [PATCH v2] mesa: Add support for GL_CONTEXT_LOST

2016-05-24 Thread Kristian Høgsberg
On Tue, May 24, 2016 at 6:04 PM, Matt Turner wrote: > On Tue, May 24, 2016 at 4:58 PM, Kristian Høgsberg wrote: >> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c >> b/src/mesa/drivers/dri/i965/intel_extensions.c >> index feea6ca..b8d7517 100644 >> --- a/src/mesa/drivers/dri/i965/intel

Re: [Mesa-dev] [PATCH v2] mesa: Add support for GL_CONTEXT_LOST

2016-05-24 Thread Kristian Høgsberg
On Tue, May 24, 2016 at 5:22 PM, Ilia Mirkin wrote: > Sorry to be pedantic, but you're enabling the ext for gles1.1, but the new > entrypoint appear to only apply to gles2. I think you also want a es1="1.1" > or something along those lines. The extension requires 2.0, so maybe we should instead o

[Mesa-dev] [PATCH v3] mesa: Enable GL_KHR_robustness

2016-05-24 Thread Kristian Høgsberg
From: Kristian Høgsberg Kristensen GL_KHR_robustness adds the GL_CONTEXT_LOST error and five new entry points that we already implement. This patch adds a new dispatch table that returns GL_CONTEXT_LOST from all entry points and implements the GL_LOSE_CONTEXT_ON_RESET by setting that table when

Re: [Mesa-dev] [PATCH v2] mesa: Add support for GL_CONTEXT_LOST

2016-05-24 Thread Ilia Mirkin
On May 24, 2016 10:25 PM, "Kristian Høgsberg" wrote: > > On Tue, May 24, 2016 at 5:22 PM, Ilia Mirkin wrote: > > Sorry to be pedantic, but you're enabling the ext for gles1.1, but the new > > entrypoint appear to only apply to gles2. I think you also want a es1="1.1" > > or something along those

Re: [Mesa-dev] [PATCH] i965/draw: Use the correct buffer index for interleaved VBO sizes

2016-05-24 Thread Kristian Høgsberg
On Tue, May 24, 2016 at 5:01 PM, Jason Ekstrand wrote: > The buffer_range_* arrays are indexed by buffer index not element index. Reviewed-by: Kristian Høgsberg > --- > src/mesa/drivers/dri/i965/brw_draw_upload.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/sr

Re: [Mesa-dev] [PATCH v2] mesa: Add support for GL_CONTEXT_LOST

2016-05-24 Thread Kristian Høgsberg
On Tue, May 24, 2016 at 7:47 PM, Ilia Mirkin wrote: > > On May 24, 2016 10:25 PM, "Kristian Høgsberg" wrote: >> >> On Tue, May 24, 2016 at 5:22 PM, Ilia Mirkin wrote: >> > Sorry to be pedantic, but you're enabling the ext for gles1.1, but the >> > new >> > entrypoint appear to only apply to gles

Re: [Mesa-dev] [PATCH 2/2] tgsi: print TGSI_PROPERTY_NEXT_SHADER value as string, not an integer

2016-05-24 Thread Ilia Mirkin
Series is Reviewed-by: Ilia Mirkin On Tue, May 24, 2016 at 8:43 PM, Brian Paul wrote: > Print "GEOM" instead of "2", for example. > > v2: also update the text parsing code, per Ilia. > --- > src/gallium/auxiliary/tgsi/tgsi_dump.c | 3 +++ > src/gallium/auxiliary/tgsi/tgsi_text.c | 22

[Mesa-dev] ARB_enhanced_layouts packing support for i965 Gen8+

2016-05-24 Thread Timothy Arceri
There are a number of packing tests already in piglit but I have a few more on the way. This series does not add support for doubles as there is currently a doubles bug with explicit locations that I've pointed out to the Igalia guys. Samuel is working on a fix for this after which I will finish u

[Mesa-dev] [PATCH 06/12] i965: add component packing support for tes

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 38 +++- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index ce61898..e0d88c6 100644 --- a/src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 05/12] i965: add component packing support for gs

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 21 + 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index d5d7a77..b5a4fc8 100644 --- a/sr

[Mesa-dev] [PATCH 02/12] nir: use the same driver location for packed varyings

2016-05-24 Thread Timothy Arceri
--- src/compiler/nir/nir.h| 4 ++-- src/compiler/nir/nir_lower_io.c | 25 - src/mesa/drivers/dri/i965/brw_nir.c | 12 +++- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 +++ 4 files changed, 36 insertions(+), 8 deletions(-) dif

[Mesa-dev] [PATCH 04/12] i965: enable component packing for vs and fs

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 17 +++-- src/mesa/drivers/dri/i965/brw_fs.h | 5 +++-- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 29 - 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.c

[Mesa-dev] [PATCH 03/12] glsl/nir: add new num_packed_components field

2016-05-24 Thread Timothy Arceri
This will be used to store the total number of components used at this location when packing via ARB_enhanced_layouts. --- src/compiler/glsl/ir.h | 5 +++ src/compiler/glsl/link_varyings.cpp | 74 - src/compiler/glsl/linker.cpp| 2 + src/c

[Mesa-dev] [PATCH 08/12] i965: add support for packing arrays

2016-05-24 Thread Timothy Arceri
Here we add a new param to the type_size functions in order to pass in the size of a varying once packing is taken into account. --- src/compiler/nir/nir.h | 6 +++-- src/compiler/nir/nir_lower_io.c| 35 +- src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 12/12] docs: mark ARB_enhanced_layouts as DONE for i965

2016-05-24 Thread Timothy Arceri
--- docs/GL3.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 2dff3cd..edc04a1 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -193,11 +193,11 @@ GL 4.4, GLSL 4.40: GL_MAX_VERTEX_ATTRIB_STRIDE DONE (all drive

[Mesa-dev] [PATCH 07/12] i965: add component packing support for tcs

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index e0d88c6..51da3bd 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/m

[Mesa-dev] [PATCH 10/12] i965: add indirect packing support to gs load inputs

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index a19ece7..16fd7d6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b

[Mesa-dev] [PATCH 01/12] nir: add new intrinsic field for storing component offset

2016-05-24 Thread Timothy Arceri
This offset is used for packing. --- src/compiler/nir/nir.h| 6 ++ src/compiler/nir/nir_intrinsics.h | 8 src/compiler/nir/nir_lower_io.c | 8 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 7

[Mesa-dev] [PATCH 09/12] i965: add indirect packing support for tcs and tes

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 33 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 51da3bd..a19ece7 100644 --- a/src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 11/12] i965: enable ARB_enhanced_layouts for gen8+

2016-05-24 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index feea6ca..5d831e5 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/

Re: [Mesa-dev] [PATCH v3] mesa: Enable GL_KHR_robustness

2016-05-24 Thread Ilia Mirkin
On Tue, May 24, 2016 at 10:41 PM, Kristian Høgsberg wrote: > From: Kristian Høgsberg Kristensen > > GL_KHR_robustness adds the GL_CONTEXT_LOST error and five new entry > points that we already implement. This patch adds a new dispatch > table that returns GL_CONTEXT_LOST from all entry points an

Re: [Mesa-dev] [PATCH] gallium/radeon: add the kernel version into the renderer string

2016-05-24 Thread Michel Dänzer
On 25.05.2016 09:09, Mike Lothian wrote: > Do you need the DRM version number if you'll be displaying the kernel > version anyway? Yes, because the DRM version depends on the kernel driver being used. The patch is Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer |

Re: [Mesa-dev] [PATCH 01/29] mesa: Add gl_point_attrib::CoordReplaceBits bitfield.

2016-05-24 Thread Mathias Fröhlich
On Tuesday, May 24, 2016 17:42:17 Roland Scheidegger wrote: > Am 24.05.2016 um 08:41 schrieb mathias.froehl...@gmx.net: > > From: Mathias Fröhlich > > > > The aim is to replace the CoordReplace array by > > a bitfield. Until all drivers are converted, > > establish the bitfield in paralell to the

Re: [Mesa-dev] [PATCH 00/29] Make more use of bitmasks

2016-05-24 Thread Mathias Fröhlich
Hi Brian, On Tuesday, May 24, 2016 11:29:56 Brian Paul wrote: > On 05/24/2016 12:41 AM, mathias.froehl...@gmx.net wrote: > > From: Mathias Fröhlich > > > > Hi all, > > > > following a series with performance improvements > > for cpu/draw bound applications. This part makes > > more use of the bit

Re: [Mesa-dev] [PATCH v3] mesa: Enable GL_KHR_robustness

2016-05-24 Thread Kristian Høgsberg
On Tue, May 24, 2016 at 8:19 PM, Ilia Mirkin wrote: > On Tue, May 24, 2016 at 10:41 PM, Kristian Høgsberg > wrote: >> From: Kristian Høgsberg Kristensen >> >> GL_KHR_robustness adds the GL_CONTEXT_LOST error and five new entry >> points that we already implement. This patch adds a new dispatch

[Mesa-dev] [PATCH] mesa/bufferobj: use mapping range in BufferSubData.

2016-05-24 Thread Dave Airlie
From: Dave Airlie According to GL4.5 spec: An INVALID_OPERATION error is generated if any part of the speci- fied buffer range is mapped with MapBufferRange or MapBuffer (see sec- tion 6.3), unless it was mapped with MAP_PERSISTENT_BIT set in the Map- BufferRange access flags. So we should use t

Re: [Mesa-dev] [PATCH] i965/draw: Use the correct buffer index for interleaved VBO sizes

2016-05-24 Thread Jason Ekstrand
On Tue, May 24, 2016 at 7:48 PM, Kristian Høgsberg wrote: > On Tue, May 24, 2016 at 5:01 PM, Jason Ekstrand > wrote: > > The buffer_range_* arrays are indexed by buffer index not element index. > > Reviewed-by: Kristian Høgsberg > Thanks! > > --- > > src/mesa/drivers/dri/i965/brw_draw_uploa

[Mesa-dev] [PATCH] mesa: Add .gitignore entries for make check binaries

2016-05-24 Thread Kristian Høgsberg
From: Kristian Høgsberg Kristensen Signed-off-by: Kristian Høgsberg Kristensen --- src/compiler/.gitignore | 4 src/compiler/nir/tests/.gitignore| 1 + src/mesa/drivers/dri/i965/.gitignore | 3 +++ src/util/.gitignore | 1 + src/util/tests/hash_table/.giti

Re: [Mesa-dev] [PATCH 0/2] scons 2.5.0 support

2016-05-24 Thread Giuseppe Bilotta
> Sure. Unfortunately, the series does not apply cleanly on ToT master: > > % git am p[12].txt > Applying: scons: whitespace cleanup > Using index info to reconstruct a base tree... > error: patch failed: src/gallium/state_trackers/wgl/SConscript:12 > error: src/gallium/state_trackers/wgl/SConscri

Re: [Mesa-dev] [PATCH] mesa: Add .gitignore entries for make check binaries

2016-05-24 Thread Matt Turner
On Tue, May 24, 2016 at 9:07 PM, Kristian Høgsberg wrote: > From: Kristian Høgsberg Kristensen > > Signed-off-by: Kristian Høgsberg Kristensen > --- > src/compiler/.gitignore | 4 > src/compiler/nir/tests/.gitignore| 1 + > src/mesa/drivers/dri/i965/.gitignore | 3 +++ > s

Re: [Mesa-dev] [PATCH] glsl: add GL_EXT_clip_cull_distance define, add helpers

2016-05-24 Thread Tobias Klausmann
Reviewed-by: Tobias Klausmann On 25.05.2016 01:59, Ilia Mirkin wrote: Signed-off-by: Ilia Mirkin --- This addresses the feedback I got after pushing the enablement patch. docs/relnotes/11.3.0.html | 1 + src/compiler/glsl/builtin_variables.cpp | 10 -- src/compile

[Mesa-dev] [Bug 96176] Cannot build non-intel drivers without python3.

2016-05-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=96176 Bug ID: 96176 Summary: Cannot build non-intel drivers without python3. Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: All Status: NEW Keywords: b

[Mesa-dev] [Bug 95529] [regression, bisected] Image corruption in Chrome

2016-05-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95529 --- Comment #3 from Vladislav Egorov --- Yes, they look washed out or half-transparent. Checker pattern is not a part of the bug, Wikipedia uses it as a background. Trace: https://www.dropbox.com/s/dusvloqxwi2iuj6/chrome.1.trace -- You are rece

Re: [Mesa-dev] [PATCH 2/2] Add LLVM version to Mesa version strings

2016-05-24 Thread Giuseppe Bilotta
On Tue, May 24, 2016 at 12:46 AM, Marek Olšák wrote: > On Mon, May 23, 2016 at 10:47 PM, Giuseppe Bilotta > wrote: >> On Mon, May 23, 2016 at 4:45 PM, Marek Olšák wrote: >>> I think it would be better to put stuff like this only into the >>> renderer string of drivers which use LLVM. The majorit

[Mesa-dev] [PATCH 00/21] i965: Scalar back-end support for SIMD32, part 2.

2016-05-24 Thread Francisco Jerez
This should be enough to get the FS generator emitting 32-wide code for at least compute shaders. Most of the work in this series is about fixing the current codegen infrastructure to support arbitrary channel group controls and execution sizes (other than dispatch_width that is), and extending se

[Mesa-dev] [PATCH 01/21] i965/eu: Define alternative interface for setting compression and group controls.

2016-05-24 Thread Francisco Jerez
This implements some simple helper functions that can be used to specify the group of channel enable signals and compression enable that apply to a brw_inst instruction. It's intended to replace brw_set_default_compression_control eventually because the current interface has a number of shortcomin

[Mesa-dev] [PATCH 04/21] i965/fs: Simplify per-instruction compression control setup in generator.

2016-05-24 Thread Francisco Jerez
By using the new compression/group control interface. This will allow easier extension to support arbitrary channel enable groups at the IR level. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 44 ++ 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/sr

[Mesa-dev] [PATCH 07/21] i965/eu: Stop using p->compressed to specify the exec size of control flow instructions.

2016-05-24 Thread Francisco Jerez
p->compressed won't work for SIMD32, we should just be using the execution size value specified via p->current instead. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c

[Mesa-dev] [PATCH 12/21] i965/fs: Clean up remaining uses of dispatch_width in the generator.

2016-05-24 Thread Francisco Jerez
Most of these are bugs because the intended execution size of an instruction and the dispatch width of the shader aren't necessarily the same (especially in SIMD32 programs). --- src/mesa/drivers/dri/i965/brw_eu.h | 1 - src/mesa/drivers/dri/i965/brw_eu_emit.c| 3 +-- src/mes

[Mesa-dev] [PATCH 05/21] i965/fs: Pass the compression mode to brw_reg_from_fs_reg().

2016-05-24 Thread Francisco Jerez
From: Kenneth Graunke Curro is planning to eliminate p->compressed, so let's avoid using it here and just pass in the value directly. Signed-off-by: Kenneth Graunke [ Francisco Jerez: Pass boolean flag instead of brw_compression enum. ] Reviewed-by: Francisco Jerez --- src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 10/21] i965/eu: Use current exec size instead of p->compressed in surface message generation.

2016-05-24 Thread Francisco Jerez
This was kind of an abuse of p->compressed, dataport send message instructions are always uncompressed. Use the current execution size instead since p->compressed is on its way out. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[Mesa-dev] [PATCH 11/21] i965/eu: Remove brw_codegen::compressed and ::compressed_stack.

2016-05-24 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_eu.c | 5 - src/mesa/drivers/dri/i965/brw_eu.h | 1 - src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drive

[Mesa-dev] [PATCH 21/21] i965/fs: Expose arbitrary channel execution groups to the IR.

2016-05-24 Thread Francisco Jerez
This generalizes the current fs_inst::force_sechalf flag to allow specifying channel enable groups other than 0 or 8. At some point it will likely make sense to fix the vec4 generator to support arbitrary execution groups and then move the definition of fs_inst::group into backend_instruction (e.g

[Mesa-dev] [PATCH 17/21] i965/fs: Lower 32-wide scratch writes in the generator.

2016-05-24 Thread Francisco Jerez
The hardware has messages that can write 32 32bit components at once but the channel enable mask gets messed up. We need to split them into several 16-wide scratch writes for the channel enables to be applied correctly. The SIMD lowering pass cannot be used for this because scratch writes are emi

[Mesa-dev] [PATCH 13/21] i965/eu: Consider QtrCtrl 3Q-4Q in typed surface message descriptor setup.

2016-05-24 Thread Francisco Jerez
In SIMD32 programs the compiler is responsible for providing the appropriate half of the sample mask in the message header, so the first and third quarters both map to the first slot group of the provided 16-bit half, while the second and fourth quarters map to the second slot group -- IOW they sho

[Mesa-dev] [PATCH 06/21] i965/fs: Extend region width calculation to allow arbitrary execution sizes.

2016-05-24 Thread Francisco Jerez
Instead of just halving the execution size when the instruction is compressed hoping that it will give a legal source region width, we can calculate the maximum legal width value in closed form from the component size and stride. This makes sure that brw_reg_from_fs_reg() always returns a valid ha

[Mesa-dev] [PATCH 19/21] i965/fs: Allow specifying arbitrary quarter control to FIND_LIVE_CHANNEL.

2016-05-24 Thread Francisco Jerez
This makes FIND_LIVE_CHANNEL behave like a normal instruction for non-zero quarter control. On Gen8+ we just leave the quarter control field of the emitted FBL instruction set to the default value so the hardware applies the expected shift to the execution mask signals. On Gen7 we apply the offse

[Mesa-dev] [PATCH 16/21] i965/fs: Implement scratch reads and writes of 4 GRFs at a time.

2016-05-24 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_eu_emit.c | 31 ++- src/mesa/drivers/dri/i965/brw_fs_generator.cpp| 4 +++ src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 4 +-- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw

[Mesa-dev] [PATCH 09/21] i965/fs: No need to reset predicate control after emitting some instructions.

2016-05-24 Thread Francisco Jerez
Trivial clean-up. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 8828e2b..a1cb5c2 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.

[Mesa-dev] [PATCH 18/21] i965/fs: Allow specifying arbitrary execution sizes up to 32 to FIND_LIVE_CHANNEL.

2016-05-24 Thread Francisco Jerez
Due to a Gen7-specific hardware bug native 32-wide instructions get the lower 16 bits of the execution mask applied incorrectly to both halves of the instruction, so the MOV trick we currently use wouldn't work. Instead emit multiple 16-wide MOV instructions in 32-wide mode in order to cover the w

[Mesa-dev] [PATCH 20/21] i965/ir: Make BROADCAST emit an unmasked single-channel move.

2016-05-24 Thread Francisco Jerez
Alternatively we could have extended the current semantics to 32-wide mode by changing brw_broadcast() to emit multiple indexed MOV instructions in the generator copying the selected value to all destination registers, but it seemed rather silly to waste EU cycles unnecessarily copying the exact sa

[Mesa-dev] [PATCH 02/21] i965/eu: Fix a bunch of compression control bugs in the generator.

2016-05-24 Thread Francisco Jerez
Most of these were resetting quarter control to zero incorrectly even though everything they needed to do was disable instruction compression -- The brw_SAMPLE() case was doing the right thing but it can be simplified slightly by using the new compression control interface. --- src/mesa/drivers/dr

[Mesa-dev] [PATCH 14/21] i965/eu: Set execution size explicitly for memory fence send message.

2016-05-24 Thread Francisco Jerez
We don't want to emit a 32-wide send message in 32-wide programs. The memory fence message should have the same effect regardless of the execution size (as long as it's valid) so just set it to one. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 11 +++ 1 file changed, 7 insertions(+), 4 d

[Mesa-dev] [PATCH 08/21] i965/fs: Pass current execution size to brw_IF() and brw_DO().

2016-05-24 Thread Francisco Jerez
This gets IF and DO instructions working in SIMD32 programs. brw_IF() and brw_DO() should probably behave in the same way as other generator functions that emit control flow instructions and just figure out the right execution size by themselves from the current execution controls specified throug

[Mesa-dev] [PATCH 03/21] i965/fs: No need to set compression control at the top of generate_code().

2016-05-24 Thread Francisco Jerez
The right value is dependent on the specific IR instruction being generated so it has to be reset in every iteration of the loop anyway. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mes

[Mesa-dev] [PATCH 15/21] i965/eu: Fix Gen7+ DP scratch message size calculation on Gen7.

2016-05-24 Thread Francisco Jerez
Gen7 hardware expects the block size field in the message descriptor to be the number of registers minus one instead of the log2 of the number of registers. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] i965: fix double-precision vertex inputs measurement

2016-05-24 Thread Kenneth Graunke
On Friday, May 20, 2016 5:05:03 PM PDT Juan A. Suarez Romero wrote: > For double-precision vertex inputs we need to measure them in dvec4 > terms, and for single-precision vertex inputs we need to measure them in > vec4 terms. > > For the later case, we use type_size_vec4() function. For the forme

Re: [Mesa-dev] [PATCH 1/2] Unify OpenGL and OpenCL version string suffix

2016-05-24 Thread Giuseppe Bilotta
On Tue, May 24, 2016 at 2:26 AM, Emil Velikov wrote: > On 23 May 2016 at 22:11, Giuseppe Bilotta wrote: >> I'll try. I've never used scons before thought so I might need some >> guidance along the way. (Doubly so considering that trying to run >> >> % scons >> >> on my work dir results in a backt

Re: [Mesa-dev] [PATCH 2/2] radeonsi: set correct stencil tile mode for texturing

2016-05-24 Thread Michel Dänzer
On 20.05.2016 19:23, 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] nvc0: enable 32 textures on kepler+

2016-05-24 Thread Samuel Pitoiset
The idea sounds good to me, but this (1U << i) needs consistency in my opinion. It's correct and avoid some compiler warnings (if the corresponding flags are used) but we currently don't do that. I would suggest to keep the (1 << i) for now, and maybe make a separate patch which replaces 1 by

[Mesa-dev] [PATCH] gbm: add pthread on libgbm LD_FLAGS

2016-05-24 Thread Alejandro Piñeiro
If not, mesa building fails with the following errors: /mesa/src/gbm/../../include/c11/threads_posix.h:189: undefined reference to `pthread_mutexattr_init' /mesa/src/gbm/../../include/c11/threads_posix.h:190: undefined reference to `pthread_mutexattr_settype' /mesa/source/mesa/src/gbm/../../inclu

[Mesa-dev] [PATCH 03/11] i965: Use nir to lower cs-derived variables

2016-05-24 Thread Jordan Justen
We added this support into nir for Mesa's Intel vulkan driver as part of the SPIR-V support, so we can use it for the i965 driver as well. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_compiler.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 01/11] i965/compute: Fix uniform init issue when SIMD8 is skipped

2016-05-24 Thread Jordan Justen
In d8347f12ead89c5a58f69ce9283a54ac8487159c, we added support for skipping SIMD8 generation when the program local size is too large for SIMD8 to be usable. This change was missed in that commit. This bug would impact gen7 platforms when the compute shader local size is greater than 512, and gen8

[Mesa-dev] [PATCH 05/11] nir: Make lowering gl_LocalInvocationIndex optional

2016-05-24 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/compiler/nir/nir.c | 4 src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_gather_info.c | 1 + src/compiler/nir/nir_intrinsics.h | 1 + src/compiler/nir/nir_lower_system_values.c | 16

[Mesa-dev] [PATCH 00/11] i965: Rework CS local IDs for gen7+

2016-05-24 Thread Jordan Justen
git://people.freedesktop.org/~jljusten/mesa hsw-cs-cross-thread-constants-v1 Note: These patches break the anv (vulkan) build. In the branch above branch I have a hack patch which will build anv, but anv will be broken. (Ie, I need to add another 'squash' patch for anv to this series.) These patc

[Mesa-dev] [PATCH 02/11] glsl: Add glsl LowerCsDerivedVariables option

2016-05-24 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/compiler/glsl/builtin_variables.cpp | 13 +++-- src/compiler/glsl/glsl_parser_extras.cpp | 8 src/mesa/drivers/dri/i965/brw_compiler.c | 2 ++ src/mesa/main/mtypes.h | 4 src/mesa/state_tracker/st_extensions.c | 4

[Mesa-dev] [PATCH 04/11] i965: Add nir based intrinsic lowering

2016-05-24 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_nir.h| 1 + src/mesa/drivers/dri/i965/brw_nir_intrinsics.c | 142 + 3 files changed, 144 insertions(+) create mode 100644 src/mesa/drivers/

[Mesa-dev] [PATCH 06/11] i965: Add nir channel_num system value

2016-05-24 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/compiler/nir/nir_intrinsics.h| 1 + src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 13 + 2 files changed, 14 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h index aeb6038..6f86c9f 100644 --- a

[Mesa-dev] [PATCH 10/11] squash i965: Run the intrinsics lowering pass

2016-05-24 Thread Jordan Justen
This pass replaces the local id and local index intrinsics with i965 specific nir code. It relies on the gl_i965_cs_thread_local_id uniform variable which actually varies per thread to provide a thread local id. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_nir.c | 1 + 1 file

[Mesa-dev] [PATCH 07/11] i965: Add uniform to hold the CS thread ID base

2016-05-24 Thread Jordan Justen
This thread ID will be used to compute the gl_LocalInvocationIndex and gl_LocalInvocationID values. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_compiler.h | 1 + src/mesa/drivers/dri/i965/brw_cs.c | 16 +--- src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH 11/11] squash i965: Remove old CS local ID handling

2016-05-24 Thread Jordan Justen
The old method pushed data for each channels uvec3 data of gl_LocalInvocationID. The new method pushes 1 dword of data that is a 'thread local ID' value. Based on that value, we can generate gl_LocalInvocationIndex and gl_LocalInvocationID with some simple calculations. Signed-off-by: Jordan Just

[Mesa-dev] [PATCH 08/11] squash-fwd i965/cs: Add CS push constant structure

2016-05-24 Thread Jordan Justen
We need information about push constants in two state atoms, so we calculated roughly the same information twice. When we add support for uploading both a common (cross-thread) set of push constants, combined with the previous per-thread push constant data, things are going to get even more compli

[Mesa-dev] [PATCH 09/11] squash i965: Use struct push_const_info and support cross-thread constants

2016-05-24 Thread Jordan Justen
The cross thread constant support appears on Haswell. It allows us to upload a set of uniform data for all threads without duplicating it per thread. We also support per-thread data which allows us to store a per-thread ID in one of the uniforms that can be used to calculate the gl_LocalInvocation

[Mesa-dev] [PATCH 0/2] scons 2.5.0 support

2016-05-24 Thread Giuseppe Bilotta
The main patch is the second, the first is just a cleanup of EOL whitespace. Giuseppe Bilotta (2): scons: whitespace cleanup scons: support 2.5.0 SConstruct| 4 ++-- scons/custom.py | 9 - src/gallium/SConscript

[Mesa-dev] [PATCH 1/2] scons: whitespace cleanup

2016-05-24 Thread Giuseppe Bilotta
--- SConstruct| 4 ++-- src/gallium/SConscript| 2 +- src/gallium/auxiliary/SConscript | 10 +- src/gallium/drivers/svga/SConscript | 2 +- src/gallium/state_trackers/wgl/SConscript | 2 +- src/gallium/targets/libgl-gdi

[Mesa-dev] [PATCH 2/2] scons: support 2.5.0

2016-05-24 Thread Giuseppe Bilotta
The get_implicit_deps changed in SCons 2.5, expecting a callable rather than a path as third argument. Detect the SCons versions and set the argument appropriately to support both 2.5 and earlier versions. This closes #95211. --- scons/custom.py | 9 - 1 file changed, 8 insertions(+), 1 d

Re: [Mesa-dev] [PATCH] gbm: add pthread on libgbm LD_FLAGS

2016-05-24 Thread Emil Velikov
On 24 May 2016 at 09:21, Alejandro Piñeiro wrote: > If not, mesa building fails with the following errors: > /mesa/src/gbm/../../include/c11/threads_posix.h:189: undefined reference to > `pthread_mutexattr_init' > /mesa/src/gbm/../../include/c11/threads_posix.h:190: undefined reference to > `pth

Re: [Mesa-dev] [PATCH] gbm: add pthread on libgbm LD_FLAGS

2016-05-24 Thread Alejandro Piñeiro
On 24/05/16 10:58, Emil Velikov wrote: > On 24 May 2016 at 09:21, Alejandro Piñeiro wrote: >> If not, mesa building fails with the following errors: >> /mesa/src/gbm/../../include/c11/threads_posix.h:189: undefined reference to >> `pthread_mutexattr_init' >> /mesa/src/gbm/../../include/c11/thre

[Mesa-dev] [PATCH] c11/threads: resolve link issues with -O0

2016-05-24 Thread Emil Velikov
From: Emil Velikov Add weak symbol notation for the pthread_mutexattr* symbols, thus making the linker happy. When building with -O1 or greater the optimiser will kick in and remove the said functions as they are dead/unreachable code. Ideally we'll enable the optimisations locally, yet that doe

Re: [Mesa-dev] [PATCH 2/2] scons: support 2.5.0

2016-05-24 Thread Emil Velikov
[Adding Jose] On 24 May 2016 at 09:43, Giuseppe Bilotta wrote: > The get_implicit_deps changed in SCons 2.5, expecting a callable rather > than a path as third argument. Detect the SCons versions and set the > argument appropriately to support both 2.5 and earlier versions. > > This closes #95211

Re: [Mesa-dev] [PATCH 2/2] scons: support 2.5.0

2016-05-24 Thread Giuseppe Bilotta
On Tue, May 24, 2016 at 2:13 PM, Emil Velikov wrote: > [Adding Jose] [Wait, I thought I did? Or did I get the email address wrong? > On 24 May 2016 at 09:43, Giuseppe Bilotta wrote: >> This closes #95211. > For the future please use the full URL. Ack. Sorry, used to LibreOffice where one can j

Re: [Mesa-dev] [PATCH] c11/threads: resolve link issues with -O0

2016-05-24 Thread Rob Herring
On Tue, May 24, 2016 at 4:57 AM, Emil Velikov wrote: > From: Emil Velikov > > Add weak symbol notation for the pthread_mutexattr* symbols, thus making > the linker happy. When building with -O1 or greater the optimiser will > kick in and remove the said functions as they are dead/unreachable code

Re: [Mesa-dev] [PATCH] c11/threads: resolve link issues with -O0

2016-05-24 Thread Ilia Mirkin
On Tue, May 24, 2016 at 9:06 AM, Rob Herring wrote: > On Tue, May 24, 2016 at 4:57 AM, Emil Velikov > wrote: >> From: Emil Velikov >> >> Add weak symbol notation for the pthread_mutexattr* symbols, thus making >> the linker happy. When building with -O1 or greater the optimiser will >> kick in

Re: [Mesa-dev] [PATCH] c11/threads: resolve link issues with -O0

2016-05-24 Thread Ilia Mirkin
On Tue, May 24, 2016 at 9:15 AM, Rob Herring wrote: > On Tue, May 24, 2016 at 8:09 AM, Ilia Mirkin wrote: >> On Tue, May 24, 2016 at 9:06 AM, Rob Herring wrote: >>> On Tue, May 24, 2016 at 4:57 AM, Emil Velikov >>> wrote: From: Emil Velikov Add weak symbol notation for the pthr

Re: [Mesa-dev] [PATCH] c11/threads: resolve link issues with -O0

2016-05-24 Thread Rob Herring
On Tue, May 24, 2016 at 8:09 AM, Ilia Mirkin wrote: > On Tue, May 24, 2016 at 9:06 AM, Rob Herring wrote: >> On Tue, May 24, 2016 at 4:57 AM, Emil Velikov >> wrote: >>> From: Emil Velikov >>> >>> Add weak symbol notation for the pthread_mutexattr* symbols, thus making >>> the linker happy. Whe

Re: [Mesa-dev] [PATCH] c11/threads: resolve link issues with -O0

2016-05-24 Thread Rob Clark
On Tue, May 24, 2016 at 9:17 AM, Ilia Mirkin wrote: > On Tue, May 24, 2016 at 9:15 AM, Rob Herring wrote: >> On Tue, May 24, 2016 at 8:09 AM, Ilia Mirkin wrote: >>> On Tue, May 24, 2016 at 9:06 AM, Rob Herring wrote: On Tue, May 24, 2016 at 4:57 AM, Emil Velikov wrote: > From: E

Re: [Mesa-dev] [PATCH v2 3/3] gallium: push offset down to driver

2016-05-24 Thread Stanimir Varbanov
Hi Emil, On 05/21/2016 11:20 AM, Emil Velikov wrote: > Hi Stan, > > First, thanks for re-spinning these according to my suggestions. Thanks for the comments! > > On 20 May 2016 at 12:17, Stanimir Varbanov > wrote: >> Push offset down to drivers when importing dmabuf. This is needed >> to mor

Re: [Mesa-dev] [PATCH 01/21] i965/eu: Define alternative interface for setting compression and group controls.

2016-05-24 Thread Michael Schellenberger
Hi curro, Am 24.05.2016 um 09:18 schrieb Francisco Jerez: > This implements some simple helper functions that can be used to > specify the group of channel enable signals and compression enable > that apply to a brw_inst instruction. > > It's intended to replace brw_set_default_compression_control

  1   2   >