mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix initialization bug in TextureCacheCommon
This commit is contained in:
1 parent
5676e90896
commit
64e55324c7
3 files changed
+4
-3
No files matched your search
@@ -92,7 +92,7 @@ static bool GetBestFramebufferCandidate(FramebufferManagerCommon *fbManager, con
|
||||
// These are Data::Format:: B4G4R4A4_PACK16, B5G6R6_PACK16, B5G5R5A1_PACK16, R8G8B8A8
|
||||
|
||||
TextureCacheCommon::TextureCacheCommon(Draw::DrawContext *draw, Draw2D *draw2D)
|
||||
: draw_(draw), draw2D_(draw2D), replacer_(draw), textureShaderCache_(draw, draw2D_) {
|
||||
: draw_(draw), draw2D_(draw2D), replacer_(draw), textureShaderCache_(draw, draw2D_), clutTextureCache_(draw) {
|
||||
decimationCounter_ = TEXCACHE_DECIMATION_INTERVAL;
|
||||
|
||||
// It's only possible to have 1KB of palette entries, although we allow 2KB in a hack.
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
|
||||
class ClutTextureCache {
|
||||
public:
|
||||
ClutTextureCache(Draw::DrawContext *draw) : draw_(draw) {}
|
||||
ClutTexture GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, const u32 *rawClut);
|
||||
|
||||
void Clear();
|
||||
@@ -47,7 +48,7 @@ public:
|
||||
void DeviceRestore(Draw::DrawContext *draw);
|
||||
|
||||
private:
|
||||
Draw::DrawContext *draw_;
|
||||
Draw::DrawContext *draw_ = nullptr;
|
||||
std::unordered_map<u32, ClutTexture *> texCache_;
|
||||
};
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ static constexpr VkStencilOp stencilOps[] = {
|
||||
VK_STENCIL_OP_ZERO,
|
||||
VK_STENCIL_OP_REPLACE,
|
||||
VK_STENCIL_OP_INVERT,
|
||||
VK_STENCIL_OP_INCREMENT_AND_CLAMP,
|
||||
VK_STENCIL_OP_INCREMENT_AND_CLAMP, // TODO: Are we sure we shouldn't wrap?
|
||||
VK_STENCIL_OP_DECREMENT_AND_CLAMP,
|
||||
VK_STENCIL_OP_KEEP, // reserved
|
||||
VK_STENCIL_OP_KEEP, // reserved
|
||||
|
||||
Reference in new issue
Block a user