diff --git a/src/dawn/native/d3d12/RenderPipelineD3D12.cpp b/src/dawn/native/d3d12/RenderPipelineD3D12.cpp index 6c8a6fbeac..0a8532583f 100644 --- a/src/dawn/native/d3d12/RenderPipelineD3D12.cpp +++ b/src/dawn/native/d3d12/RenderPipelineD3D12.cpp @@ -358,11 +358,12 @@ MaybeError RenderPipeline::Initialize() { PerStage compiledShader; std::bitset* usedInterstageVariables = nullptr; + dawn::native::EntryPointMetadata fragmentEntryPoint; if (GetStageMask() & wgpu::ShaderStage::Fragment) { // Now that only fragment shader can have interstage inputs. const ProgrammableStage& programmableStage = GetStage(SingleShaderStage::Fragment); - auto entryPoint = programmableStage.module->GetEntryPoint(programmableStage.entryPoint); - usedInterstageVariables = &entryPoint.usedInterStageVariables; + fragmentEntryPoint = programmableStage.module->GetEntryPoint(programmableStage.entryPoint); + usedInterstageVariables = &fragmentEntryPoint.usedInterStageVariables; } for (auto stage : IterateStages(GetStageMask())) {