Mainly promoting single object components to variables for SM 5.0's RDEF block and lowering combined samplers to separate sampler+texture objects for SM 4.
Following patches (including prepending uniform copies resource components within struct parameters) in:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6c
--
v5: vkd3d-shader/hlsl: Don't allocate all texture registers for synthetic separated samplers.
vkd3d-shader/hlsl: Lower combined samplers to separate sampler and texture objects for SM4.
vkd3d-shader/hlsl: Separate tracking of sampler_dim and usage for object components.
vkd3d-shader/hlsl: Introduce hlsl_new_synthetic_var_named().
vkd3d-shader/hlsl: Check is_uniform instead of HLSL_STORAGE_UNIFORM when validating object refs.
tests: Add lowering combined samplers tests.
vkd3d-shader/hlsl: Handle resource components individually for SM 5.0.
vkd3d-shader/tpf: Introduce struct extern_resource.
vkd3d-shader/hlsl: Allow derefs to provide the data_type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209
Sufficient for compiling a no-op pixel shader.
This should probably be rebased on top of !263 because it introduces vkd3d_spirv_get_type_id_for_data_type(), which 263 renders unnecessary.
!263 is not essential, but I think using two different type systems in the backend is not ideal.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/278
Jeffrey Smith (@whydoubt) commented about dlls/secur32/secur32.c:
> + "NameGivenName",
> + "NameSurname"
> +};
> +
> +static LPCSTR debugstr_NameFormat(IN EXTENDED_NAME_FORMAT NameFormat)
> +{
> + if (NameFormat >= sizeof(string_NameFormat)/sizeof(string_NameFormat[0]))
> + return "(unknown)";
> + return string_NameFormat[NameFormat];
> +}
> +
> BOOLEAN WINAPI GetUserNameExW(
> EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
> {
> - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize);
> + TRACE("(%d %s %p %p)\n", NameFormat, debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
Written this way, it would make it appear that the function takes 4 parameters. I would suggest revising to make it clear that this is two representations of the same parameter.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38855
Jeffrey Smith (@whydoubt) commented about dlls/secur32/secur32.c:
> }
>
> +static LPCSTR string_NameFormat[] =
> +{
> + "NameUnknown",
> + "NameFullyQualifiedDN",
> + "NameSamCompatible",
> + "NameDisplay",
> + "NameUniqueId",
> + "NameCanonical",
> + "NameUserPrincipal",
> + "NameCanonicalEx",
> + "NameServicePrincipal",
> + "NameDnsDomain",
> + "NameGivenName",
> + "NameSurname"
The values in the EXTENDED_NAME_FORMAT enumeration are not contiguous, so you need to fill in some gaps.
For instance, NameUniqueId is 6.
If passed in, this method would return "NameUserPrincipal".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38852