zink: lower smooth-lines if not supported
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 6 Dec 2022 07:54:34 +0000 (08:54 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 13:57:19 +0000 (13:57 +0000)
commit80285db9efe16beefc59a470b7c53d7bd38dbdc4
treea70da41467d99b4822f11c2dafad5f5cbacae67b
parent50d89663c5160f2dfd07795671a326760de0c37c
zink: lower smooth-lines if not supported

This implements line-smoothing the same way as the draw-module does,
except using a geometry shader instead of a CPU pass.

Ideally, this should be enabled either by checking for the various
smooth-line caps, or by a DRIconf setting.

Unfortunately, RADV doesn't support he smooth-lines features, and we
don't want to force it down a pessimistic shader-key code-path. So that
plan is out the window for now.

While DRIconf is also neat, it's a bit of work to wire up, and we don't
really know of any real-world applications who would need this yet. So,
for now, let's just unconditionally enable is on the IMG proprietary
driver, which is going to need this for sure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19847>
src/gallium/drivers/zink/zink_compiler.c
src/gallium/drivers/zink/zink_draw.cpp
src/gallium/drivers/zink/zink_pipeline.c
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_shader_keys.h
src/gallium/drivers/zink/zink_state.c
src/gallium/drivers/zink/zink_types.h