summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Engestrom <eric@engestrom.ch>2023-05-05 17:49:12 +0100
committerEric Engestrom <eric@engestrom.ch>2023-05-05 19:07:02 +0100
commit1d92d341a7e880737b548d2b102bb4c003e0f213 (patch)
tree7b295a07570b0067a6e17ad0c2fabe129b1d0842
parent5b220799d5857be8fde13fbf252fa7aa81072c3b (diff)
downloadmesa-1d92d341a7e880737b548d2b102bb4c003e0f213.tar.gz
dzn: fix pointer type mismatch
../src/microsoft/vulkan/dzn_image.c: In function ‘dzn_GetImageMemoryRequirements2’: ../src/microsoft/vulkan/dzn_image.c:918:91: error: passing argument 6 of ‘dzn_ID3D12Device12_GetResourceAllocationInfo3’ from incompatible pointer type [-Werror=incompatible-pointer-types] 918 | &image->castable_format_count, &image->castable_formats, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | DXGI_FORMAT ** In file included from ../src/microsoft/vulkan/dzn_private.h:67, from ../src/microsoft/vulkan/dzn_image.c:24: ../src/microsoft/vulkan/dzn_abi_helper.h:64:107: note: expected ‘const DXGI_FORMAT * const*’ but argument is of type ‘DXGI_FORMAT **’ 64 | const UINT *num_castable_formats, const DXGI_FORMAT *const *castable_formats, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors ninja: build stopped: subcommand failed. Fixes: 71dbb3120a9d0fb0de32 ("dzn: Use GetResourceAllocationInfo3 for castable formats") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22877> (cherry picked from commit cb4e4fc5de48886758a26ff19d322947b5abfcec)
-rw-r--r--.pick_status.json2
-rw-r--r--src/microsoft/vulkan/dzn_image.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 56e520d069b..8effd3c4cc1 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
"description": "dzn: fix pointer type mismatch",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "71dbb3120a9d0fb0de3296b5188c086c55673c04"
},
diff --git a/src/microsoft/vulkan/dzn_image.c b/src/microsoft/vulkan/dzn_image.c
index 108007d74a0..28fe22dbaef 100644
--- a/src/microsoft/vulkan/dzn_image.c
+++ b/src/microsoft/vulkan/dzn_image.c
@@ -915,7 +915,8 @@ dzn_GetImageMemoryRequirements2(VkDevice _device,
memcpy(&desc1, &image->desc, sizeof(image->desc));
memset(&desc1.SamplerFeedbackMipRegion, 0, sizeof(desc1.SamplerFeedbackMipRegion));
info = dzn_ID3D12Device12_GetResourceAllocationInfo3(device->dev12, 0, 1, &desc1,
- &image->castable_format_count, &image->castable_formats,
+ &image->castable_format_count,
+ (const DXGI_FORMAT *const *) &image->castable_formats,
NULL);
} else
#endif