summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/TextureCache.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2014-03-09 21:14:26 +0100
committerTillmann Karras <tilkax@gmail.com>2014-03-09 21:14:26 +0100
commitd802d392811be44d34ae9cd23f616db93e54c50f (patch)
treef9aa8831a0731ea246bd921d979f4bffa7f07bd0 /Source/Core/VideoBackends/D3D/TextureCache.cpp
parentf28116b7da6aac6069084596dc4dbf866bdebfd8 (diff)
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
Diffstat (limited to 'Source/Core/VideoBackends/D3D/TextureCache.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/TextureCache.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/D3D/TextureCache.cpp b/Source/Core/VideoBackends/D3D/TextureCache.cpp
index 4ea188986c..608cbd67cc 100644
--- a/Source/Core/VideoBackends/D3D/TextureCache.cpp
+++ b/Source/Core/VideoBackends/D3D/TextureCache.cpp
@@ -18,7 +18,7 @@
namespace DX11
{
-static TextureEncoder* g_encoder = NULL;
+static TextureEncoder* g_encoder = nullptr;
const size_t MAX_COPY_BUFFERS = 32;
ID3D11Buffer* efbcopycbuf[MAX_COPY_BUFFERS] = { 0 };
@@ -43,7 +43,7 @@ bool TextureCache::TCacheEntry::Save(const std::string& filename, unsigned int l
return false;
}
- ID3D11Texture2D* pNewTexture = NULL;
+ ID3D11Texture2D* pNewTexture = nullptr;
ID3D11Texture2D* pSurface = texture->GetTex();
D3D11_TEXTURE2D_DESC desc;
pSurface->GetDesc(&desc);
@@ -52,7 +52,7 @@ bool TextureCache::TCacheEntry::Save(const std::string& filename, unsigned int l
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE;
desc.Usage = D3D11_USAGE_STAGING;
- HRESULT hr = D3D::device->CreateTexture2D(&desc, NULL, &pNewTexture);
+ HRESULT hr = D3D::device->CreateTexture2D(&desc, nullptr, &pNewTexture);
bool saved_png = false;
@@ -85,7 +85,7 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(unsigned int width,
{
D3D11_USAGE usage = D3D11_USAGE_DEFAULT;
D3D11_CPU_ACCESS_FLAG cpu_access = (D3D11_CPU_ACCESS_FLAG)0;
- D3D11_SUBRESOURCE_DATA srdata, *data = NULL;
+ D3D11_SUBRESOURCE_DATA srdata, *data = nullptr;
if (tex_levels == 1)
{
@@ -134,7 +134,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
D3D::context->RSSetViewports(1, &vp);
// set transformation
- if (NULL == efbcopycbuf[cbufid])
+ if (nullptr == efbcopycbuf[cbufid])
{
const D3D11_BUFFER_DESC cbdesc = CD3D11_BUFFER_DESC(28 * sizeof(float), D3D11_BIND_CONSTANT_BUFFER, D3D11_USAGE_DEFAULT);
D3D11_SUBRESOURCE_DATA data;
@@ -155,7 +155,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
else
D3D::SetPointCopySampler();
- D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), NULL);
+ D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), nullptr);
// Create texture copy
D3D::drawShadedTexQuad(
@@ -208,7 +208,7 @@ TextureCache::~TextureCache()
g_encoder->Shutdown();
delete g_encoder;
- g_encoder = NULL;
+ g_encoder = nullptr;
}
}