summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-02-03 10:14:04 +0800
committerGitHub <noreply@github.com>2024-02-02 18:14:04 -0800
commita67cb0609587c230746b52567ff5775cab215220 (patch)
treeaf943e2926c7279fb825ead81d74e4fe0f55795d /tools/render-test
parent6c8626c171a0bc40e8f2d3a15b0563d4085431c1 (diff)
GLSL Passthrough support for SSBO types (#3446)
* GLSL Passthrough support for SSBO types * GLSL Passthrough support for SSBO types * Correctly apply glsl local size layout to entry points during lowering * Test for glsl layout correctness * typo * Reflect GLSL SSBO as raw buffers * Functional test for glsl ssbo * Allow allow glsl for render tests * Functional test for ssbo passthrough * Functional test for ssbo passthrough with spirv-direct * fix windows build error --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/options.cpp8
-rw-r--r--tools/render-test/options.h4
-rw-r--r--tools/render-test/slang-support.cpp2
3 files changed, 14 insertions, 0 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp
index 0266a0c75..4b62eb60b 100644
--- a/tools/render-test/options.cpp
+++ b/tools/render-test/options.cpp
@@ -223,6 +223,14 @@ static gfx::DeviceType _toRenderType(Slang::RenderApiType apiType)
//
// TODO: At some point we could warn/error and deprecate this option.
}
+ else if (argValue == "-allow-glsl")
+ {
+ outOptions.allowGLSL = true;
+ }
+ else if (argValue == "-entry")
+ {
+ SLANG_RETURN_ON_FAIL(reader.expectArg(outOptions.entryPointName));
+ }
else
{
// Lookup
diff --git a/tools/render-test/options.h b/tools/render-test/options.h
index e3b19c272..5a46c4000 100644
--- a/tools/render-test/options.h
+++ b/tools/render-test/options.h
@@ -71,6 +71,10 @@ struct Options
bool dontAddDefaultEntryPoints = false;
+ bool allowGLSL = false;
+
+ Slang::String entryPointName;
+
Slang::List<Slang::String> renderFeatures; /// Required render features for this test to run
uint32_t computeDispatchSize[3] = { 1, 1, 1 };
diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp
index 82d292cee..c598e4ea5 100644
--- a/tools/render-test/slang-support.cpp
+++ b/tools/render-test/slang-support.cpp
@@ -110,6 +110,8 @@ void ShaderCompilerUtil::Output::reset()
if (options.generateSPIRVDirectly)
spSetTargetFlags(slangRequest, 0, SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY);
+ slangRequest->setAllowGLSLInput(options.allowGLSL);
+
// Define a macro so that shader code in a test can detect what language we
// are nominally working with.
char const* langDefine = nullptr;