Re: [Mesa-dev] [PATCH 2/4] ac/nir: implement 64-bit packing and unpacking

2017-07-01 Thread Bas Nieuwenhuizen
Not sure whether I'd reviewed the first series, but patches 2-4 are Reviewed-by: Bas Nieuwenhuizen On Sat, Jul 1, 2017 at 4:56 AM, Connor Abbott wrote: > From: Connor Abbott > > We implement the split opcodes, and tell NIR to lower the original ones. > The lowering to LLVM

Re: [Mesa-dev] [PATCH 30/92] ac/nir: start using ac_shader_abi

2017-07-02 Thread Bas Nieuwenhuizen
Hi Nicolai, Can we use LLVMValueRef instead of int for the shader_abi? That way we don't force the values to be function parameters. I don't think the shared code should have to know about that, and it is more flexible when we want to pass those slightly differently between the two drivers, as we

[Mesa-dev] [PATCH] ac/nir: Move VS position exports before param exports.

2017-07-04 Thread Bas Nieuwenhuizen
According to Nicolai the SX can already start work when all the position exports are done, so do those first. Signed-off-by: Bas Nieuwenhuizen --- src/amd/common/ac_nir_to_llvm.c | 109 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/src

Re: [Mesa-dev] [PATCH 1/4] ac/radv: change api to create target machine

2017-07-06 Thread Bas Nieuwenhuizen
Series is Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 4:09 AM, Dave Airlie wrote: > From: Dave Airlie > > This just modifies the API to make it easier to add other flags > to target machine creation. > > Signed-off-by: Dave Airlie > --- > src/amd/com

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Bas Nieuwenhuizen
On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > The old way was very TGSI-based, and couldn't handle indirect > dereferences at all. Instead, pass through the type information NIR has I think the old code should handle indirect derefs just fine? See the indir_index

Re: [Mesa-dev] [PATCH 1/6] nir: don't segfault when printing variables with no name

2017-07-06 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > While normally we give variables whose name field is NULL a temporary > name when called from nir_print_shader(), when we were calling from > nir_print_instr() we

Re: [Mesa-dev] [PATCH 4/6] ac/nir: rewrite shared variable handling

2017-07-06 Thread Bas Nieuwenhuizen
Patches 3-4 look technically correct to me, so for just using it for shared vars Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > Similar to before, do the direct NIR->LLVM translation instead of > lowering to an arr

Re: [Mesa-dev] [PATCH 5/6] radv: reorder and add passes to match i965

2017-07-06 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 9:50 PM, Connor Abbott wrote: > From: Connor Abbott > > This makes the radv shader pipeline much closer to brw_preprocess_nir(). > The main changes are: > > - Now we call nir_split_var_copies(), which is necessary for >

Re: [Mesa-dev] [PATCH] radv/ac: drop setting xnack

2017-07-06 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Jul 7, 2017 at 12:10 AM, Dave Airlie wrote: > From: Dave Airlie > > Since radv uses compute rings and we can't know when we are setting > up the shaders what ring they are to be used on, we should just use > the default xnack

Re: [Mesa-dev] [PATCH 6/6] radv: don't lower indirect derefs

2017-07-06 Thread Bas Nieuwenhuizen
On Thu, Jul 6, 2017 at 9:50 PM, Connor Abbott wrote: > From: Connor Abbott > > Radeonsi doesn't either. As of the last commit, these should be handled > properly as long as LLVM has scratch support. We also should use > nir_lower_io_to_temporaries() for inputs instead of generating an > if-ladder

Re: [Mesa-dev] [PATCH 2/2] ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsics

2017-07-06 Thread Bas Nieuwenhuizen
Thanks! Pushed and cc'd it to stable. Not pushing the first patch as I assume that is superseded by Connors patches. On Fri, Jun 30, 2017 at 12:15 PM, Alex Smith wrote: > The NIR parameters are ordered "compare, data", matching GLSL, but both > the image and buffer LLVM intrinsics take them the

[Mesa-dev] [PATCH] radv: Add compute htile clear for combined depth+stencil surfaces.

2017-07-07 Thread Bas Nieuwenhuizen
Figured out the clear value when we have a combined depth stencil surface. Signed-off-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_meta_clear.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan

Re: [Mesa-dev] [PATCH] radv: add support for using addrlib max alignment.

2017-07-09 Thread Bas Nieuwenhuizen
*max_alignment = addrGetMaxAlignmentsOutput.baseAlign; > + fprintf(stderr, "max alignment is %d\n", > *max_alignment); With this printf removed, this patch is Reviewed-by: Bas Nieuwenhuizen > + } > + } >

Re: [Mesa-dev] [PATCH] radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BIT

2017-07-11 Thread Bas Nieuwenhuizen
nt.width, > - iview->extent.height, > - iview->extent.depth, > - iview->descriptor, > - iview->fmask_descriptor); > - si_set_mutable_

Re: [Mesa-dev] [PATCH v2] radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BIT

2017-07-12 Thread Bas Nieuwenhuizen
ype when writing descriptor sets. > > v2: Generate storage descriptors for images with TRANSFER_DST, since > those may be used as storage images internally. > > Signed-off-by: Alex Smith > Reviewed-by: Bas Nieuwenhuizen > --- > src/amd/vulkan/radv_descriptor_set.c |

Re: [Mesa-dev] [PATCH] radv: Fix possible invalid free of dynamic descriptors

2017-07-12 Thread Bas Nieuwenhuizen
Thanks, pushed. On Wed, Jul 12, 2017 at 12:14 PM, Alex Smith wrote: > This free was left in after dynamic descriptors were changed to not be > allocated separately from the descriptor set, and can cause a crash. > > Fixes: 39644fa40a3 ("radv: Don't allocate dynamic descriptors separately") > Sign

[Mesa-dev] [PATCH] radv: Don't use local BOs when allocating with export options.

2017-12-10 Thread Bas Nieuwenhuizen
If the app does not plan to put a buffer or image in it (why? But it is allowed and CTS does it), they do not need to allocate it with the deciate allocation struct. Fixes: a639d40f133 "radv: add support for local bos. (v3)" --- src/amd/vulkan/radv_device.c | 4 +++- 1 file changed, 3 insertions(

[Mesa-dev] [PATCH 2/2] ac/nir: Support vulkan_resource_reindex.

2017-12-10 Thread Bas Nieuwenhuizen
Fixes: 93b4cb61eb2 "spirv: Allow OpPtrAccessChain for block indices" --- src/amd/common/ac_nir_to_llvm.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index c33408491a9..318c248a985 100644 --- a/src/amd/common/

[Mesa-dev] [PATCH 1/2] ac/nir: Don't load the descriptor in vulkan_resource_index.

2017-12-10 Thread Bas Nieuwenhuizen
To support the reindex intrinsic, we need the result to be something on which we can adjust the index/address. Since it is all within a basic block, the compiler should be able to merge any extra loads. --- src/amd/common/ac_nir_to_llvm.c | 14 +++--- 1 file changed, 11 insertions(+), 3 d

Re: [Mesa-dev] [PATCH 4/4] amd/common: add ac_build_waitcnt()

2017-12-12 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Tue, Dec 12, 2017 at 6:10 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/common/ac_llvm_build.c| 9 + > src/amd/common/ac_llvm_build.h| 2 ++ >

[Mesa-dev] [PATCH] radv: Don't advertise VK_EXT_debug_report.

2017-12-12 Thread Bas Nieuwenhuizen
We never supported it. Missed during copy and pasting. Fixes: 17201a2eb0b "radv: port to using updated anv entrypoint/extension generator." --- src/amd/vulkan/radv_extensions.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions

Re: [Mesa-dev] [PATCH] radv: export SampleMask from pixel shaders at full rate

2017-12-13 Thread Bas Nieuwenhuizen
return V_028710_SPI_SHADER_UINT16_ABGR; > + } else { > + return V_028710_SPI_SHADER_ZERO; > + } > +} I'm not a fan of having this function in two places. Can we export the format from the compiler to radv, or the other way around? Otherwise, Reviewed-by: Bas Nieuwen

Re: [Mesa-dev] [PATCH] radv: do not load the local invocation index when it's unused

2017-12-14 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 14, 2017 at 5:32 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/common/ac_nir_to_llvm.c | 3 ++- > src/amd/common/ac_shader_info.c | 3 +++ > src/amd/common/ac_shader_info.h | 1 + > src/amd/vulkan/ra

Re: [Mesa-dev] [PATCH 1/3] amd/common: scan which components of gl_WorkGroupID are used

2017-12-14 Thread Bas Nieuwenhuizen
case nir_intrinsic_load_num_work_groups: > info->cs.uses_grid_size = true; > break; > + case nir_intrinsic_load_work_group_id: { > + unsigned mask = nir_ssa_def_components_read(&instr->dest.ssa); Nice find that there is an utility function for t

Re: [Mesa-dev] [PATCH 3/3] radv: do not load unused gl_LocalInvocationID/gl_WorkGroupID components

2017-12-14 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Thu, Dec 14, 2017 at 4:48 PM, Samuel Pitoiset wrote: > We should also not load the input SGPRs and VGPRS, but > let's start with this for now. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_shader.c | 1

Re: [Mesa-dev] [PATCH 3/3] radv: set FORCE_SIMD_DIST(1) for compute when profitable

2017-12-14 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen Would it make sense to move the compute_resource_limits calculation to pipeline creation time? On Thu, Dec 14, 2017 at 3:51 PM, Samuel Pitoiset wrote: > Ported from RadeonSI. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_cm

Re: [Mesa-dev] [PATCH 1/3] amd/common: add ac_get_spi_shader_z_format()

2017-12-14 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Thu, Dec 14, 2017 at 1:51 PM, Samuel Pitoiset wrote: > ac_shader_util.c will contain shader helpers for RadeonSI > and RADV. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/Makefile.sources| 5 -

Re: [Mesa-dev] [PATCH 1/2] radv: always emit all compute block components

2017-12-14 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 14, 2017 at 12:51 PM, Samuel Pitoiset wrote: > The number of grid components is always 3 when gl_NumWorkGroups > is declared, because it relies on the number of components of > nir_instrinsic_load_num_work_groups. > > Signed-off-by:

Re: [Mesa-dev] [PATCH] radv: remove useless radv_cmask_info::base_address_reg

2017-12-15 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Dec 15, 2017 at 6:54 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > 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

[Mesa-dev] [PATCH] anv: Remove unused variable.

2017-12-16 Thread Bas Nieuwenhuizen
--- src/intel/vulkan/anv_device.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 59767c2..4638f311dd1 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -741,8 +741,6 @@ void anv_GetPhysica

[Mesa-dev] [PATCH 1/6] configure/meson: Bump libdrm_amdgpu version requirement.

2017-12-16 Thread Bas Nieuwenhuizen
For the radv dependencies on syncobj signal/reset. --- configure.ac | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a4564d23f4c..138459c6f79 100644 --- a/configure.ac +++ b/configure.ac @@ -74,7 +74,7 @@ AC_SUBST([OPENCL

[Mesa-dev] [PATCH 4/6] radv: Implement fences based on syncobjs.

2017-12-16 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_device.c | 113 -- src/amd/vulkan/radv_private.h | 6 ++- src/amd/vulkan/radv_wsi.c | 5 ++ 3 files changed, 109 insertions(+), 15 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 7

[Mesa-dev] [PATCH 2/6] radv: Add syncobj signal/reset/wait to winsys.

2017-12-16 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_radeon_winsys.h | 4 +++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 40 +++ 2 files changed, 44 insertions(+) diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index 2b815d9c5a9..e851c3edf86 1006

[Mesa-dev] [PATCH 5/6] radv: Implement VK_KHR_external_fence_fd.

2017-12-16 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_device.c | 47 +++ src/amd/vulkan/radv_extensions.py | 1 + 2 files changed, 48 insertions(+) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index fc9fb59f991..94562fda875 100644 --- a/src/amd/vulkan/radv_

[Mesa-dev] [PATCH 3/6] amd/common: Add detection of the syncobj wait/signal/reset ioctls.

2017-12-16 Thread Bas Nieuwenhuizen
First amdgpu bump after inclusion was 20 (which was done for local BOs). --- src/amd/common/ac_gpu_info.c | 1 + src/amd/common/ac_gpu_info.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 0576dd369cf..c042bb229ce 100644 ---

[Mesa-dev] [PATCH 6/6] radv: Add external fence support.

2017-12-16 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_device.c | 20 src/amd/vulkan/radv_extensions.py | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 94562fda875..a4ec912ff2c 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src

Re: [Mesa-dev] [PATCH] Revert "radv: do not load unused gl_LocalInvocationID/gl_WorkGroupID components"

2017-12-17 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Dec 15, 2017 at 4:01 PM, Samuel Pitoiset wrote: > This reverts commit 2294d35b243dee15af15895e876a63b7d22e48cc. > > We can't do this without adjusting the input SGPRs/VGPRs logic. > For now, just revert it. I will send a proper solution la

Re: [Mesa-dev] [PATCH 2/2] amd/common: add ac_vgt_gs_mode() helper

2017-12-17 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Dec 15, 2017 at 3:37 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/common/ac_shader_util.c | 27 + > src/amd/common/ac_shader_util.h | 6 + >

Re: [Mesa-dev] [PATCH 1/2] amd/common: add ac_get_cb_shader_mask() helper

2017-12-17 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Dec 15, 2017 at 3:37 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/common/ac_shader_util.c | 35 > + > src/amd/common/ac_shader_util.h | 3 +++ &g

[Mesa-dev] [PATCH] radv: Fix multi-layer blits.

2017-12-17 Thread Bas Nieuwenhuizen
We did not set the layer correctly for the dst, as we would keep using the base layer. Same for the source image. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102710 CC: --- src/amd/vulkan/radv_meta_blit.c | 49 - 1 file changed, 24 insertions(+)

Re: [Mesa-dev] [PATCH] radv: port merge tess info from anv

2017-12-18 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Mon, Dec 18, 2017 at 6:08 AM, Dave Airlie wrote: > From: Dave Airlie > > anv merges the tess info correctly, but radv wasn't doing this. > > This fixes hangs in > dEQP-VK.tessellation.winding.default_domain.hlsl_triangles_ccw >

Re: [Mesa-dev] [PATCH 2/2] ac/nir: fix lds store for patch outputs.

2017-12-18 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Mon, Dec 18, 2017 at 7:55 AM, Dave Airlie wrote: > From: Dave Airlie > > This wasn't calculating the correct value, this along with > a nir patch fixes a regression in: > dEQP-VK.tessellation.shader_input_output.barrier &g

[Mesa-dev] [PATCH 3/3] radv: Advertise sync fd import and export.

2017-12-18 Thread Bas Nieuwenhuizen
Passes dEQP-VK.*.sync_fd.* --- src/amd/vulkan/radv_device.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 0c31bfb9b44..51488285b09 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vu

[Mesa-dev] [PATCH 1/3] radv/amdgpu: wrap sync fd import/export.

2017-12-18 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_radeon_winsys.h | 5 + src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 21 + 2 files changed, 26 insertions(+) diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index e851c3edf86..45f58f063a4 100644 -

[Mesa-dev] [PATCH 2/3] radv: Implement sync file import/export for fences & semaphores.

2017-12-18 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_device.c | 115 --- 1 file changed, 87 insertions(+), 28 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index a4ec912ff2c..0c31bfb9b44 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vul

[Mesa-dev] [PATCH] radv: Use a sort for rebuilding the sparse buffer bo list.

2017-12-19 Thread Bas Nieuwenhuizen
It uses slightly more memory (though still bounded by the number of mapped ranges), but gives less quadratic behavior. Cuts 4 minutes from the runtime of the CTS *.sparse.* tests. --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 45 ++- 1 file changed, 24 insertions(+),

Re: [Mesa-dev] [PATCH 1/7] radv: create pipeline layout objects for all meta operations

2017-12-19 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Mon, Dec 18, 2017 at 7:38 PM, Samuel Pitoiset wrote: > They are dummy objects but the spec requires layout to not be > NULL, this just makes sure we are creating valid pipeline layout > objects. This will allow us to remove some usele

Re: [Mesa-dev] [PATCH] radv: Use a sort for rebuilding the sparse buffer bo list.

2017-12-19 Thread Bas Nieuwenhuizen
Yep, funny that it did not hang during my testing. Thanks! On Tue, Dec 19, 2017 at 7:50 PM, Eric Engestrom wrote: > On Tuesday, 2017-12-19 09:02:57 +0100, Bas Nieuwenhuizen wrote: >> It uses slightly more memory (though still bounded by the number >> of mapped ranges), but gives

Re: [Mesa-dev] [PATCH] radv/gfx9: fix primitive topology when adjacency is used

2017-12-20 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Wed, Dec 20, 2017 at 8:57 PM, Samuel Pitoiset wrote: > Found by inspection. > > Cc: 17.3 > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_pipeline.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [Mesa-dev] [PATCH] Revert "radv: do not allocate CMASK or DCC for small surfaces"

2017-12-20 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Wed, Dec 20, 2017 at 9:07 PM, Samuel Pitoiset wrote: > This reverts commit ff0f17da1446e7aa965e06c04a6ad5a55d95463d. > > See the TODO. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_image.c | 17 +++--

Re: [Mesa-dev] [PATCH] radv: fix issue with multisample positions and interp_var_at_sample.

2017-12-21 Thread Bas Nieuwenhuizen
Nice catch! Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 21, 2017 at 5:05 AM, Dave Airlie wrote: > From: Dave Airlie > > This fixes vmfaults seen on vega with: > dEQP-VK.pipeline.multisample_interpolation.sample_interpolate_at_single_sample_.128_128_1.samples_1 > > These

Re: [Mesa-dev] [PATCH] radv: reduce the number of small surfaces that need CMASK or DCC

2017-12-21 Thread Bas Nieuwenhuizen
Assuming you tested with vega, Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 21, 2017 at 5:45 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_image.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/amd/vul

Re: [Mesa-dev] [PATCH 2/2] amd/common: add ac_export_mrt_z() helper

2017-12-21 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Thu, Dec 21, 2017 at 5:53 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/common/ac_nir_to_llvm.c | 64 +++- > src/amd/common/ac_shader_util.c

Re: [Mesa-dev] [PATCH 2/4] radv/gfx9: add 3d sampler image->buffer copy shader. (v3)

2017-12-21 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 21, 2017 at 2:50 AM, Dave Airlie wrote: > From: Dave Airlie > > On GFX9 we must access 3D textures with 3D samplers AFAICS. > > This fixes: > dEQP-VK.api.image_clearing.core.clear_color_image.3d.single_layer > > on GFX9 f

Re: [Mesa-dev] [PATCH 1/4] radv: fix surface max layer count

2017-12-21 Thread Bas Nieuwenhuizen
On Thu, Dec 21, 2017 at 2:50 AM, Dave Airlie wrote: > From: Dave Airlie > > looking at traces I noticed we'd set slice_max too large sometimes. Too small? Otherwise patch 1,3,4 are also Reviewed-by: Bas Nieuwenhuizen > > This should fix it. > > Signed-off-by: Dav

Re: [Mesa-dev] [PATCH 1/2] radv: handle depth/stencil image copy with layouts better. (v3)

2017-12-21 Thread Bas Nieuwenhuizen
e_level_layer(dest_image, > + dest_image_layout, > > &pRegions[r].dstSubresource); > > /* for DCC */ > @@ -429,7 +440,9 @@ void radv_CmdCopyImage( > RADV_FROM_H

[Mesa-dev] [PATCH] radv: Fix DCC compatible formats.

2017-12-22 Thread Bas Nieuwenhuizen
DCC was disabled when the image format is !!supported, which is one ! too many. Ironically the commit that introduced it was supposed to lead to more DCC use ... Fixes: 969537d9358 "radv: Add support for more DCC compression with VK_KHR_image_format_list." --- src/amd/vulkan/radv_image.c | 2 +

Re: [Mesa-dev] [PATCH 3/6] amd/common: Add detection of the syncobj wait/signal/reset ioctls.

2017-12-26 Thread Bas Nieuwenhuizen
6:29 PM, Marek Olšák wrote: > Does this mean that radeonsi shouldn't use amdgpu_cs_syncobj_wait on older > DRM? > > Does it make sense to have separate has_syncobj and has_syncobj_wait flags? > > Marek > > On Sun, Dec 17, 2017 at 1:11 AM, Bas Nieuwenhuizen > wro

[Mesa-dev] [PATCH 4/5] radv: Fix fragment resolve destination offset.

2017-12-26 Thread Bas Nieuwenhuizen
The position start at (dst.x, dst.y), so if we want the source to start at (src.x, src.y), we have to offset by (src.x-dst.x,src.y-dst.y). Haven't tested that this fixed anything yet, but found by inspection. Fixes: 69136f4e633 "radv/meta: add resolve pass using fragment/vertex shaders" --- src/a

[Mesa-dev] [PATCH 2/5] radv: Flush caches before subpass resolve.

2017-12-26 Thread Bas Nieuwenhuizen
Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" --- src/amd/vulkan/radv_meta_resolve_cs.c | 8 src/amd/vulkan/radv_meta_resolve_fs.c | 10 ++ 2 files changed, 18 insertions(+) diff --git a/src/amd/vulkan/radv_meta_resolve_cs.c b/src/amd/vulkan/radv_meta

[Mesa-dev] [PATCH 5/5] radv: Always use fragment resolve if dest uses DCC.

2017-12-26 Thread Bas Nieuwenhuizen
HW resolve does not support it either. --- src/amd/vulkan/radv_meta_resolve.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index e73a950ab7c..26489b7834f 100644 --- a/src/amd/vulkan/radv_meta_r

[Mesa-dev] [PATCH 3/5] radv: Don't handle DCC in compute resolve.

2017-12-26 Thread Bas Nieuwenhuizen
If the destination has DCC, we will use the FS resolve. --- src/amd/vulkan/radv_meta_resolve_cs.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_meta_resolve_cs.c b/src/amd/vulkan/radv_meta_resolve_cs.c index 5b6cea6c103..7c569aa9202 100644 --- a/src/a

[Mesa-dev] [PATCH 1/5] radv: Invert condition for all samples identical during resolve.

2017-12-26 Thread Bas Nieuwenhuizen
the samples_identical instruction returns 0 if they are differet, so we have to do the extra work if the result is 0, not if it is != 0. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" --- src/amd/vulkan/radv_meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [Mesa-dev] [PATCH 1/3] amd/common/radv/radeonsi: use register defines for dcc block sizes.

2017-12-26 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for this series. On Tue, Dec 26, 2017 at 11:19 PM, Dave Airlie wrote: > From: Dave Airlie > > These are just taken from amdvlk, we probably knew these already, > but may as well port them now. > > Signed-off-by: Dave Airlie > --- &g

Re: [Mesa-dev] [PATCH] radv/gfx9: use correct stencil format for tc compat htile.

2017-12-27 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Wed, Dec 27, 2017 at 2:24 AM, Dave Airlie wrote: > From: Dave Airlie > > This needs to correspond to the bit depth of the Z plane. > > noticed in passing reading amdvlk. > > Signed-off-by: Dave Airlie > --- > src/amd/vulkan/radv

Re: [Mesa-dev] [PATCH] radv: don't do format replacement on tc compat htile surfaces.

2017-12-27 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Wed, Dec 27, 2017 at 8:04 AM, Dave Airlie wrote: > From: Dave Airlie > > For copies the texture unit needs to know the depth format so > it can read the htile data properly. > >

Re: [Mesa-dev] [PATCH 4/5] radv: Fix fragment resolve destination offset.

2017-12-27 Thread Bas Nieuwenhuizen
On Wed, Dec 27, 2017 at 5:25 AM, Dieter Nützel wrote: > Am 27.12.2017 01:20, schrieb Bas Nieuwenhuizen: >> >> The position start at (dst.x, dst.y), so if we want the source to >> start at (src.x, src.y), we have to offset by (src.x-dst.x,src.y-dst.y). >> >> Haven&

[Mesa-dev] [PATCH] radv: Use correct frambuffer size for partial FS resolves.

2017-12-27 Thread Bas Nieuwenhuizen
Framebuffer is from 0,0, not (dst.x, dst.y). Fixes: 69136f4e633 "radv/meta: add resolve pass using fragment/vertex shaders" --- src/amd/vulkan/radv_meta_resolve_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_meta_resolve_fs.c b/src/amd/vulkan/rad

Re: [Mesa-dev] [PATCH] vulkan/wsi: free cmd pools

2017-12-27 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 28, 2017 at 12:47 AM, Dave Airlie wrote: > From: Dave Airlie > > We destroy the pools but don't free the container. > > This fixes: > dEQP-VK.wsi.xlib.swapchain.simulate_oom* > > Fixes: d50937f137 (vulkan/wsi: Implement

Re: [Mesa-dev] [PATCH] radv: fix events on compute queues.

2017-12-28 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 28, 2017 at 7:29 AM, Dave Airlie wrote: > From: Dave Airlie > > The event emission wasn't sending the correct packet for gfx8 compute > queues, which explains why it works on vega fine. > > This fixes the mpv vulkan hang. >

Re: [Mesa-dev] [PATCH] radv: fix pipeline statistics end query on compute queue

2017-12-28 Thread Bas Nieuwenhuizen
Please add a fixes tag. Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 28, 2017 at 7:33 AM, Dave Airlie wrote: > From: Dave Airlie > > It's legal to a pipeline stat query on a compute queue, > but we'd emit the wrong packet here. This should fix it to emit > the correct

Re: [Mesa-dev] [PATCH] radv: move local bos usage to a perftest flag.

2017-12-28 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Dec 28, 2017 at 7:14 AM, Dave Airlie wrote: > From: Dave Airlie > > These seem mildly unstable on vega, crashing CTS in various fun ways, > and looks like leaking memory. > > Disable for now, but leave the option to enable them. >

Re: [Mesa-dev] [PATCH] radeonsi: don't use fast color clear for small images even on APUs

2017-12-28 Thread Bas Nieuwenhuizen
On Thu, Dec 28, 2017 at 3:54 PM, Marek Olšák wrote: > On Thu, Dec 28, 2017 at 12:29 PM, Konstantin Kharlamov > wrote: >> I'm wondering, how is r600g different in that regard? I tried wiring up the >> code into evergreen_do_fast_color_clear(), both in this state and by using >> 256*256 — however

[Mesa-dev] [PATCH 5/9] radv: Make color meta operations layout aware.

2017-12-28 Thread Bas Nieuwenhuizen
For fast clear eliminate and decompressions, we always use the most compressed format. For clears, the code already creates a renderpass on demand with the exact same layout as specified. Otherwise we start distinguishing between GENERAL and TRANSFER_DST_OPTIMAL. --- src/amd/vulkan/radv_meta_bli

[Mesa-dev] [PATCH 8/9] radv: Decompress copy destination if formats are incompatible.

2017-12-28 Thread Bas Nieuwenhuizen
If both source and destination are DCC compressed, and their formats are not compatible, we need to decompress one of them to make sure we can do reinterpretation (which needs src format == dst format) . --- src/amd/vulkan/radv_meta_copy.c | 27 +-- 1 file changed, 25 inser

[Mesa-dev] [PATCH 3/9] radv: Use the meta fast clear destructor on construction failure.

2017-12-28 Thread Bas Nieuwenhuizen
Simplifies failure paths. The caller already calls radv_device_finish_meta_fast_clear_flush_state on failure. --- src/amd/vulkan/radv_meta_fast_clear.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fas

[Mesa-dev] [PATCH 7/9] radv: Disable DCC for GENERAL layout and compute transfer dest.

2017-12-28 Thread Bas Nieuwenhuizen
Apps can use this for render feedback loops, where things are defined if they render each pixel only once. However, DCC fails here, as the level of coherence is a block not a pixel, so disable it. This is also going to help implementing other stuff. Even if we optimize this later to only happen i

[Mesa-dev] [PATCH 1/9] radv: Don't enable DCC / TC compat HTILE for storage images.

2017-12-28 Thread Bas Nieuwenhuizen
We don't get a layout when binding to a descriptor set, but can assume that the LAYOUT is GENERAL. For DCC stores with the DCC bits set will result in a hang, so better be safe than sorry. --- src/amd/vulkan/radv_image.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --gi

[Mesa-dev] [PATCH 2/9] radv: Add GFX DCC decompress.

2017-12-28 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/radv_meta_fast_clear.c | 94 ++- src/amd/vulkan/radv_private.h | 1 + 2 files changed, 83 insertions(+), 12 deletions(-) diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c index 1acf510359d..44c2f

[Mesa-dev] [PATCH 4/9] radv: Add compute DCC decompress.

2017-12-28 Thread Bas Nieuwenhuizen
We do an in place copy where we read compressed and write decompressed. By doing this in sizes that cover entire DCC blocks and waiting for all reads in the block before starting to write we avoid corruption. In the end we clear the DCC metadata to 0x. --- src/amd/vulkan/radv_meta.h

[Mesa-dev] [PATCH 6/9] radv: Don't init DCC metadata during FS resolve.

2017-12-28 Thread Bas Nieuwenhuizen
It should already be valid there + the RB will update it during rendering. --- src/amd/vulkan/radv_meta_resolve_fs.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/amd/vulkan/radv_meta_resolve_fs.c b/src/amd/vulkan/radv_meta_resolve_fs.c index 798129ec854..99314d94e53 100644 --- a/sr

[Mesa-dev] [PATCH 9/9] radv: Enable DCC with transfers.

2017-12-28 Thread Bas Nieuwenhuizen
Before this DCC was in practice disabled for most games. This enables practical DCC use. Expect a 5-10% perf increase on a bunch of games on vega @ 4k. --- src/amd/vulkan/radv_image.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan

[Mesa-dev] [PATCH] radv: Also set DCC params for sampling for input attachment usage.

2017-12-29 Thread Bas Nieuwenhuizen
Those are implemented as texture sampling, so we need to make the texture TC-compatible too. Fixes: 34d23e82ca9 "radv: set some dcc parameters depending on if texture will be sampled" --- src/amd/vulkan/radv_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/v

[Mesa-dev] [PATCH 1/2] radv: Add flag for enabling binning.

2017-12-30 Thread Bas Nieuwenhuizen
Letting it be disabled by default. --- src/amd/vulkan/radv_debug.h | 1 + src/amd/vulkan/radv_device.c | 8 2 files changed, 9 insertions(+) diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index af07564833e..5b37bfe0847 100644 --- a/src/amd/vulkan/radv_debug.h +++

[Mesa-dev] [PATCH 2/2] radv: Implement binning on GFX9.

2017-12-30 Thread Bas Nieuwenhuizen
Overall it does not really help or hurt. The deferred demo gets 1% improvement and some games a 3% decrease, so I don't think this should be enabled by default. But with the code upstream it is easier to experiment with it. --- src/amd/vulkan/radv_cmd_buffer.c | 16 ++ src/amd/vulkan/radv_pipeli

[Mesa-dev] [PATCH] radv: Use the alternative workaround for GFX9 scissor issues.

2017-12-30 Thread Bas Nieuwenhuizen
I don't like having to fush, so this introduces the other workaround. Since my experience is that context register writes are pretty cheap, this should not have too much overhead. I haven't seen any significant perf changes in benchmarks or games though. --- src/amd/vulkan/radv_cmd_buffer.c | 22

[Mesa-dev] [PATCH] ac/nir: Handle loading data from compact arrays.

2018-01-01 Thread Bas Nieuwenhuizen
Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" --- src/amd/common/ac_nir_to_llvm.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index d9f2cb408c3..864f58b56d0 100644 ---

[Mesa-dev] [PATCH] radv: Allow writing 0 scissors.

2018-01-01 Thread Bas Nieuwenhuizen
When rasterization is disabled we can have that few. Fixes: 76603aa90b8 "radv: Drop the default viewport when 0 viewports are given." --- src/amd/vulkan/si_cmd_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buf

[Mesa-dev] [PATCH] radv: Use correct HTILE expanded words.

2018-01-03 Thread Bas Nieuwenhuizen
Seems like users are actually hitting 0x actually making things broken for them, and the mad max regression is fixed, so lets put this in once more. Fixes: af2844116fd "radv: Revert HTILE reset word to 0x." --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+

[Mesa-dev] [PATCH] radv: Use correct HTILE expanded words.

2018-01-03 Thread Bas Nieuwenhuizen
Seems like users are actually hitting 0x actually making things broken for them, and the mad max regression is fixed, so lets put this in once more. v2: Use 0xf for depth-only htile. (Dave) Fixes: af2844116fd "radv: Revert HTILE reset word to 0x." --- src/amd/vulkan/radv_cmd_buff

Re: [Mesa-dev] [PATCH] ac: rename has_syncobj_wait -> has_syncobj_wait_for_submit

2018-01-03 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen We should probably do something similar for has_sync_file since sync_files are significantly older. On Wed, Jan 3, 2018 at 10:51 PM, Marek Olšák wrote: > From: Marek Olšák > > --- > src/amd/common/ac_gpu_info.c | 2 +- > src/amd/commo

[Mesa-dev] [PATCH] ac: rename has_sync_file to has_fence_to_handle.

2018-01-03 Thread Bas Nieuwenhuizen
sync_files are in linux since 4.7, while the amdgpu fence_to_handle ioctl is only in 4.15. In particular we don't need it for sync_file in radv, because everything happens via syncobjs, which got support earlier than fence_to_handle. --- src/amd/common/ac_gpu_info.c| 4 ++-- src/amd/c

[Mesa-dev] [PATCH] radv: Add support for ETC2 textures.

2018-01-03 Thread Bas Nieuwenhuizen
Was surprised that is even supported by Vega. --- src/amd/vulkan/radv_device.c| 4 +++- src/amd/vulkan/radv_formats.c | 36 src/amd/vulkan/vk_format_layout.csv | 20 ++-- 3 files changed, 49 insertions(+), 11 deletions(-) diff --

[Mesa-dev] [PATCH] radv: Invildate L1 for VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT.

2018-01-03 Thread Bas Nieuwenhuizen
These are just shaders reads, so we need to invalidate L1. Fixes: 6dbb0eaccc "radv: handle subpass cache flushes" --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 6dc8

[Mesa-dev] [PATCH] radv: Use correct flush bits for flushing L2 during CB/DB flushes.

2018-01-03 Thread Bas Nieuwenhuizen
Copied from radeonsi. Putting in the correct metadata flush commands for eventually not flushing L2 on CB/DB switch. Does not remove the need for V_028A90_CACHE_FLUSH_AND_INV_TS_EVENT at the moment. --- src/amd/vulkan/si_cmd_buffer.c | 29 - 1 file changed, 16 inserti

[Mesa-dev] [PATCH] radv: reset semaphores & fences on sync_file export.

2018-01-03 Thread Bas Nieuwenhuizen
Per spec: "Additionally, exporting a fence payload to a handle with copy transference has the same side effects on the source fence’s payload as executing a fence reset operation. If the fence was using a temporarily imported payload, the fence’s prior permanent payload will be restored." And

Re: [Mesa-dev] [PATCH] radv: Add support for ETC2 textures.

2018-01-04 Thread Bas Nieuwenhuizen
an driver don’t’ support that. > > Thanks. > Best Regards, > David > >> On Jan 4, 2018, at 8:38 AM, Bas Nieuwenhuizen >> wrote: >> >> Was surprised that is even supported by Vega. >> --- >> src/amd/vulkan/radv_dev

Re: [Mesa-dev] [PATCH] radv: enable denorms for 64-bit and 16-bit floats

2018-01-04 Thread Bas Nieuwenhuizen
Looking at AMDGPUAsmPrinter::EmitProgramInfoSI in LLVM that is only set for compute shaders. So fix radv to default to the proposed value and fix LLVM to pass it through for all shaders? On Thu, Jan 4, 2018 at 11:54 AM, Samuel Pitoiset wrote: > > > On 12/28/2017 11:08 PM, Matt Arsenault wrote: >>

Re: [Mesa-dev] [PATCH] radv: limit the scissor bug workaround to Vega 10 and Raven

2018-01-04 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Jan 4, 2018 at 4:24 PM, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_cmd_buffer.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/amd/vulkan/radv_cmd_buffer.c

[Mesa-dev] [PATCH 1/3] radv: Generate VK_ANDROID_native_buffer.

2018-01-04 Thread Bas Nieuwenhuizen
--- src/amd/vulkan/Makefile.am | 6 +- src/amd/vulkan/radv_entrypoints_gen.py | 4 +++- src/amd/vulkan/radv_extensions.py | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am index 6b352aebf9..e1a04e8c7f

<    4   5   6   7   8   9   10   11   12   13   >