dawn-cmake/test/types/sampler.wgsl.expected.spvasm
James Price 830b97ffa9 writer/msl: Handle texture and sampler variables
Move these module-scope variables to entry point parameters and pass
them as arguments to functions that use them. Disable entry point IO
validation for them.

Emit [[texture()]] and [[sampler()]] attributes on these entry point
parameters.

Fixed: tint:145
Change-Id: I936a80801875a5d0b6cd98a2e8f3e297a2f53509
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53961
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-06-11 12:34:26 +00:00

30 lines
1.0 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 14
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %s "s"
OpName %sc "sc"
OpName %main "main"
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 0
OpDecorate %sc DescriptorSet 0
OpDecorate %sc Binding 1
%3 = OpTypeSampler
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
%s = OpVariable %_ptr_UniformConstant_3 UniformConstant
%_ptr_UniformConstant_3_0 = OpTypePointer UniformConstant %3
%sc = OpVariable %_ptr_UniformConstant_3_0 UniformConstant
%void = OpTypeVoid
%6 = OpTypeFunction %void
%main = OpFunction %void None %6
%9 = OpLabel
%11 = OpLoad %3 %s
%13 = OpLoad %3 %sc
OpReturn
OpFunctionEnd