ShaderExecutable9.cpp (1334B)
1 // 2 // Copyright 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 // ShaderExecutable9.cpp: Implements a D3D9-specific class to contain shader 8 // executable implementation details. 9 10 #include "libANGLE/renderer/d3d/d3d9/ShaderExecutable9.h" 11 12 #include "common/debug.h" 13 14 namespace rx 15 { 16 17 ShaderExecutable9::ShaderExecutable9(const void *function, 18 size_t length, 19 IDirect3DPixelShader9 *executable) 20 : ShaderExecutableD3D(function, length) 21 { 22 mPixelExecutable = executable; 23 mVertexExecutable = nullptr; 24 } 25 26 ShaderExecutable9::ShaderExecutable9(const void *function, 27 size_t length, 28 IDirect3DVertexShader9 *executable) 29 : ShaderExecutableD3D(function, length) 30 { 31 mVertexExecutable = executable; 32 mPixelExecutable = nullptr; 33 } 34 35 ShaderExecutable9::~ShaderExecutable9() 36 { 37 SafeRelease(mVertexExecutable); 38 SafeRelease(mPixelExecutable); 39 } 40 41 IDirect3DVertexShader9 *ShaderExecutable9::getVertexShader() const 42 { 43 return mVertexExecutable; 44 } 45 46 IDirect3DPixelShader9 *ShaderExecutable9::getPixelShader() const 47 { 48 return mPixelExecutable; 49 } 50 51 } // namespace rx