ATOM-6088 Unified approach to send draws to a single viewport

- Created a template class TagRegistery which implements the previous DrawListTagRegistry. The template is used for both DrawListTagRegistry and DrawFilterTagRegistry
- Added DrawFilterTag to DrawItemKeyPair
- Added DrawFilterMask support in DrawPacket and DrawPacketBuilder
- Added CreateDynamicContext for render pipeline which allows draw to selected render pipeline.
- Updated RasterPass's BuildCommandListInternal function to filter draw items for its owner RenderPipeline.
- Updated RHI unit tests.
This commit is contained in:
qingtao
2021-04-26 13:52:30 -07:00
parent 743d6a511a
commit 12f528d744
25 changed files with 385 additions and 272 deletions
@@ -17,6 +17,7 @@
#include <Atom/RPI.Public/DynamicDraw/DynamicBuffer.h>
#include <Atom/RPI.Public/DynamicDraw/DynamicDrawContext.h>
#include <Atom/RPI.Public/DynamicDraw/DynamicDrawInterface.h>
#include <Atom/RPI.Public/RenderPipeline.h>
#include <Atom/RPI.Public/View.h>
@@ -604,6 +605,7 @@ namespace AZ
RHI::DrawItemKeyPair drawItemKeyPair;
drawItemKeyPair.m_sortKey = sortKey;
drawItemKeyPair.m_item = &drawItemInfo.m_drawItem;
drawItemKeyPair.m_drawFilterMask = m_drawFilter;
view->AddDrawItem(m_drawListTag, drawItemKeyPair);
sortKey++;
}