summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-03-08 04:15:47 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-03-08 04:15:47 +0000
commit900dc223916d3590522b633f93914e8f5d6e1d6e (patch)
tree5e7aa9528e5e657b91ea97c0dc5a5359adea1f24 /Graphics/GraphicsEngineD3DBase
parentRepalced IShaderResourceVariable::GetArraySize() and GetName() with GetResour... (diff)
downloadDiligentCore-900dc223916d3590522b633f93914e8f5d6e1d6e.tar.gz
DiligentCore-900dc223916d3590522b633f93914e8f5d6e1d6e.zip
Added IShaderResourceVariableD3D interface plus fixed some include paths
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h11
-rw-r--r--Graphics/GraphicsEngineD3DBase/interface/ShaderResourceVariableD3D.h48
2 files changed, 56 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h
index 5ca646e0..7cf296e1 100644
--- a/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h
+++ b/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h
@@ -23,7 +23,7 @@
#pragma once
-#include "ShaderResourceVariable.h"
+#include "ShaderResourceVariableD3D.h"
/// \file
/// Declaration of Diligent::ShaderVariableD3DBase class
@@ -31,7 +31,7 @@
namespace Diligent
{
template<typename TShaderResourceLayout>
- struct ShaderVariableD3DBase : public IShaderResourceVariable
+ struct ShaderVariableD3DBase : public IShaderResourceVariableD3D
{
ShaderVariableD3DBase(TShaderResourceLayout& ParentResLayout,
const D3DShaderResourceAttribs& Attribs,
@@ -63,7 +63,7 @@ namespace Diligent
return;
*ppInterface = nullptr;
- if( IID == IID_ShaderResourceVariable || IID == IID_Unknown )
+ if( IID == IID_ShaderResourceVariableD3D || IID == IID_ShaderResourceVariable || IID == IID_Unknown )
{
*ppInterface = this;
(*ppInterface)->AddRef();
@@ -77,6 +77,11 @@ namespace Diligent
virtual ShaderResourceDesc GetResourceDesc()const override final
{
+ return GetHLSLResourceDesc();
+ }
+
+ virtual HLSLShaderResourceDesc GetHLSLResourceDesc()const override final
+ {
return m_Attribs.GetHLSLResourceDesc();
}
diff --git a/Graphics/GraphicsEngineD3DBase/interface/ShaderResourceVariableD3D.h b/Graphics/GraphicsEngineD3DBase/interface/ShaderResourceVariableD3D.h
new file mode 100644
index 00000000..1b19ca04
--- /dev/null
+++ b/Graphics/GraphicsEngineD3DBase/interface/ShaderResourceVariableD3D.h
@@ -0,0 +1,48 @@
+/* Copyright 2015-2019 Egor Yusov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
+ *
+ * In no event and under no legal theory, whether in tort (including negligence),
+ * contract, or otherwise, unless required by applicable law (such as deliberate
+ * and grossly negligent acts) or agreed to in writing, shall any Contributor be
+ * liable for any damages, including any direct, indirect, special, incidental,
+ * or consequential damages of any character arising as a result of this License or
+ * out of the use or inability to use the software (including but not limited to damages
+ * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
+ * all other commercial damages or losses), even if such Contributor has been advised
+ * of the possibility of such damages.
+ */
+
+#pragma once
+
+/// \file
+/// Definition of the Diligent::IShaderResourceVariableD3D interface
+
+#include "../../GraphicsEngine/interface/ShaderResourceVariable.h"
+#include "ShaderD3D.h"
+
+namespace Diligent
+{
+
+// {99BCAFBF-E7E1-420A-929B-C862265FD146}
+static constexpr INTERFACE_ID IID_ShaderResourceVariableD3D =
+{ 0x99bcafbf, 0xe7e1, 0x420a, { 0x92, 0x9b, 0xc8, 0x62, 0x26, 0x5f, 0xd1, 0x46 } };
+
+
+/// Interface to the Direct3D ShaderResourceVariable resource variable
+class IShaderResourceVariableD3D : public IShaderResourceVariable
+{
+public:
+ /// Returns HLSL ShaderResourceVariable resource description
+ virtual HLSLShaderResourceDesc GetHLSLResourceDesc()const = 0;
+};
+
+}