Skip to content

fix(shader): keep the per-thread empty image tables in HostThreadLocal - #19893

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/empty-image-tables-host-tls
Nov 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
oneandonlydean:fix/empty-image-tables-host-tls

Conversation

@oneandonlydean

Copy link
Copy Markdown
Collaborator

What

Since #18827, prx_thread_local_destructors and test_thread_local_destructors fail on Windows: ResolveImageTablesShared keeps the empty table result in a function-local thread_local, whose destructor runs after emulated TLS freed the object. This keeps the same per-thread value in HostThreadLocal, as the rest of the file already does, so the empty result stays per thread and #18827's reuse is unchanged. Last Windows main without the failure: 865f0fe.

Tested

The full Windows suite on this PR must show prx_thread_local_destructors and test_thread_local_destructors passing.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

boykopovar#18827 made the empty table result a function-local thread_local. On
Windows its destructor runs after emulated TLS freed the object, which
prx_thread_local_destructors and test_thread_local_destructors reject.
@github-actions github-actions Bot added the shader core/shader label Nov 14, 2026
@JJenkx

JJenkx commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Windows check of head 9b7c3fe09d, merged onto main 74900e8b0f. Setup: Windows 11 Enterprise 22621, AMD RX 6700 XT, AMD driver 26.10.1, MinGW-w64 GCC 15.2 UCRT, Release.

all 22 selected tests (agc_driver_image_table, agc_driver_image_table_cache, agc_driver_image_table_cache_bounds, agc_driver_image_table_packed, ...):

  • GPU, through the shared Windows GPU FIFO with ANYPS5_REQUIRE_VULKAN=1 (merge 1f5d68c3f0): all 22 passed in 3 of 3 runs, 66 of 66 outcomes. The binaries matched the hashes recorded at preparation, and the receipt shows exit 0 and app_count=0.
  • CPU, Vulkan hidden (merge a49736ca72): 1 passed and 21 skipped (they need a device), 0 failed, in each of 3 runs.

This PR adds no test, so these are the existing agc_driver_image_table* tests that exercise the image table code it changes.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit 37a5715 into boykopovar:main Nov 14, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants