|
1 | 1 | /* |
2 | | - * Copyright 2019-2024 Diligent Graphics LLC |
| 2 | + * Copyright 2019-2025 Diligent Graphics LLC |
3 | 3 | * Copyright 2015-2019 Egor Yusov |
4 | 4 | * |
5 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -73,7 +73,7 @@ class D3DIncludeImpl : public ID3DInclude |
73 | 73 | return E_FAIL; |
74 | 74 | } |
75 | 75 |
|
76 | | - auto pFileData = DataBlobImpl::Create(); |
| 76 | + RefCntAutoPtr<DataBlobImpl> pFileData = DataBlobImpl::Create(); |
77 | 77 | pSourceStream->ReadBlob(pFileData); |
78 | 78 | *ppData = pFileData->GetDataPtr(); |
79 | 79 | *pBytes = StaticCast<UINT>(pFileData->GetSize()); |
@@ -115,7 +115,7 @@ HRESULT CompileShader(const char* Source, |
115 | 115 | // dwShaderFlags |= D3D10_SHADER_OPTIMIZATION_LEVEL3; |
116 | 116 | #endif |
117 | 117 |
|
118 | | - static_assert(SHADER_COMPILE_FLAG_LAST == 1u << 3u, "Did you add a new shader compile flag? You may need to handle it here."); |
| 118 | + static_assert(SHADER_COMPILE_FLAG_LAST == 1u << 4u, "Did you add a new shader compile flag? You may need to handle it here."); |
119 | 119 | if (ShaderCI.CompileFlags & SHADER_COMPILE_FLAG_ENABLE_UNBOUNDED_ARRAYS) |
120 | 120 | dwShaderFlags |= D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES; |
121 | 121 |
|
@@ -177,7 +177,7 @@ RefCntAutoPtr<IDataBlob> CompileD3DBytecode(const ShaderCreateInfo& ShaderCI, |
177 | 177 | CComPtr<ID3DBlob> CompilerOutput; |
178 | 178 | CComPtr<ID3DBlob> pShaderByteCode; |
179 | 179 |
|
180 | | - auto hr = CompileShader(HLSLSource.c_str(), HLSLSource.length(), ShaderCI, Profile.c_str(), &pShaderByteCode, &CompilerOutput); |
| 180 | + HRESULT hr = CompileShader(HLSLSource.c_str(), HLSLSource.length(), ShaderCI, Profile.c_str(), &pShaderByteCode, &CompilerOutput); |
181 | 181 | HandleHLSLCompilerResult(SUCCEEDED(hr), CompilerOutput.p, HLSLSource, ShaderCI.Desc.Name, ppCompilerOutput); |
182 | 182 | return DataBlobImpl::Create(pShaderByteCode->GetBufferSize(), pShaderByteCode->GetBufferPointer()); |
183 | 183 | } |
|
0 commit comments