mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-17 04:41:23 +00:00
As the resolver currently enforces in-order declarations, this does not change the declaration order from iterating over the ast::Module::GlobalDeclarations. The MSL backend has been changed to use the sem::Module::DependencyOrderedDeclarations list instead of looping over different declaration types separately. Bug: tint:1266 Change-Id: I698d612032285311017bfceab3c42adae1928a0e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79767 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct In {
|
|
float none;
|
|
float flat;
|
|
float perspective_center;
|
|
float perspective_centroid;
|
|
float perspective_sample;
|
|
float linear_center;
|
|
float linear_centroid;
|
|
float linear_sample;
|
|
};
|
|
|
|
struct tint_symbol_2 {
|
|
float none [[user(locn0)]];
|
|
float flat [[user(locn1)]] [[flat]];
|
|
float perspective_center [[user(locn2)]] [[center_perspective]];
|
|
float perspective_centroid [[user(locn3)]] [[centroid_perspective]];
|
|
float perspective_sample [[user(locn4)]] [[sample_perspective]];
|
|
float linear_center [[user(locn5)]] [[center_no_perspective]];
|
|
float linear_centroid [[user(locn6)]] [[centroid_no_perspective]];
|
|
float linear_sample [[user(locn7)]] [[sample_no_perspective]];
|
|
};
|
|
|
|
void tint_symbol_inner(In in) {
|
|
}
|
|
|
|
fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
|
In const tint_symbol_3 = {.none=tint_symbol_1.none, .flat=tint_symbol_1.flat, .perspective_center=tint_symbol_1.perspective_center, .perspective_centroid=tint_symbol_1.perspective_centroid, .perspective_sample=tint_symbol_1.perspective_sample, .linear_center=tint_symbol_1.linear_center, .linear_centroid=tint_symbol_1.linear_centroid, .linear_sample=tint_symbol_1.linear_sample};
|
|
tint_symbol_inner(tint_symbol_3);
|
|
return;
|
|
}
|
|
|