summaryrefslogtreecommitdiffstats
path: root/tools/gfx-unit-test
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-09-01 01:25:31 -0700
committerGitHub <noreply@github.com>2023-09-01 01:25:31 -0700
commit9c11a87f8f811a9a110d73a24ab93443ea347506 (patch)
tree9b1b0f154cff0faf7efd8d77fcd7f7911aea4a44 /tools/gfx-unit-test
parentb7d19330c2d42937835d674758a05af3891e025b (diff)
Fix GLSL code gen around RayQuery and HitObject types. (#3173)
* Update slang-llvm. * Fix. * fix. * Fix unit tests for multi-thread execution. * Fix tests. * fixes. * update tests. * Add gfx-smoke to linux expected failure list. * Try fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx-unit-test')
-rw-r--r--tools/gfx-unit-test/copy-texture-tests.cpp12
-rw-r--r--tools/gfx-unit-test/shader-cache-tests.cpp7
2 files changed, 9 insertions, 10 deletions
diff --git a/tools/gfx-unit-test/copy-texture-tests.cpp b/tools/gfx-unit-test/copy-texture-tests.cpp
index 0129dd818..68ca193ae 100644
--- a/tools/gfx-unit-test/copy-texture-tests.cpp
+++ b/tools/gfx-unit-test/copy-texture-tests.cpp
@@ -749,20 +749,20 @@ namespace gfx_test
// Skip Type::Unknown and Type::Buffer as well as Format::Unknown
// TODO: Add support for TextureCube
+ Format formats[] = { Format::R8G8B8A8_UNORM, Format::R16_FLOAT, Format::R16G16_FLOAT, Format::R10G10B10A2_UNORM, Format::B5G5R5A1_UNORM };
for (uint32_t i = 2; i < (uint32_t)ITextureResource::Type::_Count - 1; ++i)
{
- for (uint32_t j = 1; j < (uint32_t)Format::_Count; ++j)
+ for (auto format : formats)
{
// Fails validation VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251
- if(isVkd3d && ((Format)j == Format::R32G32B32_TYPELESS ||
- (Format)j == Format::R32G32B32_FLOAT ||
- (Format)j == Format::R32G32B32_UINT ||
- (Format)j == Format::R32G32B32_SINT))
+ if(isVkd3d && (format == Format::R32G32B32_TYPELESS ||
+ format == Format::R32G32B32_FLOAT ||
+ format == Format::R32G32B32_UINT ||
+ format == Format::R32G32B32_SINT))
{
continue;
}
auto type = (ITextureResource::Type)i;
- auto format = (Format)j;
auto validationFormat = getValidationTextureFormat(format);
if (!validationFormat)
continue;
diff --git a/tools/gfx-unit-test/shader-cache-tests.cpp b/tools/gfx-unit-test/shader-cache-tests.cpp
index de699c2d6..3879fd630 100644
--- a/tools/gfx-unit-test/shader-cache-tests.cpp
+++ b/tools/gfx-unit-test/shader-cache-tests.cpp
@@ -7,7 +7,7 @@
#include "source/core/slang-string-util.h"
#include "source/core/slang-io.h"
#include "source/core/slang-file-system.h"
-
+#include "source/core/slang-process.h"
#include "gfx-test-texture-util.h"
using namespace gfx;
@@ -112,9 +112,8 @@ namespace gfx_test
{
this->context = context;
this->api = api;
-
- testDirectory = Path::simplify(Path::getParentDirectory(Path::getExecutablePath()) + "/shader-cache-test");
- cacheDirectory = Path::simplify(testDirectory + "/cache");
+ testDirectory = Path::simplify(Path::getParentDirectory(Path::getExecutablePath()) + "/shader-cache-test" + String(Process::getId()));
+ cacheDirectory = Path::simplify(testDirectory + "/cache" + String(Process::getId()));
// Cleanup if there are stale files from a previously aborted test.
removeDirectory(cacheDirectory);