it works!

This commit is contained in:
RSDuck
2023-04-13 22:50:27 +02:00
parent 3428d3eb3e
commit 91bea108ea
7 changed files with 110 additions and 161 deletions

View File

@ -48,8 +48,7 @@ public:
void RestartFrame() override;
u32* GetLine(int line) override;
//dk::Fence FrameReady = {};
//dk::Fence FrameReserveFence = {};
void SetupAccelFrame() override;
private:
GLuint ShaderInterpXSpans[2];
GLuint ShaderBinCombined;
@ -197,18 +196,12 @@ private:
struct TexArrayEntry
{
u16 TexArrayIdx;
u16 LayerIdx;
};
struct TexArray
{
GLuint Image;
u32 ImageDescriptor;
GLuint TextureID;
u32 Layer;
};
struct TexCacheEntry
{
u32 DescriptorIdx;
u32 LastVariant; // very cheap way to make variant lookup faster
u32 TextureRAMStart[2], TextureRAMSize[2];
@ -239,16 +232,15 @@ private:
};
GLuint MetaUniformMemory;
static const u32 TexCacheMaxImages = 4096;
u32 FreeImageDescriptorsCount = 0;
u32 FreeImageDescriptors[TexCacheMaxImages];
std::vector<TexArrayEntry> FreeTextures[8][8];
std::vector<TexArray> TexArrays[8][8];
std::vector<GLuint> TexArrays[8][8];
GLuint Samplers[9];
u32 TextureDecodingBuffer[1024*1024];
GLuint Framebuffer;
TexCacheEntry& GetTexture(u32 textureParam, u32 paletteParam);
void SetupAttrs(SpanSetupY* span, Polygon* poly, int from, int to);