r600/sfn: lower to scalar with filter applied
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9943>
This commit is contained in:
@@ -1181,6 +1181,8 @@ r600_get_compiler_options(struct pipe_screen *screen,
|
|||||||
return &rscreen->nir_options;
|
return &rscreen->nir_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool r600_lower_to_scalar_instr_filter(const nir_instr *instr, const void *);
|
||||||
|
|
||||||
bool r600_common_screen_init(struct r600_common_screen *rscreen,
|
bool r600_common_screen_init(struct r600_common_screen *rscreen,
|
||||||
struct radeon_winsys *ws)
|
struct radeon_winsys *ws)
|
||||||
{
|
{
|
||||||
@@ -1330,6 +1332,8 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
|
|||||||
.lower_bitfield_insert_to_bitfield_select = true,
|
.lower_bitfield_insert_to_bitfield_select = true,
|
||||||
.has_fused_comp_and_csel = true,
|
.has_fused_comp_and_csel = true,
|
||||||
.lower_find_msb_to_reverse = true,
|
.lower_find_msb_to_reverse = true,
|
||||||
|
.lower_to_scalar = true,
|
||||||
|
.lower_to_scalar_filter = r600_lower_to_scalar_instr_filter,
|
||||||
};
|
};
|
||||||
|
|
||||||
rscreen->nir_options = nir_options;
|
rscreen->nir_options = nir_options;
|
||||||
|
@@ -810,6 +810,7 @@ bool has_saturate(const nir_function *func)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
bool r600_lower_to_scalar_instr_filter(const nir_instr *instr, const void *)
|
bool r600_lower_to_scalar_instr_filter(const nir_instr *instr, const void *)
|
||||||
{
|
{
|
||||||
if (instr->type != nir_instr_type_alu)
|
if (instr->type != nir_instr_type_alu)
|
||||||
@@ -875,8 +876,6 @@ int r600_shader_from_nir(struct r600_context *rctx,
|
|||||||
NIR_PASS_V(sel->nir, nir_lower_int64);
|
NIR_PASS_V(sel->nir, nir_lower_int64);
|
||||||
while(optimize_once(sel->nir, false));
|
while(optimize_once(sel->nir, false));
|
||||||
|
|
||||||
NIR_PASS_V(sel->nir, nir_lower_alu_to_scalar, r600_lower_to_scalar_instr_filter, NULL);
|
|
||||||
|
|
||||||
NIR_PASS_V(sel->nir, r600_lower_shared_io);
|
NIR_PASS_V(sel->nir, r600_lower_shared_io);
|
||||||
NIR_PASS_V(sel->nir, r600_nir_lower_atomics);
|
NIR_PASS_V(sel->nir, r600_nir_lower_atomics);
|
||||||
|
|
||||||
|
@@ -146,6 +146,7 @@ extern "C" {
|
|||||||
|
|
||||||
bool r600_vectorize_vs_inputs(nir_shader *shader);
|
bool r600_vectorize_vs_inputs(nir_shader *shader);
|
||||||
|
|
||||||
|
bool r600_lower_to_scalar_instr_filter(const nir_instr *instr, const void *);
|
||||||
|
|
||||||
int r600_shader_from_nir(struct r600_context *rctx,
|
int r600_shader_from_nir(struct r600_context *rctx,
|
||||||
struct r600_pipe_shader *pipeshader,
|
struct r600_pipe_shader *pipeshader,
|
||||||
|
Reference in New Issue
Block a user