nir: add lower_all_io_to_temps flag

This will be used for freedreno and vc4 which require all inputs
and outputs to be copied to temps.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri
2018-01-30 10:55:19 +11:00
parent 3218756262
commit 9a2e085680
4 changed files with 5 additions and 0 deletions

View File

@@ -1874,6 +1874,7 @@ nir_to_vir(struct v3d_compile *c)
}
const nir_shader_compiler_options v3d_nir_options = {
.lower_all_io_to_temps = true,
.lower_extract_byte = true,
.lower_extract_word = true,
.lower_bitfield_insert = true,

View File

@@ -1873,6 +1873,8 @@ typedef struct nir_shader_compiler_options {
bool lower_extract_byte;
bool lower_extract_word;
bool lower_all_io_to_temps;
/**
* Does the driver support real 32-bit integers? (Otherwise, integers
* are simulated by floats.)

View File

@@ -50,6 +50,7 @@ static const nir_shader_compiler_options options = {
.vertex_id_zero_based = true,
.lower_extract_byte = true,
.lower_extract_word = true,
.lower_all_io_to_temps = true,
};
struct nir_shader *

View File

@@ -2180,6 +2180,7 @@ nir_to_qir(struct vc4_compile *c)
}
static const nir_shader_compiler_options nir_options = {
.lower_all_io_to_temps = true,
.lower_extract_byte = true,
.lower_extract_word = true,
.lower_ffma = true,