ALL THE PIPELINES JOURNEY THROUGH THE GPU

2y ago
93 Views
2 Downloads
1.01 MB
44 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Jayda Dunning
Transcription

ALL THEPIPELINES – JOURNEYTHROUGH THE GPULOU KRAMER,DEVELOPER TECHNOLOGY ENGINEER, AMD

OVERVIEW GIC 2020: All the pipelines – Journey through the GPU2

CONTENT CREATIONSome 3d model created via your software of choice(e.g., Blender - www.blender.org).This model is represented by a bunch of triangles.Each triangle is defined by 3 vertices.Vertices can have a number of attributes: Position Normal Vector Texture coordinate GIC 2020: All the pipelines – Journey through the GPU3

CONTENT CREATIONExport.dae.abc.3ds.fbx.ply.obj.x3d.stl custom PositionsNormal VectorsTexture CoordinatesConnectivity Information GIC 2020: All the pipelines – Journey through the GPU4

CONTENT CREATION.dae.abc.3ds.fbx.ply.obj.x3d.stl custom ImportGame Engine of your choiceGIC 2020: All the pipelines – Journey through the GPU5

RENDERING – PREPARATION ON THE CPUGeometryRenderFront EndAbstractionLayerGraphicsAPIsEngine Specific formatMesh Creation: Vertex Buffers.Index Buffers.Textures. Visibility Testing The less work the GPUneeds to do the better. MyDrawMyDispatch Vulkan (vkCmdDrawIndexed,vkCmdDispatch, )D3D12(DrawIndexedInstanced,Dispatch, )D3D11 Buffers inSystem Memory (CPU)GIC 2020: All the pipelines – Journey through the GPUList of Commands6

RENDER FRONT ENDData (Buffers, Textures )PCIe System memoryVideo memoryGIC 2020: All the pipelines – Journey through the GPU7

GPU COMMANDSList of mdBindIndexBuffervkCmdDrawIndexed Send a batch of commands to the GPUso the GPU is busy for quite a while. Every command list submission takes sometime!GIC 2020: All the pipelines – Journey through the GPU8

GPU COMMANDSList of mdBindIndexBuffervkCmdDrawIndexed Send a batch of commands to the GPUso the GPU is busy for quite a while. Every command list submission takes sometime! vkCmdBindPipeline: Sets the GPU into the correct state. Contains the settings for the different stages of the graphics pipeline. vkCmdBindVertexBuffers: Tells the GPU which vertex buffers to access for the next drawcalls. vkCmdBindIndexBuffer: Tells the GPU which index buffer to access for the next draw calls. vkCmdDrawIndexed: The actual draw call will process the specified vertices according to the state of the GPU.GIC 2020: All the pipelines – Journey through the GPU9

THE GRAPHICS PIPELINEInput AssemblerVertex Shader StageTesselation StageRasterizerPixel Shader StageOutput MergerGIC 2020: All the pipelines – Journey through the GPUGeometry Shader Stage10

THE COMPUTE PIPELINECompute Shader StageGIC 2020: All the pipelines – Journey through the GPU11

THE LOGICAL PIPELINESInput AssemblerVertex Shader StageTesselation StageRasterizerPixel Shader StageOutput Mergere.g.: Compute Lighting ShaderGeometry Shader StageCompute Shader StageGIC 2020: All the pipelines – Journey through the GPU12

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth Vertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU13

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportCommand Processor (CP)Processes the list of commands received by the CPU.Sets the GPU in the correct ‚state‘ to execute the commands.PrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU14

ON THE RDNA yEngineConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportGeometry Engine (GE)Knows about topology (points, lines, triangles) / connectivity.PrimitiveAssemblerScanConverterVertex PipelinePixel Pipeline?Compute PipelineGIC 2020: All the pipelines – Journey through the GPU15

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportShader Processor Input (SPI)Accumulates work items. For a vertex shader, one work item is one vertex.Sends them in waves to the Dual Compute Unit.A wave consists of 32 or 64 work items.GIC 2020: All the pipelines – Journey through the GPUPrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute Pipeline16

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportDual Compute Unit (Dual CU)Executes shader programs.Can read and write to memory.First run is through the vertex pipeline one work item represents one vertex.GIC 2020: All the pipelines – Journey through the GPUPrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute Pipeline17

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportShader Export (SX)Handles special output from the Dual CU.PrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU18

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportPrimitive Assembler (PA)Accumulates vertices that span a triangle.Forwards triangles to Scan Converter.PrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU19

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportScan Converter (SC)Determine pixels covered by each triangle.Forwards them to Shader Processor Input (SPI).PrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU20

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportSPI, Dual CU, SX – Pixel PipelineOne work item represents one pixel (also called fragment).PrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU21

ON THE RDNA orInputConstants Frame BufferDual Compute UnitColor Backend /Depth BackendShaderExportColor Backend / Depth BackendDiscard occluded pixels based on depth / stencil.Write colored pixels to render targets.PrimitiveAssemblerScanConverterVertex PipelinePixel PipelineCompute PipelineGIC 2020: All the pipelines – Journey through the GPU22

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ShaderScanConverterRasterizerGIC 2020: All the pipelines – Journey through the GPUShaderProcessorInputDual Compute UnitPixel ShaderShaderExportOutput Merger23

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex ShaderShaderExportTesselation Retrieves indices from index buffer. Knows about the topology. Triangles, line, point. Holds a cache for vertex reuse. Avoid shading vertices multiple times. Forwards index to Shader Processor Input (SPI).PrimitiveAssemblerRasterizerGeometry Shader0122ShaderProcessorInputScanConverter3015GIC 2020: All the pipelines – Journey through the GPUPixel Shader662ShaderExportDual Compute Unit17Output Merger6554724

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ShaderShaderProcessorInputScanConverterRasterizer Waits until there are enough indices before bothering the Dual Compute Unit. Chooses a Dual CU. Configures Dual CU. Reserves resources in Dual CU. Loads address of vertex shader program into the program counter (PC). Initializes scalar and vector registers in Dual CU. Kicks off work for Dual CU.Dual Compute UnitPixel ShaderShaderExportOutput MergerDual CUShaderProcessorInputGIC 2020: All the pipelines – Journey through the GPUPCVector RegistersScalar Registers25

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ShaderScanConverterRasterizer Usually transforms vertices from object space to clip space. Attaches additional vertex attributes. Usually same transformations for every vertex in the mesh. Parallelizable.GIC 2020: All the pipelines – Journey through the GPUShaderProcessorInputDual Compute UnitPixel ShaderShaderExportOutput MergerDouble CU26

DUAL COMPUTE UNITDual Compute Units are designed to execute parallel workloads!The number of Dual CUs depends on the card,e.g. Radeon RX 5700 XT has 20 Dual alCUDualCUDualCUDualCUDualCUDualCUDualCU4 x 32-wide SIMDsper Dual CU32 threads per SIMDOne vector register (VGPR) holds onevalue per thread.One scalar register (SGPR) holds onevalue per wave.GIC 2020: All the pipelines – Journey through the GPU27

DUAL COMPUTE UNITDual Compute Units are designed to execute parallel workloads!Example Pseudo-Code: if (vertex tail) {// Do something fox tail specific}Skipped!!!else {// Do something else }Idle GIC 2020: All the pipelines – Journey through the GPU28

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput MergerDouble CUHull ShaderTesselatorDomain ShaderOptional. It can be used to further transform the geometry.GIC 2020: All the pipelines – Journey through the GPU29

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput MergerDouble CU Gets transformed vertices from the Dual CUs. Decides if we forward to the Color Backend / Depth Backend or to the Primitive Assembler. On the vertex pipeline, it forwards to the Primitive Assembler.GIC 2020: All the pipelines – Journey through the GPU30

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput Assembler Dual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput MergerUses the connectivity info stored by the Geometry Engine earlier.Waits for 3 connected vertex positions to appear.Transforms vertices to screen space.View Frustum Culling.Backface Culling.Forwards triangle to Scan Converter.GIC 2020: All the pipelines – Journey through the GPU31

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry Shader Determine all pixels that overlap the triangle. Rasterization Scan Conversion only on a coarse ual Compute UnitPixel ShaderShaderExportOutput MergerOn a fine level (4x4 pixels) test against the triangle edges.Forwards quads to theShader ProcessorInput.GIC 2020: All the pipelines – Journey through the GPU32

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput Merger Gets enough quads from the Scan Converter. Chooses Dual Compute Unit, sets it up. A work item is now a pixel / fragment!GIC 2020: All the pipelines – Journey through the GPU33

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput Merger A lot of small triangles covering only a single pixel a lot of threads are masked out: Pixels within the quad not covered by the triangle lead to inactive threads! Export finished pixels / fragments via Shader Export.GIC 2020: All the pipelines – Journey through the GPU34

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput Merger This time, the Shader Export forwards the fragments to the Color Backend / Depth Backend instead of thePrimitive Assembler.GIC 2020: All the pipelines – Journey through the GPU35

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput Assembler Dual Compute UnitVertex metry ual Compute UnitPixel ShaderShaderExportOutput MergerColor Blending.Writes the fragment color to the bound render targets.MSAA resolve.Compression. GIC 2020: All the pipelines – Journey through the GPU36

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputInput AssemblerDual Compute UnitVertex Shader ShaderExportTesselationPrimitiveAssemblerGeometry ual Compute UnitPixel ShaderShaderExportOutput MergerUse this rendertarget as input for the next pass.Do some calculations.Output another rendertarget with same size.Every pixel of the output render target needs to bemodified.GIC 2020: All the pipelines – Journey through the GPU37

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputDual Compute derProcessorInputDual Compute UnitShaderExport Input a triangle spanning over the whole output render target. The rasterizer will then forward every pixel to the pixel shader.GIC 2020: All the pipelines – Journey through the GPU38

LOGICAL PIPELINE HARDWAREColor Backend /Depth orInputDual Compute derProcessorInputDual Compute UnitShaderExport Input a triangle spanning over the whole output render target. The rasterizer will then forward every pixel to the pixel shader. If the triangle is not spanning over the whole output render target,only a part of the output render target will be modifed!GIC 2020: All the pipelines – Journey through the GPU39

THE COMPUTE PIPELINECommandProcessorShaderProcessorInputDual Compute UnitCompute Shader StageTextures,Buffers,andConstantsRemember: Dual Compute Units canread and write to memory.Do some calculations using thedata from the Input texture usinga compute shader.Dispatch as many threads asthe texture has pixels. For compute shaders, thenumber of threads is explicitlyInput: render target from previous pass.specified.GIC 2020: All the pipelines – Journey through the GPUOutput: writable texture.40

PRESENTATIONWait until the render target is done and send it over to the screen.DisplayPort HDMI GIC 2020: All the pipelines – Journey through the GPU41

Q&Alou.kramer@amd.comGPUOpen.comSpecial thanks to Dominik Baumeister and his talk"Triangles Are Precious – Let‘s Treat Them With Care".GIC 2020: All the pipelines – Journey through the GPU42

DISCLAIMER & ATTRIBUTESDisclaimer:The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions, and typographicalerrors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to productand roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differingmanufacturers, software changes, BIOS flashes, firmware upgrades, or the like. Any computer system has risks of security vulnerabilities that cannotbe completely prevented or mitigated. AMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reservesthe right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person ofsuch revisions or changes.THIS INFORMATION IS PROVIDED ‘AS IS.” AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF ANDASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS, OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. AMD SPECIFICALLYDISCLAIMS ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILLAMD BE LIABLE TO ANY PERSON FOR ANY RELIANCE, DIRECT, INDIRECT, SPECIAL, OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OFANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.GIC 2020: All the pipelines – Journey through the GPU43

GIC 2020: All the pipelines –Journey through the GPU 16 ON THE RDNA ARCHITECTURE Command Processor Geometry Engine Dual Compute Unit Shader Export Primitive Assembler Scan Converter Color Backend / Depth Backend Command List Indices Frame Buffer Vertex Pipeline Pixel Pipeline Compute Pipeline Shader Proce

Related Documents:

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

Chính Văn.- Còn đức Thế tôn thì tuệ giác cực kỳ trong sạch 8: hiện hành bất nhị 9, đạt đến vô tướng 10, đứng vào chỗ đứng của các đức Thế tôn 11, thể hiện tính bình đẳng của các Ngài, đến chỗ không còn chướng ngại 12, giáo pháp không thể khuynh đảo, tâm thức không bị cản trở, cái được

Food outlets which focused on food quality, Service quality, environment and price factors, are thè valuable factors for food outlets to increase thè satisfaction level of customers and it will create a positive impact through word ofmouth. Keyword : Customer satisfaction, food quality, Service quality, physical environment off ood outlets .

Le genou de Lucy. Odile Jacob. 1999. Coppens Y. Pré-textes. L’homme préhistorique en morceaux. Eds Odile Jacob. 2011. Costentin J., Delaveau P. Café, thé, chocolat, les bons effets sur le cerveau et pour le corps. Editions Odile Jacob. 2010. Crawford M., Marsh D. The driving force : food in human evolution and the future.