nir: add pass to lower discard() to demote()
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 4 Mar 2020 15:55:13 +0000 (16:55 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Mar 2020 12:29:32 +0000 (12:29 +0000)
commitce87da71e93d9eea7e9a2667e3273cab9c97667f
treebece32f0db7bb5f02c3ef7b8be61b5fe818c2f9e
parent5adcfa68a935f866dd76f87a189108fbbf226630
nir: add pass to lower discard() to demote()

This pass is intended to work around game bugs, only!
It also lowers nir_intrinsic_load_helper_invocation to
nir_intrinsic_is_helper_invocation for consistency.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4047>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_discard_to_demote.c [new file with mode: 0644]