mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
r300: remove the ntr lower_cmp option
Only used in nir_lower_bool_to_float, so just hardcode the logic there. Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663>
This commit is contained in:
parent
4735265187
commit
2de9142f9f
3 changed files with 1 additions and 18 deletions
|
|
@ -1283,30 +1283,15 @@ ntr_emit_alu(struct ntr_compile *c, nir_alu_instr *instr)
|
|||
break;
|
||||
|
||||
case nir_op_fcsel:
|
||||
/* If CMP isn't supported, then the flags that enable NIR to generate
|
||||
* this opcode should also not be set.
|
||||
*/
|
||||
assert(!c->options->lower_cmp);
|
||||
|
||||
/* Implement this as CMP(-abs(src0), src1, src2). */
|
||||
ntr_CMP(c, dst, ureg_negate(ureg_abs(src[0])), src[1], src[2]);
|
||||
break;
|
||||
|
||||
case nir_op_fcsel_gt:
|
||||
/* If CMP isn't supported, then the flags that enable NIR to generate
|
||||
* these opcodes should also not be set.
|
||||
*/
|
||||
assert(!c->options->lower_cmp);
|
||||
|
||||
ntr_CMP(c, dst, ureg_negate(src[0]), src[1], src[2]);
|
||||
break;
|
||||
|
||||
case nir_op_fcsel_ge:
|
||||
/* If CMP isn't supported, then the flags that enable NIR to generate
|
||||
* these opcodes should also not be set.
|
||||
*/
|
||||
assert(!c->options->lower_cmp);
|
||||
|
||||
/* Implement this as if !(src0 < 0.0) was identical to src0 >= 0.0. */
|
||||
ntr_CMP(c, dst, src[0], src[2], src[1]);
|
||||
break;
|
||||
|
|
@ -2402,7 +2387,7 @@ const void *nir_to_rc_options(struct nir_shader *s,
|
|||
NIR_PASS_V(s, nir_copy_prop);
|
||||
NIR_PASS_V(s, r300_nir_post_integer_lowering);
|
||||
NIR_PASS_V(s, nir_lower_bool_to_float,
|
||||
!options->lower_cmp && !options->lower_fabs);
|
||||
is_r500 || s->info.stage == MESA_SHADER_FRAGMENT);
|
||||
/* bool_to_float generates MOVs for b2f32 that we want to clean up. */
|
||||
NIR_PASS_V(s, nir_copy_prop);
|
||||
/* CSE cleanup after late ftrunc lowering. */
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ struct pipe_screen;
|
|||
struct pipe_shader_state;
|
||||
|
||||
struct nir_to_rc_options {
|
||||
bool lower_cmp;
|
||||
/* Emit MAX(a,-a) instead of abs src modifier) */
|
||||
bool lower_fabs;
|
||||
bool lower_ssbo_bindings;
|
||||
|
|
|
|||
|
|
@ -1923,7 +1923,6 @@ static void* r300_create_vs_state(struct pipe_context* pipe,
|
|||
if (vs->state.type == PIPE_SHADER_IR_NIR) {
|
||||
static const struct nir_to_rc_options swtcl_options = {0};
|
||||
static const struct nir_to_rc_options hwtcl_r300_options = {
|
||||
.lower_cmp = true,
|
||||
.lower_fabs = true,
|
||||
};
|
||||
static const struct nir_to_rc_options hwtcl_r500_options = {0};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue