mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
wgsl: Implement invariant attribute
Make sure the other backends ICE on unrecognized attributes. Add E2E tests, currently skipped for the other backends. Bug: tint:772 Change-Id: I4e68d111ff79b19ebb6c574058a91debcb746011 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57642 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
508d2491d0
commit
fcc0de0b86
4
test/shader_io/invariant.wgsl
Normal file
4
test/shader_io/invariant.wgsl
Normal file
@@ -0,0 +1,4 @@
|
||||
[[stage(vertex)]]
|
||||
fn main() -> [[builtin(position), invariant]] vec4<f32> {
|
||||
return vec4<f32>();
|
||||
}
|
||||
10
test/shader_io/invariant.wgsl.expected.hlsl
Normal file
10
test/shader_io/invariant.wgsl.expected.hlsl
Normal file
@@ -0,0 +1,10 @@
|
||||
SKIP: FAILED
|
||||
|
||||
../../src/writer/hlsl/generator_impl.cc:3056 internal compiler error: unhandled struct member attribute: invariant
|
||||
********************************************************************
|
||||
* The tint shader compiler has encountered an unexpected error. *
|
||||
* *
|
||||
* Please help us fix this issue by submitting a bug report at *
|
||||
* crbug.com/tint with the source program that triggered the bug. *
|
||||
********************************************************************
|
||||
|
||||
10
test/shader_io/invariant.wgsl.expected.msl
Normal file
10
test/shader_io/invariant.wgsl.expected.msl
Normal file
@@ -0,0 +1,10 @@
|
||||
SKIP: FAILED
|
||||
|
||||
../../src/writer/msl/generator_impl.cc:1990 internal compiler error: unhandled struct member attribute: invariant
|
||||
********************************************************************
|
||||
* The tint shader compiler has encountered an unexpected error. *
|
||||
* *
|
||||
* Please help us fix this issue by submitting a bug report at *
|
||||
* crbug.com/tint with the source program that triggered the bug. *
|
||||
********************************************************************
|
||||
|
||||
9
test/shader_io/invariant.wgsl.expected.spvasm
Normal file
9
test/shader_io/invariant.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,9 @@
|
||||
SKIP: FAILED
|
||||
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() -> [[builtin(position), invariant]] vec4<f32> {
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
Failed to generate: unknown decoration
|
||||
4
test/shader_io/invariant.wgsl.expected.wgsl
Normal file
4
test/shader_io/invariant.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,4 @@
|
||||
[[stage(vertex)]]
|
||||
fn main() -> [[builtin(position), invariant]] vec4<f32> {
|
||||
return vec4<f32>();
|
||||
}
|
||||
8
test/shader_io/invariant_struct_member.wgsl
Normal file
8
test/shader_io/invariant_struct_member.wgsl
Normal file
@@ -0,0 +1,8 @@
|
||||
struct Out {
|
||||
[[builtin(position), invariant]] pos : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() -> Out {
|
||||
return Out();
|
||||
}
|
||||
10
test/shader_io/invariant_struct_member.wgsl.expected.hlsl
Normal file
10
test/shader_io/invariant_struct_member.wgsl.expected.hlsl
Normal file
@@ -0,0 +1,10 @@
|
||||
SKIP: FAILED
|
||||
|
||||
../../src/writer/hlsl/generator_impl.cc:3056 internal compiler error: unhandled struct member attribute: invariant
|
||||
********************************************************************
|
||||
* The tint shader compiler has encountered an unexpected error. *
|
||||
* *
|
||||
* Please help us fix this issue by submitting a bug report at *
|
||||
* crbug.com/tint with the source program that triggered the bug. *
|
||||
********************************************************************
|
||||
|
||||
10
test/shader_io/invariant_struct_member.wgsl.expected.msl
Normal file
10
test/shader_io/invariant_struct_member.wgsl.expected.msl
Normal file
@@ -0,0 +1,10 @@
|
||||
SKIP: FAILED
|
||||
|
||||
../../src/writer/msl/generator_impl.cc:1990 internal compiler error: unhandled struct member attribute: invariant
|
||||
********************************************************************
|
||||
* The tint shader compiler has encountered an unexpected error. *
|
||||
* *
|
||||
* Please help us fix this issue by submitting a bug report at *
|
||||
* crbug.com/tint with the source program that triggered the bug. *
|
||||
********************************************************************
|
||||
|
||||
14
test/shader_io/invariant_struct_member.wgsl.expected.spvasm
Normal file
14
test/shader_io/invariant_struct_member.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,14 @@
|
||||
SKIP: FAILED
|
||||
|
||||
|
||||
struct Out {
|
||||
[[builtin(position), invariant]]
|
||||
pos : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() -> Out {
|
||||
return Out();
|
||||
}
|
||||
|
||||
Failed to generate: unknown decoration
|
||||
@@ -0,0 +1,9 @@
|
||||
struct Out {
|
||||
[[builtin(position), invariant]]
|
||||
pos : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() -> Out {
|
||||
return Out();
|
||||
}
|
||||
Reference in New Issue
Block a user