mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Revert r7421 and r7422.
Should fix issue 4413. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7592 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -20,12 +20,12 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "D3DUtil.h"
|
||||
#include "D3DBase.h"
|
||||
#include "D3DBlob.h"
|
||||
|
||||
class VERTEXSHADERUID;
|
||||
|
||||
namespace DX11
|
||||
{
|
||||
namespace DX11 {
|
||||
|
||||
class VertexShaderCache
|
||||
{
|
||||
@ -33,33 +33,37 @@ public:
|
||||
static void Init();
|
||||
static void Clear();
|
||||
static void Shutdown();
|
||||
static bool LoadShader(u32 components);
|
||||
static bool SetShader(u32 components); // TODO: Should be renamed to LoadShader
|
||||
|
||||
static SharedPtr<ID3D11VertexShader> GetActiveShader() { return last_entry->shader; }
|
||||
static SharedPtr<ID3D10Blob> GetActiveShaderBytecode() { return last_entry->bytecode; }
|
||||
static ID3D11Buffer*const& GetConstantBuffer();
|
||||
static ID3D11VertexShader* GetActiveShader() { return last_entry->shader; }
|
||||
static D3DBlob* GetActiveShaderBytecode() { return last_entry->bytecode; }
|
||||
static ID3D11Buffer* &GetConstantBuffer();
|
||||
|
||||
static ID3D11VertexShader* GetSimpleVertexShader();
|
||||
static ID3D11VertexShader* GetClearVertexShader();
|
||||
static ID3D11InputLayout* GetSimpleInputLayout();
|
||||
static ID3D11InputLayout* GetClearInputLayout();
|
||||
|
||||
static bool VertexShaderCache::InsertByteCode(const VERTEXSHADERUID &uid, SharedPtr<ID3D10Blob> bcodeblob);
|
||||
static bool VertexShaderCache::InsertByteCode(const VERTEXSHADERUID &uid, D3DBlob* bcodeblob);
|
||||
|
||||
private:
|
||||
struct VSCacheEntry
|
||||
{
|
||||
SharedPtr<ID3D11VertexShader> shader;
|
||||
SharedPtr<ID3D10Blob> bytecode; // needed to initialize the input layout
|
||||
ID3D11VertexShader* shader;
|
||||
D3DBlob* bytecode; // needed to initialize the input layout
|
||||
int frameCount;
|
||||
|
||||
VSCacheEntry()
|
||||
: frameCount(0)
|
||||
{}
|
||||
|
||||
void SetByteCode(SharedPtr<ID3D10Blob> blob)
|
||||
VSCacheEntry() : shader(NULL), bytecode(NULL), frameCount(0) {}
|
||||
void SetByteCode(D3DBlob* blob)
|
||||
{
|
||||
SAFE_RELEASE(bytecode);
|
||||
bytecode = blob;
|
||||
blob->AddRef();
|
||||
}
|
||||
void Destroy()
|
||||
{
|
||||
SAFE_RELEASE(shader);
|
||||
SAFE_RELEASE(bytecode);
|
||||
}
|
||||
};
|
||||
typedef std::map<VERTEXSHADERUID, VSCacheEntry> VSCache;
|
||||
|
Reference in New Issue
Block a user