282 void FreeGsSurfaces();
305 void AllocPaletteVram();
318 int UploadPaletteClut();
332 void UploadBitmapMipToSubImage(
VRAM::Entry *pPage,
int nMip,
int nBlockOffset);
337 std::vector<GsMip> mGsMips;
338 unsigned long long mTex0;
339 unsigned long long mTex1;
340 unsigned long long mMipTbp1;
341 unsigned long long mMipTbp2;
348 unsigned long long mReserved98;
Drawing surface over an ABitmap, with a clip rectangle.
Definition acanvas.h:74
A 256 entry colour table an ABitmap points at.
Definition apalette.h:31
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
void UploadPendingMips()
Upload every level whose dirty bit is set, then clear the mask.
virtual ACanvas * LockMipBitmap(int nMip, int nReserved, int nFlags)
Give the caller the canvas over a mip level to draw into.
int UploadMipAndBuildMipTbp(int nMip, bool bSkipIfResident)
Resolve one mip level's GS block address, uploading the level when needed.
virtual void FreeLoadedBitmaps()
Release every loaded bitmap and every GS surface.
virtual void SetPalette(APalette *pPalette, int nReserved)
Replace the palette of the texture.
static void Init()
Install this class as the texture the renderer builds and program the default filtering.
virtual void OnMipLoaded(int nMip)
Take delivery of one mip level whose read has just finished.
PsTex(const HxStr &name)
Construct a texture with no GS residency.
int UploadBitmapMipToGs(int nMip)
Upload one mip level into the video memory block of its level.
virtual void SetGsPageInUse(bool bInUse)
Pin the video memory block of mip 0 against eviction, or release the pin.
void BindAsRenderTarget()
Make mip 0 the surface the GS draws into.
virtual void UnlockMipBitmap()
Take back the canvas LockMipBitmap() handed out.
virtual void RestoreSurfaces()
Rebuild the GS state of the whole texture from the loaded bitmaps.
virtual ~PsTex()
Release the GS residency and the texture.
bool BindToGsSlot(unsigned nTexFunc)
Make the texture current on the GS, with the given texture function.
Texture, as a bitmap path plus the load state of its mip levels.
Definition tex.h:43
Tex(const HxStr &name)
Construct a texture with no bitmap.
int mBitsPerPixel
Definition tex.h:423
One entry of the GS video memory block table.
Definition vram.h:537
One entry of the GS video memory palette table.
Definition vram.h:139
The rendering engine.
Definition animhelper.h:3
const int g_anPackedMipPageOffsets[6]
Block offset of each packed mip level inside the page of the level before mFirstPackedMip.
const int g_anClutSwizzleBlocks[4]
Block groups of a 256-entry CLUT in the order the CSM1 layout stores them, {0, 2, 1,...
const unsigned int g_dwDefaultClutEntry
The palette entry a level that fails validation is left with, an opaque 8888 colour.
Tex * NewPsTex(const HxStr &name)
Allocate and construct a PlayStation 2 texture.