Commit Graph

6 Commits

Author SHA1 Message Date
3a2f4b3e76 Merge pull request #3874 from kotorvr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:07 -05:00
be8570ace1 Merge remote-tracking branch 'origin/main' into triage-r43
# Conflicts:
#	docs/runtime_imports.md
#	runtime/CMakeLists.txt
#	runtime/shims/xgameruntime.cpp
#	runtime/test/xmem_test.cpp
#	tools/rdna2spirv.py
2026-11-22 22:12:50 -05:00
86be100f3a gta6rt: offline WinHttpSendRequest with context 0 keeps the option's context
WinHttpSendRequest assigned its dwContext to the request unconditionally, so a client that set the context with
WINHTTP_OPTION_CONTEXT_VALUE and sent with 0 got 0 back from WinHttpQueryOption and in its REQUEST_ERROR and
HANDLE_CLOSING callbacks. The host's winhttp.dll (Windows 11, asynchronous session, loopback) keeps the option's
value in all three. A nonzero dwContext still replaces it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:03:06 +00:00
4c52ce27a6 Seven fixes from an outside contributor (sent as patches, applied without the author's name)
- rdna2spirv: declare each packed vertex input register once; a register whose elements disagree on the component
  type is refused (SHADER-644).
- runtime: a title's VirtualAlloc drops the console's MEM_GRAPHICS / MEM_TITLE type bits the host rejects (RT-217).
- runtime: XPersistentLocalStorageImpl is served from <overlay>\persistent with the package's 2048 MB quota
  (RT-219; layout from the public docs, not measured in a caller).
- runtime: G:\ names the package and T:\ a scratch folder in the overlay; paths under the configured folders and
  every path with no folders configured stay host paths (RT-218).
- winhttp_offline: header blocks and timeouts the host WinHTTP rejects are rejected the same way.
- cfg_structure.run: a limit of zero or less runs no blocks.
- shader_meta: an s_movk_i32 with a register operand and a float immediate beyond float32 are left unknown instead
  of raising.

Each comes with a test that fails on the old code. Conflicts with main resolved here (internal_dir() hides T:'s
folder; both file_system_test blocks kept).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:55:46 -05:00
0f83451af9 gta6rt: the offline WinHTTP stub passes a handle's context value to its children
make_handle copied the parent's status callback and notification mask to
a new handle and left its context at 0. The host's winhttp.dll also
passes WINHTTP_OPTION_CONTEXT_VALUE on: a connection and a request start
with the context their parent has when they are made, WinHttpQueryOption
returns it and their HANDLE_CREATED and HANDLE_CLOSING callbacks carry
it. A context set on the handle itself, or given to WinHttpSendRequest,
still replaces it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 00:19:59 +03:00
9f41bf65f3 gta6rt: WinHTTP offline for mapped images
The package's XCurl.dll and libHttpClient.GDK.dll import 16 WinHTTP functions
(no Winsock) and bound to the host's winhttp.dll, so a mapped title could reach
the network. winhttp.dll is now a module the shims own and all 16 are answered
in-process:

- sessions, connections and requests are local handles; no name lookup, no
  socket;
- WinHttpSendRequest fails with ERROR_WINHTTP_CANNOT_CONNECT; on a
  WINHTTP_FLAG_ASYNC session it returns TRUE and reports
  WINHTTP_CALLBACK_STATUS_REQUEST_ERROR {API_SEND_REQUEST, CANNOT_CONNECT} from
  a thread-pool thread with the request's context (not after the request was
  closed);
- reading a response and WinHttpWriteData fail with
  ERROR_WINHTTP_INCORRECT_HANDLE_STATE; options, timeouts and headers are
  accepted, CONTEXT_VALUE and HANDLE_TYPE can be queried;
- callbacks are inherited by child handles (HANDLE_CREATED), and every handle
  reports HANDLE_CLOSING once, last (reference-counted, so a callback that
  closes its own request is safe);
- WinHttpCrackUrl stays the host's (parsing only, loaded on first use).

Each refused server is logged once. winhttp_offline: 40/40 checks, .invalid
names only, no connection opened.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:35:57 +03:00