[Mesa-dev] [PATCH 2/2] anv: Add support for shaderStorageImageWriteWithoutFormat

2017-02-09 Thread Alex Smith
ared write-only in the shader. Tested on both Sascha Willems' computeshader sample (with the original shaders and ones modified to declare images writeonly and omit their format qualifiers) and on our own shaders for which we need support for this. Signed-off-by: Alex Smith --- src/intel

[Mesa-dev] [PATCH 1/2] spirv: Add support for SpvCapabilityStorageImageWriteWithoutFormat

2017-02-09 Thread Alex Smith
Allow that capability if the driver indicates that it is supported, and flag whether images are read-only/write-only in the nir_variable (based on the NonReadable and NonWritable decorations), which drivers may need to implement this. Signed-off-by: Alex Smith --- src/compiler/spirv/nir_spirv.h

Re: [Mesa-dev] [PATCH 2/2] anv: Add support for shaderStorageImageWriteWithoutFormat

2017-02-13 Thread Alex Smith
with is almost exactly what I would > have done. :-) > > On Thu, Feb 9, 2017 at 8:06 AM, Alex Smith > wrote: > >> This allows shaders to write to storage images declared with unknown >> format if they are decorated with NonReadable ("writeonly" in GLSL). >&

Re: [Mesa-dev] [PATCH 2/2] anv: Add support for shaderStorageImageWriteWithoutFormat

2017-02-13 Thread Alex Smith
Hi Lionel, On 13 February 2017 at 17:28, Lionel Landwerlin < lionel.g.landwer...@intel.com> wrote: > On 09/02/17 16:06, Alex Smith wrote: > >> This allows shaders to write to storage images declared with unknown >> format if they are decorated with NonReada

Re: [Mesa-dev] [PATCH] anv/apply_pipeline_layout: Set image.write_only to false

2017-02-13 Thread Alex Smith
eries when I send a new version of the other patches, or can you handle applying this one before mine? Thanks, Alex > > Cc: Alex Smith > --- > src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/intel/

Re: [Mesa-dev] [PATCH 1/2] spirv: Add support for SpvCapabilityStorageImageWriteWithoutFormat

2017-02-14 Thread Alex Smith
g/archives/mesa-dev/2017-February/144167.html > > Iago > > > - > > Lionel > > > > On 13/02/17 16:10, Jason Ekstrand wrote: > > > Reviewed-by: Jason Ekstrand > > > > > > On Thu, Feb 9, 2017 at 8:06 AM, Alex Smith > > .com> wrote: >

[Mesa-dev] [PATCH 1/3] anv/apply_pipeline_layout: Set image.write_only to false

2017-02-14 Thread Alex Smith
mat will need to effectively revert this commit. Signed-off-by: Alex Smith --- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 12 1 file changed, 12 insertions(+) diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c in

[Mesa-dev] [PATCH v2 3/3] anv: Add support for shaderStorageImageWriteWithoutFormat

2017-02-14 Thread Alex Smith
ared write-only in the shader. Tested on both Sascha Willems' computeshader sample (with the original shaders and ones modified to declare images writeonly and omit their format qualifiers) and on our own shaders for which we need support for this. Signed-off-by: Alex Smith Reviewed-b

[Mesa-dev] [PATCH v2 2/3] spirv: Add support for SpvCapabilityStorageImageWriteWithoutFormat

2017-02-14 Thread Alex Smith
Allow that capability if the driver indicates that it is supported, and flag whether images are read-only/write-only in the nir_variable (based on the NonReadable and NonWritable decorations), which drivers may need to implement this. Signed-off-by: Alex Smith Reviewed-by: Jason Ekstrand --- No

Re: [Mesa-dev] [PATCH 1/2] spirv: Add support for SpvCapabilityStorageImageWriteWithoutFormat

2017-02-14 Thread Alex Smith
Hi Iago, On 14 February 2017 at 11:19, Iago Toral wrote: > On Tue, 2017-02-14 at 09:46 +0000, Alex Smith wrote: > > On 14 February 2017 at 08:45, Iago Toral wrote: > > > On Mon, 2017-02-13 at 16:29 +, Lionel Landwerlin wrote: > > > > Run this by our CI earlie

[Mesa-dev] [PATCH] anv: Set driver version to Mesa version

2017-06-05 Thread Alex Smith
As already done by RADV, this code is lifted straight from there. Signed-off-by: Alex Smith --- src/intel/vulkan/anv_device.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index aacd07f

[Mesa-dev] [PATCH] anv: Set better descriptor set limits

2017-06-05 Thread Alex Smith
resources of around 250. This allows Dawn of War III to render correctly on ANV. Signed-off-by: Alex Smith --- src/intel/vulkan/anv_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index ab484ed

Re: [Mesa-dev] [PATCH] anv: Set driver version to Mesa version

2017-06-05 Thread Alex Smith
On 5 June 2017 at 17:23, Jason Ekstrand wrote: > On Mon, Jun 5, 2017 at 9:19 AM, Bas Nieuwenhuizen > wrote: > >> On Mon, Jun 5, 2017 at 5:40 PM, Jason Ekstrand >> wrote: >> > On Mon, Jun 5, 2017 at 7:48 AM, Alex Smith > > >> > wrote: >> &g

[Mesa-dev] [PATCH 2/3] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Alex Smith
This means it can be reused for other Vulkan drivers. Also fix up a typo, need to search for '.' in the version string rather than ','. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 24 + src/vulkan/Makefile.sources | 1 + src/vulkan/ut

[Mesa-dev] [PATCH 1/3] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Alex Smith
We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c| 2 +- src/amd/vulkan/radv_formats.c | 3 ++- src/amd/vulkan

[Mesa-dev] [PATCH v2 3/3] anv: Set driver version to Mesa version

2017-06-06 Thread Alex Smith
As already done by RADV. v2: Move version calculation function to src/vulkan/util to share with RADV. Signed-off-by: Alex Smith --- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan

Re: [Mesa-dev] [PATCH 1/3] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Alex Smith
Aha, sorry, I missed that. Do you want me to fold your patch into this one and send a v2? Alex On 6 June 2017 at 12:11, Tapani Pälli wrote: > Looks nice to me, I've sent required changes to Android build system for > this change as addition. > > > On 06/06/2017 12:42

[Mesa-dev] [PATCH v2] util/vulkan: Move Vulkan utilities to src/vulkan/util

2017-06-06 Thread Alex Smith
We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. v2: Android build system changes (from Tapani Pälli) Signed-off-by: Alex Smith --- Android.common.mk | 1 + src/amd/vulkan

[Mesa-dev] [PATCH v2] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Alex Smith
This means it can be reused for other Vulkan drivers. Also fix up a typo, need to search for '.' in the version string rather than ','. v2: Remove unneeded temporary version variable (Emil, Eric) Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 24 +-

Re: [Mesa-dev] [PATCH v2] radv/vulkan: Move radv_get_driver_version to src/vulkan/util

2017-06-06 Thread Alex Smith
Yes, please! On 6 June 2017 at 16:12, Jason Ekstrand wrote: > Reviewed-by: Jason Ekstrand > > Alex, do you need someone to push these for you? > > On Tue, Jun 6, 2017 at 8:09 AM, Alex Smith > wrote: > >> This means it can be reused for other Vulkan drivers. Als

Re: [Mesa-dev] [PATCH] Android: vulkan: fix build error due to extra )

2017-06-08 Thread Alex Smith
/src/vulkan/Android.mk: > libmesa_vulkan_util: Unused source files: util/vk_util.h). > > Fixes: 621b3410f5f8 ("util/vulkan: Move Vulkan utilities to > src/vulkan/util") > Cc: Tapani Pälli > Cc: Alex Smith > Signed-off-by: Rob Herring > --- > src/vulkan/Android.mk | 2 +

[Mesa-dev] [PATCH] radv: Set active_stages after getting cached shaders

2017-10-18 Thread Alex Smith
Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()") Signed-off-by: Alex Smith --- src/amd/vulkan/radv_pipeline.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 559862678e..

[Mesa-dev] [PATCH] radv: Don't free NIR shaders if tracing

2017-10-18 Thread Alex Smith
Fixes a crash while generating a hang report. Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()") Signed-off-by: Alex Smith --- src/amd/vulkan/radv_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/

Re: [Mesa-dev] [PATCH 2/2] radv: copy indirect lowering settings from radeonsi

2017-10-19 Thread Alex Smith
Tested-by: Alex Smith Thanks! On 18 October 2017 at 23:27, Timothy Arceri wrote: > It looks the original indirect mask was probably copied from > ANV. > > Sascha Willems demo results: > > tessellation ~4000 -> ~4200 fps > > V2: continue lowering local indirect due t

[Mesa-dev] [PATCH] radv: Fix pipeline cache locking issues

2017-10-19 Thread Alex Smith
Need to lock around the whole process of retrieving cached shaders, and around GetPipelineCacheData. This fixes GPU hangs observed when creating multiple pipelines in parallel, which appeared to be due to invalid shader code being pulled from the cache. Signed-off-by: Alex Smith --- src/amd

Re: [Mesa-dev] [PATCH] radv: Fix pipeline cache locking issues

2017-10-23 Thread Alex Smith
nes in > > parallel, which appeared to be due to invalid shader code being pulled > > from the cache. > > > > Signed-off-by: Alex Smith > > --- > > src/amd/vulkan/radv_pipeline_cache.c | 30 > +++--- > > 1 file changed, 23 inser

[Mesa-dev] [PATCH] radv: Update code pointer correctly if a variant is already created

2017-10-23 Thread Alex Smith
ry (we either create all or none of the variants), but fix this anyway in case things change later. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_pipeline_cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cach

Re: [Mesa-dev] [PATCH] ac/nir: generate correct instruction for atomic min/max on unsigned images

2017-10-25 Thread Alex Smith
Forgot to add Cc: "17.2 17.3" On 25 October 2017 at 11:24, Matthew Nicholls < mnicho...@feralinteractive.com> wrote: > --- > src/amd/common/ac_nir_to_llvm.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to

[Mesa-dev] [PATCH 1/2] vulkan: Update headers and registry to 1.0.64

2017-10-25 Thread Alex Smith
Signed-off-by: Alex Smith --- include/vulkan/vulkan.h| 50 +- src/vulkan/registry/vk.xml | 159 + 2 files changed, 181 insertions(+), 28 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index e1398c68ba

[Mesa-dev] [PATCH 2/2] radv: Implement VK_AMD_shader_info

2017-10-25 Thread Alex Smith
t the shader debug info when we retrieve cached shaders. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 9 ++ src/amd/vulkan/radv_extensions.py| 1 + src/amd/vulkan/radv_pipeline.c | 2 +- src/amd/vulkan/radv_pipeline_cache.c | 11 ++- src/amd/vulkan/radv_priv

Re: [Mesa-dev] [PATCH 2/2] radv: Implement VK_AMD_shader_info

2017-10-25 Thread Alex Smith
that if we've spilled then we've used all available registers, so if numUsed{V,S}gprs is greater than the number available, then you'd know that the number spilled is the difference between the two. Can we have spilling when num_{v,s}gprs is less than the number available? Alex >

Re: [Mesa-dev] [PATCH 2/2] radv: Implement VK_AMD_shader_info

2017-10-26 Thread Alex Smith
On 25 October 2017 at 21:58, Bas Nieuwenhuizen wrote: > On Wed, Oct 25, 2017 at 4:03 PM, Samuel Pitoiset > wrote: > > > > > > On 10/25/2017 02:20 PM, Alex Smith wrote: > >> > >> On 25 October 2017 at 12:46, Samuel Pitoiset >> <mailto:samu

[Mesa-dev] [PATCH v2] radv: Implement VK_AMD_shader_info

2017-10-26 Thread Alex Smith
t the shader debug info when we retrieve cached shaders. v2: Improvements to resource usage reporting Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 9 ++ src/amd/vulkan/radv_extensions.py| 1 + src/amd/vulkan/radv_pipeline.c | 2 +- src/amd/v

[Mesa-dev] [PATCH v3] radv: Implement VK_AMD_shader_info

2017-10-27 Thread Alex Smith
t the shader debug info when we retrieve cached shaders. v2: Improvements to resource usage reporting v3: Disassembly string must be null terminated (string_buffer's length does not include the terminator) Signed-off-by: Alex Smith --- src/amd/vulkan/radv_device.c | 9 ++ src/

[Mesa-dev] [PATCH] radv: Fix -Wformat-security issue

2017-10-30 Thread Alex Smith
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103513 Fixes: de889794134e ("radv: Implement VK_AMD_shader_info") Signed-off-by: Alex Smith --- src/amd/vulkan/radv_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/

Re: [Mesa-dev] [PATCH] radv: do not advertise D16_UNORM on VI

2017-11-03 Thread Alex Smith
Hi Samuel, D16_UNORM support is mandatory on 2D images according to the spec ("Features, Limits and Formats" chapter). Thanks, Alex On 3 November 2017 at 10:02, Samuel Pitoiset wrote: > TC compatible HTILE only supports D32_SFLOAT on VI, while GFX9 > supports both. This is a recommandation for

[Mesa-dev] [PATCH] spirv: Use correct type for sampled images

2017-11-06 Thread Alex Smith
the wrong LLVM intrinsics being emitted by RADV. Signed-off-by: Alex Smith Cc: "17.2 17.3" --- src/compiler/spirv/spirv_to_nir.c | 10 -- src/compiler/spirv/vtn_private.h | 1 + src/compiler/spirv/vtn_variables.c | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) di

Re: [Mesa-dev] [PATCH] radv: force enable LLVM sisched for The Talos Principle

2017-11-07 Thread Alex Smith
On 7 November 2017 at 09:28, Samuel Pitoiset wrote: > > > On 11/07/2017 10:18 AM, Michel Dänzer wrote: > >> On 07/11/17 10:08 AM, Samuel Pitoiset wrote: >> >>> It seems safe and it improves performance by +4% (73->76). >>> >>> Signed-off-by: Samuel Pitoiset >>> --- >>> src/amd/vulkan/radv_devi

[Mesa-dev] [PATCH] nir/spirv: tg4 requires a sampler

2017-11-07 Thread Alex Smith
Gather operations in both GLSL and SPIR-V require a sampler. Fixes gathers returning garbage when using separate texture/samplers (on AMD, was using an invalid sampler descriptor). Signed-off-by: Alex Smith Cc: "17.2 17.3" --- src/compiler/nir/nir.h| 1 - src/comp

Re: [Mesa-dev] [PATCH] spirv: Use correct type for sampled images

2017-11-07 Thread Alex Smith
Thanks Jason. Can someone push this? On 6 November 2017 at 16:21, Jason Ekstrand wrote: > On Mon, Nov 6, 2017 at 2:37 AM, Alex Smith > wrote: > >> We should use the result type of the OpSampledImage opcode, rather than >> the type of the underlying image/samplers. >>

Re: [Mesa-dev] [PATCH] nir/spirv: tg4 requires a sampler

2017-11-07 Thread Alex Smith
Good point :) Will do soon. On 7 November 2017 at 15:46, Jason Ekstrand wrote: > Reviewed-by: Jason Ekstrand > > Given that you already have 27 non-trivial commits in mesa, I think now > would be a good time to apply for commit access. :-) > > On Tue, Nov 7, 2017 at 2

Re: [Mesa-dev] [PATCH] ac/nir: rewrite shared variable handling (v2)

2017-07-14 Thread Alex Smith
his for shared > variables for now until LLVM becomes smarter. > > Cc: Alex Smith > Reviewed-by: Bas Nieuwenhuizen > --- > Alex: I made this by squashing together two patches from my series, so it > should still work, but I'd still like to get your Tested-by before I

[Mesa-dev] [PATCH] radv: Set the RADEON_SURF_OPTIMIZE_FOR_SPACE flag for images

2017-07-17 Thread Alex Smith
one of our games, and brings its VRAM utilisation on RADV in line with AMDGPU-PRO and NVIDIA. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 9e54b95ac3..b58fc70ecc 100644

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

2017-07-21 Thread Alex Smith
ng RADV do basically the same as what radeonsi does. Thanks, Alex On 21 July 2017 at 02:20, Grazvydas Ignotas wrote: > For whatever reason this patch is breaking DOOM. > > Gražvydas > > On Wed, Jul 12, 2017 at 12:29 PM, Alex Smith > wrote: > > If a cube image has VK

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

2017-07-21 Thread Alex Smith
On 21 July 2017 at 15:33, Grazvydas Ignotas wrote: > On Fri, Jul 21, 2017 at 11:21 AM, Alex Smith > wrote: > > > > I don't have Doom available to test. How's it broken? > > After the menu loads, it gets stuck flipping between some 2 (?) > arbitra

[Mesa-dev] [PATCH] radv: Generate storage image descriptors unconditionally

2017-07-21 Thread Alex Smith
mages with VK_IMAGE_USAGE_STORAGE_BIT") Reported-by: Grazvydas Ignotas Signed-off-by: Alex Smith --- src/amd/vulkan/radv_image.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index f5fb790dda..d8b7e8f421 100644 --- a/src/amd/vulk

Re: [Mesa-dev] [PATCH] radv: fix buffer views on SI/CIK.

2017-07-24 Thread Alex Smith
On 24 July 2017 at 11:44, Dave Airlie wrote: > From: Dave Airlie > > Fixes CTS dEQP-VK.memory.pipeline_barrier.host_write_uniform_ > texel_buffer.1024 > on SI/CIK with radv. > > Fixes: f4e499ec (radv: add initial non-conformant radv vulkan driver) > Signed-off-by: Dave Airlie > --- > src/amd/v

[Mesa-dev] [PATCH] radv: Fix decompression on multisampled depth buffers

2017-08-03 Thread Alex Smith
Need to take the sample count into account in the depth decompress and resummarize pipelines and render pass. Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Signed-off-by: Alex Smith Cc: "17.2" --- Possibly a little late, but I'd really like

Re: [Mesa-dev] [Mesa-stable] [PATCH] radv: Fix decompression on multisampled depth buffers

2017-08-04 Thread Alex Smith
pth target. Alex > > - Bas > > > > > Thanks, > > Marek > > > > On Thu, Aug 3, 2017 at 4:32 PM, Alex Smith > wrote: > >> Need to take the sample count into account in the depth decompress and > >> resummarize pipelines and render pass. >

Re: [Mesa-dev] [PATCH 0/5] Gallium: Passing drirc options to create_screen() and fixing Rocket League

2017-06-22 Thread Alex Smith
On 22 June 2017 at 15:52, Roland Scheidegger wrote: > Am 22.06.2017 um 13:09 schrieb Nicolai Hähnle: >> On 22.06.2017 10:14, Michel Dänzer wrote: >>> On 22/06/17 04:34 PM, Nicolai Hähnle wrote: On 22.06.2017 03:38, Rob Clark wrote: > On Wed, Jun 21, 2017 at 8:15 PM, Marek Olšák wrote: >>

[Mesa-dev] [PATCH] ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffers

2017-06-26 Thread Alex Smith
The buffer intrinsics should be used instead of the image ones. Signed-off-by: Alex Smith Cc: --- This applies on top of James Legg's recent series [1], since they both touch the same function. [1] https://lists.freedesktop.org/archives/mesa-dev/2017-June/160245.html --- src/amd/c

[Mesa-dev] [RFC PATCH 1/2] nir: Add a C wrapper for glsl_type::std430_array_stride

2017-06-27 Thread Alex Smith
Signed-off-by: Alex Smith --- src/compiler/nir_types.cpp | 7 +++ src/compiler/nir_types.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 25980b9..554130c 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler

[Mesa-dev] [RFC PATCH 2/2] ac/nir: Don't treat each element as a vec4 in compute shared memory

2017-06-27 Thread Alex Smith
-off-by: Alex Smith --- RFC since I'm not sure whether this is the best approach to handle this, and there may be something I've missed. No regressions seen in Mad Max or Dawn of War 3, which both have a few shaders which use shared memory. Also no regressions in the CTS 'dEQP-VK.c

[Mesa-dev] [PATCH 1/2] ac/nir: Handle offset for atomics on shared memory

2017-06-30 Thread Alex Smith
Offset wasn't being added to the pointer, so for arrays the operation would always have been performed on the first array element. Signed-off-by: Alex Smith --- Applies on top of my earlier patch: https://lists.freedesktop.org/archives/mesa-dev/2017-June/161103.html --- src/amd/c

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

2017-06-30 Thread Alex Smith
The NIR parameters are ordered "compare, data", matching GLSL, but both the image and buffer LLVM intrinsics take them the other way around. This is already handled correctly for SSBO atomics. Signed-off-by: Alex Smith --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1

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

2017-06-30 Thread Alex Smith
type should be set as a cube. Fix by generating 2 sets of descriptors at view creation time for both storage and non-storage usage, and then choose between them based on descriptor type when writing descriptor sets. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_descriptor_set.c | 18 +++--

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

2017-06-30 Thread Alex Smith
> anyway? If so, someone should fine a bug against the CTS so we can keep > track of the coverage hole. > > > > On June 30, 2017 3:15:57 AM Alex Smith > wrote: > > The NIR parameters are ordered "compare, data", matching GLSL, but both >> the image and bu

Re: [Mesa-dev] [RFC PATCH 2/2] ac/nir: Don't treat each element as a vec4 in compute shared memory

2017-07-04 Thread Alex Smith
variables, I can try and convert shared variables too. >> >> On Tue, Jun 27, 2017 at 8:53 AM, Alex Smith >> wrote: >>> Currently every element in shared memory (including individual elements >>> of an array) are treated as a vec4. For example, the following: >

Re: [Mesa-dev] [PATCH 0/6] radv: Rewrite local & shared variable handling

2017-07-06 Thread Alex Smith
ch fixes an upcoming Feral title. > > Sorry, I worded this wrong -- I don't have any inside information on > Feral titles, and Alex's original patch didn't mention any upcoming > titles. I apologize for any confusion. Don't worry about it :P For the series: Te

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

2017-07-07 Thread Alex Smith
> > 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

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

2017-07-11 Thread Alex Smith
Ping. On 30 June 2017 at 11:18, Alex Smith wrote: > If a cube image has VK_IMAGE_USAGE_STORAGE_BIT set, the type in an image > view's descriptor was set to a 2D array (and a few other fields adjusted > accordingly). This is correct when the image view is actually bound as a > s

Re: [Mesa-dev] [PATCH] radv: set cb base tile swizzles for MRT speedups (v3)

2017-07-11 Thread Alex Smith
On 10 July 2017 at 05:59, Dave Airlie wrote: > From: Dave Airlie > > This patch uses addrlib to workout the tile swizzles according > to the surface index. It seems to produce the same values as > amdgpu-pro for the deferred test. > > v2: don't apply swizzle to CMASK. the eg docs don't mention >

Re: [Mesa-dev] [PATCH] radv: set cb base tile swizzles for MRT speedups (v3)

2017-07-11 Thread Alex Smith
On 11 July 2017 at 14:27, Alex Smith wrote: > On 10 July 2017 at 05:59, Dave Airlie wrote: > >> From: Dave Airlie >> >> This patch uses addrlib to workout the tile swizzles according >> to the surface index. It seems to produce the same values as >> amdgpu

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

2017-07-12 Thread Alex Smith
used as storage images internally. Signed-off-by: Alex Smith Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_descriptor_set.c | 18 ++-- src/amd/vulkan/radv_image.c | 79 src/amd/vulkan/radv_private.h| 6 +++ 3 files change

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

2017-07-12 Thread Alex Smith
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") Signed-off-by: Alex Smith --- src/amd/vulkan/radv_descriptor_set.

Re: [Mesa-dev] [PATCH] radv: set cb base tile swizzles for MRT speedups (v3)

2017-07-13 Thread Alex Smith
On 13 July 2017 at 04:35, Dave Airlie wrote: > On 11 July 2017 at 23:49, Alex Smith wrote: >> On 11 July 2017 at 14:27, Alex Smith wrote: >>> >>> On 10 July 2017 at 05:59, Dave Airlie wrote: >>>> >>>> From: Dave Airlie >>>> >

[Mesa-dev] [PATCH] radv: Add LLVM version to the device name string

2017-12-06 Thread Alex Smith
Allows apps to determine the LLVM version so that they can decide whether or not to enable workarounds for LLVM issues. Signed-off-by: Alex Smith Cc: "17.2 17.3" --- src/amd/vulkan/radv_device.c | 61 +-- src/amd/vulkan/radv_private.h | 2 +

Re: [Mesa-dev] [PATCH] nir/opcodes: Fix constant-folding of bitfield_insert

2017-12-07 Thread Alex Smith
Pushed. On 6 December 2017 at 17:35, Matt Turner wrote: > On Wed, Dec 6, 2017 at 3:55 AM, James Legg > wrote: > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104119 > > CC: > > CC: Samuel Pitoiset > > --- > > src/compiler/nir/nir_opcodes.py | 4 ++-- > > 1 file changed, 2 insertio

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

2017-12-15 Thread Alex Smith
Tested-by: Alex Smith On 15 December 2017 at 15:01, 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 late

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

2017-12-20 Thread Alex Smith
Tested-by: Alex Smith Fixes 3D texture contents being captured incorrectly in RenderDoc for me. On 19 December 2017 at 07:36, Dave Airlie wrote: > From: Dave Airlie > > On GFX9 we must access 3D textures with 3D samplers AFAICS. > > Thi

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

2017-12-20 Thread Alex Smith
to 2D samplers) is expected to work - see VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR. Is there no way to make that work on GFX9? Thanks, Alex On 20 December 2017 at 14:49, Alex Smith wrote: > Tested-by: Alex Smith > > Fixes 3D texture contents being captured incorrectly in RenderDoc for

Re: [Mesa-dev] radv: gfx9 3d image fixes

2017-12-21 Thread Alex Smith
Nice - this does fix the issue I was seeing, thanks. Can at least patches 2 and 3 go to stable? On 21 December 2017 at 01:50, Dave Airlie wrote: > This series fixes about 340 CTS tests on Vega that involve 3D images. > > The two main things are to use 3D samplers for copy paths sources that > a

[Mesa-dev] [PATCH] anv: Add missing unlock in anv_scratch_pool_alloc

2018-01-04 Thread Alex Smith
Fixes hangs seen due to the lock not being released here. Signed-off-by: Alex Smith Cc: mesa-sta...@lists.freedesktop.org --- src/intel/vulkan/anv_allocator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan

[Mesa-dev] [PATCH] anv: Make sure state on primary is correct after CmdExecuteCommands

2018-01-04 Thread Alex Smith
command buffers in some cases. Signed-off-by: Alex Smith Cc: mesa-sta...@lists.freedesktop.org --- src/intel/vulkan/genX_cmd_buffer.c | 8 1 file changed, 8 insertions(+) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 0bd3874db7..f6129f9d67

[Mesa-dev] [PATCH] anv: Take write mask into account in has_color_buffer_write_enabled

2018-01-04 Thread Alex Smith
account in this function. This is consistent with how things are done on i965. Signed-off-by: Alex Smith Cc: mesa-sta...@lists.freedesktop.org --- src/intel/vulkan/genX_pipeline.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/intel/vulkan

[Mesa-dev] [PATCH] anv: Allow PMA optimization to enabled in secondary command buffers

2018-01-05 Thread Alex Smith
command buffer. This improves performance by ~13% on an internal benchmark on Skylake. Signed-off-by: Alex Smith --- src/intel/vulkan/genX_cmd_buffer.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan

Re: [Mesa-dev] [PATCH] anv: Allow PMA optimization to enabled in secondary command buffers

2018-01-05 Thread Alex Smith
Landwerlin > > Thanks! > > > On 05/01/18 11:20, Alex Smith wrote: > >> This was never enabled in secondary buffers because hiz_enabled was >> never set to true for those. >> >> If the app provides a framebuffer in the inheritance info when beginning >>

[Mesa-dev] [PATCH v2] anv: Allow PMA optimization to be enabled in secondary command buffers

2018-01-05 Thread Alex Smith
command buffer. This improves performance by ~13% on an internal benchmark on Skylake. v2: Use anv_cmd_buffer_get_depth_stencil_view(). Signed-off-by: Alex Smith Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/genX_cmd_buffer.c | 22 +- 1 file changed, 21 insertions(+), 1

Re: [Mesa-dev] [PATCH v2] anv: Allow PMA optimization to be enabled in secondary command buffers

2018-01-05 Thread Alex Smith
On 5 January 2018 at 21:43, Jason Ekstrand wrote: > On Fri, Jan 5, 2018 at 9:06 AM, Alex Smith > wrote: > >> This was never enabled in secondary buffers because hiz_enabled was >> never set to true for those. >> >> If the app provides a framebuffer in the inh

Re: [Mesa-dev] [PATCH] spirv: Use correct type for sampled images

2018-01-06 Thread Alex Smith
On 6 January 2018 at 01:03, Jason Ekstrand wrote: > On Tue, Nov 7, 2017 at 3:08 AM, Alex Smith > wrote: > >> Thanks Jason. Can someone push this? >> > > Did you never get push access? > I did - this is commit e9eb3c4753e4f56b03d16d8d6f71d49f1e7b97db. Thanks

Re: [Mesa-dev] [PATCH] anv: Make sure state on primary is correct after CmdExecuteCommands

2018-01-09 Thread Alex Smith
Thanks Jason. I take it you didn't find any other state that needed resetting then? Alex On 9 January 2018 at 16:49, Jason Ekstrand wrote: > From: Alex Smith > > After executing a secondary command buffer, we need to update certain > state on the primary command buffer to r

Re: [Mesa-dev] [PATCH 2/2] radv: inline push constants where possible.

2018-01-11 Thread Alex Smith
Hi Dave, This seems to cause some breakage when both push constants and dynamic descriptors are used. I've commented 2 fixes inline below needed to avoid a crash, but with those F1 2017 will still hang pretty quick before the main menu, not sure why so far. Mad Max is OK but that doesn't use dyna

Re: [Mesa-dev] [PATCH 2/2] [rfc] radv: inline push constants where possible. (v2)

2018-01-12 Thread Alex Smith
gt;num_inline_push_consts > = remaining_sgprs; > + } > + > + if (user_sgpr_info->num_inline_push_consts > > AC_UD_MAX_INLINE_PUSH_CONST) > + user_sgpr_info->

Re: [Mesa-dev] [PATCH] anv/pipeline: Don't look at blend state unless we have an attachment

2018-01-18 Thread Alex Smith
Oops, sorry about that. Reviewed-by: Alex Smith On 18 January 2018 at 01:16, Jason Ekstrand wrote: > Without this, we may end up dereferencing blend before we check for > binding->index != UINT32_MAX. However, Vulkan allows the blend state to > be NULL so long as you don'

Re: [Mesa-dev] [PATCH] radv: restore previous stencil reference after depth-stencil clear

2018-01-19 Thread Alex Smith
Reviewed-by: Alex Smith On 19 January 2018 at 15:14, Samuel Pitoiset wrote: > Reviewed-by: Samuel Pitoiset > > > On 01/19/2018 03:11 PM, Matthew Nicholls wrote: > >> Cc: mesa-sta...@lists.freedesktop.org >> --- >> src/amd/vulkan/radv_meta_clear.c | 6 ++

Re: [Mesa-dev] [PATCH] ac/nir: use llvm fma intrinsic if nir instruction is exact.

2017-10-06 Thread Alex Smith
On 6 October 2017 at 03:39, Dave Airlie wrote: > On 6 October 2017 at 12:31, Marek Olšák wrote: > > On Fri, Oct 6, 2017 at 4:10 AM, Connor Abbott > wrote: > >> On Thu, Oct 5, 2017 at 10:08 PM, Marek Olšák wrote: > >>> On Fri, Oct 6, 2017 at 3:50 AM, Connor Abbott > wrote: > Why? While it

[Mesa-dev] [PATCH] radv: Add R16G16B16A16_SNORM fast clear support

2017-10-10 Thread Alex Smith
Signed-off-by: Alex Smith --- src/amd/vulkan/radv_formats.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 88305abd04..5c79ea7406 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c

Re: [Mesa-dev] [PATCH 4/5] radv: move calculating fragment shader i/os to pipeline.

2017-03-28 Thread Alex Smith
Hi Dave, This commit is causing some GPU hangs for us, on Polaris cards at least (470 and 480). It also causes hangs in Dota 2 (on the initial logo screen at startup). Seems to be caused by the change to set the SPI_PS_INPUT_CNTL registers with radeon_set_context_reg_seq - changing that to use a

Re: [Mesa-dev] [PATCH] radv: Invalidate L2 for TRANSFER_WRITE barriers

2017-03-28 Thread Alex Smith
On 28 March 2017 at 17:09, Emil Velikov wrote: > On 22 March 2017 at 10:06, Bas Nieuwenhuizen > wrote: > > On Tue, Mar 21, 2017 at 1:02 PM, Alex Smith > wrote: > >> CP DMA and PKT3_WRITE_DATA (in CmdUpdateBuffer) don't (currently) write > >> through L2. T

Re: [Mesa-dev] [PATCH 4/5] radv: move calculating fragment shader i/os to pipeline.

2017-03-29 Thread Alex Smith
On 28 March 2017 at 20:11, Dave Airlie wrote: > On 28 March 2017 at 21:05, Alex Smith wrote: > > Hi Dave, > > > > This commit is causing some GPU hangs for us, on Polaris cards at least > (470 > > and 480). > > > > It also causes hangs in Dot

[Mesa-dev] [PATCH] radv: Disable primitive restart for non-indexed draws

2017-04-11 Thread Alex Smith
xed draw used 16-bit indices. Fixes corruption of the credits text in Mad Max. Signed-off-by: Alex Smith --- src/amd/vulkan/radv_cmd_buffer.c | 53 +++- src/amd/vulkan/radv_private.h| 1 + 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a

Re: [Mesa-dev] [PATCH] radv: Disable primitive restart for non-indexed draws

2017-04-12 Thread Alex Smith
; > Reviewed-by: Bas Nieuwenhuizen > > On Tue, Apr 11, 2017 at 3:30 PM, Alex Smith > wrote: > > According to the Vulkan spec, VkPipelineInputAssemblyStateCreateInfo's > > primitiveRestartEnable flag should only apply to indexed draws, however > > it was being e

[Mesa-dev] [PATCH v2] radv: Disable primitive restart for non-indexed draws

2017-04-12 Thread Alex Smith
xed draw used 16-bit indices. Fixes corruption of the credits text in Mad Max. v2: Reset primitive restart state after executing a secondary command buffer. Signed-off-by: Alex Smith Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_cmd_buffer.c | 55 -

[Mesa-dev] [PATCH] radeonsi: Fix crash on shaders using MSAA image load/store

2018-05-30 Thread Alex Smith
). Signed-off-by: Alex Smith Cc: "18.1" --- src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c index

Re: [Mesa-dev] [Mesa-stable] [PATCH] radeonsi: Fix crash on shaders using MSAA image load/store

2018-05-31 Thread Alex Smith
> > Note that radeonsi doesn't support MSAA images. > > Marek > > On Wed, May 30, 2018 at 4:48 AM, Alex Smith > wrote: > >> The value returned by tgsi_util_get_texture_coord_dim() does not >> account for the sample index. This means image_fetch_coords() will n

[Mesa-dev] [PATCH 2/3] radv: Consolidate GFX9 merged shader lookup logic

2018-05-31 Thread Alex Smith
This was being handled in a few different places, consolidate it into a single radv_get_shader() function. Signed-off-by: Alex Smith Cc: "18.1" --- src/amd/vulkan/radv_cmd_buffer.c | 20 src/amd/vulkan/radv_pipeline.c | 38 -

[Mesa-dev] [PATCH 3/3] radv: Handle GFX9 merged shaders in radv_flush_constants()

2018-05-31 Thread Alex Smith
ave made the address get emitted twice. Signed-off-by: Alex Smith Cc: "18.1" --- src/amd/vulkan/radv_cmd_buffer.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index da9591b9a5..c6a2d6c5b

[Mesa-dev] [PATCH 1/3] radv: Set active_stages the same whether or not shaders were cached

2018-05-31 Thread Alex Smith
With GFX9 merged shaders, active_stages would be set to the original stages specified if shaders were not cached, but to the stages still present after merging if they were. Be consistent and use the original stages. Signed-off-by: Alex Smith Cc: "18.1" --- src/amd/vulkan/radv_pipe

Re: [Mesa-dev] [PATCH 3/3] radv: Handle GFX9 merged shaders in radv_flush_constants()

2018-06-01 Thread Alex Smith
On 31 May 2018 at 21:15, Bas Nieuwenhuizen wrote: > On Thu, May 31, 2018 at 5:44 PM, Alex Smith > wrote: > > This was not previously handled correctly. For example, > > push_constant_stages might only contain MESA_SHADER_VERTEX because > > only that stage was change

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] radv: Set active_stages the same whether or not shaders were cached

2018-06-01 Thread Alex Smith
On 1 June 2018 at 15:48, Dylan Baker wrote: > Quoting Alex Smith (2018-05-31 08:44:18) > > With GFX9 merged shaders, active_stages would be set to the original > > stages specified if shaders were not cached, but to the stages still > > present after merging if they were.

  1   2   >