Revert "i965/fs: Merge CMP and SEL into CSEL on Gen8+"
This reverts commit 52c7df1643
. The pass,
while clearly useful for some shaders, has at least three bugs that I
was able to find fairly quickly:
1. It doesn't work for type-converting MOVs because f > 0 is not the
same as f2i(f) > 0
2. CSEL is a 3src instruction and only supports one source type; it
doesn't take this into account and tries to create instructions
which do a F compare and a D select. This is especially nasty to
debug because you don't see that in the dumped assembly because we
don't properly assert that types are the same in codegen.
3. While you can handle 2, in theory, by reinterpreting types, you
can't do that in the presence of source modifiers. This pass
doesn't even attempt to detect that.
Those are just the ones I found with the one almost trival shader I was
debugging. There very likely may be more and. Best thing to do for now
is just shut it off until someone has the time to figure out how to do
this properly and write tests to ensure it's correct.
Fixes: 3cb085e6d61a "i965/fs: Merge CMP and SEL into CSEL on Gen8+"
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -190,7 +190,6 @@ public:
|
||||
fs_reg result, fs_reg *op, unsigned fsign_src);
|
||||
void emit_shader_float_controls_execution_mode();
|
||||
bool opt_peephole_sel();
|
||||
bool opt_peephole_csel();
|
||||
bool opt_peephole_predicated_break();
|
||||
bool opt_saturate_propagation();
|
||||
bool opt_cmod_propagation();
|
||||
|
Reference in New Issue
Block a user