[PATCH vkd3d 09/12] vkd3d-shader/hlsl: Move hlsl_new_offset_from_path_index() to hlsl_codegen.c.

Francisco Casas fcasas at codeweavers.com
Fri Jul 8 20:11:59 CDT 2022



On 08-07-22 17:28, Zebediah Figura wrote:
> On 7/1/22 16:24, Francisco Casas wrote:
>> This can be done now, to help removing register offsets from hlsl.c and
>> hlsl.h.
>>
>> Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
>> ---
>>   libs/vkd3d-shader/hlsl.c         | 76 -------------------------------
>>   libs/vkd3d-shader/hlsl.h         |  3 --
>>   libs/vkd3d-shader/hlsl_codegen.c | 77 ++++++++++++++++++++++++++++++++
>>   3 files changed, 77 insertions(+), 79 deletions(-)
>>
> 
> Is this going to be removed eventually? Or used from hlsl_sm1 and 
> hlsl_sm4? In either case there doesn't seem to be a point in moving it.
> 

 From this point this function is no longer used (and shall no longer be 
used) anywhere except for the "transform_deref_paths_into_offsets" pass.
This is because it mixes index paths and register offsets, and we 
shouldn't be doing that anywhere else.

Moving it and making it static seemed like a good way to enforce that 
this transitional code is not misused somewhere else, and to clean 
hlsl.c and hlsl.h.

I can remove this patch from the batch if you prefer not to move the 
function.






More information about the wine-devel mailing list