intel/nir: Extract add_const_offset_to_base

Pretty much every driver using nir_lower_io_to_temporaries followed by
nir_lower_io is going to want this. In particular, radv and radeonsi in
the next commits.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Connor Abbott
2019-05-14 12:10:11 +02:00
parent c45f5db527
commit 6b28808b22
3 changed files with 100 additions and 74 deletions

View File

@@ -3171,6 +3171,8 @@ bool nir_lower_io(nir_shader *shader,
int (*type_size)(const struct glsl_type *, bool),
nir_lower_io_options);
bool nir_io_add_const_offset_to_base(nir_shader *nir, nir_variable_mode mode);
typedef enum {
/**
* An address format which is a simple 32-bit global GPU address.