You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vulkan: Support vertex attribute aliasing for matrix types
This change builds on vertex attribute aliasing SPIR-V tranformation for
non-matrix types to add support for matrix attribute types. This is
done by turning every matrix attribute declaration into multiple vector
attribute declarations, and reusing the same mechanism for resolving
aliasing between non-matrix types.
Take the following example:
attribute mat4 a; // location 0
attribute vec3 b; // location 1
attribute mat3 c; // location 1
attribute vec4 d; // location 2
The shader is modified as such:
attribute vec4 a_0; // location 0
attribute vec4 a_1; // location 1
attribute vec4 a_2; // location 2
attribute vec4 a_3; // location 3
attribute vec3 c_0; // location 4
attribute vec4 d; // location 5
attribute vec3 c_2; // location 6
mat4 a;
mat3 c;
and in the beginning of main(), the following code is inserted:
a = mat4(a_0, a_1, a_2, a_3);
c = mat3(c_0, d.xyz, c_2);
The shader continues to use a and c as before.
Bug: angleproject:4249
Change-Id: Idfcb8c6037ca0c1f21de8203d7e2a1b66fed6e7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488128
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
0 commit comments