tu: Rewrite tessellation modes handling
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 6 Sep 2023 15:24:00 +0000 (17:24 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 19:03:56 +0000 (19:03 +0000)
commitefaf77bbddf91947fef32d078b5ce2714ec517f0
tree598fc661771b440634b00221ffd1b11320046011
parent169a44d5621816980544c4fca43d80ca3de038f9
tu: Rewrite tessellation modes handling

Before this, we combined the modes after compiling the shaders when
constructing the pipeline. But that's a bit awkward with shader objects,
where there is no good place to put state derived from TCS and TES but
not the other stages. However, shader objects leaves us with an out:
when compiling separately, the modes must be on one of the shaders. So
instead we just copy the modes earlier, in the NIR shaders, and then get
them from the appropriate shader later. That way there is no extra
overhead when fast-linking, as there currently is, and we don't need to
create an awkward separate object just for this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25276>
src/freedreno/vulkan/tu_cmd_buffer.cc
src/freedreno/vulkan/tu_cmd_buffer.h
src/freedreno/vulkan/tu_pipeline.cc
src/freedreno/vulkan/tu_pipeline.h
src/freedreno/vulkan/tu_shader.cc
src/freedreno/vulkan/tu_shader.h