Ben Clayton fe08ba4677 builtins: Add insertBits
CTS tests: https://github.com/gpuweb/cts/pull/1012

Bug: tint:1371
Change-Id: Idd55c0bc9dad1dffb558d0bc57d744f65e9041b5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81701
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
2022-02-23 21:18:09 +00:00

31 lines
1.3 KiB
Plaintext

OpCapability Shader
%13 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %f "f"
OpName %v "v"
OpName %n "n"
OpName %offset "offset"
OpName %count "count"
%void = OpTypeVoid
%1 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%8 = OpConstantNull %uint
%uint_31 = OpConstant %uint 31
%uint_32 = OpConstant %uint 32
%f = OpFunction %void None %1
%4 = OpLabel
%v = OpVariable %_ptr_Function_uint Function %8
%n = OpVariable %_ptr_Function_uint Function %8
%offset = OpVariable %_ptr_Function_uint Function %8
%count = OpVariable %_ptr_Function_uint Function %8
%14 = OpLoad %uint %v
%15 = OpLoad %uint %n
%16 = OpLoad %uint %offset
%17 = OpLoad %uint %count
%12 = OpBitFieldInsert %uint %14 %15 %16 %17
OpReturn
OpFunctionEnd