From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/make_vulkan | 6 +++++- dlls/winevulkan/vulkan_thunks.c | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 45418e362c5..6932befc719 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1320,7 +1320,7 @@ class VkVariable(object): if self.const: cast_type += "const "
- if self.pointer_array or ((self.is_dynamic_array() or self.is_static_array()) and self.is_pointer_size()): + if self.pointer_array or ((self.is_pointer() or self.is_static_array()) and self.is_pointer_size()): cast_type += "PTR32 *" else: cast_type += self.type @@ -1693,6 +1693,8 @@ class VkParam(VkVariable): elif self.is_struct(): return " convert_{0}_{3}_to_{5}host({4}{1}, &{2}_host);\n".format( self.type, self.value(prefix, conv), self.name, win_type, ctx_param, wrap_part) + elif self.is_pointer_size() and self.type != "size_t": + return " {0}_host = UlongToPtr(*{1});\n".format(self.name, self.value(prefix, conv)) else: return " {0}_host = *{1};\n".format(self.name, self.value(prefix, conv)) else: @@ -1704,6 +1706,8 @@ class VkParam(VkVariable): ref_part = "" if self.optional else "&" return " convert_{0}_host_to_{3}({4}{2}_host, {1});\n".format( self.type, self.value(prefix, conv), self.name, win_type, ref_part) + elif self.is_pointer_size() and self.type != "size_t": + return " *{0} = PtrToUlong({1}_host);\n".format(self.value(prefix, conv), self.name) else: return " *{0} = {1}_host;\n".format(self.value(prefix, conv), self.name)
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index dad8991e095..c1dccdf37e4 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -32518,9 +32518,9 @@ static NTSTATUS thunk32_vkCreateDevice(void *args)
init_conversion_context(&ctx); convert_VkDeviceCreateInfo_win32_to_host(&ctx, (const VkDeviceCreateInfo32 *)UlongToPtr(params->pCreateInfo), &pCreateInfo_host); - pDevice_host = *(VkDevice *)UlongToPtr(params->pDevice); + pDevice_host = UlongToPtr(*(PTR32 *)UlongToPtr(params->pDevice)); params->result = wine_vkCreateDevice((VkPhysicalDevice)UlongToPtr(params->physicalDevice), &pCreateInfo_host, (const VkAllocationCallbacks *)UlongToPtr(params->pAllocator), &pDevice_host, UlongToPtr(params->client_ptr)); - *(VkDevice *)UlongToPtr(params->pDevice) = pDevice_host; + *(PTR32 *)UlongToPtr(params->pDevice) = PtrToUlong(pDevice_host); free_conversion_context(&ctx); return STATUS_SUCCESS; } @@ -32803,9 +32803,9 @@ static NTSTATUS thunk32_vkCreateInstance(void *args)
init_conversion_context(&ctx); convert_VkInstanceCreateInfo_win32_to_host(&ctx, (const VkInstanceCreateInfo32 *)UlongToPtr(params->pCreateInfo), &pCreateInfo_host); - pInstance_host = *(VkInstance *)UlongToPtr(params->pInstance); + pInstance_host = UlongToPtr(*(PTR32 *)UlongToPtr(params->pInstance)); params->result = wine_vkCreateInstance(&pCreateInfo_host, (const VkAllocationCallbacks *)UlongToPtr(params->pAllocator), &pInstance_host, UlongToPtr(params->client_ptr)); - *(VkInstance *)UlongToPtr(params->pInstance) = pInstance_host; + *(PTR32 *)UlongToPtr(params->pInstance) = PtrToUlong(pInstance_host); free_conversion_context(&ctx); return STATUS_SUCCESS; } @@ -36366,9 +36366,9 @@ static NTSTATUS thunk32_vkGetDeviceQueue(void *args)
TRACE("%#x, %u, %u, %#x\n", params->device, params->queueFamilyIndex, params->queueIndex, params->pQueue);
- pQueue_host = *(VkQueue *)UlongToPtr(params->pQueue); + pQueue_host = UlongToPtr(*(PTR32 *)UlongToPtr(params->pQueue)); wine_vkGetDeviceQueue((VkDevice)UlongToPtr(params->device), params->queueFamilyIndex, params->queueIndex, &pQueue_host); - *(VkQueue *)UlongToPtr(params->pQueue) = pQueue_host; + *(PTR32 *)UlongToPtr(params->pQueue) = PtrToUlong(pQueue_host); return STATUS_SUCCESS; }
@@ -36398,9 +36398,9 @@ static NTSTATUS thunk32_vkGetDeviceQueue2(void *args) TRACE("%#x, %#x, %#x\n", params->device, params->pQueueInfo, params->pQueue);
convert_VkDeviceQueueInfo2_win32_to_host((const VkDeviceQueueInfo232 *)UlongToPtr(params->pQueueInfo), &pQueueInfo_host); - pQueue_host = *(VkQueue *)UlongToPtr(params->pQueue); + pQueue_host = UlongToPtr(*(PTR32 *)UlongToPtr(params->pQueue)); wine_vkGetDeviceQueue2((VkDevice)UlongToPtr(params->device), &pQueueInfo_host, &pQueue_host); - *(VkQueue *)UlongToPtr(params->pQueue) = pQueue_host; + *(PTR32 *)UlongToPtr(params->pQueue) = PtrToUlong(pQueue_host); return STATUS_SUCCESS; }
@@ -38515,9 +38515,9 @@ static NTSTATUS thunk32_vkGetPipelineCacheData(void *args)
TRACE("%#x, 0x%s, %#x, %#x\n", params->device, wine_dbgstr_longlong(params->pipelineCache), params->pDataSize, params->pData);
- pDataSize_host = *(size_t *)UlongToPtr(params->pDataSize); + pDataSize_host = *(PTR32 *)UlongToPtr(params->pDataSize); params->result = wine_device_from_handle((VkDevice)UlongToPtr(params->device))->funcs.p_vkGetPipelineCacheData(wine_device_from_handle((VkDevice)UlongToPtr(params->device))->device, params->pipelineCache, &pDataSize_host, (void *)UlongToPtr(params->pData)); - *(size_t *)UlongToPtr(params->pDataSize) = pDataSize_host; + *(PTR32 *)UlongToPtr(params->pDataSize) = pDataSize_host; return STATUS_SUCCESS; }
@@ -39082,9 +39082,9 @@ static NTSTATUS thunk32_vkGetShaderInfoAMD(void *args)
TRACE("%#x, 0x%s, %#x, %#x, %#x, %#x\n", params->device, wine_dbgstr_longlong(params->pipeline), params->shaderStage, params->infoType, params->pInfoSize, params->pInfo);
- pInfoSize_host = *(size_t *)UlongToPtr(params->pInfoSize); + pInfoSize_host = *(PTR32 *)UlongToPtr(params->pInfoSize); params->result = wine_device_from_handle((VkDevice)UlongToPtr(params->device))->funcs.p_vkGetShaderInfoAMD(wine_device_from_handle((VkDevice)UlongToPtr(params->device))->device, params->pipeline, params->shaderStage, params->infoType, &pInfoSize_host, (void *)UlongToPtr(params->pInfo)); - *(size_t *)UlongToPtr(params->pInfoSize) = pInfoSize_host; + *(PTR32 *)UlongToPtr(params->pInfoSize) = pInfoSize_host; return STATUS_SUCCESS; }
@@ -39208,9 +39208,9 @@ static NTSTATUS thunk32_vkGetValidationCacheDataEXT(void *args)
TRACE("%#x, 0x%s, %#x, %#x\n", params->device, wine_dbgstr_longlong(params->validationCache), params->pDataSize, params->pData);
- pDataSize_host = *(size_t *)UlongToPtr(params->pDataSize); + pDataSize_host = *(PTR32 *)UlongToPtr(params->pDataSize); params->result = wine_device_from_handle((VkDevice)UlongToPtr(params->device))->funcs.p_vkGetValidationCacheDataEXT(wine_device_from_handle((VkDevice)UlongToPtr(params->device))->device, params->validationCache, &pDataSize_host, (void *)UlongToPtr(params->pData)); - *(size_t *)UlongToPtr(params->pDataSize) = pDataSize_host; + *(PTR32 *)UlongToPtr(params->pDataSize) = pDataSize_host; return STATUS_SUCCESS; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=127061
Your paranoid android.
=== debian11 (32 bit report) ===
mshtml: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x6ab29625).