[Mesa-dev] [PATCH 2/6] ac/nir: refactor out the fmask descriptor validation.

2018-03-19 Thread Dave Airlie
From: Dave Airlie This just moves this out for later reuse. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c

[Mesa-dev] radv storage image multisample support

2018-03-19 Thread Dave Airlie
This series does some refactoring and fixes to enable support for storage image multisample. It passes all the CTS tests except for some which look like possible test bugs (dEQP-VK.pipeline.multisample.storage_image.*r8g8b8a8_unorm*) This doesn't fix the image to image copies for multisample, but

[Mesa-dev] [PATCH 6/6] radv: enable shaderStorageImageMultisample

2018-03-19 Thread Dave Airlie
From: Dave Airlie This enables multisample shader storage images on radv. --- src/amd/vulkan/radv_device.c | 4 ++-- src/amd/vulkan/radv_formats.c | 3 +-- src/amd/vulkan/radv_shader.c | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src

[Mesa-dev] [PATCH 1/6] ac/nir: restrict fmask lookup to image load intrinsics.

2018-03-19 Thread Dave Airlie
From: Dave Airlie We don't ever want to do the fmask lookup on a atomic or store, the fmask should have been decompressed if the surface has been moved to IMAGE_LAYOUT --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/c

[Mesa-dev] [PATCH 3/6] spirv: add support for StorageImageMultisample capability.

2018-03-19 Thread Dave Airlie
From: Dave Airlie --- src/compiler/shader_info.h| 1 + src/compiler/spirv/spirv_to_nir.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 0eeb2ca58ea..f6f0734dfda 100644 --- a/src/compiler

[Mesa-dev] [PATCH 5/6] radv: handle arrays in the fmask descriptor.

2018-03-19 Thread Dave Airlie
From: Dave Airlie This fixes the fmask descriptor generation to handle 2d ms arrays. --- src/amd/vulkan/radv_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 5ac0f72589d..669001085bc 100644 --- a/src/amd

[Mesa-dev] [PATCH 4/6] radv: initialise fmask memory for images.

2018-03-19 Thread Dave Airlie
From: Dave Airlie If an image is going to be used as a storage image we want to make sure the fmask is initialised to the correct value. This initialises fmask on the undefined transition. --- src/amd/vulkan/radv_cmd_buffer.c | 36 1 file changed, 36

[Mesa-dev] [PATCH] radv: revert "only enable used channels when exporting parameters"

2018-03-18 Thread Dave Airlie
From: Dave Airlie This pretty much reverts: f3275ca01cddd5d1e999e3805eff42e06ce6e974 Author: Samuel Pitoiset Date: Thu Mar 1 11:54:22 2018 +0100 ac/nir: only enable used channels when exporting parameters To fix a regression in: dEQP

[Mesa-dev] [PATCH] radv: lower constant initializers on output variables earlier

2018-03-18 Thread Dave Airlie
From: Dave Airlie If a shader only writes to an output via a constant initializer we need to lower it before we call nir_remove_dead_variables so that this pass sees the stores from the initializer and doesn't kill the output. Fixes test failures in new work-in-progress CTS tests:

[Mesa-dev] [PATCH] radv/multiview: mark layer_input if we have input attachments.

2018-03-18 Thread Dave Airlie
From: Dave Airlie This fixes: dEQP-VK.multiview.input_attachments* --- src/amd/vulkan/radv_shader_info.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c index 7208bd2f587..9c18791524d 100644 --- a/src

[Mesa-dev] [PATCH 3/3] radv/query: handle multiview timestamp queries.

2018-03-18 Thread Dave Airlie
From: Dave Airlie For each view bit we need to emit a timestamp query. Fixes: dEQP-VK.multiview.queries* --- src/amd/vulkan/radv_query.c | 79 - 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/src/amd/vulkan/radv_query.c b/src/amd

[Mesa-dev] [PATCH 2/3] radv/query: handle multiview queries properly. (v3)

2018-03-18 Thread Dave Airlie
From: Dave Airlie For multiview we need to emit a number of sequential queries depending on the view mask. This avoids dEQP-VK.multiview.queries.15 waiting forever on the CPU for query results that are never coming. We only really want to emit one query, and the rest should be blank (amdvlk

[Mesa-dev] [PATCH 1/3] radv/query: split out begin/end query emission

2018-03-18 Thread Dave Airlie
From: Dave Airlie This just splits out the begin/end query hw emissions, it makes it easier to add multiview support for queries. --- src/amd/vulkan/radv_query.c | 98 ++--- 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a/src/amd/vulkan

Re: [Mesa-dev] [PATCH] radv/query: handle multiview queries properly. (v2)

2018-03-16 Thread Dave Airlie
On 16 March 2018 at 17:51, Samuel Pitoiset wrote: > > > On 03/16/2018 07:32 AM, Dave Airlie wrote: >> >> From: Dave Airlie >> >> For multiview we need to emit a number of sequential queries >> depending on the view mask. >> >> This avoids dEQ

[Mesa-dev] [PATCH] radv/query: handle multiview queries properly. (v2)

2018-03-15 Thread Dave Airlie
From: Dave Airlie For multiview we need to emit a number of sequential queries depending on the view mask. This avoids dEQP-VK.multiview.queries.15 waiting forever on the CPU for query results that are never coming. This doesn't make this test pass though, but I can now finish my CTS run

[Mesa-dev] [PATCH] radv: handle exporting view index to fragment shader.

2018-03-15 Thread Dave Airlie
From: Dave Airlie The fragment shader was trying to read this, but nothing was exporting it from the vertex shader. This handles it like the prim id export. Fixes: dEQP-VK.multiview.secondary_cmd_buffer.* dEQP-VK.multiview.index.fragment_shader.* Signed-off-by: Dave Airlie --- src/amd/vulkan

[Mesa-dev] [PATCH] radv/query: handle multiview queries properly.

2018-03-15 Thread Dave Airlie
From: Dave Airlie For multiview we need to emit a number of sequential queries depending on the view mask. This avoids dEQP-VK.multiview.queries.15 waiting forever on the CPU for query results that are never coming. This doesn't make this test pass though, but I can now finish my CT

Re: [Mesa-dev] [PATCH 04/50] glsl: Add "built-in" functions to do eq(fp64, fp64)

2018-03-14 Thread Dave Airlie
> Is a mix really warranted here? Could just use > return result && !(isaNaN || isbNaN) (since the other mix part is just > false I think mix is a bit overkill, albeit it might not really make a > difference). > Actually I think it should be simplified, you don't need to check both > vars for NaN (

Re: [Mesa-dev] [PATCH] configure: remove unneeded XCB_REQUIRED

2018-03-14 Thread Dave Airlie
On 15 March 2018 at 09:29, Andres Gomez wrote: > It is only used for dri3 and xcb-dri3 and xcb-present were already > mandating the minimal version, which is incoherent with the xcb one. We are in the middle of a thread discussing this area already, probably don't need this patch at this stage. L

Re: [Mesa-dev] [PATCH 1/2] autotools+dri3: allow building against older xcb (v4)

2018-03-14 Thread Dave Airlie
On 15 March 2018 at 03:25, Daniel Stone wrote: > Hi, > > On 14 March 2018 at 13:04, Rob Clark wrote: >> I'm not sure everyone wants to be updating their dri3 in a forced >> march setting, this allows a nicer approach, esp when you want >> to build on distro that aren't brand new. > > I don't have

Re: [Mesa-dev] [PATCH 0/2] V2: Use hash table cloning in copy propagation

2018-03-14 Thread Dave Airlie
On 14 March 2018 at 09:22, Thomas Helland wrote: > Sending out a v2 just in case someone has any more comments. > If not I'll probably push these tomorrow, or thursday. > > This is a revival of some old patches I had around to improve > the compile times in the glsl compiler by reducing the time >

[Mesa-dev] [PATCH 14/14] radv: drop geometry stride user sgpr.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This removes the other geometry specific user sgpr. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 37 +++-- src/amd/vulkan/radv_pipeline.c| 9 - src/amd/vulkan/radv_shader.h | 1 - 3 files changed, 19

[Mesa-dev] [PATCH 10/14] radv: use num_patches output from tcs shader.

2018-03-13 Thread Dave Airlie
From: Dave Airlie Instead of recalculating the value, use the shader calculated value. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_pipeline.c | 30 ++ 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd

[Mesa-dev] [PATCH 09/14] radv/tess: remove last chunk of tess sgprs

2018-03-13 Thread Dave Airlie
From: Dave Airlie This removes the last TES-specifc user sgpr. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 50 --- src/amd/vulkan/radv_pipeline.c| 18 ++ src/amd/vulkan/radv_shader.h | 4 ++-- 3 files changed, 19

[Mesa-dev] [PATCH 13/14] radv: get rid of geometry user sgpr for num entries.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This drops one of the geometry specific user sgprs, we can work this out at compile time. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 15 +++ src/amd/vulkan/radv_pipeline.c| 9 + 2 files changed, 8 insertions(+), 16 deletions

[Mesa-dev] [PATCH 12/14] radv: migrate lds size calculations to shader gen.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This moves the lds_size calcs into the shader so we have all the size stuff in one file. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 33 + src/amd/vulkan/radv_pipeline.c| 29 - src/amd

[Mesa-dev] [PATCH 11/14] radv: drop scanning the tess shader in the nir code.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This drops the now unneeded scanning and results in favour of the ones in the info. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 33 - src/amd/vulkan/radv_pipeline.c| 7 +++ src/amd/vulkan/radv_shader.h | 5

[Mesa-dev] [PATCH 08/14] radv: pass num_patches to tes from tcs

2018-03-13 Thread Dave Airlie
From: Dave Airlie TES needs num_patches to do some of the calculations. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 4 +++- src/amd/vulkan/radv_pipeline.c| 4 src/amd/vulkan/radv_shader.h | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH 04/14] radv/tess: drop tcs_in_layout setting completely.

2018-03-13 Thread Dave Airlie
From: Dave Airlie Inline all calcs at shader creation. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 26 +- src/amd/vulkan/radv_pipeline.c| 12 ++-- src/amd/vulkan/radv_shader.h | 1 + 3 files changed, 24 insertions(+), 15

[Mesa-dev] [PATCH 06/14] radv: drop tcs_out_offsets

2018-03-13 Thread Dave Airlie
From: Dave Airlie Move all calculations to shader generation. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 39 +++ src/amd/vulkan/radv_pipeline.c| 10 ++ 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 02/14] radv/shader_info: start gathering tess output info (v2)

2018-03-13 Thread Dave Airlie
From: Dave Airlie This gathers the ls outputs written by the vertex shader, and the tcs outputs, these are needed to calculate certain tcs parameters. These have to be separate for combined gfx9 shaders. This is a bit pessimistic compared to the nir pass, as we don't work out the indiv

[Mesa-dev] [PATCH 03/14] radv: drop ls_out_layout const.

2018-03-13 Thread Dave Airlie
From: Dave Airlie We can precalculate input_vertex_size at compile time. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 30 -- src/amd/vulkan/radv_pipeline.c| 10 -- src/amd/vulkan/radv_shader.h | 1 - 3 files changed, 4

[Mesa-dev] [PATCH 07/14] radv: drop tess offchip layout for tcs.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This removes the last TCS specific user sgpr. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 116 +- src/amd/vulkan/radv_pipeline.c| 9 --- src/amd/vulkan/radv_shader.c | 2 +- src/amd/vulkan/radv_shader.h

[Mesa-dev] [PATCH 05/14] radv: drop tcs_out_layout

2018-03-13 Thread Dave Airlie
From: Dave Airlie Move all calculations to shader generation. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 22 +- src/amd/vulkan/radv_pipeline.c| 8 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/amd/vulkan

[Mesa-dev] [PATCH 01/14] radv: migrate unique index info shader info (v2)

2018-03-13 Thread Dave Airlie
From: Dave Airlie This just moves this function to an inline so the shader_info pass can use it. v2: use inline (Samuel) Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 22 -- src/amd/vulkan/radv_shader.h | 21 + 2 files changed

[Mesa-dev] radv: drop all tess and geometry user sgprs (v2)

2018-03-13 Thread Dave Airlie
None of the info we were passing from the pipeline into the shaders via user sgprs for tess/gs was required, this series removes all user sgprs in favour of calculating the values at compile time. This is a repost, I've rebased this into radv and hopefully taken all the comments on board. Dave. _

Re: [Mesa-dev] [PATCH 03/50] glsl: Add "built-in" function to do sign(fp64) (v2)

2018-03-13 Thread Dave Airlie
On 14 March 2018 at 10:46, Roland Scheidegger wrote: > Am 13.03.2018 um 05:24 schrieb Dave Airlie: >> From: Elie Tournier >> >> v2: use mix. >> >> Signed-off-by: Elie Tournier >> --- >> src/compiler/glsl/builtin_float64.h | 28 +

Re: [Mesa-dev] soft fp64 support - main body (glsl/gallium)

2018-03-13 Thread Dave Airlie
On 14 March 2018 at 09:47, Gert Wollny wrote: > > Am Dienstag, den 13.03.2018, 14:24 +1000 schrieb Dave Airlie: >> This is the main code for the soft fp64 work. It's mostly Elie's >> code with a bunch of changes by me. > > Many thanks for this work, Elie an

[Mesa-dev] [PATCH 1/3] radv: get correct offset into LDS for indexed vars.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This seems more correct to me, since if we have an array of floats they'll be vec4 aligned, and if we do af[2], we want the const index to increase by 2 slots in the non compact case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464 Fixes: 94f9591995 (radv/ac

[Mesa-dev] [PATCH 2/3] ac/nir: pass the nir variable through tcs loading.

2018-03-13 Thread Dave Airlie
From: Dave Airlie I was going to have to add another parameter to this monster, so we should just pass the nir_variable in, I can't find any reason this would be a bad idea. This needed for the next fix. Fixes: 94f9591995 (radv/ac: add support for TCS/TES inputs/outputs.) Signed-off-by:

[Mesa-dev] [PATCH 3/3] ac/radv: mark all tess output for an indirect access.

2018-03-13 Thread Dave Airlie
From: Dave Airlie If a shader does a tcs store with an indirect access, we were only marking the first spot as used. For indirect access we always now mark all slots used by the variable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464 Fixes: 94f9591995 (radv/ac: add support for

Re: [Mesa-dev] soft fp64 support - main body (glsl/gallium)

2018-03-13 Thread Dave Airlie
On 14 March 2018 at 09:54, Matt Turner wrote: > On Mon, Mar 12, 2018 at 9:24 PM, Dave Airlie wrote: >> This is the main code for the soft fp64 work. It's mostly Elie's >> code with a bunch of changes by me. >> >> This patchset has all the glsl lowering cod

[Mesa-dev] [PATCH] dri3: allow building against older xcb (v3)

2018-03-13 Thread Dave Airlie
From: Dave Airlie I'm not sure everyone wants to be updating their dri3 in a forced march setting, this allows a nicer approach, esp when you want to build on distro that aren't brand new. I'm sure there are plenty of ways this patch could be cleaner, and I've also not

[Mesa-dev] [PATCH 2/2] radv: align tessellation patch limits with amdvlk driver.

2018-03-13 Thread Dave Airlie
From: Dave Airlie AMDVLK says 16 for pre-GFX9 and 64 for GFX9. This seems to help fix: https://bugs.freedesktop.org/show_bug.cgi?id=105464 on Polaris. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464 Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_pipeline.c | 10

[Mesa-dev] [PATCH 1/2] radv: get correct offset into LDS for indexed vars.

2018-03-13 Thread Dave Airlie
From: Dave Airlie This seems more correct to me, since if we have an array of floats they'll be vec4 aligned, and if we do af[2], we want the const index to increase by 2 slots in the non compact case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105464 Fixes: 94f9591995 (radv/ac

Re: [Mesa-dev] [PATCH] radv: Fix CmdCopyImage between uncompressed and compressed images

2018-03-13 Thread Dave Airlie
7b890a36, we must still use the destination image type > when clamping the extent so that we copy the correct number of layers > for 2D to 3D copies. > > Fixes: 7b890a36 "radv: Fix vkCmdCopyImage for 2d slices into 3d Images" > Cc: > Signed-off-by: Alex Smith Reviewed-by

[Mesa-dev] [PATCH 49/50] gallium: add pipe double support enum + docs

2018-03-12 Thread Dave Airlie
From: Dave Airlie --- src/gallium/docs/source/screen.rst | 4 +++- src/gallium/include/pipe/p_defines.h | 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index e375d67..42e4f32 100644 --- a/src

[Mesa-dev] [PATCH 45/50] glsl: Add a lowering pass for 64-bit float frac()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/lower_instructions.cpp | 25 + 1 file changed, 25 insertions(+) diff --git a/src/compiler/glsl/lower_instructions.cpp b/src/compiler/glsl/lower_instructions.cpp index 3064eef..94b262d 100644 --- a/s

[Mesa-dev] [PATCH 44/50] glsl: Add a lowering pass for 64-bit float ceil()

2018-03-12 Thread Dave Airlie
From: Elie Tournier [airlied: handle vector case] Signed-off-by: Elie Tournier --- src/compiler/glsl/lower_instructions.cpp | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/lower_instructions.cpp b/src/compiler/glsl/lower_in

[Mesa-dev] [PATCH 24/50] glsl: Add a lowering pass for 64-bit float less()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 4 +++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 17d

[Mesa-dev] [PATCH 48/50] glsl: add lowering for mod64()

2018-03-12 Thread Dave Airlie
From: Elie Tournier This lowers to floor using the same code as the float lowering, it also fixes things to avoid creating more instructions that need lowering. Signed-off-by: Dave Airlie --- src/compiler/glsl/ir_optimization.h | 1 + src/compiler/glsl/lower_instructions.cpp | 9

[Mesa-dev] [PATCH 35/50] glsl: Add a lowering pass for 64-bit float round()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 6ef75

[Mesa-dev] [PATCH 34/50] glsl: Add a lowering pass for 64-bit float trunc()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 1b5d5

[Mesa-dev] [PATCH 39/50] glsl: Add a lowering pass for 64-bit float gequal()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/lower_64bit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/lower_64bit.cpp b/src/compiler/glsl/lower_64bit.cpp index c4b8e78..0dc6070 100644 --- a/src/compiler/glsl/lower_64bit.

[Mesa-dev] [PATCH 29/50] glsl: Add a lowering pass for 64-bit float d2i()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index a4cb7

[Mesa-dev] [PATCH 27/50] glsl: Add a lowering pass for 64-bit float d2u()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 6506e

[Mesa-dev] [PATCH 33/50] glsl: Add a lowering pass for 64-bit float sqrt()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index c649c

[Mesa-dev] [PATCH 50/50] st/glsl: enable fp64 lowering support

2018-03-12 Thread Dave Airlie
From: Dave Airlie This enables fp64 emulation if the driver requests it with PIPE_CAP_DOUBLES set to PIPE_DOUBLES_EMULATE. It moves the mat->vec lowering earlier as we don't want to hit any matrix operation in double lowering, and if we lower div->rcp we end up getting the wrong typ

Re: [Mesa-dev] soft fp64 support - main body (glsl/gallium)

2018-03-12 Thread Dave Airlie
On 13 March 2018 at 14:24, Dave Airlie wrote: > This is the main code for the soft fp64 work. It's mostly Elie's > code with a bunch of changes by me. > All the patches are in my tree here, along with some other bits: https://cgit.freedesktop.org/~airlied/mesa/log/?h=glsl_arb

[Mesa-dev] [PATCH 47/50] glsl: add a lowering pass for dfma to dmuladd.

2018-03-12 Thread Dave Airlie
From: Dave Airlie Just lowering dfma to dmuladd for now, I don't think it will matter for anything we care about. This also fixes the double dot to fma lowering to take this flag into account and avoid creating further fma's. Signed-off-by: Dave Airlie --- src/compiler/glsl/ir_opti

[Mesa-dev] [PATCH 46/50] glsl: Add a lowering pass for 64-bit float rsq()

2018-03-12 Thread Dave Airlie
From: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 1 + src/compiler/glsl/lower_instructions.cpp | 25 + 2 files changed, 26 insertions(+) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index ba0c101..e6f9ad3 1006

[Mesa-dev] [PATCH 42/50] glsl: Add a lowering pass for 64-bit float max()

2018-03-12 Thread Dave Airlie
From: Elie Tournier [airlied: update to handle max(dvec, double) case] Signed-off-by: Elie Tournier --- src/compiler/glsl/lower_instructions.cpp | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/compiler/glsl/lower_instructions.cpp b/src/compiler/glsl/lower_i

[Mesa-dev] [PATCH 43/50] glsl: Add a lowering pass for 64-bit float floor()

2018-03-12 Thread Dave Airlie
From: Elie Tournier [airlied: handle vector cases] Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 1 + src/compiler/glsl/lower_instructions.cpp | 34 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/

[Mesa-dev] [PATCH 32/50] glsl: Add a lowering pass for 64-bit float f2d()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index e7860

[Mesa-dev] [PATCH 40/50] glsl: Add a lowering pass for 64-bit float nequal()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/lower_64bit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/lower_64bit.cpp b/src/compiler/glsl/lower_64bit.cpp index 0dc6070..f085dae 100644 --- a/src/compiler/glsl/lower_64bit.

[Mesa-dev] [PATCH 41/50] glsl: Add a lowering pass for 64-bit float min()

2018-03-12 Thread Dave Airlie
From: Elie Tournier [airlied: update to handle min(dvec, double) case. Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 1 + src/compiler/glsl/lower_instructions.cpp | 33 2 files changed, 34 insertions(+) diff --git a/src/compiler/

[Mesa-dev] [PATCH 38/50] glsl/lower_64bit: lower d2b using comparison

2018-03-12 Thread Dave Airlie
From: Dave Airlie This just does a compare to 0 and inverts the result to lower d2b. Not 100% sure this is always correct, but it passes piglit --- src/compiler/glsl/lower_64bit.cpp | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl

[Mesa-dev] [PATCH 30/50] glsl: Add a lowering pass for 64-bit float i2d()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 3cc7f

[Mesa-dev] [PATCH 31/50] glsl: Add a lowering pass for 64-bit float d2f()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 4 +++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index f73

[Mesa-dev] [PATCH 37/50] glsl/lower_64bit: handle any/all operations

2018-03-12 Thread Dave Airlie
From: Dave Airlie This just splits them out and combines the results. Signed-off-by: Dave Airlie --- src/compiler/glsl/lower_64bit.cpp | 61 ++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/lower_64bit.cpp b/src/compiler

[Mesa-dev] [PATCH 25/50] glsl: Add a lowering pass for 64-bit float add()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 4 +++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index b5f

[Mesa-dev] [PATCH 23/50] glsl: Add a lowering pass for 64-bit float equal()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 3a406

[Mesa-dev] [PATCH 22/50] glsl: Add a lowering pass for 64-bit float sign()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 2 +- src/compiler/glsl/lower_64bit.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 2d9728d..3a

[Mesa-dev] [PATCH 28/50] glsl: Add a lowering pass for 64-bit float u2d()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Handle non 64bit sources (airlied) Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compile

[Mesa-dev] [PATCH 26/50] glsl: Add a lowering pass for 64-bit float mul()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 2 +- src/compiler/glsl/lower_64bit.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 691803e..65

[Mesa-dev] [PATCH 12/50] glsl: Add "built-in" functions to do int_to_fp64(int) (v2)

2018-03-12 Thread Dave Airlie
From: Elie Tournier v2: use mix Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 129 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 23 ++

[Mesa-dev] [PATCH 21/50] glsl: Add a lowering pass for 64-bit float neg()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/lower_64bit.cpp | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 37081

[Mesa-dev] [PATCH 16/50] glsl: Add "built-in" functions to do trunc(fp64) (v2)

2018-03-12 Thread Dave Airlie
From: Elie Tournier v2: use mix. Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 62 + src/compiler/glsl/builtin_functions.cpp | 4 +++ src/compiler/glsl/builtin_functions.h | 3 ++ src/compiler/glsl/float64.glsl | 21

[Mesa-dev] [PATCH 17/50] glsl: Add "built-in" functions to do round(fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 225 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 41 ++ src/compil

[Mesa-dev] [PATCH 15/50] glsl: Add "built-in" functions to do sqrt(fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier This currently uses fp64->fp32, sqrt(fp32), fp32->fp64. [airlied: The code is include from soft float for doing proper sqrt64 but it needs to be decided if we need to pursue this and how to optimise it better.] Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_flo

[Mesa-dev] [PATCH 18/50] glsl: Add "built-in" functions to do rcp(fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 1829 +++ src/compiler/glsl/builtin_functions.cpp |4 + src/compiler/glsl/builtin_functions.h |3 + src/compiler/glsl/float64.glsl | 10 + src/compiler

[Mesa-dev] [PATCH 19/50] glsl: Add a lowering pass for 64-bit float abs()

2018-03-12 Thread Dave Airlie
From: Elie Tournier Squashed with: glsl/lower_64bit: fix return type conversion (airlied) Only do conversion for the 64-bit types, add a path to do result merging without conversion. Signed-off-by: Elie Tournier --- src/compiler/glsl/ir_optimization.h | 1 + src/compiler/glsl/lower_64bit.cpp

[Mesa-dev] [PATCH 20/50] glsl: add define to lower all double operations

2018-03-12 Thread Dave Airlie
From: Dave Airlie We will add all fp64 ops to this for now, later drivers may want to only lower some. Signed-off-by: Dave Airlie --- src/compiler/glsl/ir_optimization.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl

[Mesa-dev] [PATCH 11/50] glsl: Add "built-in" functions to do fp64_to_int(fp64) (v2)

2018-03-12 Thread Dave Airlie
From: Elie Tournier v2: use mix Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 179 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 41 +

[Mesa-dev] [PATCH 04/50] glsl: Add "built-in" functions to do eq(fp64, fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 104 src/compiler/glsl/builtin_functions.cpp | 4 ++ src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 44 ++ s

[Mesa-dev] soft fp64 support - main body (glsl/gallium)

2018-03-12 Thread Dave Airlie
This is the main code for the soft fp64 work. It's mostly Elie's code with a bunch of changes by me. This patchset has all the glsl lowering code. (using float64.glsl, yes I know checked in files are bad, but not bad enough for anyone to have solved int64.glsl yet, so we have a precedent). It int

[Mesa-dev] [PATCH 02/50] glsl: Add "built-in" functions to do neg(fp64) (v2)

2018-03-12 Thread Dave Airlie
From: Elie Tournier v2: use mix. Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 51 + src/compiler/glsl/builtin_functions.cpp | 4 +++ src/compiler/glsl/builtin_functions.h | 3 ++ src/compiler/glsl/float64.glsl | 24

[Mesa-dev] [PATCH 10/50] glsl: Add "built-in" functions to do uint_to_fp64(uint)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 71 + src/compiler/glsl/builtin_functions.cpp | 4 ++ src/compiler/glsl/builtin_functions.h | 3 ++ src/compiler/glsl/float64.glsl | 22 ++ src/com

[Mesa-dev] [PATCH 09/50] glsl: Add "built-in" functions to do fp64_to_uint(fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 209 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 61 ++ src/co

[Mesa-dev] [PATCH 13/50] glsl: Add "built-in" functions to do fp64_to_fp32(fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 388 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 100 src/comp

[Mesa-dev] [PATCH 08/50] glsl: Add "built-in" functions to do mul(fp64, fp64) (v2)

2018-03-12 Thread Dave Airlie
From: Elie Tournier v2: use mix Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 1348 +++ src/compiler/glsl/builtin_functions.cpp |4 + src/compiler/glsl/builtin_functions.h |3 + src/compiler/glsl/float64.glsl | 148 +++

[Mesa-dev] [PATCH 14/50] glsl: Add "built-in" functions to do fp32_to_fp64(fp32)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 192 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 38 +++ src/compi

[Mesa-dev] [PATCH 05/50] glsl: add utility function to extract 64-bit sign.

2018-03-12 Thread Dave Airlie
From: Elie Tournier [airlied: left over from dropping le64] Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 18 ++ src/compiler/glsl/float64.glsl | 7 +++ 2 files changed, 25 insertions(+) diff --git a/src/compiler/glsl/builtin_float64.h b/src/

[Mesa-dev] [PATCH 03/50] glsl: Add "built-in" function to do sign(fp64) (v2)

2018-03-12 Thread Dave Airlie
From: Elie Tournier v2: use mix. Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 28 src/compiler/glsl/builtin_functions.cpp | 4 src/compiler/glsl/builtin_functions.h | 3 +++ src/compiler/glsl/float64.glsl | 9 +++

[Mesa-dev] [PATCH 01/50] glsl: Add "built-in" function to do abs(fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/Makefile.sources | 1 + src/compiler/glsl/builtin_float64.h | 19 +++ src/compiler/glsl/builtin_functions.cpp | 4 src/compiler/glsl/builtin_functions.h | 3 +++ src/compiler/glsl/float64.g

[Mesa-dev] [PATCH 06/50] glsl: Add "built-in" functions to do lt(fp64, fp64)

2018-03-12 Thread Dave Airlie
From: Elie Tournier Signed-off-by: Elie Tournier --- src/compiler/glsl/builtin_float64.h | 135 src/compiler/glsl/builtin_functions.cpp | 4 + src/compiler/glsl/builtin_functions.h | 3 + src/compiler/glsl/float64.glsl | 42 ++ src/co

[Mesa-dev] [PATCH 1/2] r600: add simple ib dumping under a env var

2018-03-12 Thread Dave Airlie
From: Dave Airlie I've used this a lot when developing, and keep rebasing it around a lot, seems like it could be useful to have upstream. R600_DUMP witll make lots of /tmp/rad_dump_.txt for every command submitted to the hw. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/eg_de

[Mesa-dev] [PATCH 2/2] r600: assert on double opcodes if we hit them

2018-03-12 Thread Dave Airlie
From: Dave Airlie This asserts on any double opcocde getting into the shader assembler on gpus that don't support them. This is a better way to find holes in the soft fp64 coverage than gpu hangs. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 14

Re: [Mesa-dev] [PATCH] [rfc] dri3: allow building against older xcb

2018-03-12 Thread Dave Airlie
On 13 March 2018 at 05:58, Marek Olšák wrote: > On Mon, Mar 12, 2018 at 3:05 PM, Dave Airlie wrote: >> On 13 March 2018 at 03:59, Marek Olšák wrote: >>> This is good, though some older distros only have libxcb 1.11. >> >> On those distros you likely just

Re: [Mesa-dev] [PATCH] [rfc] dri3: allow building against older xcb

2018-03-12 Thread Dave Airlie
On 13 March 2018 at 03:59, Marek Olšák wrote: > This is good, though some older distros only have libxcb 1.11. On those distros you likely just want to --disable-dri3 anyways. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists

<    1   2   3   4   5   6   7   8   9   10   >