diff options
| author | Yong He <yonghe@outlook.com> | 2021-06-02 16:58:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 16:58:25 -0700 |
| commit | e67af5b1a3993529c702ff2924dea11fd1017d2e (patch) | |
| tree | c4359fb6df6110d81a658278aef9ab7244af5496 /tools/render-test/render-test-main.cpp | |
| parent | 8e571669b3c8d4ac8236d0aed7a960bf88ad2bd1 (diff) | |
Various Fixes to gfx, reflection and emit. (#1867)
* Various Fixes to gfx, reflection and emit.
- Fix GLSL emit to properly output `*bitsTo*` functions for `IRBitCast` insts.
- Add line directive mode setting for `ISession`.
- Extend `TypeLayout::getElementStride` to handle `VectorType` case.
- Fix `IDevice::readBufferResource` 's D3D12 implementation to copy only the requested bytes out.
- Fix `render-test` to use the `ISession` from `gfx` instead of creating its own `ISession` to make sure `gfx` and `render-test` agree on WitnessTable and RTTI IDs.
- Extend `render-test` to support filling vector and matrix values in the new `set x = ...` TEST_INPUT syntax.
- Add a `dynamic-dispatch-15` test case to make sure packing / unpacking works correctly across all targets, and to make sure render-test's RTTI/WitnessTable ID filling logic is correct for non-trivial cases.
* Remove default-major test
* Fix cyclic reference in `ExtendedTypeLayout`.
* Move `lineDirectiveMode` setting to `TargetDesc`.
Add `structureSize` to `TargetDesc` and `SessionDesc` for future binary compatibility.
* Cleanup.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index ab73af5b5..a846f4a33 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -470,7 +470,7 @@ SlangResult RenderTestApp::initialize( // We begin by compiling the shader file and entry points that specified via the options. // - SLANG_RETURN_ON_FAIL(ShaderCompilerUtil::compileWithLayout(session, options, input, m_compilationOutput)); + SLANG_RETURN_ON_FAIL(ShaderCompilerUtil::compileWithLayout(device->getSlangSession(), options, input, m_compilationOutput)); m_shaderInputLayout = m_compilationOutput.layout; // Once the shaders have been compiled we load them via the underlying API. @@ -551,7 +551,7 @@ Result RenderTestApp::_initializeShaders( Options::ShaderProgramType shaderType, const ShaderCompilerUtil::Input& input) { - SLANG_RETURN_ON_FAIL(ShaderCompilerUtil::compileWithLayout(session, m_options, input, m_compilationOutput)); + SLANG_RETURN_ON_FAIL(ShaderCompilerUtil::compileWithLayout(device->getSlangSession(), m_options, input, m_compilationOutput)); m_shaderInputLayout = m_compilationOutput.layout; m_shaderProgram = device->createProgram(m_compilationOutput.output.desc); return m_shaderProgram ? SLANG_OK : SLANG_FAIL; @@ -672,6 +672,7 @@ void RenderTestApp::runCompute(IComputeCommandEncoder* encoder) void RenderTestApp::finalize() { + m_compilationOutput.output.reset(); } Result RenderTestApp::writeBindingOutput(const String& fileName) @@ -1099,6 +1100,8 @@ static SlangResult _innerMain(Slang::StdWriters* stdWriters, SlangSession* sessi desc.deviceType = options.deviceType; desc.adapter = options.adapter.getBuffer(); + desc.slang.lineDirectiveMode = SLANG_LINE_DIRECTIVE_MODE_NONE; + List<const char*> requiredFeatureList; for (auto& name : options.renderFeatures) requiredFeatureList.add(name.getBuffer()); |
