[PATCH vkd3d 3/8] vkd3d-shader/hlsl: Move fold_constants() to a separate file.

Francisco Casas fcasas at codeweavers.com
Fri Jan 7 06:23:21 CST 2022


January 7, 2022 9:01 AM, "Henri Verbeet" <hverbeet at gmail.com> wrote:

> On Thu, 6 Jan 2022 at 18:40, Francisco Casas <fcasas at codeweavers.com> wrote:
> 
>> Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
>> ---
>> Makefile.am | 1 +
>> libs/vkd3d-shader/hlsl.h | 2 +
>> libs/vkd3d-shader/hlsl_codegen.c | 106 ---------------------
>> libs/vkd3d-shader/hlsl_constant_ops.c | 127 ++++++++++++++++++++++++++
>> 4 files changed, 130 insertions(+), 106 deletions(-)
>> create mode 100644 libs/vkd3d-shader/hlsl_constant_ops.c
> 
> Is the expectation that hlsl_constant_ops.c is going to grow
> significantly in the future? As it is, hlsl_codegen.c isn't especially
> large, and could itself have been merged with hlsl.c.
> 

The file may get very large considering we may want to apply constant
folding to all the intrinsic functions and operators, as the native compiler
does.
The file may end up holding several more boilerplate functions like the ones I
sent in the next patches.


>> +}
>> \ No newline at end of file
>> --
> 
> Well-formed C has newlines at the end of files. I know Alexandre's
> scripts fix these up on commit for Wine, and possibly vkd3d, but
> you'll nevertheless want to avoid omitting these. Typically this
> indicates having misconfigured your editor. (Or simply using the wrong
> editor. :D)

Sorry I missed that, I just configured my editor to highlight these and
some other format mistakes.



More information about the wine-devel mailing list