Commit c2e75afa by Geoff Lang

Rename RenderTarget to RenderTargetD3D and move it into the d3d folder.

BUG=angle:681 Change-Id: I1946e01ce09d99405c318723c254fe300cc5ac53 Reviewed-on: https://chromium-review.googlesource.com/238471Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent b4dedf3e
......@@ -15,7 +15,6 @@
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/renderer/FramebufferImpl.h"
#include "libANGLE/renderer/Renderer.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/RenderbufferImpl.h"
#include "libANGLE/renderer/Workarounds.h"
......
......@@ -12,9 +12,6 @@
#include "libANGLE/formatutils.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/renderer/FramebufferImpl.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/Renderer.h"
#include "libANGLE/renderer/d3d/TextureStorage.h"
#include "common/utilities.h"
......
......@@ -14,7 +14,7 @@
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/Texture.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
#include "libANGLE/renderer/RenderbufferImpl.h"
namespace gl
......
......@@ -15,7 +15,6 @@
#include "libANGLE/Query.h"
#include "libANGLE/VertexArray.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/RenderTarget.h"
namespace gl
{
......
......@@ -9,8 +9,8 @@
#include "libANGLE/renderer/d3d/FramebufferD3D.h"
#include "libANGLE/renderer/d3d/TextureD3D.h"
#include "libANGLE/renderer/d3d/RendererD3D.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
#include "libANGLE/renderer/d3d/RenderbufferD3D.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
......@@ -18,7 +18,7 @@
namespace rx
{
DefaultAttachmentD3D::DefaultAttachmentD3D(RenderTarget *renderTarget)
DefaultAttachmentD3D::DefaultAttachmentD3D(RenderTargetD3D *renderTarget)
: mRenderTarget(renderTarget)
{
ASSERT(mRenderTarget);
......@@ -55,7 +55,7 @@ GLsizei DefaultAttachmentD3D::getSamples() const
return mRenderTarget->getSamples();
}
RenderTarget *DefaultAttachmentD3D::getRenderTarget() const
RenderTargetD3D *DefaultAttachmentD3D::getRenderTarget() const
{
return mRenderTarget;
}
......@@ -217,7 +217,7 @@ GLenum FramebufferD3D::getImplementationColorReadFormat() const
return GL_NONE;
}
RenderTarget *attachmentRenderTarget = NULL;
RenderTargetD3D *attachmentRenderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(mColorBuffers[0], &attachmentRenderTarget);
if (error.isError())
{
......@@ -240,7 +240,7 @@ GLenum FramebufferD3D::getImplementationColorReadType() const
return GL_NONE;
}
RenderTarget *attachmentRenderTarget = NULL;
RenderTargetD3D *attachmentRenderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(mColorBuffers[0], &attachmentRenderTarget);
if (error.isError())
{
......@@ -327,7 +327,7 @@ GLenum FramebufferD3D::checkStatus() const
return GL_FRAMEBUFFER_COMPLETE;
}
gl::Error GetAttachmentRenderTarget(const gl::FramebufferAttachment *attachment, RenderTarget **outRT)
gl::Error GetAttachmentRenderTarget(const gl::FramebufferAttachment *attachment, RenderTargetD3D **outRT)
{
if (attachment->type() == GL_TEXTURE)
{
......
......@@ -23,13 +23,13 @@ struct PixelPackState;
namespace rx
{
class RenderTarget;
class RenderTargetD3D;
class RendererD3D;
class DefaultAttachmentD3D : public DefaultAttachmentImpl
{
public:
DefaultAttachmentD3D(RenderTarget *renderTarget);
DefaultAttachmentD3D(RenderTargetD3D *renderTarget);
virtual ~DefaultAttachmentD3D();
static DefaultAttachmentD3D *makeDefaultAttachmentD3D(DefaultAttachmentImpl* impl);
......@@ -39,10 +39,10 @@ class DefaultAttachmentD3D : public DefaultAttachmentImpl
virtual GLenum getInternalFormat() const override;
virtual GLsizei getSamples() const override;
RenderTarget *getRenderTarget() const;
RenderTargetD3D *getRenderTarget() const;
private:
RenderTarget *mRenderTarget;
RenderTargetD3D *mRenderTarget;
};
class FramebufferD3D : public FramebufferImpl
......@@ -97,10 +97,10 @@ class FramebufferD3D : public FramebufferImpl
bool blitRenderTarget, bool blitDepth, bool blitStencil, GLenum filter,
const gl::Framebuffer *sourceFramebuffer) = 0;
virtual GLenum getRenderTargetImplementationFormat(RenderTarget *renderTarget) const = 0;
virtual GLenum getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const = 0;
};
gl::Error GetAttachmentRenderTarget(const gl::FramebufferAttachment *attachment, RenderTarget **outRT);
gl::Error GetAttachmentRenderTarget(const gl::FramebufferAttachment *attachment, RenderTargetD3D **outRT);
unsigned int GetAttachmentSerial(const gl::FramebufferAttachment *attachment);
}
......
......@@ -33,7 +33,7 @@ gl::Error ImageD3D::copy(const gl::Offset &destOffset, const gl::Rectangle &sour
gl::FramebufferAttachment *colorbuffer = source->getReadColorbuffer();
ASSERT(colorbuffer);
RenderTarget *renderTarget = NULL;
RenderTargetD3D *renderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(colorbuffer, &renderTarget);
if (error.isError())
{
......
......@@ -29,7 +29,7 @@ namespace rx
{
class TextureStorage;
class RendererD3D;
class RenderTarget;
class RenderTargetD3D;
class ImageD3D
{
......@@ -77,7 +77,7 @@ class ImageD3D
private:
DISALLOW_COPY_AND_ASSIGN(ImageD3D);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTarget *source) = 0;
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTargetD3D *source) = 0;
};
}
......
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2012-2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// RenderTarget.cpp: Implements serial handling for rx::RenderTarget
// RenderTargetD3D.cpp: Implements serial handling for rx::RenderTargetD3D
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
namespace rx
{
unsigned int RenderTarget::mCurrentSerial = 1;
unsigned int RenderTargetD3D::mCurrentSerial = 1;
RenderTarget::RenderTarget()
RenderTargetD3D::RenderTargetD3D()
: mSerial(issueSerials(1))
{
}
RenderTarget::~RenderTarget()
RenderTargetD3D::~RenderTargetD3D()
{
}
unsigned int RenderTarget::getSerial() const
unsigned int RenderTargetD3D::getSerial() const
{
return mSerial;
}
unsigned int RenderTarget::issueSerials(unsigned int count)
unsigned int RenderTargetD3D::issueSerials(unsigned int count)
{
unsigned int firstSerial = mCurrentSerial;
mCurrentSerial += count;
......
//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2012-2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// RenderTarget.h: Defines an abstract wrapper class to manage IDirect3DSurface9
// and ID3D11View objects belonging to renderbuffers.
// RenderTargetD3D.h: Defines an abstract wrapper class to manage IDirect3DSurface9
// and ID3D11View objects belonging to renderbuffers and renderable textures.
#ifndef LIBANGLE_RENDERER_RENDERTARGET_H_
#define LIBANGLE_RENDERER_RENDERTARGET_H_
#ifndef LIBANGLE_RENDERER_D3D_RENDERTARGETD3D_H_
#define LIBANGLE_RENDERER_D3D_RENDERTARGETD3D_H_
#include "common/angleutils.h"
#include "libANGLE/angletypes.h"
namespace rx
{
class RenderTarget
class RenderTargetD3D
{
public:
RenderTarget();
virtual ~RenderTarget();
RenderTargetD3D();
virtual ~RenderTargetD3D();
virtual GLsizei getWidth() const = 0;
virtual GLsizei getHeight() const = 0;
......@@ -32,7 +32,7 @@ class RenderTarget
static unsigned int issueSerials(unsigned int count);
private:
DISALLOW_COPY_AND_ASSIGN(RenderTarget);
DISALLOW_COPY_AND_ASSIGN(RenderTargetD3D);
const unsigned int mSerial;
static unsigned int mCurrentSerial;
......@@ -40,4 +40,4 @@ class RenderTarget
}
#endif // LIBANGLE_RENDERTARGET_H_
#endif // LIBANGLE_RENDERER_D3D_RENDERTARGETD3D_H_
......@@ -10,7 +10,7 @@
#include "libANGLE/renderer/d3d/RenderbufferD3D.h"
#include "libANGLE/renderer/d3d/RendererD3D.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
namespace rx
{
......@@ -42,7 +42,7 @@ gl::Error RenderbufferD3D::setStorage(GLsizei width, GLsizei height, GLenum inte
creationFormat = GL_DEPTH24_STENCIL8_OES;
}
RenderTarget *newRT = NULL;
RenderTargetD3D *newRT = NULL;
gl::Error error = mRenderer->createRenderTarget(width, height, creationFormat, samples, &newRT);
if (error.isError())
{
......@@ -55,7 +55,7 @@ gl::Error RenderbufferD3D::setStorage(GLsizei width, GLsizei height, GLenum inte
return gl::Error(GL_NO_ERROR);
}
RenderTarget *RenderbufferD3D::getRenderTarget()
RenderTargetD3D *RenderbufferD3D::getRenderTarget()
{
return mRenderTarget;
}
......
......@@ -17,7 +17,7 @@
namespace rx
{
class RendererD3D;
class RenderTarget;
class RenderTargetD3D;
class SwapChain;
class RenderbufferD3D : public RenderbufferImpl
......@@ -30,14 +30,14 @@ class RenderbufferD3D : public RenderbufferImpl
virtual gl::Error setStorage(GLsizei width, GLsizei height, GLenum internalformat, GLsizei samples) override;
RenderTarget *getRenderTarget();
RenderTargetD3D *getRenderTarget();
unsigned int getRenderTargetSerial() const;
private:
DISALLOW_COPY_AND_ASSIGN(RenderbufferD3D);
RendererD3D *mRenderer;
RenderTarget *mRenderTarget;
RenderTargetD3D *mRenderTarget;
};
}
......
......@@ -28,7 +28,7 @@ namespace rx
{
class ImageD3D;
class IndexBuffer;
class RenderTarget;
class RenderTargetD3D;
class ShaderExecutable;
class SwapChain;
class TextureStorage;
......@@ -117,7 +117,7 @@ class RendererD3D : public Renderer
const gl::Offset &destOffset, TextureStorage *storage, GLint level) = 0;
// RenderTarget creation
virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTarget **outRT) = 0;
virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT) = 0;
// Shader operations
virtual gl::Error loadExecutable(const void *function, size_t length, ShaderType type,
......@@ -140,7 +140,7 @@ class RendererD3D : public Renderer
// Buffer-to-texture and Texture-to-buffer copies
virtual bool supportsFastCopyBufferToTexture(GLenum internalFormat) const = 0;
virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea) = 0;
virtual VertexConversionType getVertexConversionType(const gl::VertexFormat &vertexFormat) const = 0;
......
......@@ -16,10 +16,10 @@
#include "libANGLE/Texture.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/BufferImpl.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/BufferD3D.h"
#include "libANGLE/renderer/d3d/ImageD3D.h"
#include "libANGLE/renderer/d3d/RendererD3D.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
#include "libANGLE/renderer/d3d/SurfaceD3D.h"
#include "libANGLE/renderer/d3d/TextureStorage.h"
......@@ -290,7 +290,7 @@ bool TextureD3D::isFastUnpackable(const gl::PixelUnpackState &unpack, GLenum siz
}
gl::Error TextureD3D::fastUnpackPixels(const gl::PixelUnpackState &unpack, const uint8_t *pixels, const gl::Box &destArea,
GLenum sizedInternalFormat, GLenum type, RenderTarget *destRenderTarget)
GLenum sizedInternalFormat, GLenum type, RenderTargetD3D *destRenderTarget)
{
// No-op
if (destArea.width <= 0 && destArea.height <= 0 && destArea.depth <= 0)
......@@ -620,7 +620,7 @@ gl::Error TextureD3D_2D::setImage(GLenum target, size_t level, GLenum internalFo
if (isFastUnpackable(unpack, sizedInternalFormat) && isLevelComplete(level))
{
// Will try to create RT storage if it does not exist
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
gl::Error error = getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -663,7 +663,7 @@ gl::Error TextureD3D_2D::setSubImage(GLenum target, size_t level, const gl::Box
gl::ImageIndex index = gl::ImageIndex::Make2D(level);
if (isFastUnpackable(unpack, getInternalFormat(level)) && isLevelComplete(level))
{
RenderTarget *renderTarget = NULL;
RenderTargetD3D *renderTarget = NULL;
gl::Error error = getRenderTarget(index, &renderTarget);
if (error.isError())
{
......@@ -896,7 +896,7 @@ unsigned int TextureD3D_2D::getRenderTargetSerial(const gl::ImageIndex &index)
return (!ensureRenderTarget().isError() ? mTexStorage->getRenderTargetSerial(index) : 0);
}
gl::Error TextureD3D_2D::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureD3D_2D::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
ASSERT(!index.hasLayer());
......@@ -1453,7 +1453,7 @@ unsigned int TextureD3D_Cube::getRenderTargetSerial(const gl::ImageIndex &index)
return (!ensureRenderTarget().isError() ? mTexStorage->getRenderTargetSerial(index) : 0);
}
gl::Error TextureD3D_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureD3D_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
ASSERT(gl::IsCubeMapTextureTarget(index.type));
......@@ -1792,7 +1792,7 @@ gl::Error TextureD3D_3D::setImage(GLenum target, size_t level, GLenum internalFo
if (isFastUnpackable(unpack, sizedInternalFormat) && !size.empty())
{
// Will try to create RT storage if it does not exist
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
gl::Error error = getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -1837,7 +1837,7 @@ gl::Error TextureD3D_3D::setSubImage(GLenum target, size_t level, const gl::Box
// Attempt a fast gpu copy of the pixel data to the surface if the app bound an unpack buffer
if (isFastUnpackable(unpack, getInternalFormat(level)))
{
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
gl::Error error = getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -2006,7 +2006,7 @@ unsigned int TextureD3D_3D::getRenderTargetSerial(const gl::ImageIndex &index)
return (!ensureRenderTarget().isError() ? mTexStorage->getRenderTargetSerial(index) : 0);
}
gl::Error TextureD3D_3D::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureD3D_3D::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
// ensure the underlying texture is created
gl::Error error = ensureRenderTarget();
......@@ -2553,7 +2553,7 @@ unsigned int TextureD3D_2DArray::getRenderTargetSerial(const gl::ImageIndex &ind
return (!ensureRenderTarget().isError() ? mTexStorage->getRenderTargetSerial(index) : 0);
}
gl::Error TextureD3D_2DArray::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureD3D_2DArray::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
// ensure the underlying texture is created
gl::Error error = ensureRenderTarget();
......
......@@ -24,7 +24,7 @@ namespace rx
class ImageD3D;
class ImageD3D;
class RendererD3D;
class RenderTarget;
class RenderTargetD3D;
class TextureStorage;
class TextureD3D : public TextureImpl
......@@ -51,7 +51,7 @@ class TextureD3D : public TextureImpl
bool isImmutable() const { return mImmutable; }
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT) = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) = 0;
virtual unsigned int getRenderTargetSerial(const gl::ImageIndex &index) = 0;
// Returns an iterator over all "Images" for this particular Texture.
......@@ -75,7 +75,7 @@ class TextureD3D : public TextureImpl
const gl::PixelUnpackState &unpack, const uint8_t *pixels);
bool isFastUnpackable(const gl::PixelUnpackState &unpack, GLenum sizedInternalFormat);
gl::Error fastUnpackPixels(const gl::PixelUnpackState &unpack, const uint8_t *pixels, const gl::Box &destArea,
GLenum sizedInternalFormat, GLenum type, RenderTarget *destRenderTarget);
GLenum sizedInternalFormat, GLenum type, RenderTargetD3D *destRenderTarget);
GLint creationLevels(GLsizei width, GLsizei height, GLsizei depth) const;
int mipLevels() const;
......@@ -144,7 +144,7 @@ class TextureD3D_2D : public TextureD3D
virtual void bindTexImage(egl::Surface *surface);
virtual void releaseTexImage();
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual unsigned int getRenderTargetSerial(const gl::ImageIndex &index);
virtual gl::ImageIndexIterator imageIterator() const;
......@@ -209,7 +209,7 @@ class TextureD3D_Cube : public TextureD3D
virtual void bindTexImage(egl::Surface *surface);
virtual void releaseTexImage();
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual unsigned int getRenderTargetSerial(const gl::ImageIndex &index);
virtual gl::ImageIndexIterator imageIterator() const;
......@@ -273,7 +273,7 @@ class TextureD3D_3D : public TextureD3D
virtual void bindTexImage(egl::Surface *surface);
virtual void releaseTexImage();
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual unsigned int getRenderTargetSerial(const gl::ImageIndex &index);
virtual gl::ImageIndexIterator imageIterator() const;
......@@ -335,7 +335,7 @@ class TextureD3D_2DArray : public TextureD3D
virtual void bindTexImage(egl::Surface *surface);
virtual void releaseTexImage();
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual unsigned int getRenderTargetSerial(const gl::ImageIndex &index);
virtual gl::ImageIndexIterator imageIterator() const;
......
......@@ -8,7 +8,7 @@
#include "libANGLE/renderer/d3d/TextureStorage.h"
#include "libANGLE/renderer/d3d/TextureD3D.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
#include "libANGLE/renderer/Renderer.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/Texture.h"
......@@ -26,7 +26,7 @@ TextureStorage::TextureStorage()
void TextureStorage::initializeSerials(unsigned int rtSerialsToReserve, unsigned int rtSerialsLayerStride)
{
mFirstRenderTargetSerial = RenderTarget::issueSerials(rtSerialsToReserve);
mFirstRenderTargetSerial = RenderTargetD3D::issueSerials(rtSerialsToReserve);
mRenderTargetSerialsLayerStride = rtSerialsLayerStride;
}
......
......@@ -27,7 +27,7 @@ struct PixelUnpackState;
namespace rx
{
class SwapChain;
class RenderTarget;
class RenderTargetD3D;
class ImageD3D;
class TextureStorage
......@@ -41,7 +41,7 @@ class TextureStorage
virtual bool isManaged() const = 0;
virtual int getLevelCount() const = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT) = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) = 0;
virtual gl::Error generateMipmap(const gl::ImageIndex &sourceIndex, const gl::ImageIndex &destIndex) = 0;
virtual gl::Error copyToStorage(TextureStorage *destStorage) = 0;
......
......@@ -156,7 +156,7 @@ gl::Error Framebuffer11::blit(const gl::Rectangle &sourceArea, const gl::Rectang
const gl::FramebufferAttachment *readBuffer = sourceFramebuffer->getReadColorbuffer();
ASSERT(readBuffer);
RenderTarget *readRenderTarget = NULL;
RenderTargetD3D *readRenderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(readBuffer, &readRenderTarget);
if (error.isError())
{
......@@ -170,7 +170,7 @@ gl::Error Framebuffer11::blit(const gl::Rectangle &sourceArea, const gl::Rectang
{
const gl::FramebufferAttachment *drawBuffer = mColorBuffers[colorAttachment];
RenderTarget *drawRenderTarget = NULL;
RenderTargetD3D *drawRenderTarget = NULL;
error = GetAttachmentRenderTarget(drawBuffer, &drawRenderTarget);
if (error.isError())
{
......@@ -193,7 +193,7 @@ gl::Error Framebuffer11::blit(const gl::Rectangle &sourceArea, const gl::Rectang
gl::FramebufferAttachment *readBuffer = sourceFramebuffer->getDepthOrStencilbuffer();
ASSERT(readBuffer);
RenderTarget *readRenderTarget = NULL;
RenderTargetD3D *readRenderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(readBuffer, &readRenderTarget);
if (error.isError())
{
......@@ -205,7 +205,7 @@ gl::Error Framebuffer11::blit(const gl::Rectangle &sourceArea, const gl::Rectang
: mStencilbuffer;
ASSERT(drawBuffer);
RenderTarget *drawRenderTarget = NULL;
RenderTargetD3D *drawRenderTarget = NULL;
error = GetAttachmentRenderTarget(drawBuffer, &drawRenderTarget);
if (error.isError())
{
......@@ -226,7 +226,7 @@ gl::Error Framebuffer11::blit(const gl::Rectangle &sourceArea, const gl::Rectang
return gl::Error(GL_NO_ERROR);
}
GLenum Framebuffer11::getRenderTargetImplementationFormat(RenderTarget *renderTarget) const
GLenum Framebuffer11::getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const
{
RenderTarget11 *renderTarget11 = RenderTarget11::makeRenderTarget11(renderTarget);
const d3d11::DXGIFormat &dxgiFormatInfo = d3d11::GetDXGIFormatInfo(renderTarget11->getDXGIFormat());
......
......@@ -35,7 +35,7 @@ class Framebuffer11 : public FramebufferD3D
const gl::Framebuffer *sourceFramebuffer) override;
GLenum getRenderTargetImplementationFormat(RenderTarget *renderTarget) const override;
GLenum getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const override;
Renderer11 *const mRenderer;
};
......
......@@ -311,7 +311,7 @@ gl::Error Image11::loadCompressedData(const gl::Box &area, const void *input)
return gl::Error(GL_NO_ERROR);
}
gl::Error Image11::copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTarget *source)
gl::Error Image11::copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTargetD3D *source)
{
RenderTarget11 *sourceRenderTarget = RenderTarget11::makeRenderTarget11(source);
ASSERT(sourceRenderTarget->getTexture());
......
......@@ -46,7 +46,7 @@ class Image11 : public ImageD3D
virtual gl::Error loadData(const gl::Box &area, GLint unpackAlignment, GLenum type, const void *input);
virtual gl::Error loadCompressedData(const gl::Box &area, const void *input);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTarget *source);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTargetD3D *source);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea,
const gl::ImageIndex &sourceIndex, TextureStorage *source);
......
......@@ -174,7 +174,7 @@ void PixelTransfer11::setBufferToTextureCopyParams(const gl::Box &destArea, cons
parametersOut->PositionScale[1] = -2.0f / static_cast<float>(destSize.height);
}
gl::Error PixelTransfer11::copyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
gl::Error PixelTransfer11::copyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea)
{
gl::Error error = loadResources();
......
......@@ -32,7 +32,7 @@ struct PixelUnpackState;
namespace rx
{
class Renderer11;
class RenderTarget;
class RenderTargetD3D;
class PixelTransfer11
{
......@@ -45,7 +45,7 @@ class PixelTransfer11
// destRenderTarget: individual slice/layer of a target texture
// destinationFormat/sourcePixelsType: determines shaders + shader parameters
// destArea: the sub-section of destRenderTarget to copy to
gl::Error copyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
gl::Error copyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea);
private:
......
......@@ -176,7 +176,7 @@ static unsigned int getDSVSubresourceIndex(ID3D11Resource *resource, ID3D11Depth
return D3D11CalcSubresource(mipSlice, arraySlice, mipLevels);
}
RenderTarget11 *RenderTarget11::makeRenderTarget11(RenderTarget *target)
RenderTarget11 *RenderTarget11::makeRenderTarget11(RenderTargetD3D *target)
{
ASSERT(HAS_DYNAMIC_TYPE(RenderTarget11*, target));
return static_cast<RenderTarget11*>(target);
......
......@@ -10,20 +10,20 @@
#ifndef LIBANGLE_RENDERER_D3D_D3D11_RENDERTARGET11_H_
#define LIBANGLE_RENDERER_D3D_D3D11_RENDERTARGET11_H_
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/d3d11/Renderer11.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
namespace rx
{
class SwapChain11;
class Renderer11;
class RenderTarget11 : public RenderTarget
class RenderTarget11 : public RenderTargetD3D
{
public:
RenderTarget11() { }
virtual ~RenderTarget11() { }
static RenderTarget11 *makeRenderTarget11(RenderTarget *renderTarget);
static RenderTarget11 *makeRenderTarget11(RenderTargetD3D *renderTarget);
virtual ID3D11Resource *getTexture() const = 0;
virtual ID3D11RenderTargetView *getRenderTargetView() const = 0;
......
......@@ -2122,7 +2122,7 @@ gl::Error Renderer11::copyImage2D(const gl::Framebuffer *framebuffer, const gl::
ASSERT(storage11);
gl::ImageIndex index = gl::ImageIndex::Make2D(level);
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
error = storage11->getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -2173,7 +2173,7 @@ gl::Error Renderer11::copyImageCube(const gl::Framebuffer *framebuffer, const gl
ASSERT(storage11);
gl::ImageIndex index = gl::ImageIndex::MakeCube(target, level);
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
error = storage11->getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -2224,7 +2224,7 @@ gl::Error Renderer11::copyImage3D(const gl::Framebuffer *framebuffer, const gl::
ASSERT(storage11);
gl::ImageIndex index = gl::ImageIndex::Make3D(level, destOffset.z);
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
error = storage11->getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -2275,7 +2275,7 @@ gl::Error Renderer11::copyImage2DArray(const gl::Framebuffer *framebuffer, const
ASSERT(storage11);
gl::ImageIndex index = gl::ImageIndex::Make2DArray(level, destOffset.z);
RenderTarget *destRenderTarget = NULL;
RenderTargetD3D *destRenderTarget = NULL;
error = storage11->getRenderTarget(index, &destRenderTarget);
if (error.isError())
{
......@@ -2326,7 +2326,7 @@ void Renderer11::setOneTimeRenderTarget(ID3D11RenderTargetView *renderTargetView
}
}
gl::Error Renderer11::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTarget **outRT)
gl::Error Renderer11::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT)
{
const d3d11::TextureFormat &formatInfo = d3d11::GetTextureFormatInfo(format, mFeatureLevel);
......@@ -2760,7 +2760,7 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const
return true;
}
gl::Error Renderer11::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
gl::Error Renderer11::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea)
{
ASSERT(supportsFastCopyBufferToTexture(destinationFormat));
......@@ -3013,8 +3013,8 @@ gl::Error Renderer11::packPixels(ID3D11Texture2D *readTexture, const PackPixelsP
return gl::Error(GL_NO_ERROR);
}
gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRect, const gl::Rectangle &drawRect, RenderTarget *readRenderTarget,
RenderTarget *drawRenderTarget, GLenum filter, const gl::Rectangle *scissor,
gl::Error Renderer11::blitRenderbufferRect(const gl::Rectangle &readRect, const gl::Rectangle &drawRect, RenderTargetD3D *readRenderTarget,
RenderTargetD3D *drawRenderTarget, GLenum filter, const gl::Rectangle *scissor,
bool colorBlit, bool depthBlit, bool stencilBlit)
{
// Since blitRenderbufferRect is called for each render buffer that needs to be blitted,
......
......@@ -17,7 +17,7 @@
#include "libANGLE/renderer/d3d/d3d11/InputLayoutCache.h"
#include "libANGLE/renderer/d3d/HLSLCompiler.h"
#include "libANGLE/renderer/d3d/RendererD3D.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
#include "libANGLE/AttributeMap.h"
......@@ -129,7 +129,7 @@ class Renderer11 : public RendererD3D
const gl::Offset &destOffset, TextureStorage *storage, GLint level);
// RenderTarget creation
virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTarget **outRT);
virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT);
// Framebuffer creation
virtual DefaultAttachmentImpl *createDefaultAttachment(GLenum type, egl::Surface *surface) override;
......@@ -192,7 +192,7 @@ class Renderer11 : public RendererD3D
// Buffer-to-texture and Texture-to-buffer copies
virtual bool supportsFastCopyBufferToTexture(GLenum internalFormat) const;
virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea);
void unapplyRenderTargets();
......@@ -208,8 +208,8 @@ class Renderer11 : public RendererD3D
void setShaderResource(gl::SamplerType shaderType, UINT resourceSlot, ID3D11ShaderResourceView *srv);
gl::Error blitRenderbufferRect(const gl::Rectangle &readRect, const gl::Rectangle &drawRect, RenderTarget *readRenderTarget,
RenderTarget *drawRenderTarget, GLenum filter, const gl::Rectangle *scissor,
gl::Error blitRenderbufferRect(const gl::Rectangle &readRect, const gl::Rectangle &drawRect, RenderTargetD3D *readRenderTarget,
RenderTargetD3D *drawRenderTarget, GLenum filter, const gl::Rectangle *scissor,
bool colorBlit, bool depthBlit, bool stencilBlit);
bool isES3Capable() const { return mFeatureLevel >= D3D_FEATURE_LEVEL_10_0; };
......
......@@ -437,14 +437,14 @@ gl::Error TextureStorage11::generateMipmap(const gl::ImageIndex &sourceIndex, co
invalidateSwizzleCacheLevel(destIndex.mipIndex);
RenderTarget *source = NULL;
RenderTargetD3D *source = NULL;
gl::Error error = getRenderTarget(sourceIndex, &source);
if (error.isError())
{
return error;
}
RenderTarget *dest = NULL;
RenderTargetD3D *dest = NULL;
error = getRenderTarget(destIndex, &dest);
if (error.isError())
{
......@@ -987,7 +987,7 @@ gl::Error TextureStorage11_2D::ensureTextureExists(int mipLevels)
return gl::Error(GL_NO_ERROR);
}
gl::Error TextureStorage11_2D::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureStorage11_2D::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
ASSERT(!index.hasLayer());
......@@ -1435,7 +1435,7 @@ gl::Error TextureStorage11_Cube::getResource(ID3D11Resource **outResource)
return gl::Error(GL_NO_ERROR);
}
gl::Error TextureStorage11_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureStorage11_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
int faceIndex = index.layerIndex;
int level = index.mipIndex;
......@@ -1856,7 +1856,7 @@ gl::Error TextureStorage11_3D::createSRV(int baseLevel, int mipLevels, DXGI_FORM
return gl::Error(GL_NO_ERROR);
}
gl::Error TextureStorage11_3D::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureStorage11_3D::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
int mipLevel = index.mipIndex;
ASSERT(mipLevel >= 0 && mipLevel < getLevelCount());
......@@ -2241,7 +2241,7 @@ gl::Error TextureStorage11_2DArray::createSRV(int baseLevel, int mipLevels, DXGI
return gl::Error(GL_NO_ERROR);
}
gl::Error TextureStorage11_2DArray::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureStorage11_2DArray::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
ASSERT(index.hasLayer());
......
......@@ -23,7 +23,7 @@ struct ImageIndex;
namespace rx
{
class RenderTarget;
class RenderTargetD3D;
class RenderTarget11;
class Renderer11;
class SwapChain11;
......@@ -42,7 +42,7 @@ class TextureStorage11 : public TextureStorage
virtual gl::Error getResource(ID3D11Resource **outResource) = 0;
virtual gl::Error getSRV(const gl::SamplerState &samplerState, ID3D11ShaderResourceView **outSRV);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT) = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) = 0;
virtual gl::Error generateMipmap(const gl::ImageIndex &sourceIndex, const gl::ImageIndex &destIndex);
......@@ -152,7 +152,7 @@ class TextureStorage11_2D : public TextureStorage11
virtual gl::Error getResource(ID3D11Resource **outResource);
virtual gl::Error getMippedResource(ID3D11Resource **outResource);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual gl::Error copyToStorage(TextureStorage *destStorage);
......@@ -207,7 +207,7 @@ class TextureStorage11_Cube : public TextureStorage11
static TextureStorage11_Cube *makeTextureStorage11_Cube(TextureStorage *storage);
virtual gl::Error getResource(ID3D11Resource **outResource);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual void associateImage(Image11* image, const gl::ImageIndex &index);
virtual void disassociateImage(const gl::ImageIndex &index, Image11* expectedImage);
......@@ -247,7 +247,7 @@ class TextureStorage11_3D : public TextureStorage11
virtual gl::Error getResource(ID3D11Resource **outResource);
// Handles both layer and non-layer RTs
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual void associateImage(Image11* image, const gl::ImageIndex &index);
virtual void disassociateImage(const gl::ImageIndex &index, Image11* expectedImage);
......@@ -287,7 +287,7 @@ class TextureStorage11_2DArray : public TextureStorage11
static TextureStorage11_2DArray *makeTextureStorage11_2DArray(TextureStorage *storage);
virtual gl::Error getResource(ID3D11Resource **outResource);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual void associateImage(Image11* image, const gl::ImageIndex &index);
virtual void disassociateImage(const gl::ImageIndex &index, Image11* expectedImage);
......
......@@ -1126,7 +1126,7 @@ HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name)
gl::Error GetAttachmentRenderTarget(const gl::FramebufferAttachment *attachment, RenderTarget11 **outRT)
{
RenderTarget *renderTarget = NULL;
RenderTargetD3D *renderTarget = NULL;
gl::Error error = rx::GetAttachmentRenderTarget(attachment, &renderTarget);
if (error.isError())
{
......
......@@ -410,7 +410,7 @@ gl::Error Framebuffer9::blit(const gl::Rectangle &sourceArea, const gl::Rectangl
return gl::Error(GL_NO_ERROR);
}
GLenum Framebuffer9::getRenderTargetImplementationFormat(RenderTarget *renderTarget) const
GLenum Framebuffer9::getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const
{
RenderTarget9 *renderTarget9 = RenderTarget9::makeRenderTarget9(renderTarget);
const d3d9::D3DFormat &d3dFormatInfo = d3d9::GetD3DFormatInfo(renderTarget9->getD3DFormat());
......
......@@ -31,7 +31,7 @@ class Framebuffer9 : public FramebufferD3D
bool blitRenderTarget, bool blitDepth, bool blitStencil, GLenum filter,
const gl::Framebuffer *sourceFramebuffer) override;
GLenum getRenderTargetImplementationFormat(RenderTarget *renderTarget) const override;
GLenum getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const override;
Renderer9 *const mRenderer;
};
......
......@@ -549,7 +549,7 @@ gl::Error Image9::loadCompressedData(const gl::Box &area, const void *input)
}
// This implements glCopyTex[Sub]Image2D for non-renderable internal texture formats and incomplete textures
gl::Error Image9::copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTarget *source)
gl::Error Image9::copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTargetD3D *source)
{
ASSERT(source);
......
......@@ -47,7 +47,7 @@ class Image9 : public ImageD3D
virtual gl::Error loadData(const gl::Box &area, GLint unpackAlignment, GLenum type, const void *input);
virtual gl::Error loadCompressedData(const gl::Box &area, const void *input);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTarget *source);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTargetD3D *source);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea,
const gl::ImageIndex &sourceIndex, TextureStorage *source);
......
......@@ -16,7 +16,7 @@
namespace rx
{
RenderTarget9 *RenderTarget9::makeRenderTarget9(RenderTarget *target)
RenderTarget9 *RenderTarget9::makeRenderTarget9(RenderTargetD3D *target)
{
ASSERT(HAS_DYNAMIC_TYPE(RenderTarget9*, target));
return static_cast<RenderTarget9*>(target);
......
......@@ -10,20 +10,20 @@
#ifndef LIBANGLE_RENDERER_D3D_D3D9_RENDERTARGET9_H_
#define LIBANGLE_RENDERER_D3D_D3D9_RENDERTARGET9_H_
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/D3D/RenderTargetD3D.h"
namespace rx
{
class Renderer9;
class SwapChain9;
class RenderTarget9 : public RenderTarget
class RenderTarget9 : public RenderTargetD3D
{
public:
RenderTarget9() { }
virtual ~RenderTarget9() { }
static RenderTarget9 *makeRenderTarget9(RenderTarget *renderTarget);
static RenderTarget9 *makeRenderTarget9(RenderTargetD3D *renderTarget);
virtual IDirect3DSurface9 *getSurface() = 0;
......
......@@ -701,7 +701,7 @@ bool Renderer9::supportsFastCopyBufferToTexture(GLenum internalFormat) const
return false;
}
gl::Error Renderer9::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
gl::Error Renderer9::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea)
{
// Pixel buffer objects are not supported in D3D9, since D3D9 is ES2-only and PBOs are ES3.
......@@ -1936,7 +1936,7 @@ gl::Error Renderer9::clear(const gl::ClearParameters &clearParams, const gl::Fra
unsigned int stencilUnmasked = 0x0;
if (clearParams.clearStencil && depthStencilBuffer->getStencilSize() > 0)
{
RenderTarget *stencilRenderTarget = NULL;
RenderTargetD3D *stencilRenderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(depthStencilBuffer, &stencilRenderTarget);
if (error.isError())
{
......@@ -1957,7 +1957,7 @@ gl::Error Renderer9::clear(const gl::ClearParameters &clearParams, const gl::Fra
D3DCOLOR color = D3DCOLOR_ARGB(255, 0, 0, 0);
if (clearColor)
{
RenderTarget *colorRenderTarget = NULL;
RenderTargetD3D *colorRenderTarget = NULL;
gl::Error error = GetAttachmentRenderTarget(colorBuffer, &colorRenderTarget);
if (error.isError())
{
......@@ -2513,7 +2513,7 @@ gl::Error Renderer9::copyImage2DArray(const gl::Framebuffer *framebuffer, const
return gl::Error(GL_INVALID_OPERATION);
}
gl::Error Renderer9::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTarget **outRT)
gl::Error Renderer9::createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT)
{
const d3d9::TextureFormat &d3d9FormatInfo = d3d9::GetTextureFormatInfo(format);
......
......@@ -15,7 +15,7 @@
#include "libANGLE/renderer/d3d/d3d9/VertexDeclarationCache.h"
#include "libANGLE/renderer/d3d/HLSLCompiler.h"
#include "libANGLE/renderer/d3d/RendererD3D.h"
#include "libANGLE/renderer/RenderTarget.h"
#include "libANGLE/renderer/d3d/RenderTargetD3D.h"
namespace gl
{
......@@ -138,7 +138,7 @@ class Renderer9 : public RendererD3D
const gl::Offset &destOffset, TextureStorage *storage, GLint level);
// RenderTarget creation
virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTarget **outRT);
virtual gl::Error createRenderTarget(int width, int height, GLenum format, GLsizei samples, RenderTargetD3D **outRT);
// Framebuffer creation
virtual DefaultAttachmentImpl *createDefaultAttachment(GLenum type, egl::Surface *surface) override;
......@@ -192,7 +192,7 @@ class Renderer9 : public RendererD3D
// Buffer-to-texture and Texture-to-buffer copies
virtual bool supportsFastCopyBufferToTexture(GLenum internalFormat) const;
virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea);
// D3D9-renderer specific methods
......
......@@ -179,7 +179,7 @@ gl::Error TextureStorage9_2D::getSurfaceLevel(int level, bool dirty, IDirect3DSu
return gl::Error(GL_NO_ERROR);
}
gl::Error TextureStorage9_2D::getRenderTarget(const gl::ImageIndex &/*index*/, RenderTarget **outRT)
gl::Error TextureStorage9_2D::getRenderTarget(const gl::ImageIndex &/*index*/, RenderTargetD3D **outRT)
{
if (!mRenderTarget && isRenderTarget())
{
......@@ -355,7 +355,7 @@ gl::Error TextureStorage9_Cube::getCubeMapSurface(GLenum faceTarget, int level,
return gl::Error(GL_NO_ERROR);
}
gl::Error TextureStorage9_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT)
gl::Error TextureStorage9_Cube::getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT)
{
ASSERT(outRT);
ASSERT(index.mipIndex == 0);
......
......@@ -18,7 +18,7 @@ namespace rx
{
class Renderer9;
class SwapChain9;
class RenderTarget;
class RenderTargetD3D;
class RenderTarget9;
class TextureStorage9 : public TextureStorage
......@@ -34,7 +34,7 @@ class TextureStorage9 : public TextureStorage
DWORD getUsage() const;
virtual gl::Error getBaseTexture(IDirect3DBaseTexture9 **outTexture) = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT) = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) = 0;
virtual int getTopLevel() const;
virtual bool isRenderTarget() const;
......@@ -73,7 +73,7 @@ class TextureStorage9_2D : public TextureStorage9
static TextureStorage9_2D *makeTextureStorage9_2D(TextureStorage *storage);
gl::Error getSurfaceLevel(int level, bool dirty, IDirect3DSurface9 **outSurface);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual gl::Error getBaseTexture(IDirect3DBaseTexture9 **outTexture);
virtual gl::Error generateMipmap(const gl::ImageIndex &sourceIndex, const gl::ImageIndex &destIndex);
virtual gl::Error copyToStorage(TextureStorage *destStorage);
......@@ -94,7 +94,7 @@ class TextureStorage9_Cube : public TextureStorage9
static TextureStorage9_Cube *makeTextureStorage9_Cube(TextureStorage *storage);
gl::Error getCubeMapSurface(GLenum faceTarget, int level, bool dirty, IDirect3DSurface9 **outSurface);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTarget **outRT);
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT);
virtual gl::Error getBaseTexture(IDirect3DBaseTexture9 **outTexture);
virtual gl::Error generateMipmap(const gl::ImageIndex &sourceIndex, const gl::ImageIndex &destIndex);
virtual gl::Error copyToStorage(TextureStorage *destStorage);
......
......@@ -550,7 +550,7 @@ void MakeValidSize(bool isImage, D3DFORMAT format, GLsizei *requestWidth, GLsize
gl::Error GetAttachmentRenderTarget(const gl::FramebufferAttachment *attachment, RenderTarget9 **outRT)
{
RenderTarget *renderTarget = NULL;
RenderTargetD3D *renderTarget = NULL;
gl::Error error = rx::GetAttachmentRenderTarget(attachment, &renderTarget);
if (error.isError())
{
......
......@@ -122,8 +122,6 @@
'libANGLE/renderer/RenderbufferImpl.cpp',
'libANGLE/renderer/Renderer.cpp',
'libANGLE/renderer/Renderer.h',
'libANGLE/renderer/RenderTarget.h',
'libANGLE/renderer/RenderTarget.cpp',
'libANGLE/renderer/ShaderExecutable.h',
'libANGLE/renderer/ShaderImpl.h',
'libANGLE/renderer/SurfaceImpl.cpp',
......@@ -183,6 +181,8 @@
'libANGLE/renderer/d3d/RenderbufferD3D.h',
'libANGLE/renderer/d3d/RendererD3D.cpp',
'libANGLE/renderer/d3d/RendererD3D.h',
'libANGLE/renderer/d3d/RenderTargetD3D.h',
'libANGLE/renderer/d3d/RenderTargetD3D.cpp',
'libANGLE/renderer/d3d/ShaderD3D.cpp',
'libANGLE/renderer/d3d/ShaderD3D.h',
'libANGLE/renderer/d3d/SurfaceD3D.cpp',
......
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