Comment # 4
on bug 101442
from Gert Wollny
After reviewing the byte code of fs-if-def-else-break I found that the problem is a bit different: In the original code BREAK is called in the loop when (KC0[0].x != 0) just like implemented in the glsl code: 0002 LOOP_START_DX10 @36 0004 ALU_PUSH_BEFORE 2 @48 KC0[CB0:0-15] 0048 2 x: MOV R2.x, 1 0050 3 MP x: PRED_SETNE_INT R6.x, KC0[0].x, 0 0006 JUMP @10 << JUMP is called if condition fails 0008 ALU 2 @52 0052 4 x: MOV R2.x, [0x00000002 2.8026e-45].x 0054 00000002 0010 ELSE @16 POP:1 0012 LOOP_BREAK @34 0014 POP @16 POP:1 however, in the optimized code the assignment and its branch is optimized away, and BREAK is called when (KC0[0].x == 0), i.e. exactly the opposite of the 0002 LOOP_START_DX10 @30 0004 PUSH @6 0006 ALU 1 @38 KC0[CB0:0-15] 0038 2 M x: PRED_SETNE_INT __.x, KC0[0].x, 0 0008 JUMP @14 POP:1 << JUMP is called if condition fails 0010 LOOP_BREAK @28 0012 POP @14 POP:1 i.e. the optimizer removed the if branch, keeps the else branch but acts as if it were the if branch, hence the failure.
You are receiving this mail because:
- You are the assignee for the bug.
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel