GPUOpen: All the Pipelines - Journey through the GPU

Discussion in 'Beginners Zone' started by CarstenS, Jan 22, 2021.

  1. CarstenS

    Legend Veteran Subscriber

    Joined:
    May 31, 2002
    Messages:
    5,362
    Likes Received:
    3,101
    Location:
    Germany
    Jawed, iroboto, BRiT and 1 other person like this.
  2. Rodéric

    Rodéric a.k.a. Ingenu
    Moderator Veteran

    Joined:
    Feb 6, 2002
    Messages:
    4,060
    Likes Received:
    955
    Location:
    Planet Earth.
    The hardware blocks to software blocks is a nice addition I've never seen before AFAIR.
     
    CarstenS likes this.
  3. Lurkmass

    Regular Newcomer

    Joined:
    Mar 3, 2020
    Messages:
    309
    Likes Received:
    350
    D3D12 Logical Pipeline: VS (Vertex Shader) -> HS (Hull Shader) -> DS (Domain Shader) -> GS (Geometry Shader)

    GFX6-8 Hardware Pipeline: LS (LDS? shader) -> HS (Hull Shader) -> ES (Export Shader) -> GS (Geometry Shader) -> VS (Vertex Shader)

    Logical -> Hardware mapping

    (VS only): VS -> VS
    (Tess enabled): VS -> LS | HS -> HS | DS -> VS
    (GS enabled): VS -> ES | GS -> GS
    (Both enabled): VS-> LS | HS -> HS | DS -> ES | GS -> GS

    GFX9 Hardware Pipeline: HS (merged LS & HS) -> GS (merged ES & GS) -> VS

    Logical -> Hardware mapping

    (VS only): VS -> VS
    (Tess enabled): VS + HS -> HS | DS -> VS
    (GS enabled): VS + GS -> GS
    (Both enabled): VS + HS -> HS | DS + GS -> GS

    GFX10 Hardware Pipeline: HS -> GS (merged ES, GS & VS)

    Logical -> Hardware mapping

    (VS only): VS -> GS
    (Tess enabled): VS + HS -> HS | DS -> GS
    (GS enabled): VS + GS -> GS
    (Both enabled): VS + HS -> HS | DS + GS -> GS

    D3D12 Mesh Shading Pipeline: AS (Amplification Shader) -> MS (Mesh Shader)

    Mesh Pipeline -> GFX10 Hardware mapping: AS -> CS (Compute Shader) | MS -> GS

    Hopefully this clears things up a bit. Now for some interesting notes:

    Despite our mental model of the vertex shader being executed at the very start of our logical pipeline, the vertex program itself can executed on 3 different HW stages on older AMD HW. I imagine the reason for this HW pipeline design where the HW's vertex shader is located at the end of the geometry pipeline is so the HW can avoid the additional overhead from tessellation and geometry shader stages in certain cases.

    As we can identify in the comments from AMD's code, amplification shaders don't map onto anything in their graphics pipeline and mesh shaders are executed on GFX10's NGG geometry shaders.

    Sources and code:
    https://cgit.freedesktop.org/mesa/m...68957a82562d13b3f0d21a04ce633ffd236e6036#n165
    https://github.com/GPUOpen-Drivers/pal/blob/dev/src/core/hw/gfxip/gfx6/gfx6GraphicsPipeline.cpp#L536
    https://github.com/GPUOpen-Drivers/pal/blob/dev/src/core/hw/gfxip/gfx9/gfx9GraphicsPipeline.cpp#L569
    https://github.com/GPUOpen-Drivers/.../gfxip/gfx9/gfx9IndirectCmdGenerator.cpp#L174
     
    #3 Lurkmass, Feb 16, 2021
    Last edited: Feb 22, 2021
    Ethatron, Jawed, jlippo and 5 others like this.
  4. 3dcgi

    Veteran Subscriber

    Joined:
    Feb 7, 2002
    Messages:
    2,481
    Likes Received:
    421
    Also, the hardware VS (Primitive Shader in newer hardware) is what feeds the rasterizer. So it goes last, providing consistency in naming from a hardware perspective.
     
    Rodéric and iroboto like this.
  5. Lurkmass

    Regular Newcomer

    Joined:
    Mar 3, 2020
    Messages:
    309
    Likes Received:
    350
    Which provides more context into this slide:

    [​IMG]

    GFX9: HS (surface shaders ?) -> GS (geometry shaders extended with per-vertex shading) -> VS (primitive shader)

    GFX10: HS -> GS or CS (compute shader) -> GS (primitive shader)

    What's unique to the NGG pipeline in comparison to the standard mesh shading pipeline is that they can exploit the fixed function tessellator hardware since it's output is used as an input for GFX9/10 geometry shaders. Did GFX9 have the capability to do per-meshlet shading or was that extended with GFX10 NGG GS ? When I compare GFX9 registers to the GFX10 registers, I see that GFX10 has added new registers with a GE prefix and are those related to the Geometry Engine by some chance ?

    It would be much appreciated if you and the guys at AMD started releasing documentation about the hardware registers again!
     
    #5 Lurkmass, Feb 17, 2021
    Last edited: Feb 17, 2021
    iroboto and BRiT like this.
  6. 3dcgi

    Veteran Subscriber

    Joined:
    Feb 7, 2002
    Messages:
    2,481
    Likes Received:
    421
    The GE prefix came about because some things were moved around and it was decided to group multiple blocks under the Geometry Engine register naming. They were already developed by the same team.

    GFX9 could do per-meshlet shading, but issues led to support being dropped in favor of focusing resources on GFX10. GFX10's implementation is different.
     
    BRiT likes this.
  7. Lurkmass

    Regular Newcomer

    Joined:
    Mar 3, 2020
    Messages:
    309
    Likes Received:
    350
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...