nir: add nir_shader_compiler_options::lower_to_scalar

This will replace PIPE_SHADER_CAP_SCALAR_ISA.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Marek Olšák
2019-10-07 22:46:00 -04:00
parent 7fc5919793
commit cebc38ff60
8 changed files with 9 additions and 0 deletions

View File

@@ -2668,6 +2668,7 @@ const nir_shader_compiler_options v3d_nir_options = {
.lower_mul_high = true,
.lower_wpos_pntc = true,
.lower_rotate = true,
.lower_to_scalar = true,
};
/**

View File

@@ -2736,6 +2736,7 @@ typedef struct nir_shader_compiler_options {
* for IO purposes and would prefer loads/stores be vectorized.
*/
bool vectorize_io;
bool lower_to_scalar;
/**
* Should nir_lower_io() create load_interpolated_input intrinsics?

View File

@@ -56,6 +56,7 @@ static const nir_shader_compiler_options options = {
.lower_bitfield_extract_to_shifts = true,
.use_interpolated_input_intrinsics = true,
.lower_rotate = true,
.lower_to_scalar = true,
};
/* we don't want to lower vertex_id to _zero_based on newer gpus: */
@@ -82,6 +83,7 @@ static const nir_shader_compiler_options options_a6xx = {
.use_interpolated_input_intrinsics = true,
.lower_rotate = true,
.vectorize_io = true,
.lower_to_scalar = true,
};
const nir_shader_compiler_options *

View File

@@ -919,6 +919,7 @@ static const nir_shader_compiler_options nir_options = {
.lower_all_io_to_temps = false,
.lower_cs_local_index_from_id = true,
.lower_rotate = true,
.lower_to_scalar = true,
.use_interpolated_input_intrinsics = true,
.max_unroll_iterations = 32,
};

View File

@@ -976,6 +976,7 @@ static const nir_shader_compiler_options nir_options = {
.max_unroll_iterations = 32,
.lower_int64_options = nir_lower_divmod64, // TODO
.lower_doubles_options = nir_lower_dmod, // TODO
.lower_to_scalar = true,
};
static const void *

View File

@@ -524,6 +524,7 @@ static const struct nir_shader_compiler_options nir_options = {
.lower_extract_byte = true,
.lower_extract_word = true,
.lower_rotate = true,
.lower_to_scalar = true,
.optimize_sample_mask_in = true,
.max_unroll_iterations = 32,
.use_interpolated_input_intrinsics = true,

View File

@@ -2191,6 +2191,7 @@ static const nir_shader_compiler_options nir_options = {
.lower_ldexp = true,
.lower_negate = true,
.lower_rotate = true,
.lower_to_scalar = true,
.max_unroll_iterations = 32,
};

View File

@@ -50,6 +50,7 @@
.lower_base_vertex = true
#define COMMON_SCALAR_OPTIONS \
.lower_to_scalar = true, \
.lower_pack_half_2x16 = true, \
.lower_pack_snorm_2x16 = true, \
.lower_pack_snorm_4x8 = true, \