Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Ilia Mirkin
On Fri, Mar 23, 2018 at 8:51 PM, Marek Olšák wrote: > diff --git a/src/gallium/include/pipe/p_state.h > b/src/gallium/include/pipe/p_state.h >> >> index 4dce399f84..913a79faee 100644 >> --- a/src/gallium/include/pipe/p_state.h >> +++ b/src/gallium/include/pipe/p_state.h >> @@

Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Marek Olšák
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h > index 4dce399f84..913a79faee 100644 > --- a/src/gallium/include/pipe/p_state.h > +++ b/src/gallium/include/pipe/p_state.h > @@ -113,6 +113,7 @@ struct pipe_rasterizer_state > unsigned line_smooth:1; >

[Mesa-dev] [PATCH shaderdb] run: shader program file created via GetProgramBinary (v5)

2018-03-23 Thread Dongwon Kim
With optin '-b', shader-db now generates a shader program binary file using GetProgramBinary(). This shader program binary can be loaded via ProgramBinary() to be executed by an application later. v2: 1. define MAX_LOG_LEN and use it as the size of gl log 2. define MAX_PROG_SIZE and use it as

Re: [Mesa-dev] [PATCH shader-db 4/4] run: handling binding of attribute variable name

2018-03-23 Thread Dongwon Kim
I realized this model won't work with parellel execution. I will fix it and post another version shortly. On Wed, Mar 14, 2018 at 03:15:20PM -0700, Kenneth Graunke wrote: > On Friday, March 9, 2018 2:28:36 PM PDT Dongwon Kim wrote: > > Optional binding of variables can be processed before linking

Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Marek Olšák
On Fri, Mar 23, 2018 at 8:54 PM, Ilia Mirkin wrote: > On Fri, Mar 23, 2018 at 8:51 PM, Marek Olšák wrote: > > diff --git a/src/gallium/include/pipe/p_state.h > > b/src/gallium/include/pipe/p_state.h > >> > >> index 4dce399f84..913a79faee 100644 > >> ---

Re: [Mesa-dev] [PATCH 5/6] i965/vec4: Propagate conditional modifiers from compares to adds

2018-03-23 Thread Alejandro Piñeiro
On 22/03/18 19:05, Ian Romanick wrote: > On 03/22/2018 01:12 AM, Alejandro Piñeiro wrote: >> Any reason to not add tests on test_vec4_cmod_propagation as the fs >> equivalent did? > Laziness. :) Ok, I guess that those could be added later on a different patch, independently of this one. >> Also,

Re: [Mesa-dev] [PATCH] mesa: readpixels add support for GL_HALF_FLOAT

2018-03-23 Thread Tapani Pälli
On 03/23/2018 07:54 AM, Lin, Johnson wrote: So the solution will be query if EXT_color_buffer_half_float is supported? I think I found a proof that we don't actually need anything. Spec for EXT_color_buffer_float adds following text: --- 8< --- An INVALID_OPERATION error is generated ...

[Mesa-dev] Mixed endianness with OpenCL

2018-03-23 Thread Bas Vermeulen
Hi, I have the following situation: A PowerPC (T2080) big endian CPU with an AMD E8860 (little endian) PCIe graphics card. I have modified the radeonsi gallium driver to allow execution on big endian (there was a union with bitfields and an uint32_t index where the index was out of range because

Re: [Mesa-dev] [PATCH 1/6] i965: Add negative_equals methods

2018-03-23 Thread Alejandro Piñeiro
On 22/03/18 19:08, Ian Romanick wrote: > On 03/22/2018 01:12 AM, Alejandro Piñeiro wrote: >> Looks good in general, just a comment below. >> >> >> On 22/03/18 01:58, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> This method is similar to the existing ::equals

Re: [Mesa-dev] [PATCH mesa] meson/configure: detect endian.h instead of trying to guess when it's available

2018-03-23 Thread Tapani Pälli
On 03/21/2018 08:55 PM, Eric Engestrom wrote: On March 21, 2018 6:47:48 PM UTC, Dylan Baker wrote: Quoting Emil Velikov (2018-03-21 10:53:08) On 21 March 2018 at 17:09, Eric Engestrom wrote: Cc: Maxin B. John Cc:

[Mesa-dev] [PATCH v3 5/8] freedreno: a2xx: Support TEXTURE_RECT

2018-03-23 Thread Wladimir J. van der Laan
Denormalized texture coordinates are required for text rendering in GALLIUM_HUD. Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_compiler.c | 3 ++- src/gallium/drivers/freedreno/a2xx/ir-a2xx.c

[Mesa-dev] [PATCH v3 8/8] freedreno: a2xx: Implement DP2 instruction

2018-03-23 Thread Wladimir J. van der Laan
Use DOT2ADDv instruction with 0.0f constant add. Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_compiler.c | 21 + 1 file changed, 21 insertions(+) Change since v2:

[Mesa-dev] [PATCH v3 6/8] freedreno: a2xx: Compressed textures support

2018-03-23 Thread Wladimir J. van der Laan
Add support for: - PIPE_FORMAT_ETC1_RGB8 - PIPE_FORMAT_DXT1_RGB - PIPE_FORMAT_DXT1_RGBA - PIPE_FORMAT_DXT3_RGBA - PIPE_FORMAT_DXT5_RGBA Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_util.c |

[Mesa-dev] [PATCH v3 2/8] freedreno: a2xx: Change use of BLEND_ to BLEND2_

2018-03-23 Thread Wladimir J. van der Laan
Change use of BLEND_ to BLEND2_, BLEND_* a3xx_rb_blend_opcode BLEND2_* is a2xx_rb_blend_opcode This makes no effective difference as the used enumerant has the same value (0), but the other enumerants do not match 1-to-1 so this will avoid future problems. Signed-off-by: Wladimir J. van

[Mesa-dev] [PATCH v3 0/8] freedreno: a2xx improvements

2018-03-23 Thread Wladimir J. van der Laan
While working on a205 support for i.MX51/53, I've also written some patches that are not specific to a20x but should apply to the whole a2xx range. As I'm figuring out how to handle backward compatibility to other a2xx, I think it makes sense to send these upstream already to reduce the patch

[Mesa-dev] [PATCH v3 7/8] freedreno: a2xx: implement SEQ/SNE instructions

2018-03-23 Thread Wladimir J. van der Laan
Extend translate_sge_slt to emit these, in analogous fashion but using CNDEv. Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_compiler.c | 23 --- 1 file changed, 20

[Mesa-dev] [PATCH v3 4/8] freedreno: a2xx: Prevent crash in emit_texture if view is not set

2018-03-23 Thread Wladimir J. van der Laan
Textures will sometimes be updated if texture view state was un-set, without this change that causes an assertion crash or segfault. Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 13

[Mesa-dev] [PATCH v3 1/8] freedreno: a2xx: Update rnndb header for formats enumeration

2018-03-23 Thread Wladimir J. van der Laan
The format enumeration comes comes from the yamoto register headers that are part of the amd-gpu kernel driver. (see freedreno envytools commit 1b32c444f82cd7144d71602106462f59f146c1d0) Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin ---

Re: [Mesa-dev] [PATCH] nir/lower_vec_to_movs: Don't coalesce the mmove when src and dest are the same reg

2018-03-23 Thread Tapani Pälli
ping Jason .. On 22.03.2018 13:30, vadym.shovkoplias wrote: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105440 Fixes: 2458ea95c56 "nir/lower_vec_to_movs: Coalesce movs on-the-fly when possible" Signed-off-by: Andriy Khulap Signed-off-by: Vadym

[Mesa-dev] [PATCH] fix gcc 8 parenthesis warning

2018-03-23 Thread Marc Dietrich
fixes warnings like this: [184/1137] Compiling C++ object 'src/compiler/glsl/glsl@sta/lower_jumps.cpp.o'. In file included from ../src/mesa/main/mtypes.h:48, from ../src/compiler/glsl_types.h:149, from ../src/compiler/glsl/lower_jumps.cpp:59:

Re: [Mesa-dev] [PATCH] mesa: readpixels add support for GL_HALF_FLOAT

2018-03-23 Thread Alejandro Piñeiro
On 23/03/18 09:58, Tapani Pälli wrote: > > On 03/23/2018 07:54 AM, Lin, Johnson wrote: >> So the solution will be query if EXT_color_buffer_half_float is >> supported? > > I think I found a proof that we don't actually need anything. Spec for > EXT_color_buffer_float adds following text: > > ---

Re: [Mesa-dev] [PATCH] fix gcc 8 parenthesis warning

2018-03-23 Thread Emil Velikov
On 23 March 2018 at 10:01, Marc Dietrich wrote: > fixes warnings like this: > [184/1137] Compiling C++ object > 'src/compiler/glsl/glsl@sta/lower_jumps.cpp.o'. > In file included from ../src/mesa/main/mtypes.h:48, > from ../src/compiler/glsl_types.h:149, >

[Mesa-dev] [PATCH] compiler: glsl: silence valgrind warning on write cache

2018-03-23 Thread Lionel Landwerlin
I don't think it actually fixes anything, but that's nice not to have valgrind warnings. It manifests itself when running the piglit test : glsl-fs-raytrace-bug27060 ==2058== Uninitialised byte(s) found during client check request ==2058==at 0xC5BB040: blob_write_bytes (blob.c:152) ==2058==

Re: [Mesa-dev] [PATCH] fix gcc 8 parenthesis warning

2018-03-23 Thread Eric Engestrom
On Friday, 2018-03-23 11:01:23 +0100, Marc Dietrich wrote: > fixes warnings like this: > [184/1137] Compiling C++ object > 'src/compiler/glsl/glsl@sta/lower_jumps.cpp.o'. > In file included from ../src/mesa/main/mtypes.h:48, > from ../src/compiler/glsl_types.h:149, >

Re: [Mesa-dev] [PATCH mesa] meson/configure: detect endian.h instead of trying to guess when it's available

2018-03-23 Thread Eric Engestrom
On Friday, 2018-03-23 09:33:39 +, Eric Engestrom wrote: > > > On March 23, 2018 9:21:25 AM UTC, "Tapani Pälli" > wrote: > > > > > > On 03/21/2018 08:55 PM, Eric Engestrom wrote: > > > > > > > > > On March 21, 2018 6:47:48 PM UTC, Dylan Baker

Re: [Mesa-dev] [PATCH] mesa: readpixels add support for GL_HALF_FLOAT

2018-03-23 Thread Tapani Pälli
On 23.03.2018 12:18, Alejandro Piñeiro wrote: On 23/03/18 09:58, Tapani Pälli wrote: On 03/23/2018 07:54 AM, Lin, Johnson wrote: So the solution will be query if EXT_color_buffer_half_float is supported? I think I found a proof that we don't actually need anything. Spec for

Re: [Mesa-dev] [PATCH v1 0/7] Implement commont gralloc_handle_t in libdrm

2018-03-23 Thread Tomasz Figa
On Fri, Mar 23, 2018 at 8:52 PM, Robert Foss wrote: > Hey Chih-Wei, > > > On 03/23/2018 03:43 AM, Chih-Wei Huang wrote: >> >> 2018-03-22 16:23 GMT+08:00 Tomasz Figa : >>> >>> Hi Chih-Wei, >>> >>> On Thu, Feb 22, 2018 at 2:53 PM, Chih-Wei Huang

Re: [Mesa-dev] [PATCH mesa] meson/configure: detect endian.h instead of trying to guess when it's available

2018-03-23 Thread Eric Engestrom
On March 23, 2018 9:21:25 AM UTC, "Tapani Pälli" wrote: > > > On 03/21/2018 08:55 PM, Eric Engestrom wrote: > > > > > > On March 21, 2018 6:47:48 PM UTC, Dylan Baker > wrote: > >> Quoting Emil Velikov (2018-03-21 10:53:08) > >>> On 21 March 2018

Re: [Mesa-dev] [PATCH v1 0/7] Implement commont gralloc_handle_t in libdrm

2018-03-23 Thread Robert Foss
Hey Chih-Wei, On 03/23/2018 03:43 AM, Chih-Wei Huang wrote: 2018-03-22 16:23 GMT+08:00 Tomasz Figa : Hi Chih-Wei, On Thu, Feb 22, 2018 at 2:53 PM, Chih-Wei Huang wrote: 2018-02-21 3:03 GMT+08:00 Rob Herring : Perhaps worth

[Mesa-dev] [PATCH v3 3/8] freedreno: a2xx: Fix fd2_tex_swiz

2018-03-23 Thread Wladimir J. van der Laan
Compose swizzles using util_format_compose_swizzles instead of the custom code (which somehow had a bug). This makes the GL_ALPHA internal format work. Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin ---

Re: [Mesa-dev] [PATCH] fix several maybe uninitialized variable errors

2018-03-23 Thread Eric Engestrom
On Friday, 2018-03-23 12:15:42 +0100, Marc Dietrich wrote: > Mostly false warnings, however AVX detection could have been problematic. Thanks, but could you split this into one patch per logical change? (In this case, that's one patch per file you changed) > > Signed-off-by: Marc Dietrich

[Mesa-dev] [PATCH] fix several maybe uninitialized variable errors

2018-03-23 Thread Marc Dietrich
Mostly false warnings, however AVX detection could have been problematic. Signed-off-by: Marc Dietrich --- src/compiler/spirv/vtn_subgroup.c| 2 ++ src/gallium/auxiliary/util/u_cpu_detect.c| 35 ++-- src/gallium/auxiliary/vl/vl_vlc.h

Re: [Mesa-dev] [PATCH] compiler: glsl: silence valgrind warning on write cache

2018-03-23 Thread Tapani Pälli
No good to have random data in serialized nir; Reviewed-by: Tapani Pälli On 23.03.2018 12:48, Lionel Landwerlin wrote: I don't think it actually fixes anything, but that's nice not to have valgrind warnings. It manifests itself when running the piglit test :

Re: [Mesa-dev] [PATCH 08/11] i965: perf: snapshot RPSTAT1 register

2018-03-23 Thread Kenneth Graunke
On Thursday, March 8, 2018 7:42:53 AM PDT Lionel Landwerlin wrote: > This register contains the frequency of the GT, it's one of the value > GPA would like to have as part of their queries. > > Signed-off-by: Lionel Landwerlin > --- >

Re: [Mesa-dev] [PATCH] nir/lower_vec_to_movs: Don't coalesce the mmove when src and dest are the same reg

2018-03-23 Thread Jason Ekstrand
After giving it some thought, I don't think this patch is quite strong enough to fix the real bug. The problem isn't that we're reswizzling a register. The problem is that we're trying to coalesce something like ssa_1 = fadd r1, r2 /* Some stuff */ r3 = vec4(ssa_1, ssa_1.y, ...) coalescing

Re: [Mesa-dev] [PATCH mesa] meson: fix header check message

2018-03-23 Thread Emil Velikov
On 23 March 2018 at 17:51, Eric Engestrom wrote: > before: Checking if "endian.h works" compiles: YES > after: Checking if "endian.h" compiles: YES > > Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov

Re: [Mesa-dev] [PATCH 1/6] i965: Add negative_equals methods

2018-03-23 Thread Matt Turner
On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: > From: Ian Romanick > > This method is similar to the existing ::equals methods. Instead of > testing that two src_regs are equal to each other, it tests that one is > the negation of the

Re: [Mesa-dev] [PATCH 5/6] i965/vec4: Propagate conditional modifiers from compares to adds

2018-03-23 Thread Matt Turner
Would be really good to extend the vec4 tests too. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH mesa] meson: fix header check message

2018-03-23 Thread Eric Engestrom
before: Checking if "endian.h works" compiles: YES after: Checking if "endian.h" compiles: YES Signed-off-by: Eric Engestrom --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

[Mesa-dev] [PATCH] nir/lower_vec_to_movs: Only coalesce if the vec had a SSA destination

2018-03-23 Thread Jason Ekstrand
Otherwise we may end up trying to coalesce in a case such as ssa_1 = fadd r1, r2 r3.x = fneg(r2); r3 = vec4(ssa_1, ssa_1.y, ...) and that would cause us to move the writes to r3 from the vec to the fadd which would re-order them with respect to the write from the fneg. In order to solve this, we

[Mesa-dev] [PATCH v3 03/19] glsl: add packed for struct types

2018-03-23 Thread Karol Herbst
We need this for OpenCL kernels because we have to apply C rules for alignment and padding inside structs and for this we also have to know if a struct is packed or not. Signed-off-by: Karol Herbst --- src/compiler/glsl_types.cpp | 17 +++--

[Mesa-dev] [PATCH v3 08/19] nir/vtn: import OpenCL.std.h

2018-03-23 Thread Karol Herbst
From: Rob Clark Lightly edited to be valid 'C' code. Is there a bug open to fix this upstream? Signed-off-by: Rob Clark Signed-off-by: Karol Herbst --- src/compiler/spirv/OpenCL.std.h | 211

[Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Karol Herbst
From: Rob Clark An attempt to add physical pointer support to vtn. I'm not totally happy about the handling of logical pointers vs physical pointers. So this is really more of an RFS (request for suggestions) v2: treat vec3 types as vec4 when dereferencing Signed-off-by:

[Mesa-dev] [PATCH v3 12/19] nir: specify bit_size when loading system values

2018-03-23 Thread Karol Herbst
With OpenCL the size of some system value depends on the Physical model choosen, so we need a way to load any system value as 32 or 64 bit. Signed-off-by: Karol Herbst --- src/compiler/nir/nir_builder.h | 10 +--- src/compiler/nir/nir_lower_alpha_test.c

[Mesa-dev] [PATCH v3 10/19] RFC: nir/vtn: handle constant builtins from kernels

2018-03-23 Thread Karol Herbst
With SPIR-V it is perfectly fine to declare builtins as constants and have no constant initializer on them. This change seems to be able to break Vulkan shaders, so please check if this is the correct thing here. Signed-off-by: Karol Herbst ---

[Mesa-dev] [PATCH v3 07/19] nir/vtn: print extension name in fail msg

2018-03-23 Thread Karol Herbst
From: Rob Clark Signed-off-by: Rob Clark Signed-off-by: Karol Herbst --- src/compiler/spirv/spirv_to_nir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/spirv/spirv_to_nir.c

[Mesa-dev] [PATCH v3 13/19] nir/vtn: Handle OpInBoundsPtrAccessChain

2018-03-23 Thread Karol Herbst
From: Rob Clark Signed-off-by: Karol Herbst --- src/compiler/spirv/spirv_to_nir.c | 1 + src/compiler/spirv/vtn_variables.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c

[Mesa-dev] [PATCH v3 11/19] nir/vtn: pointers can point to cross_workgroup or local memory as well

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/spirv/vtn_variables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 80fca6e8a32..51f73b3cf8c 100644 ---

[Mesa-dev] [PATCH 3/5] radeonsi: move FMASK shader logic to shared code

2018-03-23 Thread Marek Olšák
From: Marek Olšák We'll need it for FBFETCH in both TGSI and NIR paths. --- src/amd/common/ac_llvm_build.c| 56 + src/amd/common/ac_llvm_build.h| 3 + src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c | 74

Re: [Mesa-dev] [PATCH] configure: use AC_CHECK_HEADERS to check for endian.h

2018-03-23 Thread Eric Engestrom
On Friday, 2018-03-23 17:44:21 +, Emil Velikov wrote: > From: Emil Velikov > > The currently we use the singular CHECK_HEADER combined with explicit > append to the DEFINES variable. That is a legacy misnomer, since it > requires us to add $DEFINES to every

Re: [Mesa-dev] [PATCH 6/6] nir: Don't condition 'a-b < 0' -> 'a < b' on is_not_used_by_conditional

2018-03-23 Thread Matt Turner
On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: > From: Ian Romanick > > Now that i965 recognizes that a-b generates the same conditions as 'a < > b', there is no reason to condition this transformation on 'is not used > by conditional.' > >

[Mesa-dev] [PATCH 1/3] mesa: When copying a VAO also copy the vertex attribute mode.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/attrib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 9d3aa728a1..9c632ffb51 100644 ---

[Mesa-dev] [PATCH 3/3] vbo: Make sure the internal VAO's stay within limits.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_draw.c | 5 - src/mesa/vbo/vbo_save_api.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/vbo/vbo_exec_draw.c

Re: [Mesa-dev] [PATCH 1/6] i965: Add negative_equals methods

2018-03-23 Thread Chema Casanova
On 23/03/18 19:27, Matt Turner wrote: > On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> This method is similar to the existing ::equals methods. Instead of >> testing that two src_regs are equal to each other, it

[Mesa-dev] [PATCH v3 05/19] RFC glsl: add cl_size and cl_alignment

2018-03-23 Thread Karol Herbst
v2: fix cl_size for arrays_of_arrays Signed-off-by: Karol Herbst --- src/compiler/glsl_types.cpp | 48 + src/compiler/glsl_types.h | 10 ++ src/compiler/nir_types.cpp | 12 src/compiler/nir_types.h| 4

[Mesa-dev] [PATCH v3 04/19] glsl: add glsl_base_get_byte_size

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/glsl_types.h | 34 ++ src/compiler/nir_types.h | 30 +- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/compiler/glsl_types.h

[Mesa-dev] [PATCH v3 01/19] nir: add load/store_global intrinsics

2018-03-23 Thread Karol Herbst
OpenCL kernels have raw pointers to global memory, so we need instructions to load/store in order to dereference these pointers. In some ways similar to other load/store intrinsics, but rather than taking an offset as a src argument, they take a raw pointer value (which can be 32b or 64b depending

[Mesa-dev] [PATCH v3 02/19] vtn: handle SpvExecutionModelKernel

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/spirv/spirv_to_nir.c | 3 +++ src/compiler/spirv/vtn_private.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 7ce7e9ba62e..edf02db584b 100644 ---

[Mesa-dev] [PATCH v3 00/19] nir/vtn/compiler: first batch of compute support

2018-03-23 Thread Karol Herbst
second series here: https://lists.freedesktop.org/archives/mesa-dev/2018-March/188218.html Main difference to the last series is, that I tried to focus on the real core pars we need to get basic OpenCL support in spirv_to_nir, so that we can run more or less complex examples. There are some

[Mesa-dev] [PATCH 5/5] radeonsi: implement GL_KHR_blend_equation_advanced

2018-03-23 Thread Marek Olšák
From: Marek Olšák MSAA is supported using sample shading. Layered rendering and all texture targets are also supported. --- docs/features.txt | 2 +- docs/relnotes/18.1.0.html | 1 +

[Mesa-dev] [PATCH 2/5] radeonsi: add R600_DEBUG=nofmask to disable MSAA compression

2018-03-23 Thread Marek Olšák
From: Marek Olšák For testing. --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/gallium/drivers/radeon/r600_texture.c | 13 +++-- src/gallium/drivers/radeonsi/si_pipe.c| 1 + src/gallium/drivers/radeonsi/si_pipe.h| 1 +

[Mesa-dev] [PATCH v3 19/19] RFC: nir/vtn: member in struct deref

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/spirv/vtn_private.h | 5 +++-- src/compiler/spirv/vtn_variables.c | 14 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index

[Mesa-dev] [PATCH v3 14/19] nir/vtn/opencl: support fma

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/spirv/vtn_opencl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c index 3c5ecd22452..723a7edf9c2 100644 --- a/src/compiler/spirv/vtn_opencl.c +++

[Mesa-dev] [PATCH v3 16/19] nir: add load_kernel_param

2018-03-23 Thread Karol Herbst
OpenCL kernels have parameters (see pipe_grid_info::input), and so we need a way to access them. The offset source is the offset of the parameter to load in the kernel input buffer. v2: improve commit message remove BASE split lower_io changes into separate commit Signed-off-by: Karol

[Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-23 Thread Karol Herbst
From: Rob Clark If local_size is not known at compile time, which is the case with clover, use the load_local_group_size intrinsic instead. Signed-off-by: Karol Herbst --- src/compiler/nir/nir_lower_system_values.c | 25 + 1

[Mesa-dev] [PATCH v3 09/19] nir/vtn: initial OpenCL.std extension

2018-03-23 Thread Karol Herbst
From: Rob Clark Not complete, mostly just adding things as I encounter them in CTS. But not getting far enough yet to hit most of the OpenCL.std instructions. v2: update hadd definition (Karol Herbst ) Signed-off-by: Rob Clark

[Mesa-dev] [PATCH v3 18/19] nir: kernel entrypoints can have arguments

2018-03-23 Thread Karol Herbst
From: Rob Clark This assert is not valid for OpenCL kernels. TODO can we somehow conditionally assert based on glsl vs cl?? Signed-off-by: Rob Clark Signed-off-by: Karol Herbst --- src/compiler/nir/nir.h | 1 - 1 file changed, 1

[Mesa-dev] [PATCH 4/5] radeonsi: rename unpack_param -> si_unpack_param

2018-03-23 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 54 +++ src/gallium/drivers/radeonsi/si_shader_internal.h | 4 ++ 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c

[Mesa-dev] [PATCH 0/5] KHR_blend_equation_advanced for RadeonSI

2018-03-23 Thread Marek Olšák
Hi, This is the second and fianl version, and it adds MSAA support and FBFETCH tests into Gallium. Please review. Thanks, Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH v3 17/19] RFC nir/lower_io: lower kernel entry param load_vars to load_kernel_param

2018-03-23 Thread Karol Herbst
For OpenCL kernels we have an input buffer where most of the parameters are stored. For this we have to keep track of alignment and padding rules to correctly identify the offset of each parameter inside that buffer. For this we can just rely on the new cl_size and cl_alignment glsl_type

[Mesa-dev] [PATCH 1/5] gallium/u_tests: test FBFETCH and shader-based blending with MSAA

2018-03-23 Thread Marek Olšák
From: Marek Olšák --- src/gallium/auxiliary/util/u_tests.c | 168 ++- 1 file changed, 128 insertions(+), 40 deletions(-) diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 86eee6e68b1..293a4580a9f

Re: [Mesa-dev] [PATCH] st/mesa: silence unhandled switch case warning

2018-03-23 Thread Mathias Fröhlich
On Thursday, 22 March 2018 16:23:41 CET Brian Paul wrote: > And improve the unreachable() error message. Sure: Reviewed-by: Mathias Fröhlich best Mathias > --- > src/mesa/state_tracker/st_glsl_types.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

Re: [Mesa-dev] [PATCH 4/6] i965/vec4: Allow cmod propagation when src0 is a uniform or shader input

2018-03-23 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 3/6] i965/fs: Propagate conditional modifiers from compares to adds

2018-03-23 Thread Matt Turner
Really nice, and thanks a lot for extending the unit tests. I've been very happy with them, and they make me feel a lot more confident about the code. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 0/3] A fix and some asserts around the VAO changes.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Following one fix and a set of asserts in the VAO area. The changes already passed intels CI system. Please review Thanks and best Mathias Mathias Fröhlich (3): mesa: When copying a VAO also copy the vertex attribute mode. mesa: Flag

[Mesa-dev] [PATCH 2/3] mesa: Flag early if we modify a SharedAndImmutable VAO.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/varray.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 69a08a646f..5df38a14f0 100644 ---

Re: [Mesa-dev] [PATCH 0/3] A fix and some asserts around the VAO changes.

2018-03-23 Thread Brian Paul
On 03/23/2018 12:39 PM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich Hi, Following one fix and a set of asserts in the VAO area. The changes already passed intels CI system. Please review Thanks and best Mathias Mathias Fröhlich (3): mesa: When

Re: [Mesa-dev] [PATCH 2/6] i965/fs: Allow cmod propagation when src0 is a uniform or shader input

2018-03-23 Thread Matt Turner
Good call. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 105699] s3tc fbo-generatemipmap-formats tests fail unless optimized

2018-03-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105699 --- Comment #2 from Mark Janes --- Agreed. I was hoping it was weird enough to pique your interest. -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the

Re: [Mesa-dev] [PATCH v3 12/19] nir: specify bit_size when loading system values

2018-03-23 Thread Karol Herbst
On Fri, Mar 23, 2018 at 9:15 PM, Jason Ekstrand wrote: > On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: >> >> With OpenCL the size of some system value depends on the Physical model >> choosen, so we need a way to load any system value as 32 or 64

[Mesa-dev] [PATCH] i965/vec4: Fix null destination register in 3-source instructions

2018-03-23 Thread Ian Romanick
From: Ian Romanick A recent commit (see below) triggered some cases where conditional modifier propagation and dead code elimination would cause a MAD instruction like the following to be generated: mad.l.f0 null, ... Matt pointed out that

Re: [Mesa-dev] [PATCH 1/6] i965: Add negative_equals methods

2018-03-23 Thread Ian Romanick
On 03/23/2018 12:17 PM, Chema Casanova wrote: > > > On 23/03/18 19:27, Matt Turner wrote: >> On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> This method is similar to the existing ::equals methods. Instead of

[Mesa-dev] [PATCH 48/61] spirv: Make push constants an offset-based pointer

2018-03-23 Thread Jason Ekstrand
Push constants have been a weird edge-case for a while in that they have explitic offsets but we've been internally building access chains for them. This mostly works but it means that passing pointers to push constants through as function arguments is broken. The easy thing to do for now is to

[Mesa-dev] [PATCH 49/61] spirv: Clean up vtn_pointer_to_offset

2018-03-23 Thread Jason Ekstrand
Now that push constants are using on-the-fly offsets, we no longer need to handle access chains in vtn_pointer_to_offset. --- src/compiler/spirv/spirv_to_nir.c | 2 +- src/compiler/spirv/vtn_private.h | 2 +- src/compiler/spirv/vtn_variables.c | 89 ++ 3

[Mesa-dev] [PATCH 29/61] nir: Support deref instructions in lower_clip_cull

2018-03-23 Thread Jason Ekstrand
--- .../nir/nir_lower_clip_cull_distance_arrays.c | 69 -- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c index 95eda82..69b31d5 100644 ---

[Mesa-dev] [PATCH 56/61] anv/pipeline: Convert lower_input_attachments to deref instructions

2018-03-23 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_lower_input_attachments.c | 31 +++--- src/intel/vulkan/anv_pipeline.c| 6 ++--- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c

Re: [Mesa-dev] [PATCH 00/61] nir: Move to using instructions for derefs

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 2:42 PM, Jason Ekstrand wrote: > This is something that Connor and I have been talking about for some time > now. The basic idea is to replace the current singly linked nir_deref list > with deref instructions. This is similar to what LLVM does and

[Mesa-dev] [PATCH 40/61] st/nir: Move lower_deref_instrs later

2018-03-23 Thread Jason Ekstrand
--- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 7d111d6..f62135a 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++

[Mesa-dev] [PATCH 41/61] spirv: Use deref instructions for most variables

2018-03-23 Thread Jason Ekstrand
The only thing still using old-school drefs are function calls. --- src/compiler/spirv/spirv_to_nir.c | 119 +++-- src/compiler/spirv/vtn_cfg.c | 8 +- src/compiler/spirv/vtn_glsl450.c | 19 ++-- src/compiler/spirv/vtn_private.h | 13 ++-

[Mesa-dev] [PATCH 60/61] intel/fs: Use image_deref intrinsics instead of image_var

2018-03-23 Thread Jason Ekstrand
Since we had to rewrite the deref walking loop anyway, I took the opportunity to make it a bit clearer and more efficient. In particular, in the AoA case, we will now emit one minmax instead of one per array level. --- src/intel/compiler/brw_fs.h | 2 +- src/intel/compiler/brw_fs_nir.cpp

[Mesa-dev] [PATCH 34/61] nir: Support deref instructions in lower_wpos_ytransform

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_wpos_ytransform.c | 51 +++- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 62166e7..6212702 100644 ---

[Mesa-dev] [PATCH 57/61] anv/pipeline: Convert YCbCr lowering to deref instructiosn

2018-03-23 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_lower_ycbcr_textures.c | 34 ++--- src/intel/vulkan/anv_pipeline.c | 6 ++--- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c

Re: [Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: > From: Rob Clark > > If local_size is not known at compile time, which is the case with > clover, use the load_local_group_size intrinsic instead. > > Signed-off-by: Karol Herbst

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Jason Ekstrand
+list On Fri, Mar 23, 2018 at 1:45 PM, Karol Herbst wrote: > On Fri, Mar 23, 2018 at 9:30 PM, Jason Ekstrand > wrote: > > As I've been rewriting core NIR deref handling, I've been thinking about > > this problem quite a bit. One objective I have is to

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 2:15 PM, Karol Herbst wrote: > On Fri, Mar 23, 2018 at 10:07 PM, Jason Ekstrand > wrote: > > +list > > > > On Fri, Mar 23, 2018 at 1:45 PM, Karol Herbst > wrote: > >> > >> On Fri, Mar 23, 2018 at 9:30 PM,

[Mesa-dev] [PATCH 02/61] nir: Return a cursor from nir_instr_remove

2018-03-23 Thread Jason Ekstrand
Because nir_instr_remove is an inline wrapper around nir_instr_remove_v, the compiler should be able to tell that the return value is unused and not emit the extra code in most cases. --- src/compiler/nir/nir.c| 2 +- src/compiler/nir/nir.h| 16

[Mesa-dev] [PATCH 05/61] intel/vec4: Set channel_sizes for MOV_INDIRECT sources

2018-03-23 Thread Jason Ekstrand
Otherwise, any indirect push constant access results in an assertion failure when we start digging through the channel_sizes array. This fixes dEQP-VK.pipeline.push_constant.graphics_pipeline.dynamic_index_vert on Haswell. It should be a harmless no-op for GL since indirect push constants aren't

[Mesa-dev] [PATCH 03/61] nir/vars_to_ssa: Remove copies from the correct set

2018-03-23 Thread Jason Ekstrand
Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/nir/nir_lower_vars_to_ssa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index e8cfe30..0cc6514 100644 ---

[Mesa-dev] [PATCH 04/61] nir/lower_indirect_derefs: Support interp_var_at intrinsics

2018-03-23 Thread Jason Ekstrand
This fixes the fs-interpolateAtCentroid-block-array piglit test on i965. Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/nir/nir_lower_indirect_derefs.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c

[Mesa-dev] [PATCH 07/61] nir: Add a deref instruction type

2018-03-23 Thread Jason Ekstrand
This commit adds a new instruction type to NIR for handling derefs. Nothing uses it yet but this adds the data structure as well as all of the code to validate, print, clone, and [de]serialize them. --- src/compiler/nir/nir.c| 50 +++ src/compiler/nir/nir.h

  1   2   >