Prevent stack-use-after-scope in rendering_device_driver_metal.mm

This commit is contained in:
nikitalita 2024-11-09 00:07:33 -06:00 committed by GitHub
parent e65a23762b
commit 78895c709c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1978,7 +1978,8 @@ Vector<uint8_t> RenderingDeviceDriverMetal::shader_compile_binary_from_spirv(Vec
ERR_FAIL_COND_V_MSG(compiler.get_entry_points_and_stages().size() != 1, Result(), "Expected a single entry point and stage."); ERR_FAIL_COND_V_MSG(compiler.get_entry_points_and_stages().size() != 1, Result(), "Expected a single entry point and stage.");
EntryPoint &entry_point_stage = compiler.get_entry_points_and_stages().front(); SmallVector<EntryPoint> entry_pts_stages = compiler.get_entry_points_and_stages();
EntryPoint &entry_point_stage = entry_pts_stages.front();
SPIREntryPoint &entry_point = compiler.get_entry_point(entry_point_stage.name, entry_point_stage.execution_model); SPIREntryPoint &entry_point = compiler.get_entry_point(entry_point_stage.name, entry_point_stage.execution_model);
// Process specialization constants. // Process specialization constants.