radv: increase aligment when allocating descriptors for meta operations

Submitted by Samuel Pitoiset on March 7, 2019, 10:43 a.m.

Details

Message ID 20190307104354.7253-1-samuel.pitoiset@gmail.com
State Rejected
Headers show
Series "radv: increase aligment when allocating descriptors for meta operations" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset March 7, 2019, 10:43 a.m.
We usually align to 0x100 when allocating descriptors and
resources in the upload BO. I assume some data were corrupted
because the alignment was too small. Be consistent (and safe)
and align internal descriptors to 0x100 as well.

This fixes a GPU hang at startup with X4 Foundations.

Cc: 18.3 19.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/vulkan/radv_cmd_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 5b66930d137..24ed6d47a51 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2848,7 +2848,7 @@  void radv_meta_push_descriptor_set(
 	push_set->size = layout->set[set].layout->size;
 	push_set->layout = layout->set[set].layout;
 
-	if (!radv_cmd_buffer_upload_alloc(cmd_buffer, push_set->size, 32,
+	if (!radv_cmd_buffer_upload_alloc(cmd_buffer, push_set->size, 256,
 	                                  &bo_offset,
 	                                  (void**) &push_set->mapped_ptr))
 		return;

Comments

Please ignore this fix, it's incorrect and we shouldn't have to increase 
alignment.

On 3/7/19 11:43 AM, Samuel Pitoiset wrote:
> We usually align to 0x100 when allocating descriptors and
> resources in the upload BO. I assume some data were corrupted
> because the alignment was too small. Be consistent (and safe)
> and align internal descriptors to 0x100 as well.
>
> This fixes a GPU hang at startup with X4 Foundations.
>
> Cc: 18.3 19.0 <mesa-stable@lists.freedesktop.org>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> ---
>   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 5b66930d137..24ed6d47a51 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -2848,7 +2848,7 @@ void radv_meta_push_descriptor_set(
>   	push_set->size = layout->set[set].layout->size;
>   	push_set->layout = layout->set[set].layout;
>   
> -	if (!radv_cmd_buffer_upload_alloc(cmd_buffer, push_set->size, 32,
> +	if (!radv_cmd_buffer_upload_alloc(cmd_buffer, push_set->size, 256,
>   	                                  &bo_offset,
>   	                                  (void**) &push_set->mapped_ptr))
>   		return;