From e55d2255f6e73ddacd74e6a2ee13de90a320dc5c Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 12 Nov 2026 10:42:26 -0800 Subject: [PATCH] Lane: the rate-map cost lane compiles its fixture's text in, to run off its builder --- .../src/runtime_lane/rate_map_costs.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/metal2vulkan-validation/src/runtime_lane/rate_map_costs.rs b/crates/metal2vulkan-validation/src/runtime_lane/rate_map_costs.rs index 3ebb833dc..9d48ea6b3 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/rate_map_costs.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/rate_map_costs.rs @@ -17,7 +17,8 @@ //! //! Ignored by default: a measurement, not a check. Run it by name with `--run-ignored all`, in a //! build with `--cfg m2v_system_alloc`, whose lib test binary keeps the system allocator as a -//! consumer's process does. +//! consumer's process does. The fixture's text is compiled in, so the binary also runs on a +//! machine other than the one that built it. use super::draw_costs::{percentiles, thread_cpu}; use super::{buffer_with, validated_device_with, Messages, ScratchCache, WAIT}; @@ -28,7 +29,7 @@ use metal2vulkan::metal::{ IndexType, IndirectCommandType, PixelFormat, PrimitiveType, TextureUsage, }; use metal2vulkan::pipeline::{ColorAttachmentDescriptor, RenderPipelineDescriptor, StageSource}; -use metal2vulkan_devtools::{engine_dir, llvm_assemble}; +use metal2vulkan_devtools::llvm_assemble_text; use metal2vulkan_runtime::{ Buffer, CommandBufferStatus, CommandQueue, Device, IndirectCommandBuffer, IndirectCommandBufferDescriptor, LoadAction, PipelineOptions, RasterizationRateMap, @@ -66,9 +67,9 @@ struct Frame { impl Workload { fn new(device: Device) -> Workload { - let ll = engine_dir().join("tob_renders.ll"); + let ll = include_str!("../../fixtures/public/engine/tob_renders.ll"); let library = device - .new_library_with_air(&llvm_assemble(&ll).unwrap()) + .new_library_with_air(&llvm_assemble_text(ll).unwrap()) .unwrap(); let function = |name| { StageSource::Function(