Skip to content

Update some new function ids - #12

Open
Dreamacro wants to merge 1 commit into
arcnmx:masterfrom
Dreamacro:update-function-ids
Open

Dreamacro wants to merge 1 commit into
arcnmx:masterfrom
Dreamacro:update-function-ids

Conversation

@Dreamacro

Copy link
Copy Markdown

This pull request includes changes to the sys/src/nvid.rs file, specifically adding new extended versions of existing NVAPI DRS functions. These additions enhance the functionality by providing extended capabilities for each corresponding function.

Those function ID are from https://github.com/Orbmu2k/nvidiaProfileInspector/blob/0cbafd18a3480f65c98bc39c480bd16ab34ba1eb/nspector/Native/NVAPI/NvapiDrsWrapper.cs#L719

Enhancements to NVAPI DRS functions:

  • Added NvAPI_DRS_SetSettingExt (0x8a2cf5f5)
  • Added NvAPI_DRS_GetSettingExt (0xea99498d)
  • Added NvAPI_DRS_EnumSettingsExt (0xcfd6983e)
  • Added NvAPI_DRS_EnumAvailableSettingIdsExt (0xe5de48e5)
  • Added NvAPI_DRS_GetSettingNameFromIdExt (0x1eb13791)
  • Added NvAPI_DRS_DeleteProfileSettingExt (0xd20d29df)
  • Added NvAPI_DRS_RestoreProfileDefaultSettingExt (0x7dd5b261)

physicsdolphin added a commit to Skyworks-Neo/nvapi-rs that referenced this pull request Aug 27, 2026
- #15 QueryInterface fn-pointer cache: AtomicUsize -> AtomicPtr<c_void>;
  nvapi_QueryInterface now returns *mut c_void (null sentinel instead of
  magic 0), nvapi! macro transmutes pointer->fn directly — no usize
  round-trips left on the entry-point path. Examples adapted.
- arcnmx#12 NvVersion::new size assert: REJECTED after triage — the >64KiB RE'd
  mega-structs (pstates V4 / clk-vf-points V3 / power-policies V1) rely on
  the driver building the same lossy size|ver<<16 dword from its own
  struct, so truncation compares equal on both sides; assert would fire on
  hardware-verified paths. Documented the semantics instead; layout drift
  stays pinned by nvversion! `= size` literals + layout tests.
- #16 zeroed(): doc stack-hazard notes on both nvstruct arms (Box::new_zeroed
  for >=1MiB structs) + #[inline] on the unchecked arm
- arcnmx#11 status.rs: module-level doc on the deliberate dual-track design
  (bare c_int ABI vs typed Status; unknown codes -> NvapiError::raw_status)
- arcnmx#9 remainder: NvEnum/NvBits aliases are load-bearing in macro codegen
  (scout's zero-use claim wrong) — documented instead of removed
- hi/: leftover empty stub (hi/.gitignore + empty src/) removed

Co-Authored-By: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
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