mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
When spilling arrays and matrices so that we can access them with an index computed at runtime, if we need to spill the same expression again, don't wipe out our record of the temporary variable we used the first time. Just re-use it. Fixes #7048.
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.1
|
|
; Generator: rspirv
|
|
; Bound: 39
|
|
OpCapability Shader
|
|
OpCapability Linkage
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpDecorate %5 ArrayStride 16
|
|
%2 = OpTypeVoid
|
|
%4 = OpTypeFloat 32
|
|
%3 = OpTypeVector %4 3
|
|
%7 = OpTypeInt 32 0
|
|
%6 = OpConstant %7 2
|
|
%5 = OpTypeArray %3 %6
|
|
%8 = OpTypeVector %4 4
|
|
%9 = OpTypeInt 32 1
|
|
%12 = OpTypeFunction %2
|
|
%13 = OpConstantNull %5
|
|
%14 = OpConstant %4 0.0
|
|
%15 = OpConstantComposite %8 %14 %14 %14 %14
|
|
%16 = OpConstant %9 0
|
|
%18 = OpTypePointer Function %8
|
|
%20 = OpTypePointer Function %9
|
|
%23 = OpTypePointer Function %4
|
|
%25 = OpTypePointer Function %5
|
|
%27 = OpConstant %7 1
|
|
%34 = OpConstant %7 0
|
|
%11 = OpFunction %2 None %12
|
|
%10 = OpLabel
|
|
%17 = OpVariable %18 Function %15
|
|
%19 = OpVariable %20 Function %16
|
|
%21 = OpVariable %20 Function %16
|
|
%26 = OpVariable %25 Function
|
|
OpBranch %22
|
|
%22 = OpLabel
|
|
%24 = OpLoad %9 %21
|
|
OpStore %26 %13
|
|
%28 = OpAccessChain %23 %26 %24 %27
|
|
%29 = OpLoad %4 %28
|
|
%30 = OpLoad %9 %19
|
|
OpStore %26 %13
|
|
%31 = OpAccessChain %23 %26 %30 %6
|
|
%32 = OpLoad %4 %31
|
|
%33 = OpFMul %4 %29 %32
|
|
%35 = OpAccessChain %23 %17 %34
|
|
%36 = OpLoad %4 %35
|
|
%37 = OpFAdd %4 %36 %33
|
|
%38 = OpAccessChain %23 %17 %34
|
|
OpStore %38 %37
|
|
OpReturn
|
|
OpFunctionEnd |