diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-02-19 01:55:51 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-02-19 01:55:51 +0000 |
| commit | fb415324592e0762f455ebdf88b6963eae41b1ca (patch) | |
| tree | e27383bd267609e3b2717e4115940da6b0b20428 /Tests/TestApp | |
| parent | Updated samples (disabled multiViewport vk device feature) (diff) | |
| download | DiligentEngine-fb415324592e0762f455ebdf88b6963eae41b1ca.tar.gz DiligentEngine-fb415324592e0762f455ebdf88b6963eae41b1ca.zip | |
Updated input layout element to use explicit AutoOffset and AutoStride
Diffstat (limited to 'Tests/TestApp')
| -rw-r--r-- | Tests/TestApp/assets/TestRenderScripts.lua | 2 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestBufferAccess.cpp | 6 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestDrawCommands.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Tests/TestApp/assets/TestRenderScripts.lua b/Tests/TestApp/assets/TestRenderScripts.lua index 10401d7..94ea53a 100644 --- a/Tests/TestApp/assets/TestRenderScripts.lua +++ b/Tests/TestApp/assets/TestRenderScripts.lua @@ -120,7 +120,7 @@ PSOInst = PipelineState.Create { { InputIndex = 0, BufferSlot = 0, NumComponents = 3, ValueType = "VT_FLOAT32", IsNormalized = false, Stride = 4*3}, { InputIndex = 1, BufferSlot = 1, NumComponents = 4, ValueType = "VT_UINT8", IsNormalized = true, Stride = 4*1}, - { InputIndex = 2, BufferSlot = 2, NumComponents = 2, ValueType = "VT_FLOAT32", IsNormalized = false, Frequency = "FREQUENCY_PER_INSTANCE", Stride = 0}, + { InputIndex = 2, BufferSlot = 2, NumComponents = 2, ValueType = "VT_FLOAT32", IsNormalized = false, Frequency = "FREQUENCY_PER_INSTANCE"}, }, PrimitiveTopology = "PRIMITIVE_TOPOLOGY_TRIANGLE_LIST", pVS = MinimalInstVS, diff --git a/Tests/TestApp/src/TestBufferAccess.cpp b/Tests/TestApp/src/TestBufferAccess.cpp index 712c2e3..2cfd946 100644 --- a/Tests/TestApp/src/TestBufferAccess.cpp +++ b/Tests/TestApp/src/TestBufferAccess.cpp @@ -147,9 +147,9 @@ void TestBufferAccess::Init( IRenderDevice *pDevice, IDeviceContext *pContext, I LayoutElement Elems[] = { - LayoutElement{ 0, 1, 3, Diligent::VT_FLOAT32, false, 0 }, - LayoutElement{ 1, 1, 3, Diligent::VT_FLOAT32, false, sizeof( float ) * 3, sizeof( float ) * 6 }, - LayoutElement{ 2, 3, 2, Diligent::VT_FLOAT32, false, 0, 0, LayoutElement::FREQUENCY_PER_INSTANCE } + LayoutElement{ 1, 1, 3, Diligent::VT_FLOAT32, false, sizeof(float) * 3, sizeof(float) * 6 }, + LayoutElement{ 0, 1, 3, Diligent::VT_FLOAT32, false, 0, sizeof(float) * 6 }, + LayoutElement{ 2, 3, 2, Diligent::VT_FLOAT32, false, LayoutElement::AutoOffset, LayoutElement::AutoStride, LayoutElement::FREQUENCY_PER_INSTANCE } }; PSODesc.GraphicsPipeline.InputLayout.LayoutElements = Elems; PSODesc.GraphicsPipeline.InputLayout.NumElements = _countof( Elems ); diff --git a/Tests/TestApp/src/TestDrawCommands.cpp b/Tests/TestApp/src/TestDrawCommands.cpp index a0a4c24..c2f9ed8 100644 --- a/Tests/TestApp/src/TestDrawCommands.cpp +++ b/Tests/TestApp/src/TestDrawCommands.cpp @@ -227,7 +227,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont { LayoutElement{ 0, 0, 3, VT_FLOAT32, false, 0 }, LayoutElement{ 1, 0, 3, VT_FLOAT32, false, sizeof( float ) * 3 }, - LayoutElement{ 2, 1, 2, VT_FLOAT32, false, 0, 0, LayoutElement::FREQUENCY_PER_INSTANCE } + LayoutElement{ 2, 1, 2, VT_FLOAT32, false, LayoutElement::AutoOffset, LayoutElement::AutoStride, LayoutElement::FREQUENCY_PER_INSTANCE } }; PSODesc.GraphicsPipeline.InputLayout.LayoutElements = Elems; PSODesc.GraphicsPipeline.InputLayout.NumElements = _countof( Elems ); |
