85749c0b22
On ARM GPUs, the Vulkan driver does not honor relaxed precision when evaluating SpvOpMatrixTimesVector. This leads to reduced performance (compared to GLSL, where mediump matrices and floats do evaluate all intermediate values at mediump). This caps bit will be enabled on ARM GPUs and, in a followup CL, will be used to toggle a workaround where `m*v` is rewritten as the sum of (m[0]*v[0] + m[1]*v[1] + ... + m[N]*v[N]). Change-Id: I310fa73639b6498552c9672e76860f2eded15d0a Bug: skia:11769 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388459 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
8 lines
157 B
Plaintext
8 lines
157 B
Plaintext
/*#pragma settings RewriteMatrixVectorMultiply*/
|
|
|
|
half4 main() {
|
|
half4x4 m44 = half4x4(123);
|
|
half4 v4 = half4(0, 1, 2, 3);
|
|
return m44 * v4;
|
|
}
|