Merge branch 'development' into cmake/linux_fix_warn_unused

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/Objects/TrackGizmo.cpp
This commit is contained in:
Esteban Papp
2021-08-25 14:50:05 -07:00
113 changed files with 380 additions and 14845 deletions
+14 -39
View File
@@ -147,7 +147,7 @@ namespace LyShine
// [LYSHINE_ATOM_TODO][ATOM-15073] - need to combine into a single DrawIndexed call to take advantage of the draw call
// optimization done by this RenderGraph. This option will be added to DynamicDrawContext. For
// now we could combine the vertices ourselves
for (const IRenderer::DynUiPrimitive& primitive : m_primitives)
for (const DynUiPrimitive& primitive : m_primitives)
{
dynamicDraw->DrawIndexed(primitive.m_vertices, primitive.m_numVertices, primitive.m_indices, primitive.m_numIndices, AZ::RHI::IndexFormat::Uint16, drawSrg);
}
@@ -156,7 +156,7 @@ namespace LyShine
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void PrimitiveListRenderNode::AddPrimitive(IRenderer::DynUiPrimitive* primitive)
void PrimitiveListRenderNode::AddPrimitive(DynUiPrimitive* primitive)
{
// always clear the next pointer before adding to list
primitive->m_next = nullptr;
@@ -167,9 +167,9 @@ namespace LyShine
}
////////////////////////////////////////////////////////////////////////////////////////////////////
IRenderer::DynUiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const
DynUiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const
{
return const_cast<IRenderer::DynUiPrimitiveList&>(m_primitives);
return const_cast<DynUiPrimitiveList&>(m_primitives);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -191,7 +191,7 @@ namespace LyShine
}
////////////////////////////////////////////////////////////////////////////////////////////////////
bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(IRenderer::DynUiPrimitive* primitive) const
bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const
{
return primitive->m_numVertices + m_totalNumVertices < std::numeric_limits<uint16>::max();
}
@@ -215,9 +215,9 @@ namespace LyShine
{
size_t numPrims = m_primitives.size();
size_t primCount = 0;
const IRenderer::DynUiPrimitive* lastPrim = nullptr;
const DynUiPrimitive* lastPrim = nullptr;
int highestTexUnit = 0;
for (const IRenderer::DynUiPrimitive& primitive : m_primitives)
for (const DynUiPrimitive& primitive : m_primitives)
{
if (primCount > numPrims)
{
@@ -706,25 +706,8 @@ namespace LyShine
}
}
void RenderGraph::AddPrimitive(
IRenderer::DynUiPrimitive* primitive,
ITexture* texture,
bool isClampTextureMode,
bool isTextureSRGB,
bool isTexturePremultipliedAlpha,
BlendMode blendMode)
{
// LYSHINE_ATOM_TODO - this function will be removed when all IRenderer references are gone from UI components
AZ_UNUSED(primitive);
AZ_UNUSED(texture);
AZ_UNUSED(isClampTextureMode);
AZ_UNUSED(isTextureSRGB);
AZ_UNUSED(isTexturePremultipliedAlpha);
AZ_UNUSED(blendMode);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void RenderGraph::AddPrimitiveAtom(IRenderer::DynUiPrimitive* primitive, const AZ::Data::Instance<AZ::RPI::Image>& texture,
void RenderGraph::AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance<AZ::RPI::Image>& texture,
bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode)
{
AZStd::vector<RenderNode*>* renderNodeList = m_renderNodeListStack.top();
@@ -797,15 +780,7 @@ namespace LyShine
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void RenderGraph::AddAlphaMaskPrimitive([[maybe_unused]] IRenderer::DynUiPrimitive* primitive,
[[maybe_unused]] ITexture* texture, [[maybe_unused]] ITexture* maskTexture,
[[maybe_unused]] bool isClampTextureMode, [[maybe_unused]] bool isTextureSRGB, [[maybe_unused]] bool isTexturePremultipliedAlpha, [[maybe_unused]] BlendMode blendMode)
{
// LYSHINE_ATOM_TODO - this function will be removed when all IRenderer references are gone from UI components
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void RenderGraph::AddAlphaMaskPrimitiveAtom(IRenderer::DynUiPrimitive* primitive,
void RenderGraph::AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive,
AZ::Data::Instance<AZ::RPI::AttachmentImage> contentAttachmentImage,
AZ::Data::Instance<AZ::RPI::AttachmentImage> maskAttachmentImage,
bool isClampTextureMode,
@@ -889,7 +864,7 @@ namespace LyShine
}
////////////////////////////////////////////////////////////////////////////////////////////////////
IRenderer::DynUiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor)
DynUiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor)
{
const int numVertsInQuad = 4;
const int numIndicesInQuad = 6;
@@ -1178,10 +1153,10 @@ namespace LyShine
const PrimitiveListRenderNode* primListRenderNode = static_cast<const PrimitiveListRenderNode*>(renderNode);
IRenderer::DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives();
DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives();
info.m_numPrimitives += static_cast<int>(primitives.size());
{
for (const IRenderer::DynUiPrimitive& primitive : primitives)
for (const DynUiPrimitive& primitive : primitives)
{
info.m_numTriangles += primitive.m_numIndices / 3;
}
@@ -1362,10 +1337,10 @@ namespace LyShine
previousNodeAlreadyCounted = false;
}
IRenderer::DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives();
DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives();
int numPrimitives = static_cast<int>(primitives.size());
int numTriangles = 0;
for (const IRenderer::DynUiPrimitive& primitive : primitives)
for (const DynUiPrimitive& primitive : primitives)
{
numTriangles += primitive.m_numIndices / 3;
}