Skip to content

d3d12: GL4.2

Jesse Natalie requested to merge jenatali/mesa:d3d12-gl4.2 into main

This will be the last version bump for a while. Reaching 4.3 requires new D3D12 features (which are in development).

We only had 2 extensions missing:

  1. BPTC, which was as simple as mapping the formats to BC6/BC7.
  2. Viewport array index, which implicitly lights up ARB_fragment_layer_viewport too

Viewport array index gets a little tricky:

  • We have logic that needs to modify position being written based on whether the viewport inverts depth. This needs to now take into account this state differing based on a dynamically computed viewport index.
  • If viewport index isn't written by a GS, the FS needs to read 0 from the input gl_ViewportIndex variable. Since we currently already update the pre-rasterizer shader to output all required non-generated inputs from the fragment shader, rather than replacing the read with 0, actually write an explicit 0 for the value.
    • To prevent this from requiring a GS to be inserted, update the logic for the fragment shader flat reads to exclude a bunch of sysvals, and use the D3D12 feature that allows this value to be exported from a VS/DS too.

The new fails here are:

  • The quick shader pass fails appear to all be a WARP bug since they pass locally for me.
  • The required formats test requires an updated D3D to allow unaligned block-compressed format dimensions.
  • The compute-and-render fail is due to the spurious resize problem and passes locally for me.

Merge request reports