1
// Copyright (c) 2014- PPSSPP Project.
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
20
#include "Common/CommonTypes.h"
21
#include "GPU/ge_constants.h"
23
#include "GPU/Directx9/helper/global.h"
27
class DepalShaderDX9 {
29
LPDIRECT3DPIXELSHADER9 pixelShader;
32
class DepalTextureDX9 {
34
LPDIRECT3DTEXTURE9 texture;
38
// Caches both shaders and palette textures.
39
class DepalShaderCacheDX9 {
41
DepalShaderCacheDX9();
42
~DepalShaderCacheDX9();
44
// This also uploads the palette and binds the correct texture.
45
LPDIRECT3DPIXELSHADER9 GetDepalettizePixelShader(GEPaletteFormat clutFormat, GEBufferFormat pixelFormat);
46
LPDIRECT3DVERTEXSHADER9 GetDepalettizeVertexShader() { return vertexShader_; }
47
LPDIRECT3DTEXTURE9 GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, u32 *rawClut);
52
u32 GenerateShaderID(GEPaletteFormat clutFormat, GEBufferFormat pixelFormat);
54
LPDIRECT3DVERTEXSHADER9 vertexShader_;
55
std::map<u32, DepalShaderDX9 *> cache_;
56
std::map<u32, DepalTextureDX9 *> texCache_;
b'\\ No newline at end of file'