diff options
| author | Yong He <yonghe@outlook.com> | 2021-07-08 13:55:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-08 13:55:21 -0700 |
| commit | aba2731f0427a04a119a59567e6715ba4034920a (patch) | |
| tree | b5b127f776db65c7154c31a41f1e91eaeb738503 /tools/gfx/debug-layer.cpp | |
| parent | 09950676b3f73bb9967aea183d27a30d63098475 (diff) | |
Allow render-test to run inline ray tracing tests. (#1903)
* Update VS projects to 2019.
* Empty commit to trigger build
* Implement gfx inline ray tracing on D3D12.
* Allow render-test to run inline ray tracing tests.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/debug-layer.cpp')
| -rw-r--r-- | tools/gfx/debug-layer.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/tools/gfx/debug-layer.cpp b/tools/gfx/debug-layer.cpp index 77dd8543e..61ec856e9 100644 --- a/tools/gfx/debug-layer.cpp +++ b/tools/gfx/debug-layer.cpp @@ -228,7 +228,7 @@ void validateAccelerationStructureBuildInputs( default: GFX_DIAGNOSE_ERROR( "Unsupported IAccelerationStructure::TriangleDesc::indexFormat. Valid " - "values are R_UInt32 or R_UInt16."); + "values are Unknown, R_UInt32 or R_UInt16."); } if (!buildInputs.geometryDescs[i].content.triangles.indexData) { @@ -237,6 +237,39 @@ void validateAccelerationStructureBuildInputs( "IAccelerationStructure::TriangleDesc::indexCount is not 0"); } } + if (buildInputs.geometryDescs[i].content.triangles.indexFormat != Format::Unknown) + { + if (buildInputs.geometryDescs[i].content.triangles.indexCount == 0) + { + GFX_DIAGNOSE_ERROR( + "IAccelerationStructure::TriangleDesc::indexCount cannot be 0 if " + "IAccelerationStructure::TriangleDesc::indexFormat is not Format::Unknown"); + } + if (buildInputs.geometryDescs[i].content.triangles.indexData == 0) + { + GFX_DIAGNOSE_ERROR( + "IAccelerationStructure::TriangleDesc::indexData cannot be null if " + "IAccelerationStructure::TriangleDesc::indexFormat is not " + "Format::Unknown"); + } + } + else + { + if (buildInputs.geometryDescs[i].content.triangles.indexCount != 0) + { + GFX_DIAGNOSE_ERROR( + "IAccelerationStructure::TriangleDesc::indexCount must be 0 if " + "IAccelerationStructure::TriangleDesc::indexFormat is " + "Format::Unknown"); + } + if (buildInputs.geometryDescs[i].content.triangles.indexData != 0) + { + GFX_DIAGNOSE_ERROR( + "IAccelerationStructure::TriangleDesc::indexData must be null if " + "IAccelerationStructure::TriangleDesc::indexFormat is " + "Format::Unknown"); + } + } if (!buildInputs.geometryDescs[i].content.triangles.vertexData) { GFX_DIAGNOSE_ERROR( |
