[PATCH] winevulkan: Add support for the uint16_t type in make_vulkan.

Liam Middlebrook lmiddlebrook at nvidia.com
Wed Oct 30 15:35:56 CDT 2019


I didn't notice this until after I had sent out "[PATCH 5/6] winevulkan: Update to 
VK spec version 1.1.117", sorry about that.

On 10/30/19 12:55 PM, Derek Lesho wrote:
> Vulkan headers use this type as of Vulkan 1.1.117, due to the
> inclusion of VK_EXT_line_rasterization.
> 
> Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
> ---
>   dlls/winevulkan/make_vulkan | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
> index 8e043538c8..2af98fbd6f 100755
> --- a/dlls/winevulkan/make_vulkan
> +++ b/dlls/winevulkan/make_vulkan
> @@ -1312,8 +1312,10 @@ class VkParam(object):
>               elif self.type == "size_t":
>                   self.format_str = "0x%s"
>                   self.format_conv = "wine_dbgstr_longlong({0})"
> -            elif self.type in ["uint32_t", "VkBool32"]:
> +            elif self.type in ["uint32_t", "VkBool32", "uint16_t"]:
>                   self.format_str = "%u"

I didn't include this for my duplicate patch, but the format_conv change below 
prompted me to read up on the manpage for printf(3). It specifies a length modifier 
for "short" which would probably be better to use here (assuming we agree that 
uint16_t should be "short").

> +                if self.type == "uint16_t":
> +                    self.format_conv = "(unsigned int){0}"

Is this necessary to add in? It looks like all of the existing usage of format_conv 
is for handling types where the format specifier may be ambiguous.

>               elif self.type in ["uint64_t", "VkDeviceSize"]:
>                   self.format_str = "0x%s"
>                   self.format_conv = "wine_dbgstr_longlong({0})"
> @@ -1501,7 +1503,7 @@ class VkParam(object):
>               return "int64"
>           if self.type == "float":
>               return "float"
> -        if self.type in ["int", "int32_t", "size_t", "uint32_t", "VkBool32"]:
> +        if self.type in ["int", "int32_t", "size_t", "uint32_t", "VkBool32", "uint16_t"]:
>               return "long"

Shouldn't uint16_t be "short" ?

>           if self.type in ["uint64_t", "VkDeviceSize"]:
>               return "int64"
> 


Thanks,

Liam Middlebrook

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------



More information about the wine-devel mailing list