diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-03-02 10:07:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-02 10:07:26 -0500 |
| commit | 11da2fb2051894b3cc873748cfc8f47588d8af93 (patch) | |
| tree | ae5521fb36793f113f69bb7b251a34cf858e87e1 /source/slang/slang.cpp | |
| parent | 1b0d4259fbe39fbe2cd8482eb30d22a371db0b1a (diff) | |
Small fix to use SlangResult (#2149)
* Use SlangResult value. Make legacy SLANG_ERROR_ macros use SlangResult values.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index c1834eacb..67908841f 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4278,7 +4278,7 @@ char const* EndToEndCompileRequest::getDiagnosticOutput() SlangResult EndToEndCompileRequest::getDiagnosticOutputBlob(ISlangBlob** outBlob) { - if (!outBlob) return SLANG_ERROR_INVALID_PARAMETER; + if (!outBlob) return SLANG_E_INVALID_ARG; if (!m_diagnosticOutputBlob) { @@ -4623,14 +4623,14 @@ static SlangResult _getEntryPointResult( Index targetCount = linkage->targets.getCount(); if ((targetIndex < 0) || (targetIndex >= targetCount)) { - return SLANG_ERROR_INVALID_PARAMETER; + return SLANG_E_INVALID_ARG; } auto targetReq = linkage->targets[targetIndex]; Index entryPointCount = req->m_entryPoints.getCount(); if ((entryPointIndex < 0) || (entryPointIndex >= entryPointCount)) { - return SLANG_ERROR_INVALID_PARAMETER; + return SLANG_E_INVALID_ARG; } auto entryPointReq = program->getEntryPoint(entryPointIndex); @@ -4653,7 +4653,7 @@ static SlangResult _getWholeProgramResult( Index targetCount = linkage->targets.getCount(); if ((targetIndex < 0) || (targetIndex >= targetCount)) { - return SLANG_ERROR_INVALID_PARAMETER; + return SLANG_E_INVALID_ARG; } auto targetReq = linkage->targets[targetIndex]; @@ -4666,7 +4666,7 @@ static SlangResult _getWholeProgramResult( SlangResult EndToEndCompileRequest::getEntryPointCodeBlob(int entryPointIndex, int targetIndex, ISlangBlob** outBlob) { - if (!outBlob) return SLANG_ERROR_INVALID_PARAMETER; + if (!outBlob) return SLANG_E_INVALID_ARG; CompileResult* compileResult = nullptr; SLANG_RETURN_ON_FAIL(_getEntryPointResult(this, entryPointIndex, targetIndex, &compileResult)); @@ -4679,7 +4679,7 @@ SlangResult EndToEndCompileRequest::getEntryPointCodeBlob(int entryPointIndex, i SlangResult EndToEndCompileRequest::getEntryPointHostCallable(int entryPointIndex, int targetIndex, ISlangSharedLibrary** outSharedLibrary) { - if (!outSharedLibrary) return SLANG_ERROR_INVALID_PARAMETER; + if (!outSharedLibrary) return SLANG_E_INVALID_ARG; CompileResult* compileResult = nullptr; SLANG_RETURN_ON_FAIL(_getEntryPointResult(this, entryPointIndex, targetIndex, &compileResult)); @@ -4693,7 +4693,7 @@ SlangResult EndToEndCompileRequest::getEntryPointHostCallable(int entryPointInde SlangResult EndToEndCompileRequest::getTargetCodeBlob(int targetIndex, ISlangBlob** outBlob) { if (!outBlob) - return SLANG_ERROR_INVALID_PARAMETER; + return SLANG_E_INVALID_ARG; CompileResult* compileResult = nullptr; SLANG_RETURN_ON_FAIL(_getWholeProgramResult(this, targetIndex, &compileResult)); @@ -4707,7 +4707,7 @@ SlangResult EndToEndCompileRequest::getTargetCodeBlob(int targetIndex, ISlangBlo SlangResult EndToEndCompileRequest::getTargetHostCallable(int targetIndex,ISlangSharedLibrary** outSharedLibrary) { if (!outSharedLibrary) - return SLANG_ERROR_INVALID_PARAMETER; + return SLANG_E_INVALID_ARG; CompileResult* compileResult = nullptr; SLANG_RETURN_ON_FAIL(_getWholeProgramResult(this, targetIndex, &compileResult)); |
