mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-30 14:39:42 +08:00
105c58b380
ScalarLoadReadsTrackedFallbackMemory swaps the process-global static Gen5ShaderScalarEvaluator.FallbackMemoryReader under a lock private to the test class. The SharpEmu.Libs [ModuleInitializer] (AgcShaderCompilerHooks) assigns the same static to TryReadShaderGuestMemory the first time any Libs type is touched, and it does not take that lock. Under xUnit's default cross-class parallelism a concurrent Libs test could fire the initializer mid-test, clobbering the swapped-in reader — observed on CI (linux-x64) as the fallback returning all zeros: Expected [1181044592, 4, 1319632096, 4], Actual [0, 0, 0, 0]. Put the test in a DisableParallelization collection, matching the existing convention for shared-mutable-static tests (KernelMemoryCompatState, AjmState, AvPlayerPathState). The collection runs alone in the non-parallel phase, so no other test can mutate the static while this one holds it. Co-authored-by: slick-daddy <slick-daddy@users.noreply.github.com>