diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-29 04:35:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-29 04:35:16 +0100 |
| commit | 3ecd31707fdfab5e398fc2ad0ff86d992aefdb8a (patch) | |
| tree | 839cc2caa09496f1b2f40f0db15b6bcf66e57584 /runtime/src | |
| parent | c8bf0e7b6568f471b42540010e335ca6413d4c58 (diff) | |
| parent | 0267290f9c7ec35bece4e0b81a132f7d8310e4e6 (diff) | |
Merge pull request #1788 from IlyassRS3/fix/rt-gpu-label-memory-expand
runtime: preserve in-flight GPU label targets when expanding a non-heap region (RT-GPU-LABEL-MEMORY-EXPAND)
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/gpu_label_memory.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/src/gpu_label_memory.h b/runtime/src/gpu_label_memory.h index ac0c53591..9ad7c1d75 100644 --- a/runtime/src/gpu_label_memory.h +++ b/runtime/src/gpu_label_memory.h | |||
| @@ -35,8 +35,14 @@ class Memory { | |||
| 35 | auto previous = regions_.upper_bound(base); | 35 | auto previous = regions_.upper_bound(base); |
| 36 | if (!heap && previous != regions_.begin()) { | 36 | if (!heap && previous != regions_.begin()) { |
| 37 | --previous; | 37 | --previous; |
| 38 | const auto &r = *previous->second; | 38 | auto &r = *previous->second; |
| 39 | if (!r.heap && r.allocation_base == allocation_base && base >= r.begin && end <= r.end) return; | 39 | if (!r.heap && r.allocation_base == allocation_base && base >= r.begin) { |
| 40 | if (end <= r.end) return; | ||
| 41 | if (base == r.begin) { | ||
| 42 | r.end = end; | ||
| 43 | return; | ||
| 44 | } | ||
| 45 | } | ||
| 40 | } | 46 | } |
| 41 | regions_[base] = std::make_shared<Region>(Region{base, end, allocation_base, heap}); | 47 | regions_[base] = std::make_shared<Region>(Region{base, end, allocation_base, heap}); |
| 42 | } | 48 | } |