[PATCH vkd3d v2 04/10] vkd3d-shader/hlsl: Decay matrices of shape 1xN to vectors of length N.

Zebediah Figura (she/her) zfigura at codeweavers.com
Mon Oct 18 15:56:48 CDT 2021


On 10/18/21 02:24, Giovanni Mascellani wrote:
> Hi,
> 
> Il 15/10/21 19:47, Zebediah Figura (she/her) ha scritto:
>> What leads you to this conclusion? Even the most obvious case I 
>> checked suggests this isn't true:
>>
>> ---
>>
>> uniform float2x4 x;
>> uniform float1x4 y;
>>
>> float4 main() : sv_target
>> {
>>      return (x + y).xyzw;
>> }
>>
>> ---
> 
> Ah, interesting. My source was this:
> 
> http://shader-playground.timjones.io/cfaa21ebc1961e76a302e48e87a7a033
> 
> The error message says: "error X3017: cannot convert from 'const const 
> float4' to 'texture'". But clearly I was too optimistic about the self 
> consistency of the native compiler.

I get a similar message with "(texture)y". I also get a similar message 
with the following shader:

---

void func(float1x4 arg)
{
}

uniform Texture2D t;

float4 main() : sv_target
{
     func(t);
     return 0;
}

---

I suspect what happens is that native just reports float1xN as floatN in 
error messages, but fundamentally it's still a matrix type.

> 
> I think for the moment it is safe to drop this patch. Unfortunately it 
> is referenced in the commit message of the following one (05/10), so 
> I'll resend the whole series again. The content of 05/10 still seems to 
> be valid even when tested with swizzling: the type of x+y is the type of 
> x when x and y are a vector and a matrix (in some order) and have the 
> same number of entries.

I don't think anything else depends on 5/10, right? It should be fine 
just to resend that patch alone.



More information about the wine-devel mailing list