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

2018-03-12 Thread Dave Airlie
On 13 March 2018 at 03:24, Emil Velikov wrote: > Hi Dave, > > On 11 March 2018 at 23:26, Dave Airlie wrote: >> 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 wh

[Mesa-dev] [PATCH 3/6] glsl/lower_64bit: extract non-64bit sources from vectors.

2018-03-11 Thread Dave Airlie
From: Dave Airlie In order to deal with conversions properly we need to extract non-64bit sources from vectors instead of expanding them as the 64-bit code does. We need non-64bit sources for the 32->64 conversion functions. Signed-off-by: Dave Airlie --- src/compiler/glsl/lower_64bit.

[Mesa-dev] [PATCH 6/6] glsl: handle 32-bit destinations for 64-bit lowering.

2018-03-11 Thread Dave Airlie
From: Dave Airlie In order to handle d2u etc we need to handle the case where the dest is 32-bit. Instead of compacting things, we just want to mere the results into a single vector. Signed-off-by: Dave Airlie --- src/compiler/glsl/lower_64bit.cpp | 27 ++- 1 file

[Mesa-dev] [PATCH 1/6] glsl: rename lower_int64 to lower_64bit.

2018-03-11 Thread Dave Airlie
From: Elie Tournier This can also be used to lower some double ops. [airlied: this is extract from Elie's work into a standalone patch] Signed-off-by: Dave Airlie --- src/compiler/Makefile.sources | 2 +- src/compiler/glsl/ir_optimization.h

[Mesa-dev] [PATCH 2/6] lower_64bit: add extra protection around uint64 lowering.

2018-03-11 Thread Dave Airlie
From: Dave Airlie This will ensure the upcoming changes don't start lowering doubles using int64 functions. Signed-off-by: Dave Airlie --- src/compiler/glsl/lower_64bit.cpp | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/lower_64bit.cpp

[Mesa-dev] [PATCH 5/6] glsl/lower_64bit: add ability to handle 32-bit sources.

2018-03-11 Thread Dave Airlie
From: Dave Airlie If this function saw a 32-bit source it would just return the IR without doing any conversion, this adds the ability to denote where 32-bit sources are expected and will be used in subsequent patches to add 32->64 conversions. Signed-off-by: Dave Airlie --- src/compiler/g

[Mesa-dev] glsl: soft fp64 precursor patches

2018-03-11 Thread Dave Airlie
I've been fixing up Elie's work and although the produced shaders are large, and really show up the copy prop and sb liveness passes as horrible inefficent when you have lots of if statements, I think we should start angling towards upstreaming it. It now passes 99% of the piglit tests on r600 wit

[Mesa-dev] [PATCH 4/6] glsl/lower_64bit: use the correct packing function for doubles

2018-03-11 Thread Dave Airlie
From: Dave Airlie This picks the correct double packing and unpacking function, and type to unpack into. Signed-off-by: Dave Airlie --- src/compiler/glsl/lower_64bit.cpp | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/lower_64bit.cpp b

Re: [Mesa-dev] [PATCH 4/4] glsl: Use hash table cloning in copy propagation

2018-03-11 Thread Dave Airlie
Did anything ever comes of this series, trying some soft fp64 shaders, and glsl copy opt is taking 2-3 seconds on the big ones. Nearly all spent in hash table insertions. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freed

[Mesa-dev] [PATCH] virgl: resize resource bo allocation if we need to.

2018-03-11 Thread Dave Airlie
From: Dave Airlie This fixes an illegal command buffer on the host seen with piglit arb_internalformat_query2-max-dimensions Signed-off-by: Dave Airlie --- src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 8 ++-- src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 8 ++-- 2

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

2018-03-11 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

Re: [Mesa-dev] [PATCH] radv: Increase the number of dynamic uniform buffers.

2018-03-11 Thread Dave Airlie
s to 16. > Reviewed-by: Dave Airlie > CC: > CC: Alex Smith > --- > src/amd/vulkan/radv_device.c | 4 ++-- > src/amd/vulkan/radv_private.h | 4 +++- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/r

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

2018-03-11 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

Re: [Mesa-dev] [PATCH 04/56] anv/entrypoints: Generalize the string map a bit

2018-03-09 Thread Dave Airlie
Working under embargoes does suck and quite a lot of people had seen this code but I think the process falls down a bit when Jason wrote (even tongue-in-cheek) "You're 4.5 hours too late, I'm afraid. I'd be happy to take some patches though. :-)" I know in this case Dylan writing patches is proba

[Mesa-dev] [PATCH] radv: implement multisample image copies

2018-03-08 Thread Dave Airlie
From: Dave Airlie It appears its quite legal to do image copies on multisample images, however due to a bug in our txf handling and incomplete tests we never actually noticed we didn't do it properly in radv. This patch implements a compute shader to copy multiple samples of an image to an

[Mesa-dev] [PATCH] r600: implement callstack workaround for evergreen.

2018-03-08 Thread Dave Airlie
From: Dave Airlie This is ported from the sb backend, there are some issues with evergreen stacks on the boundary between entries and ALU_PUSH_BEFORE instructions. Whenever we are going to use a push before, we check the stack usage and if we have to use the workaround, then we switch to a

Re: [Mesa-dev] [PATCH 2/2] radv: Update version to 1.1.70.

2018-03-08 Thread Dave Airlie
On 9 March 2018 at 09:52, Bas Nieuwenhuizen wrote: > Turns out they did not reset the patch number on release. Oops and I think I suggested this, sorry! for the series: Reviewed-by: Dave Airlie > --- > src/amd/vulkan/radv_extensions.py | 4 ++-- > 1 file changed, 2 insertions(+),

[Mesa-dev] [PATCH] u_vbuf/translate: pass max_index into the set_buffer.

2018-03-08 Thread Dave Airlie
From: Dave Airlie This fixes a memory trashing crash (not the test) seen with dEQP-GLES3.stress.draw.unaligned_data.random.203 on virgl. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/util/u_vbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary

[Mesa-dev] [PATCH] radv: drop assert on bindingDescriptorCount > 0

2018-03-07 Thread Dave Airlie
From: Dave Airlie The spec is pretty clear that this can be 0, and that it operates as a reserved binding. Fixes: dEQP-VK.binding_model.descriptor_update.empty_descriptor.uniform_buffer Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_descriptor_set.c | 1 - 1 file changed, 1 deletion

[Mesa-dev] [PATCH] ac/nir: don't put lod into args if it's zero.

2018-03-06 Thread Dave Airlie
From: Dave Airlie If it's zero but put it in args we still end up consuming a register for it. This fixes some spilling in the NIR paths in Dirt Rally that isn't seen with TGSI. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 3 +-- 1 file changed, 1 inser

Re: [Mesa-dev] [PATCH] Revert "nir: bump loop unroll limit to 96."

2018-03-05 Thread Dave Airlie
in some Bioshock Infinite shaders. > > > While not as bad as Bioshock (which went from 0 -> 268 in three shaders) > Dirt Showdown VGPR spilling went from 40 -> 67 and 0 -> 17 in a couple of > shaders also as a result of loop unrolling. Okay! Reviewed-by: Dave Airlie Dave.

Re: [Mesa-dev] [PATCH 1/2] radeonsi: move si_nir_load_input_gs() to si_shader.c

2018-03-05 Thread Dave Airlie
For 1,1.5,2 Reviewed-by: Dave Airlie On 1 March 2018 at 14:24, Timothy Arceri wrote: > All the tess shader and tgsi equivalents are here and it allows > use to use llvm_type_is_64bit() in the following patch without > exposing it externally. > --- > src/gallium/drivers/radeo

Re: [Mesa-dev] [PATCH 1/4] ac/shader: scan output usage mask for VS and TES

2018-03-05 Thread Dave Airlie
On 1 March 2018 at 20:54, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset For the series: Reviewed-by: Dave Airlie Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/3] ac: add ac_count_scratch_private_memory()

2018-03-05 Thread Dave Airlie
On 2 March 2018 at 07:12, Samuel Pitoiset wrote: > Imported from RadeonSI. For the series Reviewed-by: Dave Airlie ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] r600/cayman: fix fragcood loading recip generation.

2018-02-28 Thread Dave Airlie
From: Dave Airlie This fixes some hangs seen where the recip_ieee opcodes would end up split across the wrong slots. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_shader.c

[Mesa-dev] [PATCH] [rfc] st/nir: handle components on fs outputs.

2018-02-28 Thread Dave Airlie
From: Dave Airlie fs outputs don't start above VARYING_SLOT_VAR0, but I assume that is there for a reason, so make an exception for fragment outputs. This fixes with NIR: tests/spec/arb_enhanced_layouts/execution/component-layout/fs-output.shader_test Signed-off-by: Dave Airlie --- src

[Mesa-dev] [PATCH] radeonsi/nir: increase values to 8 for gs fetch.

2018-02-28 Thread Dave Airlie
From: Dave Airlie This stops a crash when running (still fails): tests/spec/arb_gpu_shader_fp64/execution/explicit-location-gs-fs-vs.shader_test Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src

[Mesa-dev] [PATCH] ac/nir: fix shared atomic operations.

2018-02-28 Thread Dave Airlie
From: Dave Airlie The nir->llvm conversion was using the wrong srcs. Fixes: tests/spec/arb_compute_shader/execution/shared-atomics.shader_test Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH] ac/nir: don't apply slice rounding on txf_ms

2018-02-28 Thread Dave Airlie
From: Dave Airlie This matches the tgsi code. Fixes arb_texture_multisample texelFetch piglit tests. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common

[Mesa-dev] [PATCH] r600/shader: when using images always load thread id gpr at start (v2)

2018-02-27 Thread Dave Airlie
From: Dave Airlie The delayed loading code was fail if we had control flow. This fixes: tests/spec/arb_shader_image_load_store/execution/image_checkerboard.shader_test v2: don't use temp_reg before setting temp_reg up. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_sha

[Mesa-dev] [PATCH] r600/shader: when using images always load thread id gpr at start

2018-02-27 Thread Dave Airlie
From: Dave Airlie The delayed loading code was fail if we had control flow. This fixes: tests/spec/arb_shader_image_load_store/execution/image_checkerboard.shader_test Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 18 +++--- 1 file changed, 3 insertions

[Mesa-dev] [PATCH] r600: partly revert disabling tiling for 1d texture.

2018-02-27 Thread Dave Airlie
From: Dave Airlie Previously we had a check for 1d of narrow 2D textures, however narrow 2d textures caused gpu hangs, but it was correct for 1d textures. This fixes a bunch of 1D image piglits for me. --- src/gallium/drivers/r600/r600_texture.c | 5 + 1 file changed, 5 insertions(+) diff

[Mesa-dev] [PATCH] ac/radv: move load base vertex abi setup to vertex shader.

2018-02-27 Thread Dave Airlie
From: Dave Airlie This was segfaulting: dEQP-VK.memory.pipeline_barrier.host_write_index_buffer.1024 Fixes: 8de6f797070 (ac/radeonsi: add load_base_vertex() to the abi) Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [Mesa-dev] [PATCH 1/4] radv: Implement WaitForFences with !waitAll.

2018-02-27 Thread Dave Airlie
For the series. Reviewed-by: Dave Airlie On 27 February 2018 at 09:37, Bas Nieuwenhuizen wrote: > Nothing to do except using a busy wait loop. At least for old kernels. > > A better implementation for newer kernels to come later. > > Bugzilla: https://bugs.freedesktop.org/

Re: [Mesa-dev] [PATCH] gallium: remove llvm from ir struct

2018-02-27 Thread Dave Airlie
Acked-by: Dave Airlie On 28 February 2018 at 08:36, Timothy Arceri wrote: > Ping? > > On 02/02/18 08:54, Timothy Arceri wrote: >> >> This was added in 425dc4c4b366 but never used. Also since >> 100796c15c3a native has superseded llvm. >> --- >> src/gall

Re: [Mesa-dev] [PATCH] ac: fix nir_op_fdd{x,y} handling

2018-02-26 Thread Dave Airlie
Reviewed-by: Dave Airlie Though I suspect the test should handle getting either. Dave. On 27 February 2018 at 15:49, Timothy Arceri wrote: > radeonsi, i965 and anv all treat fdd{x,y} opcodes the same as > fdd{x,y}_coarse by default. The SPIR-V spec lets the implementation > deci

[Mesa-dev] [PATCH] radv: remove device pointer from buffer.

2018-02-26 Thread Dave Airlie
From: Dave Airlie This is never used. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_private.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index aa38106..50801e8 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd

[Mesa-dev] [PATCH] ac/shader: fix vertex input with components.

2018-02-26 Thread Dave Airlie
From: Dave Airlie This fixes: dEQP-VK.glsl.440.linkage.varying.component.* Fixes: 1c57a6da5e3 (ac/shader: scan vertex inputs usage mask) Signed-off-by: Dave Airlie --- src/amd/common/ac_shader_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common

[Mesa-dev] [PATCH] radv: expose async compute on SI

2018-02-26 Thread Dave Airlie
From: Dave Airlie It looks like we had all the pieces in place for this, just never tested it and turned it on. I don't see any CTS regressions and the computeshader demo runs. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_device.c | 2 -- 1 file changed, 2 deletions(-) diff --

Re: [Mesa-dev] [PATCH] radv/gfx9: add a workaround for viewing a slice of 3D as a 2D image

2018-02-26 Thread Dave Airlie
On 26 February 2018 at 23:04, Samuel Pitoiset wrote: > Ported from RadeonSI. > > That doesn't fix anything known but I think we need it. I'd really like it to fix something :-) How come we don't also need it for the TXF path? Dave. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/common/ac

[Mesa-dev] [PATCH] radv: merge tess rings into a single bo

2018-02-25 Thread Dave Airlie
From: Dave Airlie Inspired by a passing commit to radeonsi. --- src/amd/vulkan/radv_device.c | 93 ++- src/amd/vulkan/radv_private.h | 3 +- 2 files changed, 40 insertions(+), 56 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan

Re: [Mesa-dev] vulkan/wsi/wayland: Add support for zwp_dmabuf

2018-02-21 Thread Dave Airlie
On 22 February 2018 at 11:58, Dieter Nützel wrote: > Am 22.02.2018 02:35, schrieb Dave Airlie: >> >> 2018-02-22 10:57 GMT+10:00 Dieter Nützel : >>> >>> Making all in vulkan >>> make[3]: Verzeichnis „/opt/mesa/src/vulkan“ wird betreten >>&

Re: [Mesa-dev] vulkan/wsi/wayland: Add support for zwp_dmabuf

2018-02-21 Thread Dave Airlie
2018-02-22 10:57 GMT+10:00 Dieter Nützel : > Making all in vulkan > make[3]: Verzeichnis „/opt/mesa/src/vulkan“ wird betreten > make[3]: *** Keine Regel vorhanden, um das Ziel > „/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml“, > benötigt von „wsi/linux-dmabuf-unstable-v1-protocol.c“, zu ers

[Mesa-dev] [PATCH 2/2] virgl: reduce some default capset limits.

2018-02-20 Thread Dave Airlie
From: Dave Airlie Since v2 might take a while to rollout, we should reduce these inside some gathered minimums and then v2 can increase them using host values. Signed-off-by: Dave Airlie --- src/gallium/drivers/virgl/virgl_winsys.h | 16 1 file changed, 8 insertions(+), 8

[Mesa-dev] [PATCH 1/2] virgl: handle getting new capsets.

2018-02-20 Thread Dave Airlie
From: Dave Airlie This checks the kernel api is new enough and asks for the larger caps size since the kernel won't mess it up now. Signed-off-by: Dave Airlie --- src/gallium/drivers/virgl/virgl_winsys.h | 25 ++- src/gallium/winsys/virgl/drm/virgl_drm_winsys.c

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

2018-02-20 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/common/ac_nir_to_llvm.c | 33 + src/amd/common/ac_nir_to_llvm.h | 1 + src/amd/vulkan/radv_pipeline.c | 30

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

2018-02-20 Thread Dave Airlie
From: Dave Airlie Move all calculations to shader generation. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 39 +++ src/amd/vulkan/radv_pipeline.c | 11 +++ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/amd

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

2018-02-20 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/common/ac_nir_to_llvm.c | 28 src/amd/common/ac_nir_to_llvm.h | 4 src/amd/vulkan/radv_pipeline.c | 7 +++ 3

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

2018-02-20 Thread Dave Airlie
From: Dave Airlie This removes the last TES-specifc user sgpr. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 51 + src/amd/common/ac_nir_to_llvm.h | 4 ++-- src/amd/vulkan/radv_pipeline.c | 18 ++- 3 files changed, 20

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

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

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

2018-02-20 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/common/ac_nir_to_llvm.c | 15 +++ src/amd/vulkan/radv_pipeline.c | 9 + 2 files changed, 8 insertions(+), 16 deletions

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

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

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

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

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

2018-02-20 Thread Dave Airlie
From: Dave Airlie This removes the last TCS specific user sgpr. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 118 ++-- src/amd/common/ac_nir_to_llvm.h | 2 +- src/amd/vulkan/radv_pipeline.c | 9 --- src/amd/vulkan/radv_shader.c

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

2018-02-20 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 02/14] ac/shader_info: start gathering tess output info

2018-02-20 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. Signed-off-by: Dave Airlie --- src/amd/common/ac_shader_info.c | 48

[Mesa-dev] [rfc] radv drop all tess/gs specific user sgprs

2018-02-20 Thread Dave Airlie
It seems to be season for reducing sgpr usage, but I was looking at the tess/gs sgprs on radv when I realised nothing in them wasn't static from the pipeline at compile time, so there is no need to go passing to the shader via the user sgprs. This series removes all the tess/gs specific users sgpr

[Mesa-dev] [PATCH 01/14] ac: migrate unique index info shader info

2018-02-20 Thread Dave Airlie
From: Dave Airlie This just moves this function to an inline so the shader_info pass can use it. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 22 -- src/amd/common/ac_shader_info.h | 25 + 2 files changed, 25 insertions(+), 22

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

2018-02-20 Thread Dave Airlie
From: Dave Airlie Inline all calcs at shader creation. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 27 ++- src/amd/common/ac_nir_to_llvm.h | 1 + src/amd/vulkan/radv_pipeline.c | 12 ++-- 3 files changed, 25 insertions(+), 15 deletions

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

2018-02-20 Thread Dave Airlie
From: Dave Airlie We can precalculate input_vertex_size at compile time. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 30 -- src/amd/common/ac_nir_to_llvm.h | 1 - src/amd/vulkan/radv_pipeline.c | 10 -- 3 files changed, 4 insertions

[Mesa-dev] [PATCH 2/5] ac/radv: remove total_vertices variable

2018-02-19 Thread Dave Airlie
From: Dave Airlie This just removes an unneeded variable. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 31cab3b..d0394d3 100644

[Mesa-dev] radv prep for removing tess specific user sgprs

2018-02-19 Thread Dave Airlie
These are just some cleanups that popped out of a series I was working on to remove all the tcs/tes user sgprs stuff. I've got the full patchset working on VI, just need to test on Vega now. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.or

[Mesa-dev] [PATCH 4/5] radv/tess: don't need to look in constant for vertices_per_patch

2018-02-19 Thread Dave Airlie
From: Dave Airlie This just avoids passing this value via user sgprs. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 5 - src/amd/vulkan/radv_pipeline.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd

[Mesa-dev] [PATCH] ac/nir: to integer the args to bcsel.

2018-02-19 Thread Dave Airlie
From: Dave Airlie dEQP-VK.tessellation.invariance.outer_edge_symmetry.triangles_equal_spacing_ccw was hitting an llvm assert due to one value being an int and the other a float. This just casts both values to integer and fixes the test. Fixes: dEQP

[Mesa-dev] [PATCH 5/5] radv: don't send num_tcs_input_cp to sgprs.

2018-02-19 Thread Dave Airlie
From: Dave Airlie We never use it in the shaders. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_pipeline.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index a2dec0e..9990a3e 100644 --- a/src/amd

[Mesa-dev] [PATCH 3/5] ac/radv: cleanup some tcs output values access

2018-02-19 Thread Dave Airlie
From: Dave Airlie Just consolidates some code to make it easier to change. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index

[Mesa-dev] [PATCH 1/5] ac/radv: don't mark tess inner as used if we don't use it.

2018-02-19 Thread Dave Airlie
From: Dave Airlie This just avoids marking it as a used output if we don't actually use it. Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/c

Re: [Mesa-dev] [PATCH] r600/sb: fix rotated register in while loop

2018-02-18 Thread Dave Airlie
On 15 February 2018 at 01:26, Gert Wollny wrote: > Am Mittwoch, den 14.02.2018, 17:18 +1000 schrieb Dave Airlie: >> From: Dave Airlie >> >> A bunch of CTS tests led me to write >> tests/shaders/ssa/fs-while-loop-rotate-value.shader_test >> which r600/sb alwa

[Mesa-dev] [PATCH] r600/sb: fix rotated register in while loop (v3)

2018-02-18 Thread Dave Airlie
From: Dave Airlie A bunch of CTS tests led me to write tests/shaders/ssa/fs-while-loop-rotate-value.shader_test which r600/sb always fell over on. This patch fixes it, but I'll probably never be 100% sure why. Anyways what appears to be happening is when gcm is scheduling the copy_movs

[Mesa-dev] [PATCH] r600/sb: fix rotated register in while loop (attempt 2)

2018-02-15 Thread Dave Airlie
From: Dave Airlie A bunch of CTS tests led me to write tests/shaders/ssa/fs-while-loop-rotate-value.shader_test which r600/sb always fell over on. GCM seems to move some of the copys into other basic blocks, if we don't allow this to happen then it doesn't seem to schedule

[Mesa-dev] [PATCH] r600/sb: fix rotated register in while loop

2018-02-13 Thread Dave Airlie
From: Dave Airlie A bunch of CTS tests led me to write tests/shaders/ssa/fs-while-loop-rotate-value.shader_test which r600/sb always fell over on. This patch fixes it, but I'll probably never be 100% sure why. Anyways what appears to be happening is when gcm is scheduling the copy_movs

[Mesa-dev] [PATCH] virgl: remap query types to hw support.

2018-02-13 Thread Dave Airlie
From: Dave Airlie The gallium query types changed, so we need to remap from the gallium ones to the virgl ones. Fixes: dEQP-GLES3.functional.transform_feedback.basic_types* Fixes: 3f6b3d9db (gallium: add PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE) Signed-off-by: Dave Airlie --- src/gallium

[Mesa-dev] [PATCH] virgl: add ARB_sample_shading support.

2018-02-12 Thread Dave Airlie
From: Dave Airlie This enable ARB_sample_shading if the renderer supports it. Signed-off-by: Dave Airlie --- src/gallium/drivers/virgl/virgl_encode.c | 3 ++- src/gallium/drivers/virgl/virgl_protocol.h | 1 + src/gallium/drivers/virgl/virgl_screen.c | 5 +++-- 3 files changed, 6

[Mesa-dev] [PATCH] virgl: add ARB_draw_indirect support.

2018-02-12 Thread Dave Airlie
From: Dave Airlie This relies on the renderer code landing first. Signed-off-by: Dave Airlie --- src/gallium/drivers/virgl/virgl_encode.c | 15 ++- src/gallium/drivers/virgl/virgl_protocol.h | 12 src/gallium/drivers/virgl/virgl_screen.c | 3 ++- 3 files changed

[Mesa-dev] [PATCH] i965: fix tessellation regressions with gl_state_index16

2018-02-12 Thread Dave Airlie
From: Dave Airlie Looks like one conversion was missed. Fixes: e149a0253 (mesa,glsl,nir: reduce gl_state_index size to 2 bytes) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105067 Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 2 +- 1 file changed, 1

[Mesa-dev] [PATCH] virgl: Support v2 caps struct (v2)

2018-02-12 Thread Dave Airlie
From: Stéphane Marchesin This struct allows us to report: - accurate max point size/line width. - accurate texel and texture gather offsets - vertex/geometry limits. Signed-off-by: Dave Airlie --- src/gallium/drivers/virgl/virgl_hw.h| 28 ++ src/gallium/drivers

[Mesa-dev] [PATCH] virgl: fix caps ioctl size check.

2018-02-12 Thread Dave Airlie
From: Dave Airlie The size check seems backwards, if userspace gives us a size larger it is probably asking for a newer version of the caps, so we just fill in the caps version we have at the smaller size, and it can work it out from there. Userspace will probably still need a fallback as old

[Mesa-dev] [PATCH] gallium: drop all the guard band float caps.

2018-02-12 Thread Dave Airlie
From: Dave Airlie Nobody queries these and nobody sets them to anything useful, the docs say TODO. Drop them until a use appears. Signed-off-by: Dave Airlie --- src/gallium/docs/source/screen.rst | 4 src/gallium/drivers/etnaviv/etnaviv_screen.c | 5 - src/gallium

[Mesa-dev] [PATCH] r600: fix array spill if temp[0] is before all arrays

2018-02-11 Thread Dave Airlie
From: Dave Airlie I found a shader with DCL TEMP[0], LOCAL DCL TEMP[1..256], ARRAY(1), LOCAL DCL TEMP[257..512], ARRAY(2), LOCAL DCL TEMP[513..768], ARRAY(3), LOCAL DCL TEMP[769], LOCAL This would remap badly, as it would add up all the spilled sizes and subtract it from the temp for 0. If the

[Mesa-dev] [PATCH] r600/shader: tess_input_info is needed by TES for gl_PatchVerticesIn

2018-02-08 Thread Dave Airlie
From: Dave Airlie This fixes: KHR-GL45.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_PatchVerticesIn --- src/gallium/drivers/r600/r600_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium

[Mesa-dev] [PATCH] r600: fix texture gather swizzling.

2018-02-07 Thread Dave Airlie
From: Dave Airlie This fixes: KHR-GL45.texture_gather.swizzle on cayman and redwood. --- src/gallium/drivers/r600/r600_shader.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index

[Mesa-dev] [PATCH] r600: implement tg4 integer workaround. (v2)

2018-02-07 Thread Dave Airlie
From: Dave Airlie This ports the texture gather integer workaround from radeonsi. This fixes: KHR-GL45.texture_gather.plain-gather-uint/int* v2: add rect support, fix 2d array shadow Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 162

[Mesa-dev] [PATCH] r600: implement tg4 integer workaround.

2018-02-07 Thread Dave Airlie
From: Dave Airlie This ports the texture gather integer workaround from radeonsi. This fixes: KHR-GL45.texture_gather.plain-gather-uint/int* Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 135 + 1 file changed, 135 insertions(+) diff

[Mesa-dev] [PATCH] r600: fix rendering regression on r6/7 gpus

2018-02-07 Thread Dave Airlie
From: Dave Airlie Fixes: 2d5b5d267e (r600: work out target mask at framebuffer bind.) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104989 Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_state.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a

[Mesa-dev] [PATCH] r600: clean up initial shader register setup

2018-02-06 Thread Dave Airlie
From: Glenn Kennard This is taken from Glenn Kennards scratch series, but separated out as a cleanup by me. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 37 -- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src

[Mesa-dev] [PATCH] radv: don't support tc-compat on multisample d32s8 at all.

2018-02-06 Thread Dave Airlie
From: Dave Airlie RX550 fails dEQP-VK.renderpass.suballocation.multisample.d32_sfloat_s8_uint.samples_2 So increase the range of the workaround. Fixes: f4c534ef6 (radv: don't enable tc compat for d32s8 + 4/8 samples (v1.1)) Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_image.

Re: [Mesa-dev] [PATCH 3/9] r600: overhaul buffer resource query.

2018-02-05 Thread Dave Airlie
On 6 February 2018 at 14:12, Roland Scheidegger wrote: > Am 05.02.2018 um 05:29 schrieb Dave Airlie: >> From: Dave Airlie >> >> This cleans up and fixes the previous fix even more. >> >> Buffers from textures start at max const, >> buffers from buf

[Mesa-dev] [PATCH] r600/atomic: fix ATOMCAS instruction.

2018-02-04 Thread Dave Airlie
From: Dave Airlie This has 3 srcs. This fixes: KHR-GL45.shader_atomic_counter_ops_tests.ShaderAtomicCounterOpsExchangeTestCase Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH] r600/sb/cayman: fix indirect ubo access on cayman

2018-02-04 Thread Dave Airlie
From: Dave Airlie With sb enabled on cayman, this was overwriting the proper cf index value with random ones if the dst gpr was 2 or 3, only save the value for a MOVA instruction. Fixes: KHR-GL45.gpu_shader5.uniform_blocks_array_indexing (on cayman with sb) Signed-off-by: Dave Airlie --- src

[Mesa-dev] [PATCH] r600: fixup sparse color exports.

2018-02-04 Thread Dave Airlie
From: Dave Airlie If we have gaps in the shader mask we have to have 0x1 in them according to a comment in radeonsi, and this is required to fix the test at least on cayman. We also need to record the highest one written to write to the ps exports reg. This fixes: KHR-GL45

[Mesa-dev] [PATCH 9/9] r600: work out target mask at framebuffer bind.

2018-02-04 Thread Dave Airlie
From: Dave Airlie If we only get 1,2,3,6 framebuffers we want a sparse target mask. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 10 +++--- src/gallium/drivers/r600/r600_pipe.h | 1 + src/gallium/drivers/r600/r600_state.c | 2 +- 3 files changed

[Mesa-dev] [PATCH 3/9] r600: overhaul buffer resource query.

2018-02-04 Thread Dave Airlie
From: Dave Airlie This cleans up and fixes the previous fix even more. Buffers from textures start at max const, buffers from buffers/images come in from the 168 offset. This fixes a bunch of: KHR-GL45.shader_storage_buffer_object* Signed-off-by: Dave Airlie --- src/gallium/drivers/r600

[Mesa-dev] [PATCH 1/9] r600/images: set offset for compute shaders with number of declared samplers

2018-02-04 Thread Dave Airlie
From: Dave Airlie for frag shaders we get a value in the key, I expect I need to make compute work better --- src/gallium/drivers/r600/r600_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600

[Mesa-dev] [PATCH 8/9] r600: work out shader export mask at shader build time

2018-02-04 Thread Dave Airlie
From: Dave Airlie Since enhanced layouts allows setting specific MRT outputs, we can get sparse outputs, so we have to calculate the shader mask earlier. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 3 ++- src/gallium/drivers/r600/r600_pipe.h | 1

[Mesa-dev] [PATCH 5/9] r600/compute: add render cond support.

2018-02-04 Thread Dave Airlie
From: Dave Airlie Set render cond and emit atom. Fixes: KHR-GL45.compute_shader.conditional-dispatching Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_compute.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600

[Mesa-dev] [PATCH 2/9] r600/eg: fix buffer sizing.

2018-02-04 Thread Dave Airlie
From: Dave Airlie For buffers we want the size in bytes, For images we want it in elements. This fixes: KHR-GL45.shader_storage_buffer_object.advanced-unsizedArrayLength-cs-std430-vec-pad --- src/gallium/drivers/r600/evergreen_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[Mesa-dev] [PATCH 6/9] r600/compute: only mark buffer/image state dirty for fragment shaders

2018-02-04 Thread Dave Airlie
From: Dave Airlie The compute emission path always emits this currently, and emitting it on the fragment path breaks the blitter. This fixes gpu hangs in KHR-GL45.compute_shader.resource-texture Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 6 -- 1 file

[Mesa-dev] [PATCH 4/9] r600: fix not-very indirect compute

2018-02-04 Thread Dave Airlie
From: Dave Airlie We need to get the grid sizes earlier to fill in to the const buffer. Fixes: KHR-GL45.compute_shader.built-in-variables and KHR-GL45.compute_shader.dispatch-indirect Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_compute.c | 30

[Mesa-dev] [PATCH 7/9] r600: fix xfb stream check.

2018-02-04 Thread Dave Airlie
From: Dave Airlie This fixes: KHR-GL45.enhanced_layouts.xfb_vertex_streams Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c

Re: [Mesa-dev] [PATCH] r600: fix VERTEX_ATTRIB_STRIDE to be 2048

2018-02-04 Thread Dave Airlie
On 2 February 2018 at 18:02, Roland Scheidegger wrote: > Are you sure of that? You only get 11 stride bits to program, and they > are in bytes. Therefore I can't see how you could program 2048 (unless > the hw would interpet 0 as 2048 but I think stride 0 is valid there?). > Hmm so GL 4.4 defines

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