29 D3D11_MAPPED_SUBRESOURCE mapped;
30 HRESULT hr = context->Map(
GetDXResource(), sri, D3D11_MAP_WRITE_DISCARD, 0, &mapped);
33 mapped.pData =
nullptr;
35 mapped.DepthPitch = 0;
57 LogError(
"Resource does not exist.");
62 LogError(
"Staging resource does not exist.");
69 LogError(
"Staging resource has incorrect CPU access.");
80 D3D11_CPU_ACCESS_WRITE,
81 D3D11_CPU_ACCESS_READ,
#define CHECK_HR_RETURN_NONE(msg)
HRESULT SetPrivateName(ID3D11DeviceChild *object, std::string const &name)
GLuint const GLchar * name
DX11Resource(Resource const *gtResource)
ULONG FinalRelease(T *&object)
ID3D11Resource * mStaging
GLuint GLint GLboolean GLint GLenum access
void Unmap(ID3D11DeviceContext *context, unsigned int sri)
GLsizei const GLchar *const * string
#define LogError(message)
virtual void SetName(std::string const &name) override
ID3D11DeviceChild * mDXObject
#define D3D11_CPU_ACCESS_READ_WRITE
bool PreparedForCopy(D3D11_CPU_ACCESS_FLAG access) const
#define D3D11_CPU_ACCESS_NONE
ID3D11Resource * GetDXResource() const
static UINT const msStagingAccess[]
typedef UINT(WINAPI *PFNWGLGETGPUIDSAMDPROC)(UINT maxCount
D3D11_MAPPED_SUBRESOURCE MapForWrite(ID3D11DeviceContext *context, unsigned int sri)
Resource * GetResource() const
virtual void SetName(std::string const &name) override