diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-08-19 15:50:31 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-08-19 15:50:31 +0000 |
| commit | 801c65731c10ae61a0fb9252ab8add6bb65ba4d0 (patch) | |
| tree | 2feb970e34be88030d0387f304ceffa1d6d8462f /Graphics/GraphicsEngineD3DBase | |
| parent | Rename ***_PIPELINE to PIPELINE_TYPE_*** (diff) | |
| download | DiligentCore-801c65731c10ae61a0fb9252ab8add6bb65ba4d0.tar.gz DiligentCore-801c65731c10ae61a0fb9252ab8add6bb65ba4d0.zip | |
Use ShaderVersion instead of Uint8
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp b/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp index 5dac32d4..7985da98 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp @@ -41,7 +41,7 @@ namespace Diligent class ShaderD3DBase { public: - ShaderD3DBase(const ShaderCreateInfo& ShaderCI, Uint8 ShaderModel); + ShaderD3DBase(const ShaderCreateInfo& ShaderCI, const ShaderVersion& ShaderModel); protected: CComPtr<ID3DBlob> m_pShaderByteCode; diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp index 9374d528..e96edb9a 100644 --- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp @@ -389,7 +389,7 @@ static HRESULT CompileShader(const char* Source, return hr; } -ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, Uint8 ShaderModel) : +ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, const ShaderVersion& ShaderModel) : m_isDXIL{false} { if (ShaderCI.Source || ShaderCI.FilePath) @@ -414,11 +414,11 @@ ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, Uint8 ShaderModel default: UNEXPECTED("Unknown shader type"); } strShaderProfile += "_"; - strShaderProfile += '0' + ((ShaderModel >> 4) & 0xF); + strShaderProfile += '0' + (ShaderModel.Major % 10); strShaderProfile += "_"; - strShaderProfile += ((ShaderModel & 0xF) == 0xF) ? 'x' : ('0' + (ShaderModel & 0xF)); + strShaderProfile += '0' + (ShaderModel.Minor % 10); - m_isDXIL = (ShaderModel >= 0x60); + m_isDXIL = (ShaderModel.Major >= 6); String ShaderSource(g_HLSLDefinitions); if (ShaderCI.Source) |
