turnip: Selectively configure GRAS_LAYER_CNTL
authorBrian Ho <brian@brkho.com>
Fri, 3 Apr 2020 14:57:25 +0000 (07:57 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Apr 2020 14:13:20 +0000 (14:13 +0000)
commit3550e20229bfc1872ae041e66958187ee4a97ac6
treee02ad18268699c350e62142151e00d96bd64adb6
parent475fe500bfe495ffa0715e7a19d044b8d6f4f341
turnip: Selectively configure GRAS_LAYER_CNTL

One of the features of geometry shaders is the ability to render to
different layers by assigning to the gl_Layer (Layer in SPIR-V)
builtin.

While have already plumbed the layer regid to the geometry shader,
we also need to GRAS_LAYER_CNTL to actually use layered rendering.
In addition, gmem does not support layered rendering, so we need to
force sysmem.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4436>
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_pipeline.c