[PATCH vkd3d 2/6] vkd3d-shader/hlsl: Move the common shape computation to expr_common_shape.

Giovanni Mascellani gmascellani at codeweavers.com
Fri Oct 15 01:44:08 CDT 2021


Hi,

Il 15/10/21 04:39, Zebediah Figura ha scritto:
> Not that HLSL is a pinnacle of good language design, but I'm sure if 
> this weren't C I'd find it more idiomatic.

That's funny: passing pointer is precisely what I would consider the 
idiomatic C way to return more than one value. Even for HLSL, out 
parameter essentially have the semantics of passing by reference instead 
of by value, AFAIK.

(we still have the Microsoft way, though: return type << 16 | dimx << 8 
| dimy, would that be better? :-P)

> As it is I still have a mild preference for avoiding the output 
> parameters, just for the sake of what I see as idiomatic code, but I 
> won't object if you keep it the way it is.

I think in this case I'd prefer to keep the way it is, but I'll concede 
for 5/6, which hopefully can be a good compromise for you.

Giovanni.



More information about the wine-devel mailing list