implement render pipeline cache

This commit is contained in:
Samuliak 2024-08-03 09:31:40 +02:00
parent c6f66167a5
commit d7411e27f7
8 changed files with 388 additions and 263 deletions

View file

@ -36,7 +36,7 @@ typedef struct
uint16 mappedIndexOffset; // index in remapped uniform array
}LatteFastAccessRemappedUniformEntry_buffer_t;
typedef struct
typedef struct
{
uint32 texUnit;
sint32 uniformLocation;
@ -198,7 +198,7 @@ struct LatteDecompilerShader
// resource mapping (binding points)
LatteDecompilerShaderResourceMapping resourceMapping{};
// uniforms
struct
struct
{
sint32 loc_remapped; // uf_remappedVS/uf_remappedGS/uf_remappedPS
sint32 loc_uniformRegister; // uf_uniformRegisterVS/uf_uniformRegisterGS/uf_uniformRegisterPS
@ -215,7 +215,7 @@ struct LatteDecompilerShader
sint32 uniformRangeSize; // entire size of uniform variable block
}uniform{ 0 };
// fast access
struct _RemappedUniformBufferGroup
struct _RemappedUniformBufferGroup
{
_RemappedUniformBufferGroup(uint32 _kcacheBankIdOffset) : kcacheBankIdOffset(_kcacheBankIdOffset) {};
@ -255,14 +255,14 @@ struct LatteDecompilerOutputUniformOffsets
}
};
struct LatteDecompilerOptions
struct LatteDecompilerOptions
{
bool usesGeometryShader{ false };
// floating point math
bool strictMul{}; // if true, 0*anything=0 rule is emulated
// Vulkan-specific
bool useTFViaSSBO{ false };
struct
struct
{
bool hasRoundingModeRTEFloat32{ false };
}spirvInstrinsics;
@ -322,4 +322,4 @@ struct LatteParsedGSCopyShader
};
LatteParsedGSCopyShader* LatteGSCopyShaderParser_parse(uint8* programData, uint32 programSize);
bool LatteGSCopyShaderParser_getExportTypeByOffset(LatteParsedGSCopyShader* shaderContext, uint32 offset, uint32* exportType, uint32* exportParam);
bool LatteGSCopyShaderParser_getExportTypeByOffset(LatteParsedGSCopyShader* shaderContext, uint32 offset, uint32* exportType, uint32* exportParam);