Cbuffer tests for MatrixSingleSubscriptExpr#753
Conversation
- Add Vulkan Clang Xfails (Vulkan doesn't know how to legalize arrays of vectors)
|
This test does not include Swizzle of MatrixSingleSubscriptExpr that is coming in a later pr. |
| RWStructuredBuffer<float4> Out : register(u0); | ||
|
|
||
| cbuffer example : register(b1) { | ||
| float2x4 M1; |
There was a problem hiding this comment.
Is this meant to be float1x4?
There was a problem hiding this comment.
Yep. Copy paste error and looks like an unstaged change.
| Buffers: | ||
| - Name: cbuffer | ||
| Format: Float32 | ||
| Data: [ 1.1, 0xFFFF, 0xFFFF, 0xFFFF, |
There was a problem hiding this comment.
0xFFFF isn't a great sigil value for float IMO (It's like 9.18e-41?). I guess you were going for an all 1s NaN and missed a few digits. That's fine, alternatively a weird bit pattern like 0x5a5a5a5a is just a number but it's usually fairly easy to spot.
| # Note: Metal and Vulkan KosmicKrisp and MoltenVK | ||
| # Are always empty |
There was a problem hiding this comment.
I assume you'll put bug numbers along with all of these unsupported/xfail before you merge this.
| # UNSUPPORTED: Darwin | ||
|
|
||
| # NOTE: AMD on Clang and DXC have result: | ||
| # [ 1.1, 65535, 65535, 65535] |
There was a problem hiding this comment.
Interesting - row vs column major confusion?
| Out0[0] = M1[0]; | ||
| Out1[0] = M1[1]; | ||
| Out2[0] = M1[2]; | ||
| Out3[0] = M1[3]; |
There was a problem hiding this comment.
Not that I'm opposed to this test, but does this catch something that the simple ones don't? Nothing special about this test seems to be related to matrix at all, really.
| [numthreads(1,1,1)] | ||
| void main() { | ||
| Out[0] = M1[0]; | ||
| Out[1] = M1[1]; |
There was a problem hiding this comment.
| Out[1] = M1[1]; |
This read and write goes out of bounds.
There was a problem hiding this comment.
It does not currently but will when this becomes a 1x4.
There was a problem hiding this comment.
It does currently read out of bounds because the input data ends with 4.4] when it should end with 4.4, 0xFFFF] for a 2x4 matrix. It writes out of bounds of course because the output buffer is only 16 bytes.
fixes #747
This change tests Matrix padding is correct and applies to SingleSubscripting.