Nicolas Capens | 17b29fd | 2016-09-15 09:32:16 -0400 | [diff] [blame] | 1 | // Copyright 2016 The SwiftShader Authors. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | #ifndef D3D8_Direct3DPixelShader8_hpp |
| 16 | #define D3D8_Direct3DPixelShader8_hpp |
| 17 | |
| 18 | #include "PixelShader.hpp" |
| 19 | |
| 20 | #include "Unknown.hpp" |
| 21 | |
| 22 | namespace D3D8 |
| 23 | { |
| 24 | class Direct3DDevice8; |
| 25 | |
| 26 | class Direct3DPixelShader8 : public Unknown |
| 27 | { |
| 28 | public: |
| 29 | Direct3DPixelShader8(Direct3DDevice8 *device, const unsigned long *shaderToken); |
| 30 | |
Nicolas Capens | 3b9e1ea | 2017-06-12 12:43:48 -0400 | [diff] [blame] | 31 | ~Direct3DPixelShader8() override; |
Nicolas Capens | 17b29fd | 2016-09-15 09:32:16 -0400 | [diff] [blame] | 32 | |
| 33 | // IUnknown methods |
Nicolas Capens | 3b9e1ea | 2017-06-12 12:43:48 -0400 | [diff] [blame] | 34 | long __stdcall QueryInterface(const IID &iid, void **object) override; |
| 35 | unsigned long __stdcall AddRef() override; |
| 36 | unsigned long __stdcall Release() override; |
Nicolas Capens | 17b29fd | 2016-09-15 09:32:16 -0400 | [diff] [blame] | 37 | |
Nicolas Capens | 17b29fd | 2016-09-15 09:32:16 -0400 | [diff] [blame] | 38 | void __stdcall GetFunction(void *data, unsigned int *size); |
| 39 | |
| 40 | // Internal methods |
| 41 | const sw::PixelShader *getPixelShader() const; |
| 42 | |
| 43 | private: |
| 44 | // Creation parameters |
| 45 | Direct3DDevice8 *const device; |
| 46 | unsigned long *shaderToken; |
| 47 | unsigned int size; |
| 48 | |
| 49 | sw::PixelShader pixelShader; |
| 50 | }; |
| 51 | } |
| 52 | |
| 53 | #endif // D3D8_Direct3DPixelShader8_hpp |