System/Types: Add support for vec3
Non-power of two vector types were previously not supported as they would be misaligned.
Use a `constexpr` function to ensure the `alignas` is rounded to the next POT.
While the memory layout for vec3 will be identical to a vec4, this allows us to specialize templates to distinguish between `vec3` and `vec4`.
This is used by the debugger to display `vec3` locals without showing an undefined `w` component.
Bug: b/145351270
Change-Id: I61f61e42e69d367b1a625c262be970994b287433
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48708Tested-by:
Ben Clayton <bclayton@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment