Apply Chromium style fixes.
This addresses several minor code quality issues that are validated
in Chromium, but not yet applied to ANGLE:
* constructors and destructors must be defined out-of-line
* auto is not allowed for simple pointer types
* use override everywhere instead of virtual
* virtual functions must also be defined out-of-line
Slightly reduces binary size for me (~2k on Win, 150k on Linux).
Bug: angleproject:1569
Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6
Reviewed-on: https://chromium-review.googlesource.com/779959
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/preprocessor/DirectiveParser.cpp b/src/compiler/preprocessor/DirectiveParser.cpp
index 9cda720..f6c5763 100644
--- a/src/compiler/preprocessor/DirectiveParser.cpp
+++ b/src/compiler/preprocessor/DirectiveParser.cpp
@@ -215,6 +215,10 @@
{
}
+DirectiveParser::~DirectiveParser()
+{
+}
+
void DirectiveParser::lex(Token *token)
{
do
diff --git a/src/compiler/preprocessor/DirectiveParser.h b/src/compiler/preprocessor/DirectiveParser.h
index 4229cba..29c30a8 100644
--- a/src/compiler/preprocessor/DirectiveParser.h
+++ b/src/compiler/preprocessor/DirectiveParser.h
@@ -26,6 +26,7 @@
Diagnostics *diagnostics,
DirectiveHandler *directiveHandler,
int maxMacroExpansionDepth);
+ ~DirectiveParser() override;
void lex(Token *token) override;
diff --git a/src/compiler/preprocessor/Input.cpp b/src/compiler/preprocessor/Input.cpp
index 3a473f7..0f2327b 100644
--- a/src/compiler/preprocessor/Input.cpp
+++ b/src/compiler/preprocessor/Input.cpp
@@ -18,6 +18,10 @@
{
}
+Input::~Input()
+{
+}
+
Input::Input(size_t count, const char *const string[], const int length[])
: mCount(count), mString(string)
{
diff --git a/src/compiler/preprocessor/Input.h b/src/compiler/preprocessor/Input.h
index d5f3858..8c7c7ee 100644
--- a/src/compiler/preprocessor/Input.h
+++ b/src/compiler/preprocessor/Input.h
@@ -18,6 +18,7 @@
{
public:
Input();
+ ~Input();
Input(size_t count, const char *const string[], const int length[]);
size_t count() const { return mCount; }
diff --git a/src/compiler/preprocessor/Macro.cpp b/src/compiler/preprocessor/Macro.cpp
index 6162767..52e2312 100644
--- a/src/compiler/preprocessor/Macro.cpp
+++ b/src/compiler/preprocessor/Macro.cpp
@@ -12,6 +12,14 @@
namespace pp
{
+Macro::Macro() : predefined(false), disabled(false), expansionCount(0), type(kTypeObj)
+{
+}
+
+Macro::~Macro()
+{
+}
+
bool Macro::equals(const Macro &other) const
{
return (type == other.type) && (name == other.name) && (parameters == other.parameters) &&
diff --git a/src/compiler/preprocessor/Macro.h b/src/compiler/preprocessor/Macro.h
index f835c42..c42e172 100644
--- a/src/compiler/preprocessor/Macro.h
+++ b/src/compiler/preprocessor/Macro.h
@@ -27,7 +27,8 @@
typedef std::vector<std::string> Parameters;
typedef std::vector<Token> Replacements;
- Macro() : predefined(false), disabled(false), expansionCount(0), type(kTypeObj) {}
+ Macro();
+ ~Macro();
bool equals(const Macro &other) const;
bool predefined;
diff --git a/src/compiler/preprocessor/MacroExpander.cpp b/src/compiler/preprocessor/MacroExpander.cpp
index cc115f9..d88d3a6 100644
--- a/src/compiler/preprocessor/MacroExpander.cpp
+++ b/src/compiler/preprocessor/MacroExpander.cpp
@@ -458,6 +458,10 @@
{
}
+MacroExpander::MacroContext::~MacroContext()
+{
+}
+
bool MacroExpander::MacroContext::empty() const
{
return index == replacements.size();
diff --git a/src/compiler/preprocessor/MacroExpander.h b/src/compiler/preprocessor/MacroExpander.h
index 7a4f5a9..fae7676 100644
--- a/src/compiler/preprocessor/MacroExpander.h
+++ b/src/compiler/preprocessor/MacroExpander.h
@@ -52,6 +52,7 @@
struct MacroContext
{
MacroContext();
+ ~MacroContext();
bool empty() const;
const Token &get();
void unget();
diff --git a/src/compiler/preprocessor/Tokenizer.h b/src/compiler/preprocessor/Tokenizer.h
index ce030a1..af4fd7c 100644
--- a/src/compiler/preprocessor/Tokenizer.h
+++ b/src/compiler/preprocessor/Tokenizer.h
@@ -34,7 +34,7 @@
};
Tokenizer(Diagnostics *diagnostics);
- ~Tokenizer();
+ ~Tokenizer() override;
bool init(size_t count, const char *const string[], const int length[]);
diff --git a/src/compiler/translator/Cache.cpp b/src/compiler/translator/Cache.cpp
index 07cc5b2..417e824 100644
--- a/src/compiler/translator/Cache.cpp
+++ b/src/compiler/translator/Cache.cpp
@@ -57,6 +57,10 @@
TCache *TCache::sCache = nullptr;
+TCache::TCache()
+{
+}
+
void TCache::initialize()
{
if (sCache == nullptr)
diff --git a/src/compiler/translator/Cache.h b/src/compiler/translator/Cache.h
index a45ada4..a182b07 100644
--- a/src/compiler/translator/Cache.h
+++ b/src/compiler/translator/Cache.h
@@ -49,7 +49,7 @@
unsigned char secondarySize);
private:
- TCache() {}
+ TCache();
union TypeKey {
TypeKey(TBasicType basicType,
diff --git a/src/compiler/translator/Types.cpp b/src/compiler/translator/Types.cpp
index d54196f..04e885a 100644
--- a/src/compiler/translator/Types.cpp
+++ b/src/compiler/translator/Types.cpp
@@ -223,6 +223,12 @@
{
}
+TType::TType(const TType &) = default;
+
+TType::~TType()
+{
+}
+
bool TType::canBeConstructed() const
{
switch (type)
diff --git a/src/compiler/translator/Types.h b/src/compiler/translator/Types.h
index fe9f25c..0ca83c7 100644
--- a/src/compiler/translator/Types.h
+++ b/src/compiler/translator/Types.h
@@ -194,8 +194,9 @@
TType(TInterfaceBlock *interfaceBlockIn,
TQualifier qualifierIn,
TLayoutQualifier layoutQualifierIn);
+ ~TType();
- TType(const TType &) = default;
+ TType(const TType &);
TType &operator=(const TType &) = default;
TBasicType getBasicType() const { return type; }
diff --git a/src/compiler/translator/blocklayoutHLSL.h b/src/compiler/translator/blocklayoutHLSL.h
index a0220dc..d1a98c8 100644
--- a/src/compiler/translator/blocklayoutHLSL.h
+++ b/src/compiler/translator/blocklayoutHLSL.h
@@ -35,8 +35,8 @@
HLSLBlockEncoder(HLSLBlockEncoderStrategy strategy, bool transposeMatrices);
- virtual void enterAggregateType();
- virtual void exitAggregateType();
+ void enterAggregateType() override;
+ void exitAggregateType() override;
void skipRegisters(unsigned int numRegisters);
bool isPacked() const { return mEncoderStrategy == ENCODE_PACKED; }
@@ -44,16 +44,16 @@
static HLSLBlockEncoderStrategy GetStrategyFor(ShShaderOutput outputType);
protected:
- virtual void getBlockLayoutInfo(GLenum type,
- unsigned int arraySize,
- bool isRowMajorMatrix,
- int *arrayStrideOut,
- int *matrixStrideOut);
- virtual void advanceOffset(GLenum type,
- unsigned int arraySize,
- bool isRowMajorMatrix,
- int arrayStride,
- int matrixStride);
+ void getBlockLayoutInfo(GLenum type,
+ unsigned int arraySize,
+ bool isRowMajorMatrix,
+ int *arrayStrideOut,
+ int *matrixStrideOut) override;
+ void advanceOffset(GLenum type,
+ unsigned int arraySize,
+ bool isRowMajorMatrix,
+ int arrayStride,
+ int matrixStride) override;
HLSLBlockEncoderStrategy mEncoderStrategy;
bool mTransposeMatrices;
diff --git a/src/gpu_info_util/SystemInfo.cpp b/src/gpu_info_util/SystemInfo.cpp
index dd384c6..f8d7443 100644
--- a/src/gpu_info_util/SystemInfo.cpp
+++ b/src/gpu_info_util/SystemInfo.cpp
@@ -17,6 +17,18 @@
namespace angle
{
+GPUDeviceInfo::GPUDeviceInfo() = default;
+
+GPUDeviceInfo::~GPUDeviceInfo() = default;
+
+GPUDeviceInfo::GPUDeviceInfo(const GPUDeviceInfo &other) = default;
+
+SystemInfo::SystemInfo() = default;
+
+SystemInfo::~SystemInfo() = default;
+
+SystemInfo::SystemInfo(const SystemInfo &other) = default;
+
bool IsAMD(VendorID vendorId)
{
return vendorId == kVendorID_AMD;
diff --git a/src/gpu_info_util/SystemInfo.h b/src/gpu_info_util/SystemInfo.h
index 81df6d3..ada43f0 100644
--- a/src/gpu_info_util/SystemInfo.h
+++ b/src/gpu_info_util/SystemInfo.h
@@ -26,6 +26,11 @@
struct GPUDeviceInfo
{
+ GPUDeviceInfo();
+ ~GPUDeviceInfo();
+
+ GPUDeviceInfo(const GPUDeviceInfo &other);
+
VendorID vendorId = 0;
DeviceID deviceId = 0;
@@ -36,6 +41,11 @@
struct SystemInfo
{
+ SystemInfo();
+ ~SystemInfo();
+
+ SystemInfo(const SystemInfo &other);
+
std::vector<GPUDeviceInfo> gpus;
int primaryGPUIndex = -1;
int activeGPUIndex = -1;
diff --git a/src/image_util/loadimage_etc.cpp b/src/image_util/loadimage_etc.cpp
index 7c7e8dd..67f7383 100644
--- a/src/image_util/loadimage_etc.cpp
+++ b/src/image_util/loadimage_etc.cpp
@@ -16,9 +16,12 @@
{
namespace
{
+
+using IntensityModifier = const int[4];
+
// Table 3.17.2 sorted according to table 3.17.3
// clang-format off
-static const int intensityModifierDefault[][4] =
+static IntensityModifier intensityModifierDefault[] =
{
{ 2, 8, -2, -8 },
{ 5, 17, -5, -17 },
@@ -33,7 +36,7 @@
// Table C.12, intensity modifier for non opaque punchthrough alpha
// clang-format off
-static const int intensityModifierNonOpaque[][4] =
+static IntensityModifier intensityModifierNonOpaque[] =
{
{ 0, 8, 0, -8 },
{ 0, 17, 0, -17 },
@@ -400,7 +403,7 @@
const uint8_t alphaValues[4][4],
bool nonOpaquePunchThroughAlpha) const
{
- const auto intensityModifier =
+ const IntensityModifier *intensityModifier =
nonOpaquePunchThroughAlpha ? intensityModifierNonOpaque : intensityModifierDefault;
R8G8B8A8 subblockColors0[4];
@@ -1078,7 +1081,7 @@
static const size_t kNumColors = 8;
- const auto intensityModifier =
+ const IntensityModifier *intensityModifier =
nonOpaquePunchThroughAlpha ? intensityModifierNonOpaque : intensityModifierDefault;
// Compute the colors that pixels can have in each subblock both for
diff --git a/src/libANGLE/AttributeMap.cpp b/src/libANGLE/AttributeMap.cpp
index d90f596..e10d3ad 100644
--- a/src/libANGLE/AttributeMap.cpp
+++ b/src/libANGLE/AttributeMap.cpp
@@ -15,6 +15,10 @@
{
}
+AttributeMap::AttributeMap(const AttributeMap &other) = default;
+
+AttributeMap::~AttributeMap() = default;
+
void AttributeMap::insert(EGLAttrib key, EGLAttrib value)
{
mAttributes[key] = value;
diff --git a/src/libANGLE/AttributeMap.h b/src/libANGLE/AttributeMap.h
index 6c12458..eddc1b7 100644
--- a/src/libANGLE/AttributeMap.h
+++ b/src/libANGLE/AttributeMap.h
@@ -20,6 +20,8 @@
{
public:
AttributeMap();
+ AttributeMap(const AttributeMap &other);
+ ~AttributeMap();
void insert(EGLAttrib key, EGLAttrib value);
bool contains(EGLAttrib key) const;
diff --git a/src/libANGLE/BinaryStream.h b/src/libANGLE/BinaryStream.h
index c42381f..3e4c093 100644
--- a/src/libANGLE/BinaryStream.h
+++ b/src/libANGLE/BinaryStream.h
@@ -180,9 +180,8 @@
class BinaryOutputStream : angle::NonCopyable
{
public:
- BinaryOutputStream()
- {
- }
+ BinaryOutputStream();
+ ~BinaryOutputStream();
// writeInt also handles bool types
template <class IntT>
@@ -250,6 +249,13 @@
}
};
+
+inline BinaryOutputStream::BinaryOutputStream()
+{
+}
+
+inline BinaryOutputStream::~BinaryOutputStream() = default;
+
} // namespace gl
#endif // LIBANGLE_BINARYSTREAM_H_
diff --git a/src/libANGLE/Caps.cpp b/src/libANGLE/Caps.cpp
index 5a78d8d..44da2bb 100644
--- a/src/libANGLE/Caps.cpp
+++ b/src/libANGLE/Caps.cpp
@@ -35,6 +35,10 @@
{
}
+TextureCaps::TextureCaps(const TextureCaps &other) = default;
+
+TextureCaps::~TextureCaps() = default;
+
GLuint TextureCaps::getMaxSamples() const
{
return !sampleCounts.empty() ? *sampleCounts.rbegin() : 0;
@@ -708,6 +712,8 @@
{
}
+TypePrecision::TypePrecision(const TypePrecision &other) = default;
+
void TypePrecision::setIEEEFloat()
{
range = {{127, 127}};
@@ -852,6 +858,9 @@
}
}
+Caps::Caps(const Caps &other) = default;
+Caps::~Caps() = default;
+
Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensions)
{
Caps caps;
@@ -1175,6 +1184,8 @@
{
}
+ClientExtensions::ClientExtensions(const ClientExtensions &other) = default;
+
std::vector<std::string> ClientExtensions::getStrings() const
{
std::vector<std::string> extensionStrings;
diff --git a/src/libANGLE/Caps.h b/src/libANGLE/Caps.h
index 2569597..64bdf97 100644
--- a/src/libANGLE/Caps.h
+++ b/src/libANGLE/Caps.h
@@ -28,6 +28,8 @@
struct TextureCaps
{
TextureCaps();
+ TextureCaps(const TextureCaps &other);
+ ~TextureCaps();
// Supports for basic texturing: glTexImage, glTexSubImage, etc
bool texturable;
@@ -418,6 +420,7 @@
struct TypePrecision
{
TypePrecision();
+ TypePrecision(const TypePrecision &other);
void setIEEEFloat();
void setTwosComplementInt(unsigned int bits);
@@ -433,6 +436,8 @@
struct Caps
{
Caps();
+ Caps(const Caps &other);
+ ~Caps();
// ES 3.1 (April 29, 2015) 20.39: implementation dependent values
GLuint64 maxElementIndex;
@@ -703,6 +708,7 @@
struct ClientExtensions
{
ClientExtensions();
+ ClientExtensions(const ClientExtensions &other);
// Generate a vector of supported extension strings
std::vector<std::string> getStrings() const;
diff --git a/src/libANGLE/Config.cpp b/src/libANGLE/Config.cpp
index 5bbd112..ccf64c8 100644
--- a/src/libANGLE/Config.cpp
+++ b/src/libANGLE/Config.cpp
@@ -63,6 +63,22 @@
{
}
+Config::~Config()
+{
+}
+
+Config::Config(const Config &other) = default;
+
+Config &Config::operator=(const Config &other) = default;
+
+ConfigSet::ConfigSet() = default;
+
+ConfigSet::ConfigSet(const ConfigSet &other) = default;
+
+ConfigSet &ConfigSet::operator=(const ConfigSet &other) = default;
+
+ConfigSet::~ConfigSet() = default;
+
EGLint ConfigSet::add(const Config &config)
{
// Set the config's ID to a small number that starts at 1 ([EGL 1.5] section 3.4)
diff --git a/src/libANGLE/Config.h b/src/libANGLE/Config.h
index fb0147e..f2fbe8b 100644
--- a/src/libANGLE/Config.h
+++ b/src/libANGLE/Config.h
@@ -27,6 +27,9 @@
struct Config
{
Config();
+ ~Config();
+ Config(const Config &other);
+ Config &operator=(const Config &other);
GLenum renderTargetFormat; // TODO(geofflang): remove this
GLenum depthStencilFormat; // TODO(geofflang): remove this
@@ -71,6 +74,11 @@
class ConfigSet
{
public:
+ ConfigSet();
+ ConfigSet(const ConfigSet &other);
+ ~ConfigSet();
+ ConfigSet &operator=(const ConfigSet &other);
+
EGLint add(const Config &config);
const Config &get(EGLint id) const;
@@ -84,7 +92,7 @@
std::vector<const Config*> filter(const AttributeMap &attributeMap) const;
private:
- typedef std::map<EGLint, const Config> ConfigMap;
+ typedef std::map<EGLint, Config> ConfigMap;
ConfigMap mConfigs;
};
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 930f6b6..6da22da 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -3936,8 +3936,8 @@
void Context::attachShader(GLuint program, GLuint shader)
{
- auto programObject = mState.mShaderPrograms->getProgram(program);
- auto shaderObject = mState.mShaderPrograms->getShader(shader);
+ Program *programObject = mState.mShaderPrograms->getProgram(program);
+ Shader *shaderObject = mState.mShaderPrograms->getShader(shader);
ASSERT(programObject && shaderObject);
programObject->attachShader(shaderObject);
}
diff --git a/src/libANGLE/ContextState.cpp b/src/libANGLE/ContextState.cpp
index 174ffd0..d109cca 100644
--- a/src/libANGLE/ContextState.cpp
+++ b/src/libANGLE/ContextState.cpp
@@ -136,6 +136,10 @@
{
}
+ValidationContext::~ValidationContext()
+{
+}
+
bool ValidationContext::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *numParams)
{
// Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation
diff --git a/src/libANGLE/ContextState.h b/src/libANGLE/ContextState.h
index 4c5e23e..e6e9f4c 100644
--- a/src/libANGLE/ContextState.h
+++ b/src/libANGLE/ContextState.h
@@ -101,7 +101,7 @@
const Extensions &extensions,
const Limitations &limitations,
bool skipValidation);
- virtual ~ValidationContext() {}
+ virtual ~ValidationContext();
virtual void handleError(const Error &error) = 0;
diff --git a/src/libANGLE/Debug.cpp b/src/libANGLE/Debug.cpp
index 30321f4..96f30df 100644
--- a/src/libANGLE/Debug.cpp
+++ b/src/libANGLE/Debug.cpp
@@ -16,6 +16,26 @@
namespace gl
{
+Debug::Control::Control()
+{
+}
+
+Debug::Control::~Control()
+{
+}
+
+Debug::Control::Control(const Control &other) = default;
+
+Debug::Group::Group()
+{
+}
+
+Debug::Group::~Group()
+{
+}
+
+Debug::Group::Group(const Group &other) = default;
+
Debug::Debug()
: mOutputEnabled(false),
mCallbackFunction(nullptr),
@@ -28,6 +48,10 @@
pushDefaultGroup();
}
+Debug::~Debug()
+{
+}
+
void Debug::setMaxLoggedMessages(GLuint maxLoggedMessages)
{
mMaxLoggedMessages = maxLoggedMessages;
diff --git a/src/libANGLE/Debug.h b/src/libANGLE/Debug.h
index f545b81..2c15c25 100644
--- a/src/libANGLE/Debug.h
+++ b/src/libANGLE/Debug.h
@@ -31,6 +31,7 @@
{
public:
Debug();
+ ~Debug();
void setMaxLoggedMessages(GLuint maxLoggedMessages);
@@ -91,6 +92,10 @@
struct Control
{
+ Control();
+ ~Control();
+ Control(const Control &other);
+
GLenum source;
GLenum type;
GLenum severity;
@@ -100,6 +105,10 @@
struct Group
{
+ Group();
+ ~Group();
+ Group(const Group &other);
+
GLenum source;
GLuint id;
std::string message;
diff --git a/src/libANGLE/Display.cpp b/src/libANGLE/Display.cpp
index 879316b..735b472 100644
--- a/src/libANGLE/Display.cpp
+++ b/src/libANGLE/Display.cpp
@@ -268,6 +268,14 @@
} // anonymous namespace
+DisplayState::DisplayState()
+{
+}
+
+DisplayState::~DisplayState()
+{
+}
+
// static
Display *Display::GetDisplayFromNativeDisplay(EGLNativeDisplayType nativeDisplay,
const AttributeMap &attribMap)
diff --git a/src/libANGLE/Display.h b/src/libANGLE/Display.h
index 9a00c39..aa1d1c3 100644
--- a/src/libANGLE/Display.h
+++ b/src/libANGLE/Display.h
@@ -45,6 +45,9 @@
struct DisplayState final : private angle::NonCopyable
{
+ DisplayState();
+ ~DisplayState();
+
SurfaceSet surfaceSet;
};
diff --git a/src/libANGLE/Error.h b/src/libANGLE/Error.h
index b2270d0..1d57bb8 100644
--- a/src/libANGLE/Error.h
+++ b/src/libANGLE/Error.h
@@ -87,6 +87,7 @@
Error(GLenum errorCode, GLuint id, std::string &&message);
inline Error(const Error &other);
inline Error(Error &&other);
+ inline ~Error() = default;
// automatic error type conversion
inline Error(egl::Error &&eglErr);
@@ -157,6 +158,7 @@
Error(EGLint errorCode, EGLint id, std::string &&message);
inline Error(const Error &other);
inline Error(Error &&other);
+ inline ~Error() = default;
// automatic error type conversion
inline Error(gl::Error &&glErr);
diff --git a/src/libANGLE/Fence.cpp b/src/libANGLE/Fence.cpp
index be663db..9c4d381 100644
--- a/src/libANGLE/Fence.cpp
+++ b/src/libANGLE/Fence.cpp
@@ -83,6 +83,11 @@
{
}
+Error Sync::onDestroy(const Context *context)
+{
+ return NoError();
+}
+
Sync::~Sync()
{
SafeDelete(mFence);
diff --git a/src/libANGLE/Fence.h b/src/libANGLE/Fence.h
index b51222d..24bc689 100644
--- a/src/libANGLE/Fence.h
+++ b/src/libANGLE/Fence.h
@@ -52,9 +52,9 @@
{
public:
Sync(rx::SyncImpl *impl, GLuint id);
- virtual ~Sync();
+ ~Sync() override;
- Error onDestroy(const Context *context) override { return NoError(); }
+ Error onDestroy(const Context *context) override;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
diff --git a/src/libANGLE/Framebuffer.h b/src/libANGLE/Framebuffer.h
index 712d55f..70223f0 100644
--- a/src/libANGLE/Framebuffer.h
+++ b/src/libANGLE/Framebuffer.h
@@ -138,7 +138,7 @@
// Constructor to build a fake default framebuffer when surfaceless
Framebuffer(rx::GLImplFactory *factory);
- virtual ~Framebuffer();
+ ~Framebuffer() override;
void onDestroy(const Context *context);
void destroyDefault(const egl::Display *display);
diff --git a/src/libANGLE/HandleRangeAllocator.cpp b/src/libANGLE/HandleRangeAllocator.cpp
index 500a796..2a97ce9 100644
--- a/src/libANGLE/HandleRangeAllocator.cpp
+++ b/src/libANGLE/HandleRangeAllocator.cpp
@@ -27,6 +27,10 @@
mUsed.insert(std::make_pair(0u, 0u));
}
+HandleRangeAllocator::~HandleRangeAllocator()
+{
+}
+
GLuint HandleRangeAllocator::allocate()
{
return allocateRange(1u);
diff --git a/src/libANGLE/HandleRangeAllocator.h b/src/libANGLE/HandleRangeAllocator.h
index 20f9a11..4d4b6f4 100644
--- a/src/libANGLE/HandleRangeAllocator.h
+++ b/src/libANGLE/HandleRangeAllocator.h
@@ -25,6 +25,7 @@
static const GLuint kInvalidHandle;
HandleRangeAllocator();
+ ~HandleRangeAllocator();
// Allocates a new path handle.
GLuint allocate();
diff --git a/src/libANGLE/Image.cpp b/src/libANGLE/Image.cpp
index 5612b9b..04c757c 100644
--- a/src/libANGLE/Image.cpp
+++ b/src/libANGLE/Image.cpp
@@ -78,7 +78,7 @@
}
else
{
- for (auto &sourceImage : mSourcesOf)
+ for (egl::Image *sourceImage : mSourcesOf)
{
ANGLE_TRY(sourceImage->orphanSibling(context, this));
}
@@ -122,6 +122,10 @@
{
}
+ImageState::~ImageState()
+{
+}
+
Image::Image(rx::EGLImplFactory *factory,
EGLenum target,
ImageSibling *buffer,
diff --git a/src/libANGLE/Image.h b/src/libANGLE/Image.h
index e3449b0..d2f1b87 100644
--- a/src/libANGLE/Image.h
+++ b/src/libANGLE/Image.h
@@ -35,7 +35,7 @@
{
public:
ImageSibling(GLuint id);
- virtual ~ImageSibling();
+ ~ImageSibling() override;
bool isEGLImageTarget() const;
gl::InitState sourceEGLImageInitState() const;
@@ -64,6 +64,7 @@
struct ImageState : private angle::NonCopyable
{
ImageState(EGLenum target, ImageSibling *buffer, const AttributeMap &attribs);
+ ~ImageState();
gl::ImageIndex imageIndex;
gl::BindingPointer<ImageSibling> source;
@@ -79,7 +80,7 @@
const AttributeMap &attribs);
gl::Error onDestroy(const gl::Context *context) override;
- ~Image();
+ ~Image() override;
const gl::Format &getFormat() const;
size_t getWidth() const;
diff --git a/src/libANGLE/ImageIndex.cpp b/src/libANGLE/ImageIndex.cpp
index f2af70d..6f99f8a 100644
--- a/src/libANGLE/ImageIndex.cpp
+++ b/src/libANGLE/ImageIndex.cpp
@@ -120,6 +120,8 @@
: type(typeIn), mipIndex(mipIndexIn), layerIndex(layerIndexIn), numLayers(numLayersIn)
{}
+ImageIndexIterator::ImageIndexIterator(const ImageIndexIterator &other) = default;
+
ImageIndexIterator ImageIndexIterator::Make2D(GLint minMip, GLint maxMip)
{
return ImageIndexIterator(GL_TEXTURE_2D, Range<GLint>(minMip, maxMip),
diff --git a/src/libANGLE/ImageIndex.h b/src/libANGLE/ImageIndex.h
index 4693493..8e1b010 100644
--- a/src/libANGLE/ImageIndex.h
+++ b/src/libANGLE/ImageIndex.h
@@ -57,6 +57,8 @@
class ImageIndexIterator
{
public:
+ ImageIndexIterator(const ImageIndexIterator &other);
+
static ImageIndexIterator Make2D(GLint minMip, GLint maxMip);
static ImageIndexIterator MakeRectangle(GLint minMip, GLint maxMip);
static ImageIndexIterator MakeCube(GLint minMip, GLint maxMip);
diff --git a/src/libANGLE/IndexRangeCache.cpp b/src/libANGLE/IndexRangeCache.cpp
index 4f165c1..71a1392 100644
--- a/src/libANGLE/IndexRangeCache.cpp
+++ b/src/libANGLE/IndexRangeCache.cpp
@@ -15,6 +15,14 @@
namespace gl
{
+IndexRangeCache::IndexRangeCache()
+{
+}
+
+IndexRangeCache::~IndexRangeCache()
+{
+}
+
void IndexRangeCache::addRange(GLenum type,
size_t offset,
size_t count,
diff --git a/src/libANGLE/IndexRangeCache.h b/src/libANGLE/IndexRangeCache.h
index 69de421..3b18344 100644
--- a/src/libANGLE/IndexRangeCache.h
+++ b/src/libANGLE/IndexRangeCache.h
@@ -23,6 +23,9 @@
class IndexRangeCache
{
public:
+ IndexRangeCache();
+ ~IndexRangeCache();
+
void addRange(GLenum type,
size_t offset,
size_t count,
diff --git a/src/libANGLE/LoggingAnnotator.cpp b/src/libANGLE/LoggingAnnotator.cpp
index 4a79ce0..799399e 100644
--- a/src/libANGLE/LoggingAnnotator.cpp
+++ b/src/libANGLE/LoggingAnnotator.cpp
@@ -13,6 +13,11 @@
namespace angle
{
+bool LoggingAnnotator::getStatus()
+{
+ return false;
+}
+
void LoggingAnnotator::logMessage(const gl::LogMessage &msg) const
{
auto *plat = ANGLEPlatformCurrent();
diff --git a/src/libANGLE/LoggingAnnotator.h b/src/libANGLE/LoggingAnnotator.h
index 3617dd5..5bec68e 100644
--- a/src/libANGLE/LoggingAnnotator.h
+++ b/src/libANGLE/LoggingAnnotator.h
@@ -22,7 +22,7 @@
void beginEvent(const wchar_t *eventName) override {}
void endEvent() override {}
void setMarker(const wchar_t *markerName) override {}
- bool getStatus() override { return false; }
+ bool getStatus() override;
void logMessage(const gl::LogMessage &msg) const override;
};
diff --git a/src/libANGLE/MemoryProgramCache.cpp b/src/libANGLE/MemoryProgramCache.cpp
index 5fa6f64..e3953f8 100644
--- a/src/libANGLE/MemoryProgramCache.cpp
+++ b/src/libANGLE/MemoryProgramCache.cpp
@@ -581,9 +581,9 @@
const Program *program,
ProgramHash *hashOut)
{
- auto vertexShader = program->getAttachedVertexShader();
- auto fragmentShader = program->getAttachedFragmentShader();
- auto computeShader = program->getAttachedComputeShader();
+ const Shader *vertexShader = program->getAttachedVertexShader();
+ const Shader *fragmentShader = program->getAttachedFragmentShader();
+ const Shader *computeShader = program->getAttachedComputeShader();
// Compute the program hash. Start with the shader hashes and resource strings.
HashStream hashStream;
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index 8296d50..c5a379c 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -404,6 +404,23 @@
ASSERT(arrayIndex != GL_INVALID_INDEX);
}
+SamplerBinding::SamplerBinding(GLenum textureTypeIn, size_t elementCount, bool unreferenced)
+ : textureType(textureTypeIn), boundTextureUnits(elementCount, 0), unreferenced(unreferenced)
+{
+}
+
+SamplerBinding::SamplerBinding(const SamplerBinding &other) = default;
+
+SamplerBinding::~SamplerBinding() = default;
+
+Program::Bindings::Bindings()
+{
+}
+
+Program::Bindings::~Bindings()
+{
+}
+
void Program::Bindings::bindLocation(GLuint index, const std::string &name)
{
mBindings[name] = index;
@@ -425,6 +442,21 @@
return mBindings.end();
}
+ImageBinding::ImageBinding(size_t count) : boundImageUnits(count, 0)
+{
+}
+ImageBinding::ImageBinding(GLuint imageUnit, size_t count)
+{
+ for (size_t index = 0; index < count; ++index)
+ {
+ boundImageUnits.push_back(imageUnit + static_cast<GLuint>(index));
+ }
+}
+
+ImageBinding::ImageBinding(const ImageBinding &other) = default;
+
+ImageBinding::~ImageBinding() = default;
+
ProgramState::ProgramState()
: mLabel(),
mAttachedFragmentShader(nullptr),
@@ -770,9 +802,9 @@
const Caps &caps = data.getCaps();
- auto vertexShader = mState.mAttachedVertexShader;
- auto fragmentShader = mState.mAttachedFragmentShader;
- auto computeShader = mState.mAttachedComputeShader;
+ Shader *vertexShader = mState.mAttachedVertexShader;
+ Shader *fragmentShader = mState.mAttachedFragmentShader;
+ Shader *computeShader = mState.mAttachedComputeShader;
bool isComputeShaderAttached = (computeShader != nullptr);
bool nonComputeShadersAttached = (vertexShader != nullptr || fragmentShader != nullptr);
diff --git a/src/libANGLE/Program.h b/src/libANGLE/Program.h
index 0b50e15..9c815ec 100644
--- a/src/libANGLE/Program.h
+++ b/src/libANGLE/Program.h
@@ -178,10 +178,9 @@
// This small structure encapsulates binding sampler uniforms to active GL textures.
struct SamplerBinding
{
- SamplerBinding(GLenum textureTypeIn, size_t elementCount, bool unreferenced)
- : textureType(textureTypeIn), boundTextureUnits(elementCount, 0), unreferenced(unreferenced)
- {
- }
+ SamplerBinding(GLenum textureTypeIn, size_t elementCount, bool unreferenced);
+ SamplerBinding(const SamplerBinding &other);
+ ~SamplerBinding();
// Necessary for retrieving active textures from the GL state.
GLenum textureType;
@@ -218,14 +217,10 @@
struct ImageBinding
{
- ImageBinding(size_t count) : boundImageUnits(count, 0) {}
- ImageBinding(GLuint imageUnit, size_t count)
- {
- for (size_t index = 0; index < count; ++index)
- {
- boundImageUnits.push_back(imageUnit + static_cast<GLuint>(index));
- }
- }
+ ImageBinding(size_t count);
+ ImageBinding(GLuint imageUnit, size_t count);
+ ImageBinding(const ImageBinding &other);
+ ~ImageBinding();
std::vector<GLuint> boundImageUnits;
};
@@ -588,6 +583,8 @@
class Bindings final : angle::NonCopyable
{
public:
+ Bindings();
+ ~Bindings();
void bindLocation(GLuint index, const std::string &name);
int getBinding(const std::string &name) const;
@@ -616,7 +613,7 @@
using MergedVaryings = std::map<std::string, VaryingRef>;
private:
- ~Program();
+ ~Program() override;
void unlink();
diff --git a/src/libANGLE/ProgramLinkedResources.cpp b/src/libANGLE/ProgramLinkedResources.cpp
index 7a2a5db..5787c2b 100644
--- a/src/libANGLE/ProgramLinkedResources.cpp
+++ b/src/libANGLE/ProgramLinkedResources.cpp
@@ -54,6 +54,8 @@
{
}
+UniformLinker::~UniformLinker() = default;
+
void UniformLinker::getResults(std::vector<LinkedUniform> *uniforms,
std::vector<VariableLocation> *uniformLocations)
{
diff --git a/src/libANGLE/ProgramLinkedResources.h b/src/libANGLE/ProgramLinkedResources.h
index 1d1fb98..75975e8 100644
--- a/src/libANGLE/ProgramLinkedResources.h
+++ b/src/libANGLE/ProgramLinkedResources.h
@@ -24,6 +24,7 @@
{
public:
UniformLinker(const ProgramState &state);
+ ~UniformLinker();
bool link(const Context *context,
InfoLog &infoLog,
@@ -170,7 +171,7 @@
public:
UniformBlockLinker(std::vector<InterfaceBlock> *blocksOut,
std::vector<LinkedUniform> *uniformsOut);
- virtual ~UniformBlockLinker();
+ ~UniformBlockLinker() override;
private:
void defineBlockMember(const sh::ShaderVariable &field,
@@ -188,7 +189,7 @@
public:
ShaderStorageBlockLinker(std::vector<InterfaceBlock> *blocksOut,
std::vector<BufferVariable> *bufferVariablesOut);
- virtual ~ShaderStorageBlockLinker();
+ ~ShaderStorageBlockLinker() override;
private:
void defineBlockMember(const sh::ShaderVariable &field,
diff --git a/src/libANGLE/ProgramPipeline.cpp b/src/libANGLE/ProgramPipeline.cpp
index cf3dc02..0445512 100644
--- a/src/libANGLE/ProgramPipeline.cpp
+++ b/src/libANGLE/ProgramPipeline.cpp
@@ -42,6 +42,11 @@
mProgramPipeline.release();
}
+Error ProgramPipeline::onDestroy(const Context *context)
+{
+ return NoError();
+}
+
void ProgramPipeline::setLabel(const std::string &label)
{
mState.mLabel = label;
diff --git a/src/libANGLE/ProgramPipeline.h b/src/libANGLE/ProgramPipeline.h
index 2755fd9..2aac87c 100644
--- a/src/libANGLE/ProgramPipeline.h
+++ b/src/libANGLE/ProgramPipeline.h
@@ -48,7 +48,7 @@
ProgramPipeline(rx::GLImplFactory *factory, GLuint handle);
~ProgramPipeline() override;
- Error onDestroy(const Context *context) override { return NoError(); }
+ Error onDestroy(const Context *context) override;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
diff --git a/src/libANGLE/Query.h b/src/libANGLE/Query.h
index 7a51917..c307eaa 100644
--- a/src/libANGLE/Query.h
+++ b/src/libANGLE/Query.h
@@ -30,7 +30,7 @@
public:
Query(rx::QueryImpl *impl, GLuint id);
void destroy(const gl::Context *context) {}
- virtual ~Query();
+ ~Query() override;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
diff --git a/src/libANGLE/RefCountObject.h b/src/libANGLE/RefCountObject.h
index 3420772..cb41cc2 100644
--- a/src/libANGLE/RefCountObject.h
+++ b/src/libANGLE/RefCountObject.h
@@ -26,7 +26,7 @@
{
public:
RefCountObjectNoID() : mRefCount(0) {}
- virtual Error onDestroy(const Context *context) { return NoError(); }
+ virtual Error onDestroy(const Context *context);
void addRef() const { ++mRefCount; }
@@ -43,7 +43,7 @@
size_t getRefCount() const { return mRefCount; }
protected:
- virtual ~RefCountObjectNoID() { ASSERT(mRefCount == 0); }
+ virtual ~RefCountObjectNoID();
// A specialized release method for objects which need a destroy context.
void release(const gl::Context *context)
@@ -61,6 +61,16 @@
mutable std::size_t mRefCount;
};
+inline RefCountObjectNoID::~RefCountObjectNoID()
+{
+ ASSERT(mRefCount == 0);
+}
+
+inline Error RefCountObjectNoID::onDestroy(const Context *context)
+{
+ return NoError();
+}
+
template <class ObjectType>
class BindingPointer;
diff --git a/src/libANGLE/Renderbuffer.cpp b/src/libANGLE/Renderbuffer.cpp
index 7303a2d..8310f1a 100644
--- a/src/libANGLE/Renderbuffer.cpp
+++ b/src/libANGLE/Renderbuffer.cpp
@@ -195,6 +195,16 @@
return Extents(mWidth, mHeight, 1);
}
+const Format &Renderbuffer::getAttachmentFormat(GLenum /*binding*/,
+ const ImageIndex & /*imageIndex*/) const
+{
+ return getFormat();
+}
+GLsizei Renderbuffer::getAttachmentSamples(const ImageIndex & /*imageIndex*/) const
+{
+ return getSamples();
+}
+
InitState Renderbuffer::initState(const gl::ImageIndex & /*imageIndex*/) const
{
if (isEGLImageTarget())
@@ -217,4 +227,9 @@
}
}
+rx::FramebufferAttachmentObjectImpl *Renderbuffer::getAttachmentImpl() const
+{
+ return mRenderbuffer;
+}
+
} // namespace gl
diff --git a/src/libANGLE/Renderbuffer.h b/src/libANGLE/Renderbuffer.h
index 55245cf..def18e6 100644
--- a/src/libANGLE/Renderbuffer.h
+++ b/src/libANGLE/Renderbuffer.h
@@ -32,7 +32,7 @@
{
public:
Renderbuffer(rx::RenderbufferImpl *impl, GLuint id);
- virtual ~Renderbuffer();
+ ~Renderbuffer() override;
Error onDestroy(const Context *context) override;
@@ -62,15 +62,8 @@
// FramebufferAttachmentObject Impl
Extents getAttachmentSize(const ImageIndex &imageIndex) const override;
- const Format &getAttachmentFormat(GLenum /*binding*/,
- const ImageIndex & /*imageIndex*/) const override
- {
- return getFormat();
- }
- GLsizei getAttachmentSamples(const ImageIndex & /*imageIndex*/) const override
- {
- return getSamples();
- }
+ const Format &getAttachmentFormat(GLenum binding, const ImageIndex &imageIndex) const override;
+ GLsizei getAttachmentSamples(const ImageIndex &imageIndex) const override;
void onAttach(const Context *context) override;
void onDetach(const Context *context) override;
@@ -80,7 +73,7 @@
void setInitState(const ImageIndex &imageIndex, InitState initState) override;
private:
- rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override { return mRenderbuffer; }
+ rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override;
rx::RenderbufferImpl *mRenderbuffer;
diff --git a/src/libANGLE/ResourceManager.cpp b/src/libANGLE/ResourceManager.cpp
index 1b7e966..79eb7e5 100644
--- a/src/libANGLE/ResourceManager.cpp
+++ b/src/libANGLE/ResourceManager.cpp
@@ -135,6 +135,10 @@
// ShaderProgramManager Implementation.
+ShaderProgramManager::ShaderProgramManager()
+{
+}
+
ShaderProgramManager::~ShaderProgramManager()
{
ASSERT(mPrograms.empty());
@@ -337,6 +341,10 @@
// PathManager Implementation.
+PathManager::PathManager()
+{
+}
+
ErrorOrResult<GLuint> PathManager::createPaths(rx::GLImplFactory *factory, GLsizei range)
{
// Allocate client side handles.
@@ -353,7 +361,7 @@
for (GLsizei i = 0; i < range; ++i)
{
- const auto impl = paths[static_cast<unsigned>(i)];
+ rx::PathImpl *impl = paths[static_cast<unsigned>(i)];
const auto id = client + i;
mPaths.assign(id, new Path(impl));
}
diff --git a/src/libANGLE/ResourceManager.h b/src/libANGLE/ResourceManager.h
index 16d0445..2dfeff5 100644
--- a/src/libANGLE/ResourceManager.h
+++ b/src/libANGLE/ResourceManager.h
@@ -126,6 +126,8 @@
class ShaderProgramManager : public ResourceManagerBase<HandleAllocator>
{
public:
+ ShaderProgramManager();
+
GLuint createShader(rx::GLImplFactory *factory,
const Limitations &rendererLimitations,
GLenum type);
@@ -222,6 +224,8 @@
class PathManager : public ResourceManagerBase<HandleRangeAllocator>
{
public:
+ PathManager();
+
ErrorOrResult<GLuint> createPaths(rx::GLImplFactory *factory, GLsizei range);
void deletePaths(GLuint first, GLsizei range);
Path *getPath(GLuint handle) const;
diff --git a/src/libANGLE/Sampler.cpp b/src/libANGLE/Sampler.cpp
index 17ad70a..0f05b69 100644
--- a/src/libANGLE/Sampler.cpp
+++ b/src/libANGLE/Sampler.cpp
@@ -25,6 +25,11 @@
SafeDelete(mImpl);
}
+Error Sampler::onDestroy(const Context *context)
+{
+ return NoError();
+}
+
void Sampler::setLabel(const std::string &label)
{
mLabel = label;
diff --git a/src/libANGLE/Sampler.h b/src/libANGLE/Sampler.h
index 5f85eb2..cd34273 100644
--- a/src/libANGLE/Sampler.h
+++ b/src/libANGLE/Sampler.h
@@ -29,7 +29,7 @@
Sampler(rx::GLImplFactory *factory, GLuint id);
~Sampler() override;
- Error onDestroy(const Context *context) override { return NoError(); }
+ Error onDestroy(const Context *context) override;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
diff --git a/src/libANGLE/Shader.h b/src/libANGLE/Shader.h
index 2ebafaa..4b6be46 100644
--- a/src/libANGLE/Shader.h
+++ b/src/libANGLE/Shader.h
@@ -180,7 +180,7 @@
const std::string &getCompilerResourcesString() const;
private:
- virtual ~Shader();
+ ~Shader() override;
static void GetSourceImpl(const std::string &source,
GLsizei bufSize,
GLsizei *length,
diff --git a/src/libANGLE/State.h b/src/libANGLE/State.h
index 390602e..0af8406 100644
--- a/src/libANGLE/State.h
+++ b/src/libANGLE/State.h
@@ -38,7 +38,7 @@
{
public:
State();
- ~State();
+ ~State() override;
void initialize(const Context *context,
bool debug,
diff --git a/src/libANGLE/Surface.cpp b/src/libANGLE/Surface.cpp
index 712f7a0..746da03 100644
--- a/src/libANGLE/Surface.cpp
+++ b/src/libANGLE/Surface.cpp
@@ -103,6 +103,11 @@
{
}
+rx::FramebufferAttachmentObjectImpl *Surface::getAttachmentImpl() const
+{
+ return mImplementation;
+}
+
Error Surface::destroyImpl(const Display *display)
{
if (mState.defaultFramebuffer)
diff --git a/src/libANGLE/Surface.h b/src/libANGLE/Surface.h
index 3289606..b3188ff 100644
--- a/src/libANGLE/Surface.h
+++ b/src/libANGLE/Surface.h
@@ -127,8 +127,8 @@
protected:
Surface(EGLint surfaceType, const egl::Config *config, const AttributeMap &attributes);
- virtual ~Surface();
- rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override { return mImplementation; }
+ ~Surface() override;
+ rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override;
gl::Framebuffer *createDefaultFramebuffer(const Display *display);
diff --git a/src/libANGLE/Texture.cpp b/src/libANGLE/Texture.cpp
index 8003200..c927b43 100644
--- a/src/libANGLE/Texture.cpp
+++ b/src/libANGLE/Texture.cpp
@@ -126,6 +126,10 @@
{
}
+TextureState::~TextureState()
+{
+}
+
bool TextureState::swizzleRequired() const
{
return mSwizzleState.swizzleRequired();
diff --git a/src/libANGLE/Texture.h b/src/libANGLE/Texture.h
index d6ac4d8..f7f2000 100644
--- a/src/libANGLE/Texture.h
+++ b/src/libANGLE/Texture.h
@@ -91,6 +91,7 @@
struct TextureState final : private angle::NonCopyable
{
TextureState(GLenum target);
+ ~TextureState();
bool swizzleRequired() const;
GLuint getEffectiveBaseLevel() const;
diff --git a/src/libANGLE/TransformFeedback.cpp b/src/libANGLE/TransformFeedback.cpp
index eb7f760..99235de 100644
--- a/src/libANGLE/TransformFeedback.cpp
+++ b/src/libANGLE/TransformFeedback.cpp
@@ -27,6 +27,10 @@
{
}
+TransformFeedbackState::~TransformFeedbackState()
+{
+}
+
const BindingPointer<Buffer> &TransformFeedbackState::getGenericBuffer() const
{
return mGenericBuffer;
diff --git a/src/libANGLE/TransformFeedback.h b/src/libANGLE/TransformFeedback.h
index 2cb8a81..2b35d43 100644
--- a/src/libANGLE/TransformFeedback.h
+++ b/src/libANGLE/TransformFeedback.h
@@ -31,6 +31,7 @@
{
public:
TransformFeedbackState(size_t maxIndexedBuffers);
+ ~TransformFeedbackState();
const BindingPointer<Buffer> &getGenericBuffer() const;
const OffsetBindingPointer<Buffer> &getIndexedBuffer(size_t idx) const;
@@ -55,7 +56,7 @@
{
public:
TransformFeedback(rx::GLImplFactory *implFactory, GLuint id, const Caps &caps);
- virtual ~TransformFeedback();
+ ~TransformFeedback() override;
Error onDestroy(const Context *context) override;
void setLabel(const std::string &label) override;
diff --git a/src/libANGLE/Uniform.cpp b/src/libANGLE/Uniform.cpp
index 1e7a077..b7c8301 100644
--- a/src/libANGLE/Uniform.cpp
+++ b/src/libANGLE/Uniform.cpp
@@ -171,6 +171,8 @@
{
}
+ShaderVariableBuffer::ShaderVariableBuffer(const ShaderVariableBuffer &other) = default;
+
ShaderVariableBuffer::~ShaderVariableBuffer()
{
}
diff --git a/src/libANGLE/Uniform.h b/src/libANGLE/Uniform.h
index 01f019e..5d463f2 100644
--- a/src/libANGLE/Uniform.h
+++ b/src/libANGLE/Uniform.h
@@ -52,7 +52,7 @@
LinkedUniform(const sh::Uniform &uniform);
LinkedUniform(const LinkedUniform &uniform);
LinkedUniform &operator=(const LinkedUniform &uniform);
- ~LinkedUniform();
+ ~LinkedUniform() override;
bool isSampler() const;
bool isImage() const;
@@ -78,7 +78,7 @@
unsigned int arraySize,
const int bufferIndex,
const sh::BlockMemberInfo &blockInfo);
- ~BufferVariable();
+ ~BufferVariable() override;
int bufferIndex;
sh::BlockMemberInfo blockInfo;
@@ -91,7 +91,8 @@
struct ShaderVariableBuffer : public StaticallyUsed
{
ShaderVariableBuffer();
- virtual ~ShaderVariableBuffer();
+ ShaderVariableBuffer(const ShaderVariableBuffer &other);
+ ~ShaderVariableBuffer() override;
int numActiveVariables() const;
int binding;
diff --git a/src/libANGLE/VaryingPacking.cpp b/src/libANGLE/VaryingPacking.cpp
index 836895b..6b74d4c 100644
--- a/src/libANGLE/VaryingPacking.cpp
+++ b/src/libANGLE/VaryingPacking.cpp
@@ -61,6 +61,8 @@
{
}
+VaryingPacking::~VaryingPacking() = default;
+
// Packs varyings into generic varying registers, using the algorithm from
// See [OpenGL ES Shading Language 1.00 rev. 17] appendix A section 7 page 111
// Also [OpenGL ES Shading Language 3.00 rev. 4] Section 11 page 119
diff --git a/src/libANGLE/VaryingPacking.h b/src/libANGLE/VaryingPacking.h
index 95e2c48..14b25f9 100644
--- a/src/libANGLE/VaryingPacking.h
+++ b/src/libANGLE/VaryingPacking.h
@@ -131,6 +131,7 @@
{
public:
VaryingPacking(GLuint maxVaryingVectors, PackMode packMode);
+ ~VaryingPacking();
bool packUserVaryings(gl::InfoLog &infoLog,
const std::vector<PackedVarying> &packedVaryings,
diff --git a/src/libANGLE/VertexArray.h b/src/libANGLE/VertexArray.h
index c749032..f82ec78 100644
--- a/src/libANGLE/VertexArray.h
+++ b/src/libANGLE/VertexArray.h
@@ -190,7 +190,7 @@
bool hasAnyDirtyBit() const { return mDirtyBits.any(); }
private:
- ~VertexArray();
+ ~VertexArray() override;
GLuint mId;
diff --git a/src/libANGLE/VertexAttribute.cpp b/src/libANGLE/VertexAttribute.cpp
index 0c0fbc8..20f7452 100644
--- a/src/libANGLE/VertexAttribute.cpp
+++ b/src/libANGLE/VertexAttribute.cpp
@@ -22,6 +22,10 @@
*this = std::move(binding);
}
+VertexBinding::~VertexBinding()
+{
+}
+
VertexBinding &VertexBinding::operator=(VertexBinding &&binding)
{
if (this != &binding)
diff --git a/src/libANGLE/VertexAttribute.h b/src/libANGLE/VertexAttribute.h
index fca2221..c531bec 100644
--- a/src/libANGLE/VertexAttribute.h
+++ b/src/libANGLE/VertexAttribute.h
@@ -24,6 +24,7 @@
public:
VertexBinding();
VertexBinding(VertexBinding &&binding);
+ ~VertexBinding();
VertexBinding &operator=(VertexBinding &&binding);
GLuint getStride() const { return mStride; }
diff --git a/src/libANGLE/angletypes.cpp b/src/libANGLE/angletypes.cpp
index 278f211..702d391 100644
--- a/src/libANGLE/angletypes.cpp
+++ b/src/libANGLE/angletypes.cpp
@@ -148,6 +148,8 @@
sRGBDecode = GL_DECODE_EXT;
}
+SamplerState::SamplerState(const SamplerState &other) = default;
+
// static
SamplerState SamplerState::CreateDefaultForTarget(GLenum target)
{
@@ -165,6 +167,15 @@
return state;
}
+ImageUnit::ImageUnit()
+ : texture(), level(0), layered(false), layer(0), access(GL_READ_ONLY), format(GL_R32UI)
+{
+}
+
+ImageUnit::ImageUnit(const ImageUnit &other) = default;
+
+ImageUnit::~ImageUnit() = default;
+
static void MinMax(int a, int b, int *minimum, int *maximum)
{
if (a < b)
diff --git a/src/libANGLE/angletypes.h b/src/libANGLE/angletypes.h
index e4e684c..811764c 100644
--- a/src/libANGLE/angletypes.h
+++ b/src/libANGLE/angletypes.h
@@ -200,6 +200,7 @@
{
// This will zero-initialize the struct, including padding.
SamplerState();
+ SamplerState(const SamplerState &other);
static SamplerState CreateDefaultForTarget(GLenum target);
@@ -248,10 +249,9 @@
struct ImageUnit
{
- ImageUnit()
- : texture(), level(0), layered(false), layer(0), access(GL_READ_ONLY), format(GL_R32UI)
- {
- }
+ ImageUnit();
+ ImageUnit(const ImageUnit &other);
+ ~ImageUnit();
BindingPointer<Texture> texture;
GLint level;
diff --git a/src/libANGLE/formatutils.cpp b/src/libANGLE/formatutils.cpp
index 8e316c4..67bb2ef 100644
--- a/src/libANGLE/formatutils.cpp
+++ b/src/libANGLE/formatutils.cpp
@@ -301,6 +301,8 @@
{
}
+InternalFormat::InternalFormat(const InternalFormat &other) = default;
+
bool InternalFormat::isLUMA() const
{
return ((redBits + greenBits + blueBits + depthBits + stencilBits) == 0 &&
diff --git a/src/libANGLE/formatutils.h b/src/libANGLE/formatutils.h
index 2f65e49..dbfe590 100644
--- a/src/libANGLE/formatutils.h
+++ b/src/libANGLE/formatutils.h
@@ -51,6 +51,7 @@
struct InternalFormat
{
InternalFormat();
+ InternalFormat(const InternalFormat &other);
GLuint computePixelBytes(GLenum formatType) const;
diff --git a/src/libANGLE/params.cpp b/src/libANGLE/params.cpp
index 71fe491..a89d87e 100644
--- a/src/libANGLE/params.cpp
+++ b/src/libANGLE/params.cpp
@@ -25,6 +25,11 @@
{
}
+HasIndexRange::HasIndexRange(Context *context, GLsizei count, GLenum type, const void *indices)
+ : ParamsBase(context), mContext(context), mCount(count), mType(type), mIndices(indices)
+{
+}
+
const Optional<IndexRange> &HasIndexRange::getIndexRange() const
{
if (mIndexRange.valid() || !mContext)
diff --git a/src/libANGLE/params.h b/src/libANGLE/params.h
index dee4c51..27dba64 100644
--- a/src/libANGLE/params.h
+++ b/src/libANGLE/params.h
@@ -73,10 +73,7 @@
public:
// Dummy placeholder that can't generate an index range.
HasIndexRange();
- HasIndexRange(Context *context, GLsizei count, GLenum type, const void *indices)
- : ParamsBase(context), mContext(context), mCount(count), mType(type), mIndices(indices)
- {
- }
+ HasIndexRange(Context *context, GLsizei count, GLenum type, const void *indices);
template <EntryPoint EP, typename... ArgsT>
static void Factory(HasIndexRange *objBuffer, ArgsT... args);
diff --git a/src/libANGLE/renderer/ContextImpl.h b/src/libANGLE/renderer/ContextImpl.h
index 4b08f93..68f9ddb 100644
--- a/src/libANGLE/renderer/ContextImpl.h
+++ b/src/libANGLE/renderer/ContextImpl.h
@@ -29,7 +29,7 @@
{
public:
ContextImpl(const gl::ContextState &state);
- virtual ~ContextImpl();
+ ~ContextImpl() override;
virtual void onDestroy(const gl::Context *context) {}
diff --git a/src/libANGLE/renderer/DisplayImpl.h b/src/libANGLE/renderer/DisplayImpl.h
index 5089a7d..b1c49d9 100644
--- a/src/libANGLE/renderer/DisplayImpl.h
+++ b/src/libANGLE/renderer/DisplayImpl.h
@@ -48,7 +48,7 @@
{
public:
DisplayImpl(const egl::DisplayState &state);
- virtual ~DisplayImpl();
+ ~DisplayImpl() override;
virtual egl::Error initialize(egl::Display *display) = 0;
virtual void terminate() = 0;
diff --git a/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h b/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h
index 35684cb..056ddc8 100644
--- a/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h
+++ b/src/libANGLE/renderer/FramebufferAttachmentObjectImpl.h
@@ -25,20 +25,30 @@
virtual gl::Error getAttachmentRenderTarget(const gl::Context *context,
GLenum binding,
const gl::ImageIndex &imageIndex,
- FramebufferAttachmentRenderTarget **rtOut)
- {
- UNIMPLEMENTED();
- return gl::OutOfMemory() << "getAttachmentRenderTarget not supported.";
- }
+ FramebufferAttachmentRenderTarget **rtOut);
virtual gl::Error initializeContents(const gl::Context *context,
- const gl::ImageIndex &imageIndex)
- {
- UNIMPLEMENTED();
- return gl::OutOfMemory() << "initialize not supported.";
- }
+ const gl::ImageIndex &imageIndex);
};
+inline gl::Error FramebufferAttachmentObjectImpl::getAttachmentRenderTarget(
+ const gl::Context *context,
+ GLenum binding,
+ const gl::ImageIndex &imageIndex,
+ FramebufferAttachmentRenderTarget **rtOut)
+{
+ UNIMPLEMENTED();
+ return gl::OutOfMemory() << "getAttachmentRenderTarget not supported.";
+}
+
+inline gl::Error FramebufferAttachmentObjectImpl::initializeContents(
+ const gl::Context *context,
+ const gl::ImageIndex &imageIndex)
+{
+ UNIMPLEMENTED();
+ return gl::OutOfMemory() << "initialize not supported.";
+}
+
} // namespace rx
#endif // LIBANGLE_RENDERER_FRAMEBUFFER_ATTACHMENT_OBJECT_IMPL_H_
diff --git a/src/libANGLE/renderer/RenderbufferImpl.h b/src/libANGLE/renderer/RenderbufferImpl.h
index 5932a6f..a70ab1d 100644
--- a/src/libANGLE/renderer/RenderbufferImpl.h
+++ b/src/libANGLE/renderer/RenderbufferImpl.h
@@ -26,8 +26,8 @@
{
public:
RenderbufferImpl() {}
- virtual ~RenderbufferImpl() {}
- virtual gl::Error onDestroy(const gl::Context *context) { return gl::NoError(); }
+ ~RenderbufferImpl() override {}
+ virtual gl::Error onDestroy(const gl::Context *context);
virtual gl::Error setStorage(const gl::Context *context,
GLenum internalformat,
@@ -41,6 +41,10 @@
virtual gl::Error setStorageEGLImageTarget(const gl::Context *context, egl::Image *image) = 0;
};
+inline gl::Error RenderbufferImpl::onDestroy(const gl::Context *context)
+{
+ return gl::NoError();
+}
}
#endif // LIBANGLE_RENDERER_RENDERBUFFERIMPL_H_
diff --git a/src/libANGLE/renderer/SurfaceImpl.h b/src/libANGLE/renderer/SurfaceImpl.h
index 7ce4056..eaa27de 100644
--- a/src/libANGLE/renderer/SurfaceImpl.h
+++ b/src/libANGLE/renderer/SurfaceImpl.h
@@ -38,7 +38,7 @@
{
public:
SurfaceImpl(const egl::SurfaceState &surfaceState);
- virtual ~SurfaceImpl();
+ ~SurfaceImpl() override;
virtual void destroy(const egl::Display *display) {}
virtual egl::Error initialize(const egl::Display *display) = 0;
diff --git a/src/libANGLE/renderer/TextureImpl.cpp b/src/libANGLE/renderer/TextureImpl.cpp
index 34480d8..830d30e 100644
--- a/src/libANGLE/renderer/TextureImpl.cpp
+++ b/src/libANGLE/renderer/TextureImpl.cpp
@@ -19,6 +19,11 @@
{
}
+gl::Error TextureImpl::onDestroy(const gl::Context *context)
+{
+ return gl::NoError();
+}
+
gl::Error TextureImpl::copyTexture(const gl::Context *context,
GLenum target,
size_t level,
diff --git a/src/libANGLE/renderer/TextureImpl.h b/src/libANGLE/renderer/TextureImpl.h
index 8cf78c3..3b4f28f 100644
--- a/src/libANGLE/renderer/TextureImpl.h
+++ b/src/libANGLE/renderer/TextureImpl.h
@@ -44,9 +44,9 @@
{
public:
TextureImpl(const gl::TextureState &state);
- virtual ~TextureImpl();
+ ~TextureImpl() override;
- virtual gl::Error onDestroy(const gl::Context *context) { return gl::NoError(); }
+ virtual gl::Error onDestroy(const gl::Context *context);
virtual gl::Error setImage(const gl::Context *context,
GLenum target,
diff --git a/src/libANGLE/renderer/d3d/BufferD3D.cpp b/src/libANGLE/renderer/d3d/BufferD3D.cpp
index f75bd9e..7769ab2 100644
--- a/src/libANGLE/renderer/d3d/BufferD3D.cpp
+++ b/src/libANGLE/renderer/d3d/BufferD3D.cpp
@@ -75,7 +75,7 @@
{
if (mStaticVertexBuffers.empty())
{
- auto newStaticBuffer = new StaticVertexBufferInterface(mFactory);
+ StaticVertexBufferInterface *newStaticBuffer = new StaticVertexBufferInterface(mFactory);
mStaticVertexBuffers.push_back(
std::unique_ptr<StaticVertexBufferInterface>(newStaticBuffer));
}
@@ -134,7 +134,7 @@
}
// At this point, we must create a new static buffer for the attribute data.
- auto newStaticBuffer = new StaticVertexBufferInterface(mFactory);
+ StaticVertexBufferInterface *newStaticBuffer = new StaticVertexBufferInterface(mFactory);
newStaticBuffer->setAttribute(attribute, binding);
mStaticVertexBuffers.push_back(std::unique_ptr<StaticVertexBufferInterface>(newStaticBuffer));
return newStaticBuffer;
diff --git a/src/libANGLE/renderer/d3d/BufferD3D.h b/src/libANGLE/renderer/d3d/BufferD3D.h
index 93c43b0..6015374 100644
--- a/src/libANGLE/renderer/d3d/BufferD3D.h
+++ b/src/libANGLE/renderer/d3d/BufferD3D.h
@@ -37,7 +37,7 @@
{
public:
BufferD3D(const gl::BufferState &state, BufferFactoryD3D *factory);
- virtual ~BufferD3D();
+ ~BufferD3D() override;
unsigned int getSerial() const { return mSerial; }
diff --git a/src/libANGLE/renderer/d3d/CompilerD3D.cpp b/src/libANGLE/renderer/d3d/CompilerD3D.cpp
index 6f8d171..8ceeec3 100644
--- a/src/libANGLE/renderer/d3d/CompilerD3D.cpp
+++ b/src/libANGLE/renderer/d3d/CompilerD3D.cpp
@@ -17,4 +17,14 @@
{
}
+gl::Error CompilerD3D::release()
+{
+ return gl::NoError();
+}
+
+ShShaderOutput CompilerD3D::getTranslatorOutputType() const
+{
+ return mTranslatorOutputType;
+}
+
} // namespace rx
diff --git a/src/libANGLE/renderer/d3d/CompilerD3D.h b/src/libANGLE/renderer/d3d/CompilerD3D.h
index 7ad6f07..bcfe810 100644
--- a/src/libANGLE/renderer/d3d/CompilerD3D.h
+++ b/src/libANGLE/renderer/d3d/CompilerD3D.h
@@ -21,8 +21,8 @@
CompilerD3D(ShShaderOutput translatorOutputType);
~CompilerD3D() override {}
- gl::Error release() override { return gl::NoError(); }
- ShShaderOutput getTranslatorOutputType() const override { return mTranslatorOutputType; }
+ gl::Error release() override;
+ ShShaderOutput getTranslatorOutputType() const override;
private:
ShShaderOutput mTranslatorOutputType;
diff --git a/src/libANGLE/renderer/d3d/DeviceD3D.cpp b/src/libANGLE/renderer/d3d/DeviceD3D.cpp
index 7123ac8..5a06b15 100644
--- a/src/libANGLE/renderer/d3d/DeviceD3D.cpp
+++ b/src/libANGLE/renderer/d3d/DeviceD3D.cpp
@@ -98,4 +98,8 @@
outExtensions->deviceD3D = true;
}
+bool DeviceD3D::deviceExternallySourced()
+{
+ return mDeviceExternallySourced;
+}
}
diff --git a/src/libANGLE/renderer/d3d/DeviceD3D.h b/src/libANGLE/renderer/d3d/DeviceD3D.h
index 1dd9979..15eaf92 100644
--- a/src/libANGLE/renderer/d3d/DeviceD3D.h
+++ b/src/libANGLE/renderer/d3d/DeviceD3D.h
@@ -25,7 +25,7 @@
egl::Error getDevice(void **outValue) override;
EGLint getType() override;
void generateExtensions(egl::DeviceExtensions *outExtensions) const override;
- bool deviceExternallySourced() override { return mDeviceExternallySourced; }
+ bool deviceExternallySourced() override;
private:
void *mDevice;
diff --git a/src/libANGLE/renderer/d3d/DisplayD3D.cpp b/src/libANGLE/renderer/d3d/DisplayD3D.cpp
index 512570c..0edda9c 100644
--- a/src/libANGLE/renderer/d3d/DisplayD3D.cpp
+++ b/src/libANGLE/renderer/d3d/DisplayD3D.cpp
@@ -247,7 +247,7 @@
egl::Error DisplayD3D::restoreLostDevice(const egl::Display *display)
{
// Release surface resources to make the Reset() succeed
- for (auto &surface : mState.surfaceSet)
+ for (egl::Surface *surface : mState.surfaceSet)
{
if (surface->getBoundTexture())
{
@@ -263,7 +263,7 @@
}
// Restore any surfaces that may have been lost
- for (const auto &surface : mState.surfaceSet)
+ for (const egl::Surface *surface : mState.surfaceSet)
{
SurfaceD3D *surfaceD3D = GetImplAs<SurfaceD3D>(surface);
@@ -324,7 +324,7 @@
egl::Error DisplayD3D::waitClient(const gl::Context *context) const
{
- for (auto &surface : mState.surfaceSet)
+ for (egl::Surface *surface : mState.surfaceSet)
{
SurfaceD3D *surfaceD3D = GetImplAs<SurfaceD3D>(surface);
ANGLE_TRY(surfaceD3D->checkForOutOfDateSwapChain(context));
diff --git a/src/libANGLE/renderer/d3d/DisplayD3D.h b/src/libANGLE/renderer/d3d/DisplayD3D.h
index ecad131..7090522 100644
--- a/src/libANGLE/renderer/d3d/DisplayD3D.h
+++ b/src/libANGLE/renderer/d3d/DisplayD3D.h
@@ -22,7 +22,7 @@
DisplayD3D(const egl::DisplayState &state);
egl::Error initialize(egl::Display *display) override;
- virtual void terminate() override;
+ void terminate() override;
// Surface creation
SurfaceImpl *createWindowSurface(const egl::SurfaceState &state,
diff --git a/src/libANGLE/renderer/d3d/DynamicHLSL.cpp b/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
index b1db8c9..55c3846 100644
--- a/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
+++ b/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
@@ -149,6 +149,11 @@
constexpr const char *PIXEL_OUTPUT_STUB_STRING = "@@ PIXEL OUTPUT @@";
} // anonymous namespace
+// BuiltinInfo implementation
+
+BuiltinInfo::BuiltinInfo() = default;
+BuiltinInfo::~BuiltinInfo() = default;
+
// DynamicHLSL implementation
DynamicHLSL::DynamicHLSL(RendererD3D *const renderer) : mRenderer(renderer)
@@ -1332,6 +1337,8 @@
}
}
+BuiltinVaryingsD3D::~BuiltinVaryingsD3D() = default;
+
void BuiltinVaryingsD3D::updateBuiltins(ShaderType shaderType,
const ProgramD3DMetadata &metadata,
const VaryingPacking &packing)
diff --git a/src/libANGLE/renderer/d3d/DynamicHLSL.h b/src/libANGLE/renderer/d3d/DynamicHLSL.h
index dd111d2..b64c15f 100644
--- a/src/libANGLE/renderer/d3d/DynamicHLSL.h
+++ b/src/libANGLE/renderer/d3d/DynamicHLSL.h
@@ -71,6 +71,9 @@
struct BuiltinInfo
{
+ BuiltinInfo();
+ ~BuiltinInfo();
+
BuiltinVarying dxPosition;
BuiltinVarying glPosition;
BuiltinVarying glFragCoord;
@@ -92,6 +95,7 @@
{
public:
BuiltinVaryingsD3D(const ProgramD3DMetadata &metadata, const gl::VaryingPacking &packing);
+ ~BuiltinVaryingsD3D();
bool usesPointSize() const { return mBuiltinInfo[SHADER_VERTEX].glPointSize.enabled; }
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
index 0c85ccf..3d73b2c 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
@@ -87,6 +87,10 @@
}
}
+ClearParameters::ClearParameters() = default;
+
+ClearParameters::ClearParameters(const ClearParameters &other) = default;
+
FramebufferD3D::FramebufferD3D(const gl::FramebufferState &data, RendererD3D *renderer)
: FramebufferImpl(data), mRenderer(renderer)
{
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.h b/src/libANGLE/renderer/d3d/FramebufferD3D.h
index 9a04d04..a7312fd 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.h
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.h
@@ -32,6 +32,9 @@
struct ClearParameters
{
+ ClearParameters();
+ ClearParameters(const ClearParameters &other);
+
bool clearColor[gl::IMPLEMENTATION_MAX_DRAW_BUFFERS];
gl::ColorF colorF;
gl::ColorI colorI;
@@ -57,7 +60,7 @@
{
public:
FramebufferD3D(const gl::FramebufferState &data, RendererD3D *renderer);
- virtual ~FramebufferD3D();
+ ~FramebufferD3D() override;
gl::Error clear(const gl::Context *context, GLbitfield mask) override;
gl::Error clearBufferfv(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/ImageD3D.cpp b/src/libANGLE/renderer/d3d/ImageD3D.cpp
index ead5db6..dbbcbbe 100644
--- a/src/libANGLE/renderer/d3d/ImageD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ImageD3D.cpp
@@ -29,4 +29,34 @@
{
}
+gl::Error ImageD3D::setManagedSurface2D(const gl::Context *context,
+ TextureStorage *storage,
+ int level)
+{
+ return gl::NoError();
+}
+
+gl::Error ImageD3D::setManagedSurfaceCube(const gl::Context *context,
+ TextureStorage *storage,
+ int face,
+ int level)
+{
+ return gl::NoError();
+}
+
+gl::Error ImageD3D::setManagedSurface3D(const gl::Context *context,
+ TextureStorage *storage,
+ int level)
+{
+ return gl::NoError();
+}
+
+gl::Error ImageD3D::setManagedSurface2DArray(const gl::Context *context,
+ TextureStorage *storage,
+ int layer,
+ int level)
+{
+ return gl::NoError();
+}
+
} // namespace rx
diff --git a/src/libANGLE/renderer/d3d/ImageD3D.h b/src/libANGLE/renderer/d3d/ImageD3D.h
index 9d559da..1b7235f 100644
--- a/src/libANGLE/renderer/d3d/ImageD3D.h
+++ b/src/libANGLE/renderer/d3d/ImageD3D.h
@@ -64,30 +64,18 @@
virtual gl::Error setManagedSurface2D(const gl::Context *context,
TextureStorage *storage,
- int level)
- {
- return gl::NoError();
- }
+ int level);
virtual gl::Error setManagedSurfaceCube(const gl::Context *context,
TextureStorage *storage,
int face,
- int level)
- {
- return gl::NoError();
- }
+ int level);
virtual gl::Error setManagedSurface3D(const gl::Context *context,
TextureStorage *storage,
- int level)
- {
- return gl::NoError();
- }
+ int level);
virtual gl::Error setManagedSurface2DArray(const gl::Context *context,
TextureStorage *storage,
int layer,
- int level)
- {
- return gl::NoError();
- }
+ int level);
virtual gl::Error copyToStorage(const gl::Context *context,
TextureStorage *storage,
const gl::ImageIndex &index,
diff --git a/src/libANGLE/renderer/d3d/IndexBuffer.h b/src/libANGLE/renderer/d3d/IndexBuffer.h
index 0b7b28d..969cf6a 100644
--- a/src/libANGLE/renderer/d3d/IndexBuffer.h
+++ b/src/libANGLE/renderer/d3d/IndexBuffer.h
@@ -81,7 +81,7 @@
{
public:
explicit StreamingIndexBufferInterface(BufferFactoryD3D *factory);
- ~StreamingIndexBufferInterface();
+ ~StreamingIndexBufferInterface() override;
gl::Error reserveBufferSpace(unsigned int size, GLenum indexType) override;
};
@@ -90,7 +90,7 @@
{
public:
explicit StaticIndexBufferInterface(BufferFactoryD3D *factory);
- ~StaticIndexBufferInterface();
+ ~StaticIndexBufferInterface() override;
gl::Error reserveBufferSpace(unsigned int size, GLenum indexType) override;
};
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index 150ffa3..851ad7e 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -2242,7 +2242,7 @@
{
ASSERT(uniformType == GL_INT);
size_t size = count * sizeof(T);
- auto dest = &targetUniform->mSamplerData[locationInfo.arrayIndex];
+ GLint *dest = &targetUniform->mSamplerData[locationInfo.arrayIndex];
if (memcmp(dest, v, size) != 0)
{
memcpy(dest, v, size);
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.h b/src/libANGLE/renderer/d3d/ProgramD3D.h
index c9634d3..c5d8be4 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.h
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.h
@@ -151,7 +151,7 @@
{
public:
ProgramD3D(const gl::ProgramState &data, RendererD3D *renderer);
- virtual ~ProgramD3D();
+ ~ProgramD3D() override;
const std::vector<PixelShaderOutputVariable> &getPixelShaderKey() { return mPixelShaderKey; }
diff --git a/src/libANGLE/renderer/d3d/RenderTargetD3D.h b/src/libANGLE/renderer/d3d/RenderTargetD3D.h
index cb82225..fde9613 100644
--- a/src/libANGLE/renderer/d3d/RenderTargetD3D.h
+++ b/src/libANGLE/renderer/d3d/RenderTargetD3D.h
@@ -21,7 +21,7 @@
{
public:
RenderTargetD3D();
- virtual ~RenderTargetD3D();
+ ~RenderTargetD3D() override;
virtual GLsizei getWidth() const = 0;
virtual GLsizei getHeight() const = 0;
diff --git a/src/libANGLE/renderer/d3d/RenderbufferD3D.h b/src/libANGLE/renderer/d3d/RenderbufferD3D.h
index 63f679a..b50eff7 100644
--- a/src/libANGLE/renderer/d3d/RenderbufferD3D.h
+++ b/src/libANGLE/renderer/d3d/RenderbufferD3D.h
@@ -25,7 +25,7 @@
{
public:
RenderbufferD3D(RendererD3D *renderer);
- virtual ~RenderbufferD3D();
+ ~RenderbufferD3D() override;
gl::Error onDestroy(const gl::Context *context) override;
diff --git a/src/libANGLE/renderer/d3d/RendererD3D.h b/src/libANGLE/renderer/d3d/RendererD3D.h
index fdc572a..1834ab7 100644
--- a/src/libANGLE/renderer/d3d/RendererD3D.h
+++ b/src/libANGLE/renderer/d3d/RendererD3D.h
@@ -110,7 +110,7 @@
{
public:
explicit RendererD3D(egl::Display *display);
- virtual ~RendererD3D();
+ ~RendererD3D() override;
virtual egl::Error initialize() = 0;
diff --git a/src/libANGLE/renderer/d3d/ShaderD3D.h b/src/libANGLE/renderer/d3d/ShaderD3D.h
index ed6b5ec..2065f12 100644
--- a/src/libANGLE/renderer/d3d/ShaderD3D.h
+++ b/src/libANGLE/renderer/d3d/ShaderD3D.h
@@ -36,7 +36,7 @@
ShaderD3D(const gl::ShaderState &data,
const angle::WorkaroundsD3D &workarounds,
const gl::Extensions &extensions);
- virtual ~ShaderD3D();
+ ~ShaderD3D() override;
// ShaderImpl implementation
ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream,
diff --git a/src/libANGLE/renderer/d3d/TextureD3D.h b/src/libANGLE/renderer/d3d/TextureD3D.h
index 8ae2b68..eb206a6 100644
--- a/src/libANGLE/renderer/d3d/TextureD3D.h
+++ b/src/libANGLE/renderer/d3d/TextureD3D.h
@@ -36,7 +36,7 @@
{
public:
TextureD3D(const gl::TextureState &data, RendererD3D *renderer);
- virtual ~TextureD3D();
+ ~TextureD3D() override;
gl::Error onDestroy(const gl::Context *context) override;
@@ -190,7 +190,7 @@
{
public:
TextureD3D_2D(const gl::TextureState &data, RendererD3D *renderer);
- virtual ~TextureD3D_2D();
+ ~TextureD3D_2D() override;
gl::Error onDestroy(const gl::Context *context) override;
@@ -310,7 +310,7 @@
bool isValidLevel(int level) const;
bool isLevelComplete(int level) const;
- virtual bool isImageComplete(const gl::ImageIndex &index) const override;
+ bool isImageComplete(const gl::ImageIndex &index) const override;
gl::Error updateStorageLevel(const gl::Context *context, int level);
@@ -328,7 +328,7 @@
{
public:
TextureD3D_Cube(const gl::TextureState &data, RendererD3D *renderer);
- virtual ~TextureD3D_Cube();
+ ~TextureD3D_Cube() override;
gl::Error onDestroy(const gl::Context *context) override;
@@ -446,7 +446,7 @@
bool isValidFaceLevel(int faceIndex, int level) const;
bool isFaceLevelComplete(int faceIndex, int level) const;
bool isCubeComplete() const;
- virtual bool isImageComplete(const gl::ImageIndex &index) const override;
+ bool isImageComplete(const gl::ImageIndex &index) const override;
gl::Error updateStorageFaceLevel(const gl::Context *context, int faceIndex, int level);
gl::Error redefineImage(const gl::Context *context,
@@ -463,7 +463,7 @@
{
public:
TextureD3D_3D(const gl::TextureState &data, RendererD3D *renderer);
- virtual ~TextureD3D_3D();
+ ~TextureD3D_3D() override;
gl::Error onDestroy(const gl::Context *context) override;
@@ -562,7 +562,7 @@
bool isValidLevel(int level) const;
bool isLevelComplete(int level) const;
- virtual bool isImageComplete(const gl::ImageIndex &index) const override;
+ bool isImageComplete(const gl::ImageIndex &index) const override;
gl::Error updateStorageLevel(const gl::Context *context, int level);
gl::Error redefineImage(const gl::Context *context,
@@ -578,7 +578,7 @@
{
public:
TextureD3D_2DArray(const gl::TextureState &data, RendererD3D *renderer);
- virtual ~TextureD3D_2DArray();
+ ~TextureD3D_2DArray() override;
gl::Error onDestroy(const gl::Context *context) override;
@@ -675,7 +675,7 @@
bool isValidLevel(int level) const;
bool isLevelComplete(int level) const;
- virtual bool isImageComplete(const gl::ImageIndex &index) const override;
+ bool isImageComplete(const gl::ImageIndex &index) const override;
gl::Error updateStorageLevel(const gl::Context *context, int level);
void deleteImages();
diff --git a/src/libANGLE/renderer/d3d/TextureStorage.h b/src/libANGLE/renderer/d3d/TextureStorage.h
index f1d876b..383fbc2 100644
--- a/src/libANGLE/renderer/d3d/TextureStorage.h
+++ b/src/libANGLE/renderer/d3d/TextureStorage.h
@@ -35,10 +35,7 @@
TextureStorage() {}
virtual ~TextureStorage() {}
- virtual gl::Error onDestroy(const gl::Context *context)
- {
- return gl::NoError();
- }
+ virtual gl::Error onDestroy(const gl::Context *context);
virtual int getTopLevel() const = 0;
virtual bool isRenderTarget() const = 0;
@@ -64,12 +61,20 @@
// This is a no-op for most implementations of TextureStorage. Some (e.g. TextureStorage11_2D) might override it.
virtual gl::Error useLevelZeroWorkaroundTexture(const gl::Context *context,
- bool useLevelZeroTexture)
- {
- return gl::NoError();
- }
+ bool useLevelZeroTexture);
};
+inline gl::Error TextureStorage::onDestroy(const gl::Context *context)
+{
+ return gl::NoError();
+}
+
+inline gl::Error TextureStorage::useLevelZeroWorkaroundTexture(const gl::Context *context,
+ bool useLevelZeroTexture)
+{
+ return gl::NoError();
+}
+
using TexStoragePointer = angle::UniqueObjectPointer<TextureStorage, gl::Context>;
} // namespace rx
diff --git a/src/libANGLE/renderer/d3d/VertexBuffer.h b/src/libANGLE/renderer/d3d/VertexBuffer.h
index 36297d9..df8085d 100644
--- a/src/libANGLE/renderer/d3d/VertexBuffer.h
+++ b/src/libANGLE/renderer/d3d/VertexBuffer.h
@@ -104,7 +104,7 @@
{
public:
StreamingVertexBufferInterface(BufferFactoryD3D *factory, std::size_t initialSize);
- ~StreamingVertexBufferInterface();
+ ~StreamingVertexBufferInterface() override;
gl::Error storeDynamicAttribute(const gl::VertexAttribute &attrib,
const gl::VertexBinding &binding,
@@ -131,7 +131,7 @@
{
public:
explicit StaticVertexBufferInterface(BufferFactoryD3D *factory);
- ~StaticVertexBufferInterface();
+ ~StaticVertexBufferInterface() override;
// Warning: you should ensure binding really matches attrib.bindingIndex before using these
// functions.
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
index 518fcd3..54ad5e5 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.cpp
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
@@ -126,6 +126,8 @@
{
}
+TranslatedAttribute::TranslatedAttribute(const TranslatedAttribute &other) = default;
+
gl::ErrorOrResult<unsigned int> TranslatedAttribute::computeOffset(GLint startVertex) const
{
if (!usesFirstVertexOffset)
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.h b/src/libANGLE/renderer/d3d/VertexDataManager.h
index c10b280..694366d 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.h
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.h
@@ -48,6 +48,7 @@
struct TranslatedAttribute
{
TranslatedAttribute();
+ TranslatedAttribute(const TranslatedAttribute &other);
// Computes the correct offset from baseOffset, usesFirstVertexOffset, stride and startVertex.
// Can throw an error on integer overflow.
diff --git a/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp b/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
index 5b3f2a6..f032e88 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
@@ -558,6 +558,14 @@
} // namespace
+Blit11::Shader::Shader() = default;
+
+Blit11::Shader::Shader(Shader &&other) = default;
+
+Blit11::Shader::~Shader() = default;
+
+Blit11::Shader &Blit11::Shader::operator=(Blit11::Shader &&other) = default;
+
Blit11::Blit11(Renderer11 *renderer)
: mRenderer(renderer),
mResourcesInitialized(false),
@@ -1079,7 +1087,7 @@
deviceContext->Unmap(mSwizzleCB.get(), 0);
- auto stateManager = mRenderer->getStateManager();
+ StateManager11 *stateManager = mRenderer->getStateManager();
// Apply vertex buffer
stateManager->setSingleVertexBuffer(&mVertexBuffer, stride, 0);
@@ -1174,7 +1182,7 @@
deviceContext->Unmap(mVertexBuffer.get(), 0);
- auto stateManager = mRenderer->getStateManager();
+ StateManager11 *stateManager = mRenderer->getStateManager();
// Apply vertex buffer
stateManager->setSingleVertexBuffer(&mVertexBuffer, stride, 0);
@@ -1283,7 +1291,7 @@
deviceContext->Unmap(mVertexBuffer.get(), 0);
- auto stateManager = mRenderer->getStateManager();
+ StateManager11 *stateManager = mRenderer->getStateManager();
// Apply vertex buffer
stateManager->setSingleVertexBuffer(&mVertexBuffer, stride, 0);
@@ -1995,7 +2003,7 @@
// Possibly D3D11 bug or undefined behaviour: Clear the DSV so that our first render
// works as expected. Otherwise the results of the first use seem to be incorrect.
- auto context = mRenderer->getDeviceContext();
+ ID3D11DeviceContext *context = mRenderer->getDeviceContext();
context->ClearDepthStencilView(mResolvedDepthDSView.get(), D3D11_CLEAR_DEPTH, 1.0f, 0);
return gl::NoError();
diff --git a/src/libANGLE/renderer/d3d/d3d11/Blit11.h b/src/libANGLE/renderer/d3d/d3d11/Blit11.h
index 5dce053..14078f9 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Blit11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Blit11.h
@@ -194,6 +194,11 @@
struct Shader
{
+ Shader();
+ Shader(Shader &&other);
+ ~Shader();
+ Shader &operator=(Shader &&other);
+
ShaderDimension dimension;
d3d11::PixelShader pixelShader;
};
diff --git a/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
index 49a03b3..3f87603 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
@@ -305,7 +305,7 @@
Buffer11::~Buffer11()
{
- for (auto &storage : mBufferStorages)
+ for (BufferStorage *&storage : mBufferStorages)
{
SafeDelete(storage);
}
@@ -902,6 +902,11 @@
return GetAs<PackStorage>(packStorage);
}
+size_t Buffer11::getSize() const
+{
+ return mSize;
+}
+
bool Buffer11::supportsDirectBinding() const
{
// Do not support direct buffers for dynamic data. The streaming buffer
diff --git a/src/libANGLE/renderer/d3d/d3d11/Buffer11.h b/src/libANGLE/renderer/d3d/d3d11/Buffer11.h
index 7d37043..ddbeeb9 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Buffer11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Buffer11.h
@@ -51,7 +51,7 @@
{
public:
Buffer11(const gl::BufferState &state, Renderer11 *renderer);
- virtual ~Buffer11();
+ ~Buffer11() override;
gl::ErrorOrResult<ID3D11Buffer *> getBuffer(const gl::Context *context, BufferUsage usage);
gl::ErrorOrResult<ID3D11Buffer *> getEmulatedIndexedBuffer(const gl::Context *context,
@@ -73,7 +73,7 @@
size_t getTotalCPUBufferMemoryBytes() const;
// BufferD3D implementation
- size_t getSize() const override { return mSize; }
+ size_t getSize() const override;
bool supportsDirectBinding() const override;
gl::Error getData(const gl::Context *context, const uint8_t **outData) override;
void initializeStaticData(const gl::Context *context) override;
diff --git a/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp b/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
index bc96f30..f9dda0a 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
@@ -422,7 +422,7 @@
}
else
{
- const auto colorAttachment = fboData.getFirstColorAttachment();
+ const gl::FramebufferAttachment *colorAttachment = fboData.getFirstColorAttachment();
if (!colorAttachment)
{
diff --git a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
index 63e47f2..02326d7 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
@@ -71,7 +71,8 @@
}
if (newRenderTarget != cachedRenderTarget)
{
- auto channel = (newRenderTarget ? newRenderTarget->getBroadcastChannel() : nullptr);
+ OnRenderTargetDirtyChannel *channel =
+ (newRenderTarget ? newRenderTarget->getBroadcastChannel() : nullptr);
channelBinding->bind(channel);
cachedRenderTarget = newRenderTarget;
}
@@ -106,7 +107,7 @@
ANGLE_TRY(MarkAttachmentsDirty(context, &colorAttachment));
}
- auto dsAttachment = mState.getDepthOrStencilAttachment();
+ const gl::FramebufferAttachment *dsAttachment = mState.getDepthOrStencilAttachment();
if (dsAttachment)
{
ANGLE_TRY(MarkAttachmentsDirty(context, dsAttachment));
@@ -198,7 +199,8 @@
size_t colorIndex =
(attachments[i] == GL_COLOR ? 0u : (attachments[i] - GL_COLOR_ATTACHMENT0));
- auto colorAttachment = mState.getColorAttachment(colorIndex);
+ const gl::FramebufferAttachment *colorAttachment =
+ mState.getColorAttachment(colorIndex);
if (colorAttachment)
{
ANGLE_TRY(invalidateAttachment(context, colorAttachment));
diff --git a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
index b64354a..afdda29 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
@@ -21,7 +21,7 @@
{
public:
Framebuffer11(const gl::FramebufferState &data, Renderer11 *renderer);
- virtual ~Framebuffer11();
+ ~Framebuffer11() override;
gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
gl::Error invalidate(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/d3d11/Image11.h b/src/libANGLE/renderer/d3d/d3d11/Image11.h
index fc198dd..584d231 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Image11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Image11.h
@@ -31,7 +31,7 @@
{
public:
Image11(Renderer11 *renderer);
- virtual ~Image11();
+ ~Image11() override;
static gl::Error GenerateMipmap(const gl::Context *context,
Image11 *dest,
diff --git a/src/libANGLE/renderer/d3d/d3d11/IndexBuffer11.h b/src/libANGLE/renderer/d3d/d3d11/IndexBuffer11.h
index 6c7260f..7b5d744 100644
--- a/src/libANGLE/renderer/d3d/d3d11/IndexBuffer11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/IndexBuffer11.h
@@ -20,18 +20,18 @@
{
public:
explicit IndexBuffer11(Renderer11 *const renderer);
- virtual ~IndexBuffer11();
+ ~IndexBuffer11() override;
- virtual gl::Error initialize(unsigned int bufferSize, GLenum indexType, bool dynamic);
+ gl::Error initialize(unsigned int bufferSize, GLenum indexType, bool dynamic) override;
- virtual gl::Error mapBuffer(unsigned int offset, unsigned int size, void** outMappedMemory);
- virtual gl::Error unmapBuffer();
+ gl::Error mapBuffer(unsigned int offset, unsigned int size, void **outMappedMemory) override;
+ gl::Error unmapBuffer() override;
- virtual GLenum getIndexType() const;
- virtual unsigned int getBufferSize() const;
- virtual gl::Error setSize(unsigned int bufferSize, GLenum indexType);
+ GLenum getIndexType() const override;
+ unsigned int getBufferSize() const override;
+ gl::Error setSize(unsigned int bufferSize, GLenum indexType) override;
- virtual gl::Error discard();
+ gl::Error discard() override;
DXGI_FORMAT getIndexFormat() const;
const d3d11::Buffer &getBuffer() const;
diff --git a/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp b/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp
index 12edb65..61f9018 100644
--- a/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp
@@ -74,6 +74,8 @@
{
}
+PackedAttributeLayout::PackedAttributeLayout(const PackedAttributeLayout &other) = default;
+
void PackedAttributeLayout::addAttributeData(GLenum glType,
UINT semanticIndex,
gl::VertexFormatType vertexFormatType,
diff --git a/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h b/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h
index 7cc1a8e..adf7175 100644
--- a/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h
+++ b/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h
@@ -31,6 +31,7 @@
struct PackedAttributeLayout
{
PackedAttributeLayout();
+ PackedAttributeLayout(const PackedAttributeLayout &other);
void addAttributeData(GLenum glType,
UINT semanticIndex,
diff --git a/src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp b/src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
index e9c8ca7..7d7ecb0 100644
--- a/src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
@@ -188,7 +188,7 @@
// Are we doing a 2D or 3D copy?
const auto *geometryShader = ((destSize.depth > 1) ? &mBufferToTextureGS : nullptr);
- auto stateManager = mRenderer->getStateManager();
+ StateManager11 *stateManager = mRenderer->getStateManager();
stateManager->setDrawShaders(&mBufferToTextureVS, geometryShader, pixelShader);
stateManager->setShaderResource(gl::SAMPLER_PIXEL, 0, bufferSRV);
diff --git a/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.h b/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.h
index 419e669..db49cac 100644
--- a/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/RenderTarget11.h
@@ -24,7 +24,7 @@
{
public:
RenderTarget11(const d3d11::Format &formatSet);
- virtual ~RenderTarget11();
+ ~RenderTarget11() override;
virtual const TextureHelper11 &getTexture() const = 0;
virtual const d3d11::RenderTargetView &getRenderTargetView() const = 0;
@@ -67,7 +67,7 @@
GLsizei height,
GLsizei depth,
GLsizei samples);
- virtual ~TextureRenderTarget11();
+ ~TextureRenderTarget11() override;
GLsizei getWidth() const override;
GLsizei getHeight() const override;
@@ -105,7 +105,7 @@
{
public:
SurfaceRenderTarget11(SwapChain11 *swapChain, Renderer11 *renderer, bool depth);
- virtual ~SurfaceRenderTarget11();
+ ~SurfaceRenderTarget11() override;
GLsizei getWidth() const override;
GLsizei getHeight() const override;
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
index 393bcbb..979722d 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -355,8 +355,8 @@
bool DrawCallNeedsTranslation(const gl::Context *context, GLenum mode)
{
const auto &glState = context->getGLState();
- const auto &vertexArray = glState.getVertexArray();
- auto *vertexArray11 = GetImplAs<VertexArray11>(vertexArray);
+ const gl::VertexArray *vertexArray = glState.getVertexArray();
+ VertexArray11 *vertexArray11 = GetImplAs<VertexArray11>(vertexArray);
// Direct drawing doesn't support dynamic attribute storage since it needs the first and count
// to translate when applyVertexBuffer. GL_LINE_LOOP and GL_TRIANGLE_FAN are not supported
// either since we need to simulate them in D3D.
@@ -438,6 +438,8 @@
} // anonymous namespace
+Renderer11DeviceCaps::Renderer11DeviceCaps() = default;
+
Renderer11::Renderer11(egl::Display *display)
: RendererD3D(display),
mCreateDebugDevice(false),
@@ -3657,7 +3659,12 @@
bool Renderer11::isES3Capable() const
{
return (d3d11_gl::GetMaximumClientVersion(mRenderer11DeviceCaps.featureLevel).major > 2);
-};
+}
+
+RendererClass Renderer11::getRendererClass() const
+{
+ return RENDERER_D3D11;
+}
void Renderer11::onSwap()
{
@@ -3680,7 +3687,7 @@
// Update the buffer CPU memory histogram
{
size_t sizeSum = 0;
- for (auto &buffer : mAliveBuffers)
+ for (const Buffer11 *buffer : mAliveBuffers)
{
sizeSum += buffer->getTotalCPUBufferMemoryBytes();
}
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
index 1b9cf10..c7ed4b3 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
@@ -45,6 +45,8 @@
struct Renderer11DeviceCaps
{
+ Renderer11DeviceCaps();
+
D3D_FEATURE_LEVEL featureLevel;
bool supportsDXGI1_2; // Support for DXGI 1.2
bool supportsClearView; // Support for ID3D11DeviceContext1::ClearView
@@ -112,7 +114,7 @@
{
public:
explicit Renderer11(egl::Display *display);
- virtual ~Renderer11();
+ ~Renderer11() override;
egl::Error initialize() override;
bool resetDevice() override;
@@ -371,7 +373,7 @@
bool isES3Capable() const;
const Renderer11DeviceCaps &getRenderer11DeviceCaps() const { return mRenderer11DeviceCaps; };
- RendererClass getRendererClass() const override { return RENDERER_D3D11; }
+ RendererClass getRendererClass() const override;
StateManager11 *getStateManager() { return &mStateManager; }
void onSwap();
diff --git a/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.h b/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.h
index c9a4b61..3f41757 100644
--- a/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/ShaderExecutable11.h
@@ -29,7 +29,7 @@
ShaderExecutable11(const void *function, size_t length, d3d11::GeometryShader &&executable);
ShaderExecutable11(const void *function, size_t length, d3d11::ComputeShader &&executable);
- virtual ~ShaderExecutable11();
+ ~ShaderExecutable11() override;
const d3d11::PixelShader &getPixelShader() const;
const d3d11::VertexShader &getVertexShader() const;
@@ -49,7 +49,7 @@
{
public:
UniformStorage11(size_t initialSize);
- virtual ~UniformStorage11();
+ ~UniformStorage11() override;
gl::Error getConstantBuffer(Renderer11 *renderer, const d3d11::Buffer **bufferOut);
diff --git a/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp b/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
index f0ba55a..c95a9f5 100644
--- a/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
@@ -181,6 +181,14 @@
// StateManager11::SRVCache Implementation.
+StateManager11::SRVCache::SRVCache() : mHighestUsedSRV(0)
+{
+}
+
+StateManager11::SRVCache::~SRVCache()
+{
+}
+
void StateManager11::SRVCache::update(size_t resourceIndex, ID3D11ShaderResourceView *srv)
{
ASSERT(resourceIndex < mCurrentSRVs.size());
@@ -230,6 +238,10 @@
{
}
+ShaderConstants11::~ShaderConstants11()
+{
+}
+
void ShaderConstants11::init(const gl::Caps &caps)
{
mSamplerMetadataVS.resize(caps.maxVertexTextureImageUnits);
@@ -623,7 +635,7 @@
if (record.srv != reinterpret_cast<uintptr_t>(srv))
{
- auto deviceContext = mRenderer->getDeviceContext();
+ ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
ID3D11ShaderResourceView *srvPtr = srv ? srv->get() : nullptr;
if (shaderType == gl::SAMPLER_VERTEX)
{
@@ -1524,7 +1536,7 @@
return gl::NoError();
}
- auto deviceContext = mRenderer->getDeviceContext();
+ ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
if (samplerType == gl::SAMPLER_VERTEX)
{
deviceContext->VSSetShaderResources(static_cast<unsigned int>(clearRange.low()),
@@ -1751,7 +1763,7 @@
const auto *attrib = &vertexAttributes[attribIndex];
const auto ¤tValue = glState.getVertexAttribCurrentValue(attribIndex);
- auto currentValueAttrib = &mCurrentValueAttribs[attribIndex];
+ TranslatedAttribute *currentValueAttrib = &mCurrentValueAttribs[attribIndex];
currentValueAttrib->currentValueType = currentValue.Type;
currentValueAttrib->attribute = attrib;
currentValueAttrib->binding = &vertexBindings[attrib->bindingIndex];
@@ -2477,8 +2489,8 @@
TranslatedIndexData *indexInfo)
{
const auto &state = context->getGLState();
- const auto &vertexArray = state.getVertexArray();
- auto *vertexArray11 = GetImplAs<VertexArray11>(vertexArray);
+ const gl::VertexArray *vertexArray = state.getVertexArray();
+ VertexArray11 *vertexArray11 = GetImplAs<VertexArray11>(vertexArray);
if (mVertexAttribsNeedTranslation)
{
diff --git a/src/libANGLE/renderer/d3d/d3d11/StateManager11.h b/src/libANGLE/renderer/d3d/d3d11/StateManager11.h
index 9b4a07c..431f341 100644
--- a/src/libANGLE/renderer/d3d/d3d11/StateManager11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/StateManager11.h
@@ -31,6 +31,7 @@
{
public:
ShaderConstants11();
+ ~ShaderConstants11();
void init(const gl::Caps &caps);
size_t getRequiredBufferSize(gl::SamplerType samplerType) const;
@@ -436,7 +437,8 @@
class SRVCache : angle::NonCopyable
{
public:
- SRVCache() : mHighestUsedSRV(0) {}
+ SRVCache();
+ ~SRVCache();
void initialize(size_t size) { mCurrentSRVs.resize(size); }
diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
index fcac8a6..19bcaae 100644
--- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
@@ -823,7 +823,7 @@
deviceContext->Unmap(mQuadVB.get(), 0);
- auto stateManager = mRenderer->getStateManager();
+ StateManager11 *stateManager = mRenderer->getStateManager();
constexpr UINT stride = sizeof(d3d11::PositionTexCoordVertex);
stateManager->setSingleVertexBuffer(&mQuadVB, stride, 0);
@@ -997,11 +997,26 @@
return mDepthStencilTexture;
}
+void *SwapChain11::getKeyedMutex()
+{
+ return mKeyedMutex;
+}
+
void SwapChain11::recreate()
{
// possibly should use this method instead of reset
}
+RenderTargetD3D *SwapChain11::getColorRenderTarget()
+{
+ return &mColorRenderTarget;
+}
+
+RenderTargetD3D *SwapChain11::getDepthStencilRenderTarget()
+{
+ return &mDepthStencilRenderTarget;
+}
+
egl::Error SwapChain11::getSyncValues(EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc)
{
if (!mSwapChain)
diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
index 51da989..5ce2af1 100644
--- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
@@ -29,7 +29,7 @@
GLenum depthBufferFormat,
EGLint orientation,
EGLint samples);
- virtual ~SwapChain11();
+ ~SwapChain11() override;
EGLint resize(const gl::Context *context,
EGLint backbufferWidth,
@@ -45,8 +45,8 @@
EGLint height) override;
void recreate() override;
- RenderTargetD3D *getColorRenderTarget() override { return &mColorRenderTarget; }
- RenderTargetD3D *getDepthStencilRenderTarget() override { return &mDepthStencilRenderTarget; }
+ RenderTargetD3D *getColorRenderTarget() override;
+ RenderTargetD3D *getDepthStencilRenderTarget() override;
const TextureHelper11 &getOffscreenTexture();
const d3d11::RenderTargetView &getRenderTarget();
@@ -58,7 +58,7 @@
EGLint getWidth() const { return mWidth; }
EGLint getHeight() const { return mHeight; }
- void *getKeyedMutex() override { return mKeyedMutex; }
+ void *getKeyedMutex() override;
EGLint getSamples() const { return mEGLSamples; }
egl::Error getSyncValues(EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc) override;
diff --git a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
index c0922f3..8f76d16 100644
--- a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
@@ -191,6 +191,12 @@
return std::max(static_cast<int>(mTextureDepth) >> mipLevel, 1);
}
+gl::Error TextureStorage11::getMippedResource(const gl::Context *context,
+ const TextureHelper11 **outResource)
+{
+ return getResource(context, outResource);
+}
+
UINT TextureStorage11::getSubresourceIndex(const gl::ImageIndex &index) const
{
UINT mipSlice = static_cast<UINT>(index.mipIndex + mTopLevel);
@@ -570,7 +576,7 @@
RenderTargetD3D *dest = nullptr;
ANGLE_TRY(getRenderTarget(context, destIndex, &dest));
- auto rt11 = GetAs<RenderTarget11>(source);
+ RenderTarget11 *rt11 = GetAs<RenderTarget11>(source);
const d3d11::SharedSRV &sourceSRV = rt11->getBlitShaderResourceView();
const d3d11::RenderTargetView &destRTV = rt11->getRenderTargetView();
diff --git a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h
index d3e3b3f..336aa49 100644
--- a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.h
@@ -111,10 +111,7 @@
// Some classes (e.g. TextureStorage11_2D) will override getMippedResource.
virtual gl::Error getMippedResource(const gl::Context *context,
- const TextureHelper11 **outResource)
- {
- return getResource(context, outResource);
- }
+ const TextureHelper11 **outResource);
virtual gl::Error getSwizzleTexture(const TextureHelper11 **outTexture) = 0;
virtual gl::Error getSwizzleRenderTarget(int mipLevel,
diff --git a/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp b/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
index b7395f9..4118e60 100644
--- a/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
@@ -32,6 +32,10 @@
}
}
+VertexArray11::~VertexArray11()
+{
+}
+
void VertexArray11::destroy(const gl::Context *context)
{
for (auto &buffer : mCurrentBuffers)
@@ -50,7 +54,7 @@
// Generate a state serial. This serial is used in the program class to validate the cached
// input layout, and skip recomputation in the fast path.
- auto renderer = GetImplAs<Context11>(context)->getRenderer();
+ Renderer11 *renderer = GetImplAs<Context11>(context)->getRenderer();
mCurrentStateSerial = renderer->generateSerial();
// TODO(jmadill): Individual attribute invalidation.
diff --git a/src/libANGLE/renderer/d3d/d3d11/VertexArray11.h b/src/libANGLE/renderer/d3d/d3d11/VertexArray11.h
index 69cde43..f9da64a 100644
--- a/src/libANGLE/renderer/d3d/d3d11/VertexArray11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/VertexArray11.h
@@ -22,6 +22,7 @@
{
public:
VertexArray11(const gl::VertexArrayState &data);
+ ~VertexArray11() override;
void destroy(const gl::Context *context) override;
void syncState(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
index 23aaba1..9c2a214 100644
--- a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
@@ -2129,6 +2129,19 @@
void *initData,
const char *name);
+LazyInputLayout::LazyInputLayout(const D3D11_INPUT_ELEMENT_DESC *inputDesc,
+ size_t inputDescLen,
+ const BYTE *byteCode,
+ size_t byteCodeLen,
+ const char *debugName)
+ : mInputDesc(inputDesc, inputDescLen), mByteCode(byteCode, byteCodeLen), mDebugName(debugName)
+{
+}
+
+LazyInputLayout::~LazyInputLayout()
+{
+}
+
gl::Error LazyInputLayout::resolve(Renderer11 *renderer)
{
return resolveImpl(renderer, mInputDesc, &mByteCode, mDebugName);
diff --git a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h
index e8eba66..d74cf5b 100644
--- a/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h
+++ b/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.h
@@ -242,16 +242,12 @@
class LazyInputLayout final : public LazyResource<ResourceType::InputLayout>
{
public:
- constexpr LazyInputLayout(const D3D11_INPUT_ELEMENT_DESC *inputDesc,
- size_t inputDescLen,
- const BYTE *byteCode,
- size_t byteCodeLen,
- const char *debugName)
- : mInputDesc(inputDesc, inputDescLen),
- mByteCode(byteCode, byteCodeLen),
- mDebugName(debugName)
- {
- }
+ LazyInputLayout(const D3D11_INPUT_ELEMENT_DESC *inputDesc,
+ size_t inputDescLen,
+ const BYTE *byteCode,
+ size_t byteCodeLen,
+ const char *debugName);
+ ~LazyInputLayout() override;
gl::Error resolve(Renderer11 *renderer) override;
@@ -266,7 +262,7 @@
public:
LazyBlendState(const D3D11_BLEND_DESC &desc, const char *debugName);
- gl::Error resolve(Renderer11 *renderer);
+ gl::Error resolve(Renderer11 *renderer) override;
private:
D3D11_BLEND_DESC mDesc;
@@ -332,7 +328,7 @@
TextureHelper11();
TextureHelper11(TextureHelper11 &&other);
TextureHelper11(const TextureHelper11 &other);
- ~TextureHelper11();
+ ~TextureHelper11() override;
TextureHelper11 &operator=(TextureHelper11 &&other);
TextureHelper11 &operator=(const TextureHelper11 &other);
@@ -350,7 +346,7 @@
std::swap(mData->manager, texture.mData->manager);
// Can't use std::swap because texture is typed, and here we use ID3D11Resource.
- auto temp = mData->object;
+ ID3D11Resource *temp = mData->object;
mData->object = texture.mData->object;
texture.mData->object = static_cast<ResourceT *>(temp);
diff --git a/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp b/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp
index 5160c38..dc308e7 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp
+++ b/src/libANGLE/renderer/d3d/d3d9/Buffer9.cpp
@@ -22,6 +22,16 @@
mSize = 0;
}
+size_t Buffer9::getSize() const
+{
+ return mSize;
+}
+
+bool Buffer9::supportsDirectBinding() const
+{
+ return false;
+}
+
gl::Error Buffer9::setData(const gl::Context *context,
gl::BufferBinding /*target*/,
const void *data,
diff --git a/src/libANGLE/renderer/d3d/d3d9/Buffer9.h b/src/libANGLE/renderer/d3d/d3d9/Buffer9.h
index ceb537c..960b2a2 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Buffer9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/Buffer9.h
@@ -21,11 +21,11 @@
{
public:
Buffer9(const gl::BufferState &state, Renderer9 *renderer);
- virtual ~Buffer9();
+ ~Buffer9() override;
// BufferD3D implementation
- size_t getSize() const override { return mSize; }
- bool supportsDirectBinding() const override { return false; }
+ size_t getSize() const override;
+ bool supportsDirectBinding() const override;
gl::Error getData(const gl::Context *context, const uint8_t **outData) override;
// BufferImpl implementation
diff --git a/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h b/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
index 883e8df..d2b4643 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
@@ -19,7 +19,7 @@
{
public:
Framebuffer9(const gl::FramebufferState &data, Renderer9 *renderer);
- virtual ~Framebuffer9();
+ ~Framebuffer9() override;
gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
gl::Error invalidate(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/d3d9/Image9.h b/src/libANGLE/renderer/d3d/d3d9/Image9.h
index 9021f10..01c60dc 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Image9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/Image9.h
@@ -26,7 +26,7 @@
{
public:
Image9(Renderer9 *renderer);
- ~Image9();
+ ~Image9() override;
static gl::Error generateMipmap(Image9 *dest, Image9 *source);
static gl::Error generateMip(IDirect3DSurface9 *destSurface, IDirect3DSurface9 *sourceSurface);
diff --git a/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.h b/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.h
index ba03ba7..5921d2a 100644
--- a/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/IndexBuffer9.h
@@ -19,18 +19,18 @@
{
public:
explicit IndexBuffer9(Renderer9 *const renderer);
- virtual ~IndexBuffer9();
+ ~IndexBuffer9() override;
- virtual gl::Error initialize(unsigned int bufferSize, GLenum indexType, bool dynamic);
+ gl::Error initialize(unsigned int bufferSize, GLenum indexType, bool dynamic) override;
- virtual gl::Error mapBuffer(unsigned int offset, unsigned int size, void** outMappedMemory);
- virtual gl::Error unmapBuffer();
+ gl::Error mapBuffer(unsigned int offset, unsigned int size, void **outMappedMemory) override;
+ gl::Error unmapBuffer() override;
- virtual GLenum getIndexType() const;
- virtual unsigned int getBufferSize() const;
- virtual gl::Error setSize(unsigned int bufferSize, GLenum indexType);
+ GLenum getIndexType() const override;
+ unsigned int getBufferSize() const override;
+ gl::Error setSize(unsigned int bufferSize, GLenum indexType) override;
- virtual gl::Error discard();
+ gl::Error discard() override;
D3DFORMAT getIndexFormat() const;
IDirect3DIndexBuffer9 *getBuffer() const;
diff --git a/src/libANGLE/renderer/d3d/d3d9/Query9.h b/src/libANGLE/renderer/d3d/d3d9/Query9.h
index 9d17711..6c7c22f 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Query9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/Query9.h
@@ -19,16 +19,16 @@
{
public:
Query9(Renderer9 *renderer, GLenum type);
- virtual ~Query9();
+ ~Query9() override;
- virtual gl::Error begin();
- virtual gl::Error end();
- virtual gl::Error queryCounter();
- virtual gl::Error getResult(GLint *params);
- virtual gl::Error getResult(GLuint *params);
- virtual gl::Error getResult(GLint64 *params);
- virtual gl::Error getResult(GLuint64 *params);
- virtual gl::Error isResultAvailable(bool *available);
+ gl::Error begin() override;
+ gl::Error end() override;
+ gl::Error queryCounter() override;
+ gl::Error getResult(GLint *params) override;
+ gl::Error getResult(GLuint *params) override;
+ gl::Error getResult(GLint64 *params) override;
+ gl::Error getResult(GLuint64 *params) override;
+ gl::Error isResultAvailable(bool *available) override;
private:
gl::Error testQuery();
diff --git a/src/libANGLE/renderer/d3d/d3d9/RenderTarget9.h b/src/libANGLE/renderer/d3d/d3d9/RenderTarget9.h
index f19c54d..bb3b5a4 100644
--- a/src/libANGLE/renderer/d3d/d3d9/RenderTarget9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/RenderTarget9.h
@@ -21,7 +21,7 @@
{
public:
RenderTarget9() { }
- virtual ~RenderTarget9() { }
+ ~RenderTarget9() override {}
// Retrieve the texture that backs this render target, may be null for swap chain render
// targets.
virtual IDirect3DBaseTexture9 *getTexture() const = 0;
@@ -43,7 +43,7 @@
GLsizei height,
GLsizei depth,
GLsizei samples);
- virtual ~TextureRenderTarget9();
+ ~TextureRenderTarget9() override;
GLsizei getWidth() const override;
GLsizei getHeight() const override;
@@ -74,7 +74,7 @@
{
public:
SurfaceRenderTarget9(SwapChain9 *swapChain, bool depth);
- virtual ~SurfaceRenderTarget9();
+ ~SurfaceRenderTarget9() override;
GLsizei getWidth() const override;
GLsizei getHeight() const override;
diff --git a/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
index 0ad01cb..51b6481 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
+++ b/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
@@ -1059,7 +1059,7 @@
// the sample counts that we set in render target view, here we use renderTarget->getSamples to
// get the actual samples.
GLsizei samples = 0;
- auto firstColorAttachment = framebuffer->getFirstColorbuffer();
+ const gl::FramebufferAttachment *firstColorAttachment = framebuffer->getFirstColorbuffer();
if (firstColorAttachment)
{
ASSERT(firstColorAttachment->isAttached());
@@ -1087,13 +1087,13 @@
gl::Error Renderer9::setBlendDepthRasterStates(const gl::Context *context, GLenum drawMode)
{
const auto &glState = context->getGLState();
- auto drawFramebuffer = glState.getDrawFramebuffer();
+ gl::Framebuffer *drawFramebuffer = glState.getDrawFramebuffer();
ASSERT(!drawFramebuffer->hasAnyDirtyBit());
// Since framebuffer->getSamples will return the original samples which may be different with
// the sample counts that we set in render target view, here we use renderTarget->getSamples to
// get the actual samples.
GLsizei samples = 0;
- auto firstColorAttachment = drawFramebuffer->getFirstColorbuffer();
+ const gl::FramebufferAttachment *firstColorAttachment = drawFramebuffer->getFirstColorbuffer();
if (firstColorAttachment)
{
ASSERT(firstColorAttachment->isAttached());
@@ -2892,6 +2892,11 @@
return gl::NoError();
}
+RendererClass Renderer9::getRendererClass() const
+{
+ return RENDERER_D3D9;
+}
+
ImageD3D *Renderer9::createImage()
{
return new Image9(this);
@@ -3230,6 +3235,11 @@
return gl::NoError();
}
+bool Renderer9::canSelectViewInVertexShader() const
+{
+ return false;
+}
+
// For each Direct3D sampler of either the pixel or vertex stage,
// looks up the corresponding OpenGL texture image unit and texture type,
// and sets the texture and its addressing/filtering state (or NULL when inactive).
diff --git a/src/libANGLE/renderer/d3d/d3d9/Renderer9.h b/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
index 777cc01..17ee277 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
@@ -67,7 +67,7 @@
{
public:
explicit Renderer9(egl::Display *display);
- virtual ~Renderer9();
+ ~Renderer9() override;
egl::Error initialize() override;
bool resetDevice() override;
@@ -353,7 +353,7 @@
IDirect3DSurface9 *source,
bool fromManaged);
- RendererClass getRendererClass() const override { return RENDERER_D3D9; }
+ RendererClass getRendererClass() const override;
D3DDEVTYPE getD3D9DeviceType() const { return mDeviceType; }
@@ -386,7 +386,7 @@
const float clearDepthValue,
const unsigned int clearStencilValue) override;
- bool canSelectViewInVertexShader() const override { return false; }
+ bool canSelectViewInVertexShader() const override;
private:
gl::Error drawArraysImpl(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/d3d9/ShaderExecutable9.h b/src/libANGLE/renderer/d3d/d3d9/ShaderExecutable9.h
index 382a68c..0b6b879 100644
--- a/src/libANGLE/renderer/d3d/d3d9/ShaderExecutable9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/ShaderExecutable9.h
@@ -20,7 +20,7 @@
public:
ShaderExecutable9(const void *function, size_t length, IDirect3DPixelShader9 *executable);
ShaderExecutable9(const void *function, size_t length, IDirect3DVertexShader9 *executable);
- virtual ~ShaderExecutable9();
+ ~ShaderExecutable9() override;
IDirect3DPixelShader9 *getPixelShader() const;
IDirect3DVertexShader9 *getVertexShader() const;
diff --git a/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp b/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp
index f9323ab..bc81aa1 100644
--- a/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp
+++ b/src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp
@@ -455,4 +455,13 @@
ASSERT(SUCCEEDED(result));
}
+RenderTargetD3D *SwapChain9::getColorRenderTarget()
+{
+ return &mColorRenderTarget;
+}
+
+RenderTargetD3D *SwapChain9::getDepthStencilRenderTarget()
+{
+ return &mDepthStencilRenderTarget;
+}
}
diff --git a/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h b/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h
index 288eec5..5753637 100644
--- a/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/SwapChain9.h
@@ -28,7 +28,7 @@
GLenum backBufferFormat,
GLenum depthBufferFormat,
EGLint orientation);
- virtual ~SwapChain9();
+ ~SwapChain9() override;
EGLint resize(const gl::Context *context, EGLint backbufferWidth, EGLint backbufferHeight)
override;
@@ -43,8 +43,8 @@
EGLint height) override;
void recreate() override;
- RenderTargetD3D *getColorRenderTarget() override { return &mColorRenderTarget; }
- RenderTargetD3D *getDepthStencilRenderTarget() override { return &mDepthStencilRenderTarget; }
+ RenderTargetD3D *getColorRenderTarget() override;
+ RenderTargetD3D *getDepthStencilRenderTarget() override;
virtual IDirect3DSurface9 *getRenderTarget();
virtual IDirect3DSurface9 *getDepthStencil();
diff --git a/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp b/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp
index bb4fff7..6404af6 100644
--- a/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp
+++ b/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.cpp
@@ -144,7 +144,7 @@
TextureStorage9_2D::~TextureStorage9_2D()
{
SafeRelease(mTexture);
- for (auto &renderTarget : mRenderTargets)
+ for (RenderTargetD3D *renderTarget : mRenderTargets)
{
SafeDelete(renderTarget);
}
diff --git a/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h b/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h
index 9ea7e48..2f51901 100644
--- a/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/TextureStorage9.h
@@ -25,7 +25,7 @@
class TextureStorage9 : public TextureStorage
{
public:
- virtual ~TextureStorage9();
+ ~TextureStorage9() override;
static DWORD GetTextureUsage(GLenum internalformat, bool renderTarget);
@@ -127,7 +127,7 @@
{
public:
TextureStorage9_Cube(Renderer9 *renderer, GLenum internalformat, bool renderTarget, int size, int levels, bool hintLevelZeroOnly);
- virtual ~TextureStorage9_Cube();
+ ~TextureStorage9_Cube() override;
gl::Error getSurfaceLevel(const gl::Context *context,
GLenum target,
diff --git a/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h b/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h
index 08c40e8..0f4410b 100644
--- a/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h
@@ -23,12 +23,8 @@
public:
VertexArray9(const gl::VertexArrayState &data) : VertexArrayImpl(data) {}
- void syncState(const gl::Context *context, const gl::VertexArray::DirtyBits &dirtyBits) override
- {
- ASSERT(dirtyBits.any());
- Renderer9 *renderer = GetImplAs<Context9>(context)->getRenderer();
- mCurrentStateSerial = renderer->generateSerial();
- }
+ void syncState(const gl::Context *context,
+ const gl::VertexArray::DirtyBits &dirtyBits) override;
~VertexArray9() override {}
@@ -38,6 +34,13 @@
Serial mCurrentStateSerial;
};
+inline void VertexArray9::syncState(const gl::Context *context,
+ const gl::VertexArray::DirtyBits &dirtyBits)
+{
+ ASSERT(dirtyBits.any());
+ Renderer9 *renderer = GetImplAs<Context9>(context)->getRenderer();
+ mCurrentStateSerial = renderer->generateSerial();
+}
}
#endif // LIBANGLE_RENDERER_D3D_D3D9_VERTEXARRAY9_H_
diff --git a/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp b/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp
index 08c26e7..d10fa1e 100644
--- a/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp
+++ b/src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp
@@ -30,7 +30,7 @@
// A map to determine the pixel size and mip generation function of a given D3D format
typedef std::map<D3DFORMAT, D3DFormat> D3D9FormatInfoMap;
-constexpr D3DFormat::D3DFormat()
+D3DFormat::D3DFormat()
: pixelBytes(0),
blockWidth(0),
blockHeight(0),
@@ -45,17 +45,17 @@
{
}
-constexpr D3DFormat::D3DFormat(GLuint bits,
- GLuint blockWidth,
- GLuint blockHeight,
- GLuint redBits,
- GLuint greenBits,
- GLuint blueBits,
- GLuint alphaBits,
- GLuint lumBits,
- GLuint depthBits,
- GLuint stencilBits,
- Format::ID formatID)
+D3DFormat::D3DFormat(GLuint bits,
+ GLuint blockWidth,
+ GLuint blockHeight,
+ GLuint redBits,
+ GLuint greenBits,
+ GLuint blueBits,
+ GLuint alphaBits,
+ GLuint lumBits,
+ GLuint depthBits,
+ GLuint stencilBits,
+ Format::ID formatID)
: pixelBytes(bits / 8),
blockWidth(blockWidth),
blockHeight(blockHeight),
@@ -74,14 +74,13 @@
{
if (format == D3DFMT_NULL)
{
- static constexpr D3DFormat info(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE);
+ static const D3DFormat info(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE);
return info;
}
if (format == D3DFMT_INTZ)
{
- static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 8,
- Format::ID::D24_UNORM_S8_UINT);
+ static const D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 8, Format::ID::D24_UNORM_S8_UINT);
return info;
}
@@ -89,136 +88,129 @@
{
case D3DFMT_UNKNOWN:
{
- static constexpr D3DFormat info(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE);
+ static const D3DFormat info(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Format::ID::NONE);
return info;
}
case D3DFMT_L8:
{
- static constexpr D3DFormat info(8, 1, 1, 0, 0, 0, 0, 8, 0, 0, Format::ID::L8_UNORM);
+ static const D3DFormat info(8, 1, 1, 0, 0, 0, 0, 8, 0, 0, Format::ID::L8_UNORM);
return info;
}
case D3DFMT_A8:
{
- static constexpr D3DFormat info(8, 1, 1, 0, 0, 0, 8, 0, 0, 0, Format::ID::A8_UNORM);
+ static const D3DFormat info(8, 1, 1, 0, 0, 0, 8, 0, 0, 0, Format::ID::A8_UNORM);
return info;
}
case D3DFMT_A8L8:
{
- static constexpr D3DFormat info(16, 1, 1, 0, 0, 0, 8, 8, 0, 0, Format::ID::L8A8_UNORM);
+ static const D3DFormat info(16, 1, 1, 0, 0, 0, 8, 8, 0, 0, Format::ID::L8A8_UNORM);
return info;
}
case D3DFMT_A4R4G4B4:
{
- static constexpr D3DFormat info(16, 1, 1, 4, 4, 4, 4, 0, 0, 0,
- Format::ID::B4G4R4A4_UNORM);
+ static const D3DFormat info(16, 1, 1, 4, 4, 4, 4, 0, 0, 0, Format::ID::B4G4R4A4_UNORM);
return info;
}
case D3DFMT_A1R5G5B5:
{
- static constexpr D3DFormat info(16, 1, 1, 5, 5, 5, 1, 0, 0, 0,
- Format::ID::B5G5R5A1_UNORM);
+ static const D3DFormat info(16, 1, 1, 5, 5, 5, 1, 0, 0, 0, Format::ID::B5G5R5A1_UNORM);
return info;
}
case D3DFMT_R5G6B5:
{
- static constexpr D3DFormat info(16, 1, 1, 5, 6, 5, 0, 0, 0, 0,
- Format::ID::R5G6B5_UNORM);
+ static const D3DFormat info(16, 1, 1, 5, 6, 5, 0, 0, 0, 0, Format::ID::R5G6B5_UNORM);
return info;
}
case D3DFMT_X8R8G8B8:
{
- static constexpr D3DFormat info(32, 1, 1, 8, 8, 8, 0, 0, 0, 0,
- Format::ID::B8G8R8X8_UNORM);
+ static const D3DFormat info(32, 1, 1, 8, 8, 8, 0, 0, 0, 0, Format::ID::B8G8R8X8_UNORM);
return info;
}
case D3DFMT_A8R8G8B8:
{
- static constexpr D3DFormat info(32, 1, 1, 8, 8, 8, 8, 0, 0, 0,
- Format::ID::B8G8R8A8_UNORM);
+ static const D3DFormat info(32, 1, 1, 8, 8, 8, 8, 0, 0, 0, Format::ID::B8G8R8A8_UNORM);
return info;
}
case D3DFMT_R16F:
{
- static constexpr D3DFormat info(16, 1, 1, 16, 0, 0, 0, 0, 0, 0, Format::ID::R16_FLOAT);
+ static const D3DFormat info(16, 1, 1, 16, 0, 0, 0, 0, 0, 0, Format::ID::R16_FLOAT);
return info;
}
case D3DFMT_G16R16F:
{
- static constexpr D3DFormat info(32, 1, 1, 16, 16, 0, 0, 0, 0, 0,
- Format::ID::R16G16_FLOAT);
+ static const D3DFormat info(32, 1, 1, 16, 16, 0, 0, 0, 0, 0, Format::ID::R16G16_FLOAT);
return info;
}
case D3DFMT_A16B16G16R16F:
{
- static constexpr D3DFormat info(64, 1, 1, 16, 16, 16, 16, 0, 0, 0,
- Format::ID::R16G16B16A16_FLOAT);
+ static const D3DFormat info(64, 1, 1, 16, 16, 16, 16, 0, 0, 0,
+ Format::ID::R16G16B16A16_FLOAT);
return info;
}
case D3DFMT_R32F:
{
- static constexpr D3DFormat info(32, 1, 1, 32, 0, 0, 0, 0, 0, 0, Format::ID::R32_FLOAT);
+ static const D3DFormat info(32, 1, 1, 32, 0, 0, 0, 0, 0, 0, Format::ID::R32_FLOAT);
return info;
}
case D3DFMT_G32R32F:
{
- static constexpr D3DFormat info(64, 1, 1, 32, 32, 0, 0, 0, 0, 0,
- Format::ID::R32G32_FLOAT);
+ static const D3DFormat info(64, 1, 1, 32, 32, 0, 0, 0, 0, 0, Format::ID::R32G32_FLOAT);
return info;
}
case D3DFMT_A32B32G32R32F:
{
- static constexpr D3DFormat info(128, 1, 1, 32, 32, 32, 32, 0, 0, 0,
- Format::ID::R32G32B32A32_FLOAT);
+ static const D3DFormat info(128, 1, 1, 32, 32, 32, 32, 0, 0, 0,
+ Format::ID::R32G32B32A32_FLOAT);
return info;
}
case D3DFMT_D16:
{
- static constexpr D3DFormat info(16, 1, 1, 0, 0, 0, 0, 0, 16, 0, Format::ID::D16_UNORM);
+ static const D3DFormat info(16, 1, 1, 0, 0, 0, 0, 0, 16, 0, Format::ID::D16_UNORM);
return info;
}
case D3DFMT_D24S8:
{
- static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 8,
- Format::ID::D24_UNORM_S8_UINT);
+ static const D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 8,
+ Format::ID::D24_UNORM_S8_UINT);
return info;
}
case D3DFMT_D24X8:
{
- static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 0, Format::ID::D16_UNORM);
+ static const D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 24, 0, Format::ID::D16_UNORM);
return info;
}
case D3DFMT_D32:
{
- static constexpr D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 32, 0, Format::ID::D32_UNORM);
+ static const D3DFormat info(32, 1, 1, 0, 0, 0, 0, 0, 32, 0, Format::ID::D32_UNORM);
return info;
}
case D3DFMT_DXT1:
{
- static constexpr D3DFormat info(64, 4, 4, 0, 0, 0, 0, 0, 0, 0,
- Format::ID::BC1_RGBA_UNORM_BLOCK);
+ static const D3DFormat info(64, 4, 4, 0, 0, 0, 0, 0, 0, 0,
+ Format::ID::BC1_RGBA_UNORM_BLOCK);
return info;
}
case D3DFMT_DXT3:
{
- static constexpr D3DFormat info(128, 4, 4, 0, 0, 0, 0, 0, 0, 0,
- Format::ID::BC2_RGBA_UNORM_BLOCK);
+ static const D3DFormat info(128, 4, 4, 0, 0, 0, 0, 0, 0, 0,
+ Format::ID::BC2_RGBA_UNORM_BLOCK);
return info;
}
case D3DFMT_DXT5:
{
- static constexpr D3DFormat info(128, 4, 4, 0, 0, 0, 0, 0, 0, 0,
- Format::ID::BC3_RGBA_UNORM_BLOCK);
+ static const D3DFormat info(128, 4, 4, 0, 0, 0, 0, 0, 0, 0,
+ Format::ID::BC3_RGBA_UNORM_BLOCK);
return info;
}
default:
{
- static constexpr D3DFormat defaultInfo;
+ static const D3DFormat defaultInfo;
return defaultInfo;
}
}
diff --git a/src/libANGLE/renderer/d3d/d3d9/formatutils9.h b/src/libANGLE/renderer/d3d/d3d9/formatutils9.h
index 828252d..1bef320 100644
--- a/src/libANGLE/renderer/d3d/d3d9/formatutils9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/formatutils9.h
@@ -29,18 +29,18 @@
struct D3DFormat
{
- constexpr D3DFormat();
- constexpr D3DFormat(GLuint pixelBytes,
- GLuint blockWidth,
- GLuint blockHeight,
- GLuint redBits,
- GLuint greenBits,
- GLuint blueBits,
- GLuint alphaBits,
- GLuint luminanceBits,
- GLuint depthBits,
- GLuint stencilBits,
- angle::Format::ID formatID);
+ D3DFormat();
+ D3DFormat(GLuint pixelBytes,
+ GLuint blockWidth,
+ GLuint blockHeight,
+ GLuint redBits,
+ GLuint greenBits,
+ GLuint blueBits,
+ GLuint alphaBits,
+ GLuint luminanceBits,
+ GLuint depthBits,
+ GLuint stencilBits,
+ angle::Format::ID formatID);
const angle::Format &info() const { return angle::Format::Get(formatID); }
diff --git a/src/libANGLE/renderer/gl/ClearMultiviewGL.cpp b/src/libANGLE/renderer/gl/ClearMultiviewGL.cpp
index 0c9a3ba..fb32978 100644
--- a/src/libANGLE/renderer/gl/ClearMultiviewGL.cpp
+++ b/src/libANGLE/renderer/gl/ClearMultiviewGL.cpp
@@ -40,7 +40,7 @@
GLfloat depth,
GLint stencil)
{
- const auto &firstAttachment = state.getFirstNonNullAttachment();
+ const gl::FramebufferAttachment *firstAttachment = state.getFirstNonNullAttachment();
switch (firstAttachment->getMultiviewLayout())
{
case GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE:
@@ -69,7 +69,7 @@
mStateManager->bindFramebuffer(GL_DRAW_FRAMEBUFFER, mFramebuffer);
- const auto &firstAttachment = state.getFirstNonNullAttachment();
+ const gl::FramebufferAttachment *firstAttachment = state.getFirstNonNullAttachment();
ASSERT(firstAttachment->getMultiviewLayout() == GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE);
const auto &drawBuffers = state.getDrawBufferStates();
@@ -97,7 +97,7 @@
GLfloat depth,
GLint stencil)
{
- const auto &firstAttachment = state.getFirstNonNullAttachment();
+ const gl::FramebufferAttachment *firstAttachment = state.getFirstNonNullAttachment();
ASSERT(firstAttachment->getMultiviewLayout() == GL_FRAMEBUFFER_MULTIVIEW_SIDE_BY_SIDE_ANGLE);
const auto &viewportOffsets = firstAttachment->getMultiviewViewportOffsets();
@@ -147,7 +147,7 @@
{
for (auto drawBufferId : state.getEnabledDrawBuffers())
{
- const auto &attachment = state.getColorAttachment(drawBufferId);
+ const gl::FramebufferAttachment *attachment = state.getColorAttachment(drawBufferId);
if (attachment == nullptr)
{
continue;
@@ -163,9 +163,9 @@
textureGL->getTextureID(), imageIndex.mipIndex, layer);
}
- const auto &depthStencilAttachment = state.getDepthStencilAttachment();
- const auto &depthAttachment = state.getDepthAttachment();
- const auto &stencilAttachment = state.getStencilAttachment();
+ const gl::FramebufferAttachment *depthStencilAttachment = state.getDepthStencilAttachment();
+ const gl::FramebufferAttachment *depthAttachment = state.getDepthAttachment();
+ const gl::FramebufferAttachment *stencilAttachment = state.getStencilAttachment();
if (depthStencilAttachment != nullptr)
{
const auto &imageIndex = depthStencilAttachment->getTextureImageIndex();
@@ -199,7 +199,7 @@
{
for (auto drawBufferId : state.getEnabledDrawBuffers())
{
- const auto &attachment = state.getColorAttachment(drawBufferId);
+ const gl::FramebufferAttachment *attachment = state.getColorAttachment(drawBufferId);
if (attachment == nullptr)
{
continue;
@@ -210,9 +210,9 @@
mFunctions->framebufferTextureLayer(GL_DRAW_FRAMEBUFFER, colorAttachment, 0, 0, 0);
}
- const auto &depthStencilAttachment = state.getDepthStencilAttachment();
- const auto &depthAttachment = state.getDepthAttachment();
- const auto &stencilAttachment = state.getStencilAttachment();
+ const gl::FramebufferAttachment *depthStencilAttachment = state.getDepthStencilAttachment();
+ const gl::FramebufferAttachment *depthAttachment = state.getDepthAttachment();
+ const gl::FramebufferAttachment *stencilAttachment = state.getStencilAttachment();
if (depthStencilAttachment != nullptr)
{
mFunctions->framebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, 0, 0,
diff --git a/src/libANGLE/renderer/gl/CompilerGL.cpp b/src/libANGLE/renderer/gl/CompilerGL.cpp
index 71be156..7e643f9 100644
--- a/src/libANGLE/renderer/gl/CompilerGL.cpp
+++ b/src/libANGLE/renderer/gl/CompilerGL.cpp
@@ -88,4 +88,14 @@
{
}
+gl::Error CompilerGL::release()
+{
+ return gl::NoError();
+}
+
+ShShaderOutput CompilerGL::getTranslatorOutputType() const
+{
+ return mTranslatorOutputType;
+}
+
} // namespace rx
diff --git a/src/libANGLE/renderer/gl/CompilerGL.h b/src/libANGLE/renderer/gl/CompilerGL.h
index 4c4104f..22e101b 100644
--- a/src/libANGLE/renderer/gl/CompilerGL.h
+++ b/src/libANGLE/renderer/gl/CompilerGL.h
@@ -21,8 +21,8 @@
CompilerGL(const FunctionsGL *functions);
~CompilerGL() override {}
- gl::Error release() override { return gl::NoError(); }
- ShShaderOutput getTranslatorOutputType() const override { return mTranslatorOutputType; }
+ gl::Error release() override;
+ ShShaderOutput getTranslatorOutputType() const override;
private:
ShShaderOutput mTranslatorOutputType;
diff --git a/src/libANGLE/renderer/gl/FunctionsGL.h b/src/libANGLE/renderer/gl/FunctionsGL.h
index ea4b948..77047c4 100644
--- a/src/libANGLE/renderer/gl/FunctionsGL.h
+++ b/src/libANGLE/renderer/gl/FunctionsGL.h
@@ -33,7 +33,7 @@
{
public:
FunctionsGL();
- virtual ~FunctionsGL();
+ ~FunctionsGL() override;
void initialize(const egl::AttributeMap &displayAttributes);
@@ -53,7 +53,7 @@
bool hasGLESExtension(const std::string &ext) const;
private:
- virtual void *loadProcAddress(const std::string &function) const = 0;
+ void *loadProcAddress(const std::string &function) const override = 0;
void initializeDummyFunctionsForNULLDriver(const std::set<std::string> &extensionSet);
};
diff --git a/src/libANGLE/renderer/gl/PathGL.h b/src/libANGLE/renderer/gl/PathGL.h
index 461d39a..74939d4 100644
--- a/src/libANGLE/renderer/gl/PathGL.h
+++ b/src/libANGLE/renderer/gl/PathGL.h
@@ -21,7 +21,7 @@
{
public:
PathGL(const FunctionsGL *functions, GLuint path);
- ~PathGL();
+ ~PathGL() override;
gl::Error setCommands(GLsizei numCommands,
const GLubyte *commands,
diff --git a/src/libANGLE/renderer/gl/QueryGL.cpp b/src/libANGLE/renderer/gl/QueryGL.cpp
index 9868724..ddbf2f8 100644
--- a/src/libANGLE/renderer/gl/QueryGL.cpp
+++ b/src/libANGLE/renderer/gl/QueryGL.cpp
@@ -245,7 +245,7 @@
mSync = mFunctions->fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
}
- virtual ~SyncProviderGLSync() { mFunctions->deleteSync(mSync); }
+ ~SyncProviderGLSync() override { mFunctions->deleteSync(mSync); }
gl::Error flush(bool force, bool *finished) override
{
@@ -284,7 +284,7 @@
ANGLE_SWALLOW_ERR(stateManager->resumeQuery(queryType));
}
- virtual ~SyncProviderGLQuery() { mFunctions->deleteQueries(1, &mQuery); }
+ ~SyncProviderGLQuery() override { mFunctions->deleteQueries(1, &mQuery); }
gl::Error flush(bool force, bool *finished) override
{
diff --git a/src/libANGLE/renderer/gl/RenderbufferGL.h b/src/libANGLE/renderer/gl/RenderbufferGL.h
index 2f11b39..7aafec6 100644
--- a/src/libANGLE/renderer/gl/RenderbufferGL.h
+++ b/src/libANGLE/renderer/gl/RenderbufferGL.h
@@ -32,17 +32,16 @@
const gl::TextureCapsMap &textureCaps);
~RenderbufferGL() override;
- virtual gl::Error setStorage(const gl::Context *context,
- GLenum internalformat,
- size_t width,
- size_t height) override;
- virtual gl::Error setStorageMultisample(const gl::Context *context,
- size_t samples,
- GLenum internalformat,
- size_t width,
- size_t height) override;
- virtual gl::Error setStorageEGLImageTarget(const gl::Context *context,
- egl::Image *image) override;
+ gl::Error setStorage(const gl::Context *context,
+ GLenum internalformat,
+ size_t width,
+ size_t height) override;
+ gl::Error setStorageMultisample(const gl::Context *context,
+ size_t samples,
+ GLenum internalformat,
+ size_t width,
+ size_t height) override;
+ gl::Error setStorageEGLImageTarget(const gl::Context *context, egl::Image *image) override;
gl::Error initializeContents(const gl::Context *context,
const gl::ImageIndex &imageIndex) override;
diff --git a/src/libANGLE/renderer/gl/StateManagerGL.cpp b/src/libANGLE/renderer/gl/StateManagerGL.cpp
index 98bf942..f35ef05 100644
--- a/src/libANGLE/renderer/gl/StateManagerGL.cpp
+++ b/src/libANGLE/renderer/gl/StateManagerGL.cpp
@@ -210,6 +210,10 @@
angle::Matrix<GLfloat>::setToIdentity(mPathMatrixMV);
}
+StateManagerGL::~StateManagerGL()
+{
+}
+
void StateManagerGL::deleteProgram(GLuint program)
{
if (program != 0)
diff --git a/src/libANGLE/renderer/gl/StateManagerGL.h b/src/libANGLE/renderer/gl/StateManagerGL.h
index c3a3a5e..9153067 100644
--- a/src/libANGLE/renderer/gl/StateManagerGL.h
+++ b/src/libANGLE/renderer/gl/StateManagerGL.h
@@ -40,6 +40,7 @@
StateManagerGL(const FunctionsGL *functions,
const gl::Caps &rendererCaps,
const gl::Extensions &extensions);
+ ~StateManagerGL();
void deleteProgram(GLuint program);
void deleteVertexArray(GLuint vao);
diff --git a/src/libANGLE/renderer/gl/VertexArrayGL.cpp b/src/libANGLE/renderer/gl/VertexArrayGL.cpp
index 6dc1fe1..512baa5 100644
--- a/src/libANGLE/renderer/gl/VertexArrayGL.cpp
+++ b/src/libANGLE/renderer/gl/VertexArrayGL.cpp
@@ -83,6 +83,10 @@
}
}
+VertexArrayGL::~VertexArrayGL()
+{
+}
+
void VertexArrayGL::destroy(const gl::Context *context)
{
mStateManager->deleteVertexArray(mVertexArrayID);
diff --git a/src/libANGLE/renderer/gl/VertexArrayGL.h b/src/libANGLE/renderer/gl/VertexArrayGL.h
index 6158099..7010d69 100644
--- a/src/libANGLE/renderer/gl/VertexArrayGL.h
+++ b/src/libANGLE/renderer/gl/VertexArrayGL.h
@@ -23,6 +23,8 @@
VertexArrayGL(const gl::VertexArrayState &data,
const FunctionsGL *functions,
StateManagerGL *stateManager);
+ ~VertexArrayGL() override;
+
void destroy(const gl::Context *context) override;
gl::Error syncDrawArraysState(const gl::Context *context,
diff --git a/src/libANGLE/renderer/gl/WorkaroundsGL.h b/src/libANGLE/renderer/gl/WorkaroundsGL.h
index b6cc626..ab50022 100644
--- a/src/libANGLE/renderer/gl/WorkaroundsGL.h
+++ b/src/libANGLE/renderer/gl/WorkaroundsGL.h
@@ -14,6 +14,8 @@
struct WorkaroundsGL
{
+ WorkaroundsGL();
+
// When writing a float to a normalized integer framebuffer, desktop OpenGL is allowed to write
// one of the two closest normalized integer representations (although round to nearest is
// preferred) (see section 2.3.5.2 of the GL 4.5 core specification). OpenGL ES requires that
@@ -142,6 +144,9 @@
// On some Android devices for loops used to initialize variables hit native GLSL compiler bugs.
bool dontUseLoopsToInitializeVariables = false;
};
+
+inline WorkaroundsGL::WorkaroundsGL() = default;
+
} // namespace rx
#endif // LIBANGLE_RENDERER_GL_WORKAROUNDSGL_H_
diff --git a/src/libANGLE/renderer/gl/formatutilsgl.cpp b/src/libANGLE/renderer/gl/formatutilsgl.cpp
index 180e0a7..1829d46 100644
--- a/src/libANGLE/renderer/gl/formatutilsgl.cpp
+++ b/src/libANGLE/renderer/gl/formatutilsgl.cpp
@@ -27,6 +27,12 @@
{
}
+SupportRequirement::SupportRequirement(const SupportRequirement &other) = default;
+
+SupportRequirement::~SupportRequirement()
+{
+}
+
InternalFormat::InternalFormat()
: texture(),
filter(),
@@ -35,6 +41,12 @@
{
}
+InternalFormat::InternalFormat(const InternalFormat &other) = default;
+
+InternalFormat::~InternalFormat()
+{
+}
+
// supported = version || vertexExt
static inline SupportRequirement VersionOrExts(GLuint major, GLuint minor, const std::string &versionExt)
{
diff --git a/src/libANGLE/renderer/gl/formatutilsgl.h b/src/libANGLE/renderer/gl/formatutilsgl.h
index 616f37a..b83e9bb 100644
--- a/src/libANGLE/renderer/gl/formatutilsgl.h
+++ b/src/libANGLE/renderer/gl/formatutilsgl.h
@@ -28,6 +28,8 @@
struct SupportRequirement
{
SupportRequirement();
+ SupportRequirement(const SupportRequirement &other);
+ ~SupportRequirement();
// Version that this format became supported without extensions
gl::Version version;
@@ -42,6 +44,8 @@
struct InternalFormat
{
InternalFormat();
+ InternalFormat(const InternalFormat &other);
+ ~InternalFormat();
SupportRequirement texture;
SupportRequirement filter;
diff --git a/src/libANGLE/renderer/gl/wgl/FunctionsWGL.cpp b/src/libANGLE/renderer/gl/wgl/FunctionsWGL.cpp
index 2cfe6e9..b3a9473 100644
--- a/src/libANGLE/renderer/gl/wgl/FunctionsWGL.cpp
+++ b/src/libANGLE/renderer/gl/wgl/FunctionsWGL.cpp
@@ -97,6 +97,10 @@
{
}
+FunctionsWGL::~FunctionsWGL()
+{
+}
+
void FunctionsWGL::initialize(HMODULE glModule, HDC context)
{
// First grab the wglGetProcAddress function from the gl module
diff --git a/src/libANGLE/renderer/gl/wgl/FunctionsWGL.h b/src/libANGLE/renderer/gl/wgl/FunctionsWGL.h
index 30cf9eb..9f09f62 100644
--- a/src/libANGLE/renderer/gl/wgl/FunctionsWGL.h
+++ b/src/libANGLE/renderer/gl/wgl/FunctionsWGL.h
@@ -19,6 +19,7 @@
{
public:
FunctionsWGL();
+ ~FunctionsWGL();
// Loads all available wgl functions, may be called multiple times
void initialize(HMODULE glModule, HDC context);
diff --git a/src/libANGLE/renderer/vulkan/BufferVk.cpp b/src/libANGLE/renderer/vulkan/BufferVk.cpp
index fb828c8..4b35e0f 100644
--- a/src/libANGLE/renderer/vulkan/BufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/BufferVk.cpp
@@ -47,7 +47,7 @@
gl::BufferUsage usage)
{
ContextVk *contextVk = vk::GetImpl(context);
- auto device = contextVk->getDevice();
+ VkDevice device = contextVk->getDevice();
if (size > mCurrentRequiredSize)
{
diff --git a/src/libANGLE/renderer/vulkan/ContextVk.cpp b/src/libANGLE/renderer/vulkan/ContextVk.cpp
index 6972e6f..0ba2082 100644
--- a/src/libANGLE/renderer/vulkan/ContextVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ContextVk.cpp
@@ -255,9 +255,9 @@
VkDevice device = mRenderer->getDevice();
const auto &state = mState.getState();
- const auto &programGL = state.getProgram();
- const auto &vao = state.getVertexArray();
- const auto *drawFBO = state.getDrawFramebuffer();
+ const gl::Program *programGL = state.getProgram();
+ const gl::VertexArray *vao = state.getVertexArray();
+ const gl::Framebuffer *drawFBO = state.getDrawFramebuffer();
ProgramVk *programVk = vk::GetImpl(programGL);
FramebufferVk *vkFBO = vk::GetImpl(drawFBO);
VertexArrayVk *vkVAO = vk::GetImpl(vao);
@@ -308,9 +308,9 @@
}
const auto &state = mState.getState();
- const auto &programGL = state.getProgram();
+ const gl::Program *programGL = state.getProgram();
ProgramVk *programVk = vk::GetImpl(programGL);
- const auto &vao = state.getVertexArray();
+ const gl::VertexArray *vao = state.getVertexArray();
VertexArrayVk *vkVAO = vk::GetImpl(vao);
const auto *drawFBO = state.getDrawFramebuffer();
FramebufferVk *vkFBO = vk::GetImpl(drawFBO);
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
index 01d11a3..c102ae9 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
@@ -134,6 +134,10 @@
{
}
+ProgramVk::DefaultUniformBlock::~DefaultUniformBlock()
+{
+}
+
ProgramVk::ProgramVk(const gl::ProgramState &state)
: ProgramImpl(state), mDefaultUniformBlocks(), mDescriptorSetOffset(0), mDirtyTextures(true)
{
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.h b/src/libANGLE/renderer/vulkan/ProgramVk.h
index aa382dd..4da6d38 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.h
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.h
@@ -135,6 +135,7 @@
struct DefaultUniformBlock final : private angle::NonCopyable
{
DefaultUniformBlock();
+ ~DefaultUniformBlock();
vk::BufferAndMemory storage;
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 7289f0d..f98f242 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -41,7 +41,7 @@
extensionNames.insert(extensionProp.extensionName);
}
- for (const auto &extensionName : enabledExtensionNames)
+ for (const char *extensionName : enabledExtensionNames)
{
if (extensionNames.count(extensionName) == 0)
{
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
index 76b5290..ed2ed95 100644
--- a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
@@ -157,6 +157,10 @@
return gl::NoError();
}
+WindowSurfaceVk::SwapchainImage::SwapchainImage() = default;
+WindowSurfaceVk::SwapchainImage::SwapchainImage(WindowSurfaceVk::SwapchainImage &&other) = default;
+WindowSurfaceVk::SwapchainImage::~SwapchainImage() = default;
+
WindowSurfaceVk::WindowSurfaceVk(const egl::SurfaceState &surfaceState,
EGLNativeWindowType window,
EGLint width,
@@ -230,7 +234,7 @@
uint32_t presentQueue = 0;
ANGLE_TRY_RESULT(renderer->selectPresentQueueForSurface(mSurface), presentQueue);
- const auto &physicalDevice = renderer->getPhysicalDevice();
+ const VkPhysicalDevice &physicalDevice = renderer->getPhysicalDevice();
VkSurfaceCapabilitiesKHR surfaceCaps;
ANGLE_VK_TRY(vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, mSurface, &surfaceCaps));
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.h b/src/libANGLE/renderer/vulkan/SurfaceVk.h
index 0388f0d..531f5ea 100644
--- a/src/libANGLE/renderer/vulkan/SurfaceVk.h
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.h
@@ -129,6 +129,10 @@
struct SwapchainImage
{
+ SwapchainImage();
+ SwapchainImage(SwapchainImage &&other);
+ ~SwapchainImage();
+
vk::Image image;
vk::ImageView imageView;
vk::Framebuffer framebuffer;
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
index 02c24ad..eab9749 100644
--- a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
@@ -29,6 +29,10 @@
mCurrentVertexAttribDescs.reserve(state.getMaxAttribs());
}
+VertexArrayVk::~VertexArrayVk()
+{
+}
+
void VertexArrayVk::destroy(const gl::Context *context)
{
}
@@ -40,7 +44,7 @@
// Invalidate current pipeline.
// TODO(jmadill): Use pipeline cache.
- auto contextVk = vk::GetImpl(context);
+ ContextVk *contextVk = vk::GetImpl(context);
contextVk->invalidateCurrentPipeline();
// Invalidate the vertex descriptions.
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.h b/src/libANGLE/renderer/vulkan/VertexArrayVk.h
index b103d06..1c70abe 100644
--- a/src/libANGLE/renderer/vulkan/VertexArrayVk.h
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.h
@@ -21,6 +21,8 @@
{
public:
VertexArrayVk(const gl::VertexArrayState &state);
+ ~VertexArrayVk() override;
+
void destroy(const gl::Context *context) override;
void syncState(const gl::Context *context,
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 21edfd9..dda8027 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -2361,7 +2361,7 @@
}
const auto &state = context->getGLState();
- auto readFramebuffer = state.getReadFramebuffer();
+ Framebuffer *readFramebuffer = state.getReadFramebuffer();
if (readFramebuffer->checkStatus(context) != GL_FRAMEBUFFER_COMPLETE)
{
context->handleError(InvalidFramebufferOperation());
@@ -5154,7 +5154,7 @@
return false;
}
- auto readFramebuffer = context->getGLState().getReadFramebuffer();
+ Framebuffer *readFramebuffer = context->getGLState().getReadFramebuffer();
if (readFramebuffer->checkStatus(context) != GL_FRAMEBUFFER_COMPLETE)
{
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index cd835b3..5e505aa 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2533,7 +2533,7 @@
bool ValidateClear(ValidationContext *context, GLbitfield mask)
{
- auto fbo = context->getGLState().getDrawFramebuffer();
+ Framebuffer *fbo = context->getGLState().getDrawFramebuffer();
if (fbo->checkStatus(context) != GL_FRAMEBUFFER_COMPLETE)
{
context->handleError(InvalidFramebufferOperation());
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index e8167eb..1aadfc8 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -2152,7 +2152,7 @@
}
}
- auto program = context->getGLState().getProgram();
+ Program *program = context->getGLState().getProgram();
if (!program)
{