Add ShaderExecutable11 files.

TRAC #22191 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1530 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 071ee6a6
......@@ -278,6 +278,8 @@
'libGLESv2/renderer/ShaderExecutable.h',
'libGLESv2/renderer/ShaderExecutable9.cpp',
'libGLESv2/renderer/ShaderExecutable9.h',
'libGLESv2/renderer/ShaderExecutable11.cpp',
'libGLESv2/renderer/ShaderExecutable11.h',
'libGLESv2/renderer/SwapChain.h',
'libGLESv2/renderer/SwapChain9.cpp',
'libGLESv2/renderer/SwapChain9.h',
......
......@@ -255,6 +255,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<ClCompile Include="renderer\RenderTarget11.cpp" />
<ClCompile Include="renderer\RenderTarget9.cpp" />
<ClCompile Include="renderer\RenderStateCache.cpp" />
<ClCompile Include="renderer\ShaderExecutable11.cpp" />
<ClCompile Include="renderer\ShaderExecutable9.cpp" />
<ClCompile Include="renderer\SwapChain11.cpp" />
<ClCompile Include="renderer\SwapChain9.cpp" />
......@@ -301,6 +302,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<ClInclude Include="renderer\RenderStateCache.h" />
<ClInclude Include="renderer\ShaderCache.h" />
<ClInclude Include="renderer\ShaderExecutable.h" />
<ClInclude Include="renderer\ShaderExecutable11.h" />
<ClInclude Include="renderer\ShaderExecutable9.h" />
<ClInclude Include="renderer\SwapChain.h" />
<ClInclude Include="renderer\SwapChain11.h" />
......
......@@ -134,6 +134,9 @@
<ClCompile Include="renderer\ShaderExecutable9.cpp">
<Filter>Renderer</Filter>
</ClCompile>
<ClCompile Include="renderer\ShaderExecutable11.cpp">
<Filter>Renderer</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BinaryStream.h">
......@@ -277,6 +280,9 @@
<ClInclude Include="renderer\ShaderExecutable9.h">
<Filter>Renderer</Filter>
</ClInclude>
<ClInclude Include="renderer\ShaderExecutable11.h">
<Filter>Renderer</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="libGLESv2.def">
......
......@@ -33,4 +33,4 @@ class ShaderExecutable
}
#endif // LIBGLESV2_RENDERER_SHADEREXECUTABLE9_H_
\ No newline at end of file
#endif // LIBGLESV2_RENDERER_SHADEREXECUTABLE9_H_
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ShaderExecutable11.cpp: Implements a D3D11-specific class to contain shader
// executable implementation details.
#include "libGLESv2/renderer/ShaderExecutable11.h"
#include "common/debug.h"
namespace rx
{
ShaderExecutable11::ShaderExecutable11(ID3D11PixelShader *executable)
{
mPixelExecutable = executable;
mVertexExecutable = NULL;
}
ShaderExecutable11::ShaderExecutable11(ID3D11VertexShader *executable)
{
mVertexExecutable = executable;
mPixelExecutable = NULL;
}
ShaderExecutable11::~ShaderExecutable11()
{
if (mVertexExecutable)
{
mVertexExecutable->Release();
}
if (mPixelExecutable)
{
mPixelExecutable->Release();
}
}
ShaderExecutable11 *ShaderExecutable11::makeShaderExecutable11(ShaderExecutable *executable)
{
ASSERT(dynamic_cast<ShaderExecutable11*>(executable) != NULL);
return static_cast<ShaderExecutable11*>(executable);
}
bool ShaderExecutable11::getVertexFunction(void *pData, UINT *pSizeOfData)
{
// TODO
UNIMPLEMENTED();
return false;
}
bool ShaderExecutable11::getPixelFunction(void *pData, UINT *pSizeOfData)
{
// TODO
UNIMPLEMENTED();
return false;
}
ID3D11VertexShader *ShaderExecutable11::getVertexShader()
{
return mVertexExecutable;
}
ID3D11PixelShader *ShaderExecutable11::getPixelShader()
{
return mPixelExecutable;
}
gl::D3DConstantTable *ShaderExecutable11::getConstantTable()
{
return NULL;
}
}
\ No newline at end of file
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ShaderExecutable11.h: Defines a D3D11-specific class to contain shader
// executable implementation details.
#ifndef LIBGLESV2_RENDERER_SHADEREXECUTABLE11_H_
#define LIBGLESV2_RENDERER_SHADEREXECUTABLE11_H_
#include <d3d11.h>
#include "libGLESv2/renderer/ShaderExecutable.h"
namespace rx
{
class ShaderExecutable11 : public ShaderExecutable
{
public:
ShaderExecutable11(ID3D11PixelShader *executable);
ShaderExecutable11(ID3D11VertexShader *executable);
virtual ~ShaderExecutable11();
virtual bool getVertexFunction(void *pData, UINT *pSizeOfData);
virtual bool getPixelFunction(void *pData, UINT *pSizeOfData);
static ShaderExecutable11 *makeShaderExecutable11(ShaderExecutable *executable);
ID3D11PixelShader *getPixelShader();
ID3D11VertexShader *getVertexShader();
virtual gl::D3DConstantTable *getConstantTable();
private:
DISALLOW_COPY_AND_ASSIGN(ShaderExecutable11);
ID3D11PixelShader *mPixelExecutable;
ID3D11VertexShader *mVertexExecutable;
};
}
#endif // LIBGLESV2_RENDERER_SHADEREXECUTABLE11_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment