Repository navigation
Conversation
yeetbot90
force-pushed
the
fix/windows-movie-and-first-scene
branch
from
November 12, 2026 16:45
395059c to
36f7b20
Compare
A decoder slower than the gap between pictures was asked to decode the next one so it could be dropped. The clock gained every decode, and the opening skipped 1933 of 2221 pictures. The first acquire waits about 500 ms, by the same clock as the later 100 ms wait, and a stopped decoder still does not wait. Co-authored-by: Cursor <cursoragent@cursor.com>
Intel's compiler on Windows was entered by several threads, and vkCreateShaderModule had no guard. A read of address 0x170 in igvk64 ended the process during the first scene. On that driver one thread enters the compiler, and a fault drops the shader instead of the process. Other vendors, and Intel on other systems, are unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Declaring them in the header made a second function beside the ones in the unnamed namespace, so every call in vk_draw.cpp was ambiguous and the Windows build stopped. Other files call the same functions through a wrapper. Co-authored-by: Cursor <cursoragent@cursor.com>
…a tenth The stopped-decoder check was still counting a decoder that had already acquired once. Co-authored-by: Cursor <cursoragent@cursor.com>
…ered one thread at a time Co-authored-by: Cursor <cursoragent@cursor.com>
yeetbot90
force-pushed
the
fix/windows-movie-and-first-scene
branch
from
November 12, 2026 16:49
36f7b20 to
285f2b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
��What this is for: a Windows PC with Intel UHD Graphics can play the opening movie instead of skipping almost every picture, and can get into the first scene without the process dying inside Intel's compiler. What is measured: game-free checks on Windows, including the movie check run against this branch and against the source from before the movie change. Not measured: the reporter's game was not run again, on that UHD or on any other GPU. No pictures.
This branch is current
main(b157c3e8). #2827 is already merged there, so it is not repeated here.Problem
From one Windows log, build
v2.1.0-rc.3-256-g51da0464, Intel UHD Graphics, Vulkan 1.4, driver0x195bb0/ Intel Corporation 101.7088, 4 logical processors, shaders not prepared at the build.dec_acquire(host/nn_video.c) waits about 100 ms for the first picture, then hands the buffer out black. The first decode took 426.1 ms. The log saysthe first buffer went out before the first picture was decoded (shown black)twice.movie upscaling uses the linear compute path). The coop-matrix movie networks stayed left out. That is unchanged.the shaders' preparation was skipped at the build). One submit wasslow submit: 109326.6 ms(draw 108018.5 ms, pipelines 7.1 ms). Later:134.8 draws left out (not ready), skips atvk_draw.cpp6756 and 6752,312 pipelines (203441 ms). Those draws are the mesh fallback waiting on compute pipelines. They are not what killed the process.CRASH: exception 0xc0000005 (read 0x170, guest 0xfffff00000000170) at igvk64.dll+0x14d102, backtraceigvk64.dll+0x14d102 igvk64.dll+0x134aaf igvk64.dll+0x7f23a igvk64.dll+0x322ef hookshot_vk.dll+0x21d861 hookshot_vk.dll+0x23467d ucrtbase.dll+0x2cd30 KERNEL32.DLL+0x2dda7 ntdll.dll+0x7ee4c. The log has nodriver faulted compilingline, so the fault was not insideguarded_graphicsorguarded_compute.vkCreateShaderModuleandgpl_link's pipeline create were not guarded, and graphics pipelines were still built side by side.0775215f8da720e6(512x288 -> 1536x864) squares the decoded sqrt values on purpose. That math is unchanged. An unbound storage buffer reported as reading zeros is unchanged.What changed
host/nn_video.cdec_acquire: the first acquire waits ~500 ms for a picture, by the same clock as fix(host): a movie's end no longer waits ~250 ms for a picture that is not coming #2682's later ~100 ms wait. A Stop or Flush with nothing submitted since still does not wait.HOS_VIDEO_ACQUIRE_TRIES=1is still 50 tries. If the mean decode time is already longer than the gap between pictures, the late picture is shown instead of decoding another one in order to drop it. Pictures already queued are still dropped.HOS_VIDEO_NO_CATCHUP=1still skips nothing.gpu/vk/vk_internal.hIntelDriverGate: on Windows, vendor0x8086only, one thread entersvkCreateShaderModuleandvkCreate*Pipelines.RX_VK_NO_INTEL_SERIALleaves them side by side. NVIDIA, AMD, and Intel on other systems take no lock.guarded_shader_module(gpu/vk/vk_draw.cpp): a fault comes back as result -77 and that program is left out.gpl_link, the movie and upscale helpers, a masked clear's modules, and the compute warm pass call it in this file.make_moduleand the temporal pipelines call the same functions throughextern_guarded_*, because a header declaration ofguarded_*itself was a second function and the Windows build rejected every call as ambiguous. A masked clear does not hold the gate acrosscached_graphics, which takes the same lock.readme.mdanddocs/development.mdsay what the movie does now and nameRX_VK_NO_INTEL_SERIAL,HOS_VIDEO_NO_CATCHUPandHOS_VIDEO_ACQUIRE_TRIES.How it was tested
Windows, clang 22.1.5 (
x86_64-pc-windows-msvc), 2026-11-12. No game window. Rebased ontomainb157c3e8.python -I -B tests/test_video_catchup.py: printedok. The same test againsthost/nn_video.cfrom before this movie change printedFAIL: the first acquire waits ~500 ms for a picture,FAIL: an acquire after the first waits ~100 ms, andFAIL: a decoder slower than the pictures shows the late one instead of decoding in order to skip it, then exited 1. The fast-decoder case still passed on that old source.python -I -B tests/test_vcore_video_acquire.py: printedok. The first acquire waits ~500 ms, an acquire after that ~100 ms even when a sleep takes 5 ms, and a stopped decoder does not wait.python -I -B tests/test_intel_compiler_gate.py: printedIntel's compiler on Windows is entered by one thread, and a fault leaves that shader out: ok.python -I -B tests/test_shader_module_guard.py: the extractedguarded_shader_module, with a stand-in that raises an access violation after writing a handle, printeda fault creating a shader module leaves that program out: ok.test_opening_skip.py,test_driver_faults.py,test_masked_clear_failure.py,test_program_cache_cleanup.py,test_upscale_fallback.py,test_precompile_compute_guard.py.guarded_computeandguarded_shader_modulein the header made a second function, and llvm-mingw reported the calls ambiguous. The wrappers are the fix.tests/run_all.pywas not run as a whole.Not tested
Risks
RX_VK_NO_INTEL_SERIALturns that off.igvk64.dllcrash, by keeping pipeline-cache saves off the build, and docs(worklist): the igvk64.dll crash reproduced on a UHD 770, re-scored 0.11 -> 0.28 #2790 says four runs of that branch on a UHD 770 did not crash. This branch does not include fix(vk): Intel Windows runtime fixes (pipeline cache saves, alpha to coverage) #2456. The two changes are not the same, and this one was not run on that GPU.Overlaps
mainand is not in this branch's commits.