mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-11 18:50:30 +00:00
Initial megacommit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a3be5d89ae
commit
775dc8a9c0
1920 changed files with 734652 additions and 0 deletions
72
Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h
Normal file
72
Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h
Normal file
|
@ -0,0 +1,72 @@
|
|||
#pragma once
|
||||
|
||||
#if 0
|
||||
|
||||
#include "D3DBase.h"
|
||||
#include "DecodedVArray.h"
|
||||
#include <map>
|
||||
|
||||
|
||||
class CompiledDList
|
||||
{
|
||||
u32 *data;
|
||||
int dataSize;
|
||||
int pass;
|
||||
int codeSize;
|
||||
u8 *code;
|
||||
|
||||
struct Batch
|
||||
{
|
||||
DecodedVArray varray;
|
||||
LPDIRECT3DINDEXBUFFER9 ibuffer;
|
||||
int numDraws;
|
||||
};
|
||||
Batch *batches;
|
||||
int numBatches;
|
||||
|
||||
u32 addr, size;
|
||||
bool Compile();
|
||||
bool Pass1();
|
||||
void Pass2();
|
||||
void Run();
|
||||
|
||||
public:
|
||||
CompiledDList(u32 _addr, u32 _size);
|
||||
~CompiledDList();
|
||||
bool Call();
|
||||
static void DrawHelperHelper(CompiledDList *dl, int vno, int prim);
|
||||
};
|
||||
|
||||
class DListCache
|
||||
{
|
||||
struct DLCacheEntry
|
||||
{
|
||||
CompiledDList *dlist;
|
||||
int frameCount;
|
||||
int pass;
|
||||
u32 size;
|
||||
DLCacheEntry()
|
||||
{
|
||||
pass=0;
|
||||
dlist=0;
|
||||
frameCount=0;
|
||||
}
|
||||
void Destroy()
|
||||
{
|
||||
if (dlist)
|
||||
delete dlist;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map<DWORD,DLCacheEntry> DLCache;
|
||||
|
||||
static DLCache dlists;
|
||||
|
||||
public:
|
||||
static void Init();
|
||||
static void Cleanup();
|
||||
static void Shutdown();
|
||||
static void Call(u32 _addr, u32 _size);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue