#include "ui/gl/debug_utils.h"
#include <d3d11.h>
#include <dxgi.h>
namespace gl {
namespace {
template <typename T>
HRESULT SetDebugNameInternal(T* d3d11_object, const char* debug_string) {
return d3d11_object->SetPrivateData(WKPDID_D3DDebugObjectName,
strlen(debug_string), debug_string);
}
}
HRESULT SetDebugName(ID3D11DeviceChild* d3d11_device_child,
const char* debug_string) {
return SetDebugNameInternal(d3d11_device_child, debug_string);
}
HRESULT SetDebugName(IDXGIObject* dxgi_object, const char* debug_string) {
return SetDebugNameInternal(dxgi_object, debug_string);
}
}