diff options
| author | Yong He <yonghe@outlook.com> | 2025-01-07 22:26:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 22:26:31 -0800 |
| commit | c43f6fa55aca23365c86c6ec1737d42be74d9d3e (patch) | |
| tree | 2c49bc1dbd12ae5f46d682a3f240465931471060 /tools/render-test | |
| parent | 1a56f58fdd0c704e6dc0fad0f0ec33a25a35e60b (diff) | |
Lower varying parameters as pointers instead of SSA values. (#5919)
* Add executable test on matrix-typed vertex input.
* Fix emit logic of matrix layout qualifier.
* Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.
Diffstat (limited to 'tools/render-test')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index 5907be66d..b1f957551 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -45,12 +45,16 @@ struct Vertex float position[3]; float color[3]; float uv[2]; + float customData0[4]; + float customData1[4]; + float customData2[4]; + float customData3[4]; }; static const Vertex kVertexData[] = { - {{0, 0, 0.5}, {1, 0, 0}, {0, 0}}, - {{0, 1, 0.5}, {0, 0, 1}, {1, 0}}, - {{1, 0, 0.5}, {0, 1, 0}, {1, 1}}, + {{0, 0, 0.5}, {1, 0, 0}, {0, 0}, {1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}, + {{0, 1, 0.5}, {0, 0, 1}, {1, 0}, {1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}, + {{1, 0, 0.5}, {0, 1, 0}, {1, 1}, {1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}, }; static const int kVertexCount = SLANG_COUNT_OF(kVertexData); @@ -614,6 +618,10 @@ SlangResult RenderTestApp::initialize( {"A", 0, Format::R32G32B32_FLOAT, offsetof(Vertex, position)}, {"A", 1, Format::R32G32B32_FLOAT, offsetof(Vertex, color)}, {"A", 2, Format::R32G32_FLOAT, offsetof(Vertex, uv)}, + {"A", 3, Format::R32G32B32A32_FLOAT, offsetof(Vertex, customData0)}, + {"A", 4, Format::R32G32B32A32_FLOAT, offsetof(Vertex, customData1)}, + {"A", 5, Format::R32G32B32A32_FLOAT, offsetof(Vertex, customData2)}, + {"A", 6, Format::R32G32B32A32_FLOAT, offsetof(Vertex, customData3)}, }; ComPtr<IInputLayout> inputLayout; |
