2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:29:41 +00:00
|
|
|
// 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:
|
2016-06-24 08:43:46 +00:00
|
|
|
// memory will be copied into an own buffer
|
|
|
|
D3DBlob(unsigned int blob_size, const u8* init_data = nullptr);
|
2011-06-11 19:37:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// d3dblob will be AddRef'd
|
|
|
|
D3DBlob(ID3D10Blob* d3dblob);
|
2011-06-11 19:37:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void AddRef();
|
|
|
|
unsigned int Release();
|
2011-06-11 19:37:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
unsigned int Size() const;
|
|
|
|
u8* Data();
|
2011-06-11 19:37:21 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
~D3DBlob();
|
2011-06-11 19:37:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
unsigned int ref;
|
|
|
|
unsigned int size;
|
2011-06-11 19:37:21 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
u8* data;
|
|
|
|
ID3D10Blob* blob;
|
2011-06-11 19:37:21 +00:00
|
|
|
};
|
|
|
|
|
2015-03-01 16:17:09 +00:00
|
|
|
} // namespace
|