nir: Add nir_load_interpolated_input lowering code.
Now nir_lower_io can optionally produce load_interpolated_input and load_barycentric_* intrinsics for fragment shader inputs. flat inputs continue using regular load_input. v2: Use a nir_shader_compiler_options flag rather than ad-hoc boolean passing (in response to review feedback from Chris Forbes). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -1699,6 +1699,14 @@ typedef struct nir_shader_compiler_options {
|
||||
bool vertex_id_zero_based;
|
||||
|
||||
bool lower_cs_local_index_from_id;
|
||||
|
||||
/**
|
||||
* Should nir_lower_io() create load_interpolated_input intrinsics?
|
||||
*
|
||||
* If not, it generates regular load_input intrinsics and interpolation
|
||||
* information must be inferred from the list of input nir_variables.
|
||||
*/
|
||||
bool use_interpolated_input_intrinsics;
|
||||
} nir_shader_compiler_options;
|
||||
|
||||
typedef struct nir_shader_info {
|
||||
|
Reference in New Issue
Block a user