Latest YouTube Video

Friday, June 12, 2015

[FD] The token order of OpVectorTimesScalar and OpMatrixTimesScalar which generated in glslangValidator isn't consistant with SPEC

Hi, According to SPIR-V spec, OpVectorTimesScalar's first source operand is vector and secondary is scalar, and OpMatrixTimesScalar's first source operand is matrix and secondary is scalar. But it seems the token order generated by glslangValidator isn't consistant with sepc. It is better if you can update glslangValidator to match spec's behavior. following is a simple sample, in case you need it. Example: GLSL soruce: #version 440 in layout(location = 0) vec4 v0; in layout(location = 1) float s1; in layout(location = 2) mat4 m2; out layout(location = 2) mat4 om2; void main() { gl_Position = s1 * v0; om2 = s1 * m2; } SPIR-V generated glslangValidator: ... 4(main): 2 Function None 3 5: Label 20: 7(float) Load 19(s1) 23: 8(fvec4) Load 22(v0) 24: 8(fvec4) VectorTimesScalar 20 23 <== 20 is float and 23 is vector 26: 25(ptr) AccessChain 15 17 Store 26 24 30: 7(float) Load 19(s1) 33: 27 Load 32(m2) 34: 27 MatrixTimesScalar 30 33 <== 30 is float and 33 is matrix Store 29(om2) 34 Branch 6 6: Label Return FunctionEnd Best Regards Qun

Source: Gmail -> IFTTT-> Blogger

No comments: