[PATCH vkd3d 3/5] vkd3d-shader/hlsl: Write SM4 negation instructions.
Matteo Bruni
matteo.mystral at gmail.com
Tue Aug 31 18:33:09 CDT 2021
On Mon, Aug 30, 2021 at 7:21 PM Zebediah Figura <zfigura at codeweavers.com> wrote:
>
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
> Makefile.am | 5 +----
> libs/vkd3d-shader/hlsl_sm4.c | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+), 4 deletions(-)
> diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c
> index ace2eb66..160da47f 100644
> --- a/libs/vkd3d-shader/hlsl_sm4.c
> +++ b/libs/vkd3d-shader/hlsl_sm4.c
> @@ -561,6 +561,7 @@ struct sm4_register
> unsigned int idx_count;
> enum vkd3d_sm4_dimension dim;
> uint32_t immconst_uint[4];
> + unsigned int mod;
> };
>
> struct sm4_instruction
> @@ -710,6 +711,8 @@ static uint32_t sm4_register_order(const struct sm4_register *reg)
> if (reg->type == VKD3D_SM4_RT_IMMCONST)
> order += reg->dim == VKD3D_SM4_DIMENSION_VEC4 ? 4 : 1;
> order += reg->idx_count;
> + if (reg->mod)
> + ++order;
> return order;
> }
Something that came to my mind at least twice while looking at that
function... Do you know e.g. by random looks to DXC's sources what the
size of a register in the bytecode is supposed to be called? "Order"
feels like a curious choice for a name.
No need to go investigate, just wondering if you happened to see anything.
More information about the wine-devel
mailing list