Skip to content

GPU, Shader: probe host device view-heap limits and clamp descriptor heap indices (#3476, #3330) - #95

Merged
LAKSHYA-cmd-tech merged 1 commit into
integrate/gta6-world-and-shader-fixesfrom
fix/nvidia-view-heap-cap
Nov 27, 2026
Merged

LAKSHYA-cmd-tech merged 1 commit into
integrate/gta6-world-and-shader-fixesfrom
fix/nvidia-view-heap-cap

Conversation

@LAKSHYA-cmd-tech

Copy link
Copy Markdown
Owner

Backports and hardens upstream PR Marvisak#3476 for GTA VI world stability:

  • `crates/victory-shader/src/emit/shader.rs`: Implemented `heap_views()` and `set_heap_views()` with `PORTABLE_HEAP_VIEWS` (1,000,000 slots) fallback. In `heap_handle`, clamped computed descriptor heap indices below `heap_views() - 1` (views) and `HEAP_SAMPLERS - 1` (samplers) using unsigned `IUGT` bounds checks to prevent out-of-range indices from faulting the GPU.
  • `crates/victory-gpu/src/host.rs`: Added `view_limit` device probe during `Host` creation to detect whether the host D3D12 device supports full `HEAP_VIEWS` (2^21 descriptors) or caps heaps at `PORTABLE_HEAP_VIEWS` (10^6 slots on NVIDIA hardware).
  • `crates/victory-gpu/src/shader_cache.rs`: Included `heap_views()` in the cache build key and ensured `host()` initializes before generating cache keys or translating shaders.
  • `crates/victory-gpu/src/descriptor/host.rs`: Synced heap creation and fallback capacities with `victory_shader::emit::heap_views()`.
  • Passes all GPU/shader unit tests, clean clippy, and asset policy checks.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85e3c8bc-cf53-46c7-a236-c13da4fd3780

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@LAKSHYA-cmd-tech
LAKSHYA-cmd-tech merged commit 3c8e238 into integrate/gta6-world-and-shader-fixes Nov 27, 2026
1 of 2 checks passed
@LAKSHYA-cmd-tech
LAKSHYA-cmd-tech deleted the fix/nvidia-view-heap-cap branch November 27, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant