mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 03:41:34 +00:00
* Extract ast::Enable::ExtensionKind to ast::Extension. * Move the parsing out of ast::Enable and next to ast/extension.h * Change the ast::Enable constructor to take the Extension, instead of a std::string. It's the WGSL parser's responsibility to parse, not the AST nodes. * Add ProgramBuilder::Enable() helper. * Keep ast::Module simple - keep track of the declared AST Enable nodes, don't do any deduplicating of the enabled extensions. * Add the de-duplicated ast::Extensions to the sem::Module. * Remove the kInternalExtensionForTesting enum value - we have kF16 now, which can be used instead for testing. * Rename kNoExtension to kNone. Bug: tint:1472 Change-Id: I9af635e95d36991ea468e6e0bf6798bb50937edc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90523 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 19
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %value
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %value "value"
|
|
OpName %main_inner "main_inner"
|
|
OpName %main "main"
|
|
OpDecorate %value Location 0
|
|
%float = OpTypeFloat 32
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
%5 = OpConstantNull %v4float
|
|
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
%6 = OpTypeFunction %v4float
|
|
%float_0_100000001 = OpConstant %float 0.100000001
|
|
%float_0_200000003 = OpConstant %float 0.200000003
|
|
%float_0_300000012 = OpConstant %float 0.300000012
|
|
%float_0_400000006 = OpConstant %float 0.400000006
|
|
%13 = OpConstantComposite %v4float %float_0_100000001 %float_0_200000003 %float_0_300000012 %float_0_400000006
|
|
%void = OpTypeVoid
|
|
%14 = OpTypeFunction %void
|
|
%main_inner = OpFunction %v4float None %6
|
|
%8 = OpLabel
|
|
OpReturnValue %13
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %14
|
|
%17 = OpLabel
|
|
%18 = OpFunctionCall %v4float %main_inner
|
|
OpStore %value %18
|
|
OpReturn
|
|
OpFunctionEnd
|