HLSL: fix several issues in mat construction from scalars
This fixes: 1. A compilation error when assigning scalars to matricies 2. A semantic error in matrix construction from scalars. This was initializing the diagonal, where HLSL semantics require the scalar be replicated to every matrix element. 3. Functions accepting mats can be called with scalars, which will be shape-converted to the matrix type. This was previously failing to match the function signature. NOTE: this does not yet handle complex scalars (a function call, say) used to construct matricies. That'll be added when the node replicator service is available. For now, there's an assert. There's one new test (hlsl.scalar2matrix.frag). An existing test lsl.type.half.frag changes, because of (2) above, and a negative test error message changes due to (3) above. Fixes #923.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
hlsl.intrinsics.negative.frag
|
||||
ERROR: 0:10: 'determinant' : no matching overloaded function found
|
||||
ERROR: 0:10: 'determinant' : ambiguous best function under implicit type conversion
|
||||
ERROR: 0:25: 'normalize' : ambiguous best function under implicit type conversion
|
||||
ERROR: 0:26: 'reflect' : ambiguous best function under implicit type conversion
|
||||
ERROR: 0:27: 'refract' : ambiguous best function under implicit type conversion
|
||||
ERROR: 0:28: 'refract' : no matching overloaded function found
|
||||
ERROR: 0:30: 'transpose' : no matching overloaded function found
|
||||
ERROR: 0:30: 'transpose' : ambiguous best function under implicit type conversion
|
||||
ERROR: 0:39: 'GetRenderTargetSamplePosition' : no matching overloaded function found
|
||||
ERROR: 0:46: 'asdouble' : double2 conversion not implemented
|
||||
ERROR: 0:47: 'CheckAccessFullyMapped' : no matching overloaded function found
|
||||
@@ -104,8 +104,9 @@ ERROR: node is still EOpNull!
|
||||
0:9 0 (const int)
|
||||
0:9 Constant:
|
||||
0:9 3 (const int)
|
||||
0:10 Constant:
|
||||
0:10 0.000000
|
||||
0:10 determinant ( temp float)
|
||||
ERROR: node is still EOpNull!
|
||||
0:10 'inF0' ( in float)
|
||||
0:12 direct index ( temp float)
|
||||
0:12 unpackHalf2x16 ( temp 2-component vector of float)
|
||||
0:12 Convert float to uint ( temp uint)
|
||||
@@ -150,8 +151,9 @@ ERROR: node is still EOpNull!
|
||||
0:29 bitFieldReverse ( temp uint)
|
||||
0:29 Convert float to uint ( temp uint)
|
||||
0:29 'inF0' ( in float)
|
||||
0:30 Constant:
|
||||
0:30 0.000000
|
||||
0:30 transpose ( temp 1X1 matrix of float)
|
||||
ERROR: node is still EOpNull!
|
||||
0:30 'inF0' ( in float)
|
||||
0:32 Branch: Return with expression
|
||||
0:32 Constant:
|
||||
0:32 0.000000
|
||||
@@ -565,8 +567,9 @@ ERROR: node is still EOpNull!
|
||||
0:9 0 (const int)
|
||||
0:9 Constant:
|
||||
0:9 3 (const int)
|
||||
0:10 Constant:
|
||||
0:10 0.000000
|
||||
0:10 determinant ( temp float)
|
||||
ERROR: node is still EOpNull!
|
||||
0:10 'inF0' ( in float)
|
||||
0:12 direct index ( temp float)
|
||||
0:12 unpackHalf2x16 ( temp 2-component vector of float)
|
||||
0:12 Convert float to uint ( temp uint)
|
||||
@@ -611,8 +614,9 @@ ERROR: node is still EOpNull!
|
||||
0:29 bitFieldReverse ( temp uint)
|
||||
0:29 Convert float to uint ( temp uint)
|
||||
0:29 'inF0' ( in float)
|
||||
0:30 Constant:
|
||||
0:30 0.000000
|
||||
0:30 transpose ( temp 1X1 matrix of float)
|
||||
ERROR: node is still EOpNull!
|
||||
0:30 'inF0' ( in float)
|
||||
0:32 Branch: Return with expression
|
||||
0:32 Constant:
|
||||
0:32 0.000000
|
||||
|
||||
Reference in New Issue
Block a user