diff options
| author | richardsenra <49772972+richardsenra@users.noreply.github.com> | 2026-11-22 12:36:58 -0300 |
|---|---|---|
| committer | richardsenra <49772972+richardsenra@users.noreply.github.com> | 2026-11-22 12:36:58 -0300 |
| commit | 35953169c9c8afe54d3de2ec551e83e103e1ee0d (patch) | |
| tree | b0f0100403d682c07eacd990580dd12cf9b8fd02 /runtime/src/pe_loader.cpp | |
| parent | f475508e93be188687c36de39d15c9f9536527a5 (diff) | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
Merge main into D3D-209 and resolve M3 documentation and test registration conflicts
Keep the upstream M4 and buffer-UAV targets and the new fence measurements alongside the single-output M3 query probe and first-pass test. Retested on Intel UHD and RTX 3050 with validation; the pre-existing Intel post-pass Int64 capability error remains visible. AI-assisted with Codex.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
| -rw-r--r-- | runtime/src/pe_loader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp index 1ab9c7801..387051756 100644 --- a/runtime/src/pe_loader.cpp +++ b/runtime/src/pe_loader.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <vector> | 14 | #include <vector> |
| 15 | 15 | ||
| 16 | #include "../shims/shims.h" | 16 | #include "../shims/shims.h" |
| 17 | #include "base_reservation.h" | ||
| 17 | 18 | ||
| 18 | namespace rt { | 19 | namespace rt { |
| 19 | 20 | ||
| @@ -506,8 +507,11 @@ Module& Loader::map_image(const std::filesystem::path& path) { | |||
| 506 | by_name_[lower(m->name)] = m; | 507 | by_name_[lower(m->name)] = m; |
| 507 | order_.push_back(m); | 508 | order_.push_back(m); |
| 508 | 509 | ||
| 509 | m->base = static_cast<uint8_t*>( | 510 | // Inside the range gta6rt reserved for this image before the process started (base_reservation.h), else as usual. |
| 510 | VirtualAlloc(reinterpret_cast<void*>(oh.ImageBase), oh.SizeOfImage, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)); | 511 | m->base = static_cast<uint8_t*>(base_reservation::commit_reserved(oh.ImageBase, oh.SizeOfImage)); |
| 512 | if (!m->base) | ||
| 513 | m->base = static_cast<uint8_t*>(VirtualAlloc(reinterpret_cast<void*>(oh.ImageBase), oh.SizeOfImage, | ||
| 514 | MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)); | ||
| 511 | if (!m->base) { | 515 | if (!m->base) { |
| 512 | const auto relocs = directory(nt, IMAGE_DIRECTORY_ENTRY_BASERELOC); | 516 | const auto relocs = directory(nt, IMAGE_DIRECTORY_ENTRY_BASERELOC); |
| 513 | if (!relocs.Size) | 517 | if (!relocs.Size) |