Current Generation Games Analysis Technical Discussion [2023] [XBSX|S, PS5, PC]

Status
Not open for further replies.
This is as I expected. It's unlikely that the hardware is actually different between ps5 and seriesx. SeriesX supports mesh shaders because it uses Direct3D. PS5 does not support mesh shaders because it doesn't use Direct3D, but the hardware has the same capability. PS5 likely just uses primitive shaders because that maps closer to the actual hardware. From what I've heard about GNM, they basically rely on the simplest implementation that's as close to the hardware as possible. They don't have to worry about intel, nvidia or different generations of amd hardware. The AMD driver takes mesh shaders and translates/converts them to primitive shaders. On PS5 you'd just have a driver that exposes primitive shaders directly.
They should be able to map mesh shaders to PS5. Every major API has mesh shaders, GNM is the odd person out in this scenario
 
I disagree with this; hardware support is different between RDNA 1 and RDNA 2 listed here:


  • On RDNA2 and newer, per-primitive output attributes are also supported.
There are other items under the hood as well I think, which largely leads yo why primitive shaders were abandoned. But basically you want fewer calls on AMD.
So that should mean that if the game (Alan Wake 2) doesn't work on RDNA1 GPUs then the PS5 has RDNA2 primitive shaders (and not RDNA1 primitive shaders lacking the per-primitive output attributes which seems to be the only difference). We'll know more when the game effectively lands. If it's running on 5700s with RDNA1 primitive shaders and how the game performs on PS5 vs XSX. I mean if they had a branch working on RDNA1 primitive shaders why would they not use it with RDNA1 GPUs?

By the way this blog is very interesting and confirms us that mesh shader is only an API on RDNA GPU (and so on Xbox Series), not a hardware. There is only primitive shaders hardware on RDNA GPUs with the RDNA2 version adding the per-primitive output attributes.
 
So that should mean that if the game (Alan Wake 2) doesn't work on RDNA1 GPUs then the PS5 has RDNA2 primitive shaders (and not RDNA1 primitive shaders lacking the per-primitive output attributes which seems to be the only difference). We'll know more when the game effectively lands. If it's running on 5700s with RDNA1 primitive shaders and how the game performs on PS5 vs XSX. I mean if they had a branch working on RDNA1 primitive shaders why would they not use it with RDNA1 GPUs?

By the way this blog is very interesting and confirms us that mesh shader is only an API on RDNA GPU (and so on Xbox Series), not a hardware. There is only primitive shaders hardware on RDNA GPUs with the RDNA2 version adding the per-primitive output attributes.
PS5 is a console. You can do whatever you want on console hardware knowing that the custom path would still hit an extremely large base of users.

They can certainly make AW2 work on PS5 without mesh shaders. They can do a combination of primitive with compute shaders etc.

I wouldn’t 1:1 with what’s on PC.

Yes. Mesh shaders map onto NGG hardware for AMD based cards. But NGG is likely being updated with each generation of RDNA family.
 
PS5 is a console. You can do whatever you want on console hardware knowing that the custom path would still hit an extremely large base of users.

They can certainly make AW2 work on PS5 without mesh shaders. They can do a combination of primitive with compute shaders etc.

I wouldn’t 1:1 with what’s on PC.

Yes. Mesh shaders map onto NGG hardware for AMD based cards. But NGG is likely being updated with each generation of RDNA family.
According to the dev they had an old buggy branch without mesh shaders (with vertex shaders) they dropped during development. All launch versions are using mesh shaders. From his/her deleted tweet. So again if they had a RDNA1 version working perfectly well on PS5 (which it does as they have being showing the PS5 version months ago) why wouldn't they use it on PC version?

pw9a4CM.png
 
According to the dev they had an old buggy branch without mesh shaders (with vertex shaders) they dropped during development. All launch versions are using mesh shaders. From his/her deleted tweet. So again if they had a RDNA1 version working perfectly well on PS5 (which it does as they have being showing the PS5 version months ago) why wouldn't they use it on PC version?

pw9a4CM.png
Primitive shaders are not exposed in dx12 which the Game uses and I do Not even know If they are really exposed in RDNA1 on PC.
 
Why would the hardware be exposed on an API? Developers don't need to know how the API is implemented.
Well what if developers need either more performance/functionality to properly ship their games ? Exposing a closer abstraction whether it'd be primitive or mesh shaders is valuable in that case in comparison to the older geometry pipeline ...
 
Why would the hardware be exposed on an API? Developers don't need to know how the API is implemented.

Primitive Shader functionality needs to be accessible to the developer. It isn't through DX12U, which the game uses. To go around this limitation, the driver would need to give access through some kind of API. This would allow the Primitive Shader workloads to run on the hardware's NGG hardware.

AMD cancelled implicit Primitive Shader support back in 2018, which I think would have allowed the driver to decide when to turn VS stuff or GS stuff or whatever stuff into Primitive Shader to (potentially) get a speed-up. AMD announced they would release an explicit Primitive Shader API for Vega in the future. I don't think this ever happened.

I don't know what the status of PS support on the 5700 series is. According to "Timur's blog" (the Valve Linux driver dude) NGG doesn't work on the better selling Navi 14 (RX 5500) anyway.

Alan Wake 2 only supports DX12U cards. Additionally supporting a tiny collection of very niche, aged RDNA1 cards (the 5700/XT) through a custom path that still lacks other DX12U features wouldn't seem to be a good use of resources IMO.

@Lurkmass, do you know if Primitive Shader support is available for the RX 5700 on Windows?
 
They should be able to map mesh shaders to PS5. Every major API has mesh shaders, GNM is the odd person out in this scenario

But why would you do that? I think what devs like about playstation is the APIs target exactly what the hardware does. If a driver can take a mesh shader and convert it into primitive shaders which map to the hardware, then there's no reason to expose anything more than primitive shaders directly. Sony isn't building cross-vendor cross-generation APIs.
 
Primitive shaders are not exposed in dx12 which the Game uses and I do Not even know If they are really exposed in RDNA1 on PC.

What do you mean by "exposed"? Technically doesn't the DX12 API expose the underlying hardware tech from both manufacturers? While they are not the same exact tech and maybe there is some walkarounds that the driver or developers must contend with when it comes to the AMD's solution, nevertheless both next gen geometry solutions are driving mesh shading on their respective GPUs.
 
But why would you do that? I think what devs like about playstation is the APIs target exactly what the hardware does. If a driver can take a mesh shader and convert it into primitive shaders which map to the hardware, then there's no reason to expose anything more than primitive shaders directly. Sony isn't building cross-vendor cross-generation APIs.
Sony doesn't really need to expose mesh shaders. Primitive shaders are simply the "more explicit" option on AMD HW compared to mesh shaders ...
 
What do you mean by "exposed"? Technically doesn't the DX12 API expose the underlying hardware tech from both manufacturers? While they are not the same exact tech and maybe there is some walkarounds that the driver or developers must contend with when it comes to the AMD's solution, nevertheless both next gen geometry solutions are driving mesh shading on their respective GPUs.
Seems Khronos then Microsoft announced support following the Siggraph presentation. https://blog.siggraph.org/2021/04/mesh-shaders-release-the-intrinsic-power-of-a-gpu.html/
In 2019, Nvidia presented a paper on mesh and task shaders at SIGGRAPH. Then, Khronos announced it would use Nvidia mesh shader code as an extension to Vulkan and OGL. Next, in November 2019, Microsoft said DirectX 12 (D3D12) would support mesh and amplification shaders. And, finally, in March 2020 DirectX 12 Ultimate included Mesh Shaders, then in January 2021 Microsoft released code samples—the world shifted.
 
Last edited by a moderator:
But why would you do that? I think what devs like about playstation is the APIs target exactly what the hardware does. If a driver can take a mesh shader and convert it into primitive shaders which map to the hardware, then there's no reason to expose anything more than primitive shaders directly. Sony isn't building cross-vendor cross-generation APIs.
I think I see the problem here.
When we are discussing DX12 Mesh Shaders - we are discussing Mesh Shader and Amplification Shader (or Task Shader for Nvidia).
Primitive Shaders align 1:1 with Mesh Shaders - but the question is whether PS5 supports Amplification Shaders to support 'Mesh Shaders' standard wholly.

The reason I bring this up, is because primitive shaders have been around since Vega, but the support for 'DX12U Mesh Shader' only begins at RDNA 2, if RDNA 1 was able to support Amplification shaders, it too would be able to support 'Mesh Shaders' in this sense.

Khronos documents the importance of Amplification/Task Shaders here as well as Mesh Shader best practices:
Task shaders call Mesh Shaders, and that is where the actual power lies in 'mesh shading'. Basically, you're sending a compute like kernel to invoke hundreds of mesh shaders at once. But it's a little more complex than that, but I suspect largely that is what they are doing on PS5. The beauty is that the firmware will do the work for you on DX12.

Task shaders on AMD HW​

What I discuss here is based on information that is already publicly available in open source drivers. If you are already familiar with how AMD’s own PAL-based drivers work, you won’t find any surprises here.

First things fist. Under the hood, task shaders are compiled to a plain old compute shader. The task payload is located in VRAM. The shader code that stores the mesh dispatch size and payload are compiled to memory writes which store these in VRAM ring buffers. Even though they are compute shaders as far as the AMD HW is concerned, task shaders do not work like a compute pre-pass. Instead, task shaders are dispatched on an async compute queue while at the same time the mesh shader work is executed on the graphics queue in parallel.

The task+mesh dispatch packets are different from a regular compute dispatch. The compute and graphics queue firmwares work together in parallel:

  • Compute queue launches up to as many task workgroups as it has space available in the ring buffer.
  • Graphics queue waits until a task workgroup is finished and can launch mesh shader workgroups immediately. Execution of mesh dispatches from a finished task workgroup can therefore overlap with other task workgroups.
  • When a mesh dispatch from the a task workgroup is finished, its slot in the ring buffer can be reused and a new task workgroup can be launched.
  • When the ring buffer is full, the compute queue waits until a mesh dispatch is finished, before launching the next task workgroup.
You can find out the exact concrete details in the PAL source code, or RADV merge requests.

Side note, getting some implementation details wrong can easily cause a deadlock on the GPU. It is great fun to debug these.

The relevant details here are that most of the hard work is implemented in the firmware (good news, because that means I don’t have to implement it), and that task shaders are executed on an async compute queue and that the driver now has to submit compute and graphics work in parallel.

Keep in mind that the API hides this detail and pretends that the mesh shading pipeline is just another graphics pipeline that the application can submit to a graphics queue. So, once again we have a mismatch between the API programming model and what the HW actually does.

the thing is, for RDNA 1 this is going to be awkward without task shaders. While RDNA can leverage drivers to compile the existing front end into into primitive shaders for NGG, it has no way to divide and explicitly call the work like a task shader does, it requires explicit coding. You would need to have full control over the primitive shaders and the compute shader to call them in order for this to work - something the PS5 can do, but something PC cannot.

The reality is, I think without an amplification/task shader, it's a lot of work to write a compute shader based system to schedule the work for primitive shaders to work off. On DX12, the amplification shader handles all of this for you, the compute and graphics queues are working together. I don't think that PS5 can make the graphics and compute queues work together in tandem (compute queue waiting on the graphics queue to signal when to submit the next load), and if not, everyone needs to write their own highly specialized custom compute shaders that schedule workloads primitive shader processing. A bit like what Epic has done with Nanite for instance.
 
Last edited:
@iroboto I've never seen anything super compelling about PS5 being rdna1. Everything I've ever seen says it's a custom rdna2 gpu. I expect that if Alan Wake 2 runs fine with D3D12 on PC with an RDNA2 gpu that there's no reason to doubt PS5 can't do all of the same things without an explicit Mesh Shader API. Mesh Shaders are just an API. It's not the hardware. They need hardware features to implement the API, but it seems like RDNA2 does that fine with NGG (primitive shaders). On Series X the AMD driver is going to take the mesh shader and turn it into some primitive shader, compute shader that maps to the hardware. On PS5 they'll just write primitive shaders and compute shaders directly (I think). For all I know PS5 actually has some mesh shader API. I don't think GNM is actually public. From what I've heard they tend to keep the API closer to the hardware, so I suspect it doesn't. What I'm getting at is I doubt there's a hardware departure here between PS5 and Series X/S. It's just a different API. On PC RDNA1 and Pascal do not support mesh shaders so they'd have to use the old vertex pipeline.
 
@iroboto I've never seen anything super compelling about PS5 being rdna1.
Interview with David Wang (AMD). Might need to translate.

In that case, how is AMD's Primitive Shader currently handled? Sony Interactive Entertainment (SIE) has previously promoted the use of Primitive Shader in the PlayStation 5's GPU (see related article ). On the other hand, Microsoft is promoting the adoption of Mesh Shader in the Xbox Series X|S (hereinafter referred to as XSX) ( related link ).

What is interesting is that although both PS5 and XSX are equipped with AMD GPUs of almost the same generation, the technology used as standard for the new geometry pipeline is different.

Since the PS5 GPU is an RDNA-based GPU made by AMD, it is equipped with Primitive Shader, which can be used natively (*from the PS5 SDK). As a result, some PS5-only game titles effectively utilize Primitive Shader.
 
Last edited by a moderator:
@iroboto I've never seen anything super compelling about PS5 being rdna1. Everything I've ever seen says it's a custom rdna2 gpu. I expect that if Alan Wake 2 runs fine with D3D12 on PC with an RDNA2 gpu that there's no reason to doubt PS5 can't do all of the same things without an explicit Mesh Shader API. Mesh Shaders are just an API. It's not the hardware. They need hardware features to implement the API, but it seems like RDNA2 does that fine with NGG (primitive shaders). On Series X the AMD driver is going to take the mesh shader and turn it into some primitive shader, compute shader that maps to the hardware. On PS5 they'll just write primitive shaders and compute shaders directly (I think). For all I know PS5 actually has some mesh shader API. I don't think GNM is actually public. From what I've heard they tend to keep the API closer to the hardware, so I suspect it doesn't. What I'm getting at is I doubt there's a hardware departure here between PS5 and Series X/S. It's just a different API. On PC RDNA1 and Pascal do not support mesh shaders so they'd have to use the old vertex pipeline.

I think if Amplification shaders were available on PS5, Mesh Shaders would have been in full use much earlier. It's much faster. I think because PS5 doesn't have Amplification shaders, developers would have to write their own compute shaders in conjunction with the primitive shaders to get the same net effect that Amp+Mesh does on DX12. And most are probably not up to the task of doing that.

The firmware needs to support amplification shaders, the drivers make the call to the firmware, and the firmware calls the available instruction set.

On DirectX, Amplification shaders are executed on Async Compute queue where it simultaneously dispatches both a compute and graphics queue in parallel, and the compute and graphics queue wait off another.
That requires hardware for the queues to communicate to each other in this way. But as written above, if you are willing to do it, you can write your own compute shaders that can do this type of work.

As per RDNA - the compute units haven't changed much from RDNA 1 to 2, with the exception of RT and some faster matrices math for AI.
But the render backends are unchanged from RDNA 1, and Xbox Series all use RBEs from RDNA 2. Then there is also support for VRS and SFS.
These are all hardware features on the graphics pipeline (Mesh shaders included).

MS took significantly longer to get their devkits out to developers and cited that they needed to wait for these items to be done before they could start building.
 
Last edited:
Interview with David Wang (AMD). Might need to translate.

I'm just skimming this but it looks like it's pretty much what I said. Direct3D mesh shaders are implemented with primitive shaders on AMD. PS5 SDK (API) uses primitive shaders explicitly. I don't see anything about differences in hardware capability, unless I'm missing it. If you can quote out something that explicitly says PS5 is RDNA1 or not, I'd be interested, but I'm not interested in reading all of that right now.
 
I think if Amplification shaders were available on PS5, Mesh Shaders would have been in full use much earlier. It's much faster. I think because PS5 doesn't have Amplification shaders, developers would have to write their own compute shaders in conjunction with the primitive shaders to get the same net effect that Amp+Mesh does on DX12. And most are probably not up to the task of doing that.

The firmware needs to support amplification shaders, the drivers make the call to the firmware, and the firmware calls the available instruction set.

On DirectX, Amplification shaders are executed on Async Compute queue where it simultaneously dispatches both a compute and graphics queue in parallel, and the compute and graphics queue wait off another.
That requires hardware for the queues to communicate to each other in this way. But as written above, if you are willing to do it, you can write your own compute shaders that can do this type of work.

As per RDNA - the compute units haven't changed much from RDNA 1 to 2, with the exception of RT and some faster matrices math for AI.
But the render backends are unchanged from RDNA 1, and Xbox Series all use RBEs from RDNA 2. Then there is also support for VRS and SFS.
These are all hardware features on the graphics pipeline (Mesh shaders included).

MS took significantly longer to get their devkits out to developers and cited that they needed to wait for these items to be done before they could start building.

Mesh shaders are in use in UE5. Cross-gen games, and pc games that support RDNA1 and Pascal have no choice but to support the old vertex shader pipeline, and that's still a lot of consoles and gpus. Adoption was always going to be slow. People seem fairly upset that Alan Wake 2 may only support rdna2 and RTX 20x0 series and higher.
 
Status
Not open for further replies.
Back
Top