Skip to content

Shaders: start constant tables after instructions - #52

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/code-table-start
Nov 25, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/code-table-start

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Re-ports upstream #2143 onto the fxceless base.

code_dword previously started the embedded constant table at the lowest code offset named by any load. Computed loads name offset 0 even though they read constants appended after the instructions, so the generated constant array could contain the whole shader program (tens of KiB) rather than only its constants. Under drivers that lower large constant arrays to private/local memory, that multiplies memory use per thread.

code_table_start now starts the table after the final machine instruction unless a fixed-offset load genuinely reads inside the instruction bytes. The regression test is split into emit/lower/code_table_tests.rs because lower.rs is at the repository asset-policy size cap.

Validation:

  • cargo test --locked -p victory-shader the_code_table_starts_after_the_instructions --lib
  • CARGO_FEATURE_PURE=1 RUSTFLAGS='-D warnings' cargo check --locked -p victory-shader --all-targets --target x86_64-pc-windows-msvc
  • CARGO_FEATURE_PURE=1 RUSTFLAGS='-D warnings' cargo clippy --locked -p victory-shader --all-targets --all-features --target x86_64-pc-windows-msvc
  • cargo run --locked --quiet --package xtask -- policy

No GPU/game/Proton runtime validation is available in this VM.

Link to Devin session: https://app.devin.ai/sessions/75bbf6b4192940fea34014b13a016bee
Open in Devin Desktop: https://app.devin.ai/desktop/session/75bbf6b4192940fea34014b13a016bee?variant=devin
Requested by: @Personed


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration
devin-ai-integration Bot merged commit b0916fb into main Nov 25, 2026
5 checks passed
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