writer/spirv: Add Flat decoration to integers

Vulkan requires that shader inputs/outputs that are integers must be
decorated with Flat.

Bug: tint:746, dawn:956
Change-Id: I648451b9aa559d08415bada904dee5f9d1e4e60f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56400
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
James Price
2021-06-29 13:36:05 +00:00
committed by Tint LUCI CQ
parent 230295dea4
commit 5ea0fe00bf
20 changed files with 265 additions and 8 deletions

View File

@@ -26,8 +26,10 @@
OpDecorate %tint_pointsize BuiltIn PointSize
OpDecorate %tint_symbol_1 BuiltIn Position
OpDecorate %tint_symbol_2 Location 0
OpDecorate %tint_symbol_2 Flat
OpDecorate %tint_symbol_5 BuiltIn Position
OpDecorate %tint_symbol_6 Location 0
OpDecorate %tint_symbol_6 Flat
OpMemberDecorate %VertexOutput 0 Offset 0
OpMemberDecorate %VertexOutput 1 Offset 16
%float = OpTypeFloat 32