daniel@transgaming.com | 813bb78 | 2012-11-28 21:03:30 +0000 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | // ShaderExecutable11.cpp: Implements a D3D11-specific class to contain shader |
| 8 | // executable implementation details. |
| 9 | |
| 10 | #include "libGLESv2/renderer/ShaderExecutable11.h" |
| 11 | |
| 12 | #include "common/debug.h" |
| 13 | |
| 14 | namespace rx |
| 15 | { |
| 16 | |
| 17 | ShaderExecutable11::ShaderExecutable11(ID3D11PixelShader *executable) |
| 18 | { |
| 19 | mPixelExecutable = executable; |
| 20 | mVertexExecutable = NULL; |
| 21 | } |
| 22 | |
| 23 | ShaderExecutable11::ShaderExecutable11(ID3D11VertexShader *executable) |
| 24 | { |
| 25 | mVertexExecutable = executable; |
| 26 | mPixelExecutable = NULL; |
| 27 | } |
| 28 | |
| 29 | ShaderExecutable11::~ShaderExecutable11() |
| 30 | { |
| 31 | if (mVertexExecutable) |
| 32 | { |
| 33 | mVertexExecutable->Release(); |
| 34 | } |
| 35 | if (mPixelExecutable) |
| 36 | { |
| 37 | mPixelExecutable->Release(); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | ShaderExecutable11 *ShaderExecutable11::makeShaderExecutable11(ShaderExecutable *executable) |
| 42 | { |
| 43 | ASSERT(dynamic_cast<ShaderExecutable11*>(executable) != NULL); |
| 44 | return static_cast<ShaderExecutable11*>(executable); |
| 45 | } |
| 46 | |
| 47 | bool ShaderExecutable11::getVertexFunction(void *pData, UINT *pSizeOfData) |
| 48 | { |
| 49 | // TODO |
| 50 | UNIMPLEMENTED(); |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | bool ShaderExecutable11::getPixelFunction(void *pData, UINT *pSizeOfData) |
| 55 | { |
| 56 | // TODO |
| 57 | UNIMPLEMENTED(); |
| 58 | return false; |
| 59 | } |
| 60 | |
| 61 | ID3D11VertexShader *ShaderExecutable11::getVertexShader() |
| 62 | { |
| 63 | return mVertexExecutable; |
| 64 | } |
| 65 | |
| 66 | ID3D11PixelShader *ShaderExecutable11::getPixelShader() |
| 67 | { |
| 68 | return mPixelExecutable; |
| 69 | } |
| 70 | |
| 71 | gl::D3DConstantTable *ShaderExecutable11::getConstantTable() |
| 72 | { |
| 73 | return NULL; |
| 74 | } |
| 75 | |
| 76 | } |