From 60f315a54dee5b24d789de3f114a74fadab6a80b Mon Sep 17 00:00:00 2001 From: korenkonder Date: Thu, 19 Sep 2024 22:43:03 +0300 Subject: [PATCH] video_core: stride fix (#986) I don't know why it was forced to be 1 while in reality it should be as is --- src/video_core/amdgpu/resource.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/amdgpu/resource.h b/src/video_core/amdgpu/resource.h index 1721c1aea..41dbe801d 100644 --- a/src/video_core/amdgpu/resource.h +++ b/src/video_core/amdgpu/resource.h @@ -66,7 +66,7 @@ struct Buffer { } u32 GetStride() const noexcept { - return stride == 0 ? 1U : stride; + return stride; } u32 NumDwords() const noexcept { @@ -74,7 +74,7 @@ struct Buffer { } u32 GetSize() const noexcept { - return GetStride() * num_records; + return stride == 0 ? num_records : (stride * num_records); } }; static_assert(sizeof(Buffer) == 16); // 128bits