Unlike previous vkd3d-utils interfaces, ID3D12ShaderReflection is rather more
large and complex, and will probably end up needing several new individual
scan interfaces from vkd3d-shader, which are themselves not exactly trivial to
design.
Therefore, instead of implementing everything in vkd3d-shader and then hooking
up the vkd3d-utils interfaces on top of that, this patch series copies the
existing implementation of reflection and then begins the process of moving its
implementation to vkd3d-shader.
The primary motivation here is to add reflection crosstests (primarily for the
benefit of the HLSL compiler) without being blocked on API design. Part 2 of
this patch series does this.
--
v5: tests: Test signature reflection via D3DReflect().
tests: Test VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES.
vkd3d-utils: Implement input and output signature reflection.
vkd3d-utils: Add D3DReflect().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/561
~~Other validation stuff I plan to send as soon as !450 and !550 are in.~~
~~I guess the CI is going to timeout because of too many commits, so I'll preemptively stop it.~~
--
v8: vkd3d-shader/ir: Validate PHI instructions.
vkd3d-shader/ir: Do not allow IMMCONST and IMMCONST64 as destination registers.
vkd3d-shader/ir: Refactor register-type-specific code in parameter validation.
vkd3d-shader/ir: Check that all instructions appear in a block.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/559
On Mon Jan 22 18:33:10 2024 +0000, Esme Povirk wrote:
> I think this will leak memory if parameters were already set.
if the parameters are set and we are trying to re-set new params, then it should overwrite - for it will use realloc
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58460
On Mon Jan 22 19:46:41 2024 +0000, Vijay Kiran Kamuju wrote:
> paramsize we get it from `GdipGetEffectParameterSize` as the default
> size is always set when creating the specific effect even when without
> params being even set at all.
Yes, but if params are set then we will get a different value that I don't think should have an effect on the size validation here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58458
On Mon Jan 22 18:31:30 2024 +0000, Esme Povirk wrote:
> I don't think we can use `paramsize` in this case because it will depend
> on whether parameters were already set.
paramsize we get it from `GdipGetEffectParameterSize` as the default size is always set when creating the specific effect.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58457
On Mon Jan 22 18:49:11 2024 +0000, Vijay Kiran Kamuju wrote:
> I will add a check if desc is already allocated or not, if yes then use realloc.
I really think you need to pass in void** here, as it looks like desc is meant as an output parameter.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58455
On Mon Jan 22 18:40:16 2024 +0000, Vijay Kiran Kamuju wrote:
> They can all be combined to one, if we don't use a union and use 'void
> *' as member of CGpEffect to store the parameter. I am a bit confused on
> how to merge the cases if we use a union.
Just pick one. The pointer type doesn't matter if you're going to pass it to memcpy.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58454