[PATCH vkd3d v4 1/6] tests: Test matrix multiplication.

Zebediah Figura (she/her) zfigura at codeweavers.com
Mon Jan 31 15:32:39 CST 2022



On 1/28/22 09:33, Giovanni Mascellani wrote:
> Hi,
> 
> Il 28/01/22 14:35, Francisco Casas ha scritto:
>> It seems that mul checks whether it is a scalar-scalar, scalar-vector,
>> scalar-matrix, vector-scalar, vector-vector, vector-matrix, 
>> matrix-scalar,
>> matrix-vector, or matrix-matrix multiplication, using the equivalent 
>> to our
>> hlsl_type_class.
>>
>> This difference makes me wonder whether we are wrong assuming float 
>> and float1
>> are the same in other parts of the codebase, for instance:
> 
> As you say float and float1 are two different things in HLSL, but once 
> we are deep enough in the pipeline that all the relevant operations 
> (like mul()) have been lowered, then we can ignore the difference.

Basically this, yes. I think we should preserve HLSL type information 
for the duration of yyparse(), so that we can do type checking, but as 
soon as we get out we shouldn't be caring at all.

> As (I 
> think) I have said in another email, what I would like to happen is that 
> at some point everything is converted to vectors (so we don't have 
> scalars lingering around anymore), but it doesn't seem that the others 
> agree with me.

I personally just don't see it as necessary. In particular there's not 
really much difference between

     type->class == HLSL_CLASS_VECTOR && type->dimx == 1

and

     type->class <= HLSL_CLASS_VECTOR && type->dimx == 1



More information about the wine-devel mailing list