summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-06-20 12:14:31 -0700
committerGitHub <noreply@github.com>2017-06-20 12:14:31 -0700
commit338232bff7144c6a0e7964984765f01d9f9eecb7 (patch)
treee62d8f184bf04df0906fcc6c8a04803febe35376 /tools/render-test
parent40617db15d87ece6e7cc88da23f747f8f827c69a (diff)
parent327f2b7ec50a7480b458d6d3ba8e2ca7fcdb8498 (diff)
Merge pull request #36 from tfoleyNV/entry-point-indexing
Overhaul handling of entry points and translation units.
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/render-d3d11.cpp4
-rw-r--r--tools/render-test/slang-support.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/render-test/render-d3d11.cpp b/tools/render-test/render-d3d11.cpp
index 4f1071905..19795d685 100644
--- a/tools/render-test/render-d3d11.cpp
+++ b/tools/render-test/render-d3d11.cpp
@@ -113,8 +113,8 @@ HRESULT initializeSlang(ID3D11Device* dxDevice, char const* sourceText)
spAddTranslationUnitSourceString(slangRequest, translationUnitIndex, gOptions.sourcePath, sourceText);
- spAddTranslationUnitEntryPoint(slangRequest, translationUnitIndex, vertexEntryPointName, spFindProfile(slangSession, vertexProfileName));
- spAddTranslationUnitEntryPoint(slangRequest, translationUnitIndex, fragmentEntryPointName, spFindProfile(slangSession, fragmentProfileName));
+ spAddEntryPoint(slangRequest, translationUnitIndex, vertexEntryPointName, spFindProfile(slangSession, vertexProfileName));
+ spAddEntryPoint(slangRequest, translationUnitIndex, fragmentEntryPointName, spFindProfile(slangSession, fragmentProfileName));
int compileErr = spCompile(slangRequest);
if(auto diagnostics = spGetDiagnosticOutput(slangRequest))
diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp
index 8db62ebef..d87f693eb 100644
--- a/tools/render-test/slang-support.cpp
+++ b/tools/render-test/slang-support.cpp
@@ -73,8 +73,8 @@ struct SlangShaderCompilerWrapper : public ShaderCompiler
spSetCompileFlags(slangRequest, SLANG_COMPILE_FLAG_NO_CHECKING);
}
- int vertexEntryPoint = spAddTranslationUnitEntryPoint(slangRequest, vertexTranslationUnit, request.vertexShader.name, spFindProfile(slangSession, request.vertexShader.profile));
- int fragmentEntryPoint = spAddTranslationUnitEntryPoint(slangRequest, fragmentTranslationUnit, request.fragmentShader.name, spFindProfile(slangSession, request.fragmentShader.profile));
+ int vertexEntryPoint = spAddEntryPoint(slangRequest, vertexTranslationUnit, request.vertexShader.name, spFindProfile(slangSession, request.vertexShader.profile));
+ int fragmentEntryPoint = spAddEntryPoint(slangRequest, fragmentTranslationUnit, request.fragmentShader.name, spFindProfile(slangSession, request.fragmentShader.profile));
int compileErr = spCompile(slangRequest);
if(auto diagnostics = spGetDiagnosticOutput(slangRequest))
@@ -97,8 +97,8 @@ struct SlangShaderCompilerWrapper : public ShaderCompiler
innerRequest.source.text = translatedCode;
}
- char const* vertexCode = spGetEntryPointSource(slangRequest, vertexTranslationUnit, vertexEntryPoint);
- char const* fragmentCode = spGetEntryPointSource(slangRequest, fragmentTranslationUnit, fragmentEntryPoint);
+ char const* vertexCode = spGetEntryPointSource(slangRequest, vertexEntryPoint);
+ char const* fragmentCode = spGetEntryPointSource(slangRequest, fragmentEntryPoint);
innerRequest.vertexShader.source.text = vertexCode;
innerRequest.fragmentShader.source.text = fragmentCode;