mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 12:21:35 +00:00
In 104681 the vectors were cast to themselves to fixup an issue with `packed_int`. That CL used an `as_type` which does a bit cast. A `packed_int` can not be bitcast to an `int`. This CL changes to a type cast, so instead of `as_type<int3>()` it does `int3()`. Bug: tint:1677 Change-Id: I72218c06853e4e5ae1a0d34e2fc3e1ca597de993 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104682 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
12 lines
243 B
Plaintext
12 lines
243 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct S {
|
|
/* 0x0000 */ int4 a;
|
|
};
|
|
|
|
void foo(device S* const tint_symbol) {
|
|
(*(tint_symbol)).a = as_type<int4>((as_type<uint4>(int4((*(tint_symbol)).a)) - as_type<uint4>(int4(int4(2)))));
|
|
}
|
|
|