[PATCH v2 09/12] vkd3d: Fix non-standard pointer arithmetic on void-pointer

Hans-Kristian Arntzen post at arntzen-software.no
Tue Oct 1 05:33:46 CDT 2019


Signed-off-by: Hans-Kristian Arntzen <post at arntzen-software.no>
---
 libs/vkd3d/resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index aebe1fa..88f184d 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -1388,7 +1388,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_ReadFromSubresource(ID3D12Resour
     size = (box.right - box.left) / format->block_width * format->byte_count * format->block_byte_count;
     for (z = box.front; z < box.back; ++z)
     {
-        dst = dst_data + (z - box.front) * dst_slice_pitch;
+        dst = (uint8_t *)dst_data + (z - box.front) * dst_slice_pitch;
         src = src_data + z * vk_layout.depthPitch + box.top / format->block_height * vk_layout.rowPitch;
         for (y = box.top; y < box.bottom; y += format->block_height)
         {
-- 
2.23.0




More information about the wine-devel mailing list