Commit b13f866e by Nicolas Capens Committed by Shannon Woods

Disambiguate getRenderTarget calls.

TRAC #22705 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens
parent c0f7c619
...@@ -2696,7 +2696,7 @@ bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &so ...@@ -2696,7 +2696,7 @@ bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &so
return gl::error(GL_OUT_OF_MEMORY, false); return gl::error(GL_OUT_OF_MEMORY, false);
} }
RenderTarget11 *destRenderTarget = RenderTarget11::makeRenderTarget11(storage11->getRenderTarget(target, level)); RenderTarget11 *destRenderTarget = RenderTarget11::makeRenderTarget11(storage11->getRenderTargetFace(target, level));
if (!destRenderTarget) if (!destRenderTarget)
{ {
source->Release(); source->Release();
......
...@@ -104,7 +104,7 @@ TextureStorageInterfaceCube::~TextureStorageInterfaceCube() ...@@ -104,7 +104,7 @@ TextureStorageInterfaceCube::~TextureStorageInterfaceCube()
RenderTarget *TextureStorageInterfaceCube::getRenderTarget(GLenum faceTarget) const RenderTarget *TextureStorageInterfaceCube::getRenderTarget(GLenum faceTarget) const
{ {
return mInstance->getRenderTarget(faceTarget, 0); return mInstance->getRenderTargetFace(faceTarget, 0);
} }
void TextureStorageInterfaceCube::generateMipmap(int face, int level) void TextureStorageInterfaceCube::generateMipmap(int face, int level)
......
// //
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -32,7 +32,7 @@ class TextureStorage ...@@ -32,7 +32,7 @@ class TextureStorage
virtual int levelCount() = 0; virtual int levelCount() = 0;
virtual RenderTarget *getRenderTarget(int level) = 0; virtual RenderTarget *getRenderTarget(int level) = 0;
virtual RenderTarget *getRenderTarget(GLenum faceTarget, int level) = 0; virtual RenderTarget *getRenderTargetFace(GLenum faceTarget, int level) = 0;
virtual RenderTarget *getRenderTargetLayer(int mipLevel, int layer) = 0; virtual RenderTarget *getRenderTargetLayer(int mipLevel, int layer) = 0;
virtual void generateMipmap(int level) = 0; virtual void generateMipmap(int level) = 0;
virtual void generateMipmap(int face, int level) = 0; virtual void generateMipmap(int face, int level) = 0;
......
#include "precompiled.h" #include "precompiled.h"
// //
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -520,7 +520,7 @@ ID3D11Resource *TextureStorage11_Cube::getBaseTexture() const ...@@ -520,7 +520,7 @@ ID3D11Resource *TextureStorage11_Cube::getBaseTexture() const
return mTexture; return mTexture;
} }
RenderTarget *TextureStorage11_Cube::getRenderTarget(GLenum faceTarget, int level) RenderTarget *TextureStorage11_Cube::getRenderTargetFace(GLenum faceTarget, int level)
{ {
unsigned int faceIdx = gl::TextureCubeMap::faceIndex(faceTarget); unsigned int faceIdx = gl::TextureCubeMap::faceIndex(faceTarget);
if (level >= 0 && level < static_cast<int>(mMipLevels)) if (level >= 0 && level < static_cast<int>(mMipLevels))
...@@ -643,8 +643,8 @@ ID3D11ShaderResourceView *TextureStorage11_Cube::getSRV() ...@@ -643,8 +643,8 @@ ID3D11ShaderResourceView *TextureStorage11_Cube::getSRV()
void TextureStorage11_Cube::generateMipmap(int face, int level) void TextureStorage11_Cube::generateMipmap(int face, int level)
{ {
RenderTarget11 *source = RenderTarget11::makeRenderTarget11(getRenderTarget(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, level - 1)); RenderTarget11 *source = RenderTarget11::makeRenderTarget11(getRenderTargetFace(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, level - 1));
RenderTarget11 *dest = RenderTarget11::makeRenderTarget11(getRenderTarget(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, level)); RenderTarget11 *dest = RenderTarget11::makeRenderTarget11(getRenderTargetFace(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, level));
generateMipmapLayer(source, dest); generateMipmapLayer(source, dest);
} }
......
// //
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -36,7 +36,7 @@ class TextureStorage11 : public TextureStorage ...@@ -36,7 +36,7 @@ class TextureStorage11 : public TextureStorage
virtual ID3D11Resource *getBaseTexture() const = 0; virtual ID3D11Resource *getBaseTexture() const = 0;
virtual ID3D11ShaderResourceView *getSRV() = 0; virtual ID3D11ShaderResourceView *getSRV() = 0;
virtual RenderTarget *getRenderTarget(int level) { return NULL; } virtual RenderTarget *getRenderTarget(int level) { return NULL; }
virtual RenderTarget *getRenderTarget(GLenum faceTarget, int level) { return NULL; } virtual RenderTarget *getRenderTargetFace(GLenum faceTarget, int level) { return NULL; }
virtual RenderTarget *getRenderTargetLayer(int mipLevel, int layer) { return NULL; } virtual RenderTarget *getRenderTargetLayer(int mipLevel, int layer) { return NULL; }
virtual void generateMipmap(int level) {}; virtual void generateMipmap(int level) {};
...@@ -107,7 +107,7 @@ class TextureStorage11_Cube : public TextureStorage11 ...@@ -107,7 +107,7 @@ class TextureStorage11_Cube : public TextureStorage11
virtual ID3D11Resource *getBaseTexture() const; virtual ID3D11Resource *getBaseTexture() const;
virtual ID3D11ShaderResourceView *getSRV(); virtual ID3D11ShaderResourceView *getSRV();
virtual RenderTarget *getRenderTarget(GLenum faceTarget, int level); virtual RenderTarget *getRenderTargetFace(GLenum faceTarget, int level);
virtual void generateMipmap(int face, int level); virtual void generateMipmap(int face, int level);
......
// //
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -37,7 +37,7 @@ class TextureStorage9 : public TextureStorage ...@@ -37,7 +37,7 @@ class TextureStorage9 : public TextureStorage
virtual IDirect3DBaseTexture9 *getBaseTexture() const = 0; virtual IDirect3DBaseTexture9 *getBaseTexture() const = 0;
virtual RenderTarget *getRenderTarget(int level) { return NULL; } virtual RenderTarget *getRenderTarget(int level) { return NULL; }
virtual RenderTarget *getRenderTarget(GLenum faceTarget, int level) { return NULL; } virtual RenderTarget *getRenderTargetFace(GLenum faceTarget, int level) { return NULL; }
virtual RenderTarget *getRenderTargetLayer(int mipLevel, int layer) { return NULL; } virtual RenderTarget *getRenderTargetLayer(int mipLevel, int layer) { return NULL; }
virtual void generateMipmap(int level) {}; virtual void generateMipmap(int level) {};
virtual void generateMipmap(int face, int level) {}; virtual void generateMipmap(int face, int level) {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment