r300: fix handling swizzle in transform_source_conflicts
As usage of 2 inputs/const sources in one instruction requires introducing additional temps, the question arises "what to do with swizzles?". The old approach with using original swizzle in mov operation requires that all opcodes are "conscious" about potential extra mov. (This makes code overly complicated and can cause bugs like this one.) New approach is to create clean copy.
Before (swizzle used when copying and XYZW swizzle in original operation):
Vertex Program: after 'dataflow optimize'
# Radeon Compiler Program
0: POW output[1].y, input[1]._w__, input[2]._y__;
1: POW output[1].z, input[1].__y_, input[2].__x_;
2: MOV output[1].xw, none.0__1;
3: MOV output[0], input[0];
4: MOV output[2], input[0];
Vertex Program: after 'source conflict resolve'
# Radeon Compiler Program
0: MOV temp[0], input[2]._y__;
1: POW output[1].y, input[1]._w__, temp[0]; // so overall temp[0].xyzw, and first x (with garbage) is used
2: MOV temp[1], input[2].__x_;
3: POW output[1].z, input[1].__y_, temp[1]; // so overall temp[0].xyxw, and first x (with garbage) is used
4: MOV output[1].xw, none.0__1;
5: MOV output[0], input[0];
6: MOV output[2], input[0];
After (clean copy and swizzle used in original operation):
Vertex Program: after 'dataflow optimize'
# Radeon Compiler Program
0: POW output[1].y, input[1]._w__, input[2]._y__;
1: POW output[1].z, input[1].__y_, input[2].__x_;
2: MOV output[1].xw, none.0__1;
3: MOV output[0], input[0];
4: MOV output[2], input[0];
Vertex Program: after 'source conflict resolve'
# Radeon Compiler Program
0: MOV temp[0], input[2];
1: POW output[1].y, input[1]._w__, temp[0]._y__;
2: MOV temp[1], input[2];
3: POW output[1].z, input[1].__y_, temp[1].__x_;
4: MOV output[1].xw, none.0__1;
5: MOV output[0], input[0];
6: MOV output[2], input[0];
Fixes:
dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec2_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec3_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.highp_vec4_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec2_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec3_vertex,Fail
dEQP-GLES2.functional.shaders.operator.exponential.pow.mediump_vec4_vertex,Fail
Unfortunately on my RV535 tests for floats are still failing.
dEQP-GLES2.performance.shaders.operator.exponential.pow.vertex.highp_float
dEQP-GLES2.performance.shaders.operator.exponential.pow.vertex.lowp_float
dEQP-GLES2.performance.shaders.operator.exponential.pow.vertex.mediump_float