2013-04-18 03:29:41 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2011-06-11 19:37:21 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2011-06-11 19:37:21 +00:00
|
|
|
|
|
|
|
struct ID3D10Blob;
|
|
|
|
|
|
|
|
namespace DX11
|
|
|
|
{
|
|
|
|
|
|
|
|
// use this class instead ID3D10Blob or ID3D11Blob whenever possible
|
|
|
|
class D3DBlob
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// memory will be copied into an own buffer
|
2014-03-09 20:14:26 +00:00
|
|
|
D3DBlob(unsigned int blob_size, const u8* init_data = nullptr);
|
2011-06-11 19:37:21 +00:00
|
|
|
|
|
|
|
// d3dblob will be AddRef'd
|
|
|
|
D3DBlob(ID3D10Blob* d3dblob);
|
|
|
|
|
|
|
|
void AddRef();
|
|
|
|
unsigned int Release();
|
|
|
|
|
2015-04-15 04:38:21 +00:00
|
|
|
unsigned int Size() const;
|
2011-06-11 19:37:21 +00:00
|
|
|
u8* Data();
|
|
|
|
|
|
|
|
private:
|
|
|
|
~D3DBlob();
|
|
|
|
|
|
|
|
unsigned int ref;
|
|
|
|
unsigned int size;
|
|
|
|
|
|
|
|
u8* data;
|
|
|
|
ID3D10Blob* blob;
|
|
|
|
};
|
|
|
|
|
2015-03-01 16:17:09 +00:00
|
|
|
} // namespace
|