blob: d9f9725a9e090d54ef0aee446c6dc78d5907a6da [file] [log] [blame]
Nicolas Capens17b29fd2016-09-15 09:32:16 -04001// 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
22namespace D3D8
23{
24 class Direct3DDevice8;
25
26 class Direct3DPixelShader8 : public Unknown
27 {
28 public:
29 Direct3DPixelShader8(Direct3DDevice8 *device, const unsigned long *shaderToken);
30
Nicolas Capens3b9e1ea2017-06-12 12:43:48 -040031 ~Direct3DPixelShader8() override;
Nicolas Capens17b29fd2016-09-15 09:32:16 -040032
33 // IUnknown methods
Nicolas Capens3b9e1ea2017-06-12 12:43:48 -040034 long __stdcall QueryInterface(const IID &iid, void **object) override;
35 unsigned long __stdcall AddRef() override;
36 unsigned long __stdcall Release() override;
Nicolas Capens17b29fd2016-09-15 09:32:16 -040037
Nicolas Capens17b29fd2016-09-15 09:32:16 -040038 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