zink: rework rast-discard for primgen queries
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 14 Aug 2023 16:34:59 +0000 (12:34 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 15 Aug 2023 01:31:42 +0000 (01:31 +0000)
commit553603073593cf21bec19927bdc50bf0ecba10e0
treed8ae2b77a8fd836d70db771dfcf8eb0a0c5fc105
parent4f743df4f00a346a14edaccda35e035e5224233c
zink: rework rast-discard for primgen queries

I originally used CWE for this case since it nicely avoids a lot of the
"complex" operations while still disabling most effects of a fragment shader

in theory, however, there are some cases where CWE isn't quite the same as actually
disabling the fs, so this adds a new rast-discard mode that can be used for
those cases

it can also be used instead of the dummy surface handling that was previously
used for drivers/hw that didn't support primitivesGeneratedQueryWithRasterizerDiscard,
which enables a bunch of gross conditionals to be simplified

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_context.h
src/gallium/drivers/zink/zink_framebuffer.c
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_query.c
src/gallium/drivers/zink/zink_state.c
src/gallium/drivers/zink/zink_types.h