Skip to content

turnip: Layered rendering for geometry shaders

Brian Ho requested to merge brkho/mesa:layered into master

This MR implements layered rendering which fixes the remaining tests in dEQP-VK.geometry.layered.*.

I populate a few registers that I missed in the first pass, but the main change is replacing GRAS_LAYER_CNTL with GRAS_MAX_LAYER_INDEX. While investigating cube_array geometry tests, I noticed that the blob was setting an unknown 0x8 to LAYER_CNTL, so I checked the value of LAYER_CNTL for various layer sizes:

1: LAYER_CNTL=0
2: LAYER_CNTL=1
3: LAYER_CNTL=2
4: LAYER_CNTL=3
9: LAYER_CNTL=8
256: LAYER_CNTL=255
2000: LAYER_CNTL=1999

It seems like this register is actually just a count of the largest layer that can be written to via gl_Layer and does not actually store things like layer type.

I'm still failing dEQP-VK.geometry.basic.output_vary_by_uniform*, but I suspect this is due to #2774.

cc: @krh

Merge request reports