Skip to content

Fix: sync ImTextureData with upstream ImGui layout - #255

Merged
dzhdanNV merged 1 commit into
NVIDIA-RTX:mainfrom
eyalezer:imgui-imTextureData-struct-fix
Aug 28, 2026
Merged

Fix: sync ImTextureData with upstream ImGui layout#255
dzhdanNV merged 1 commit into
NVIDIA-RTX:mainfrom
eyalezer:imgui-imTextureData-struct-fix

Conversation

@eyalezer

Copy link
Copy Markdown
Contributor

Sync ImTextureData with upstream ImGui layout

This syncs the ImTextureData struct in Source/Shared/ImguiInterface.hpp with the current ImGui layout (matching ocornut/imgui@b335bf4).

Why this matters

The upstream ImGui ImTextureData struct gained a new QueueUserData field:

struct ImTextureData {
    int UniqueID;
    ImTextureStatus Status;
    void* BackendUserData;
    void* QueueUserData;   // <-- added in upstream
    ImTextureID TexID;
    ...
};

Because NRI's copy of this struct was missing that field, the two layouts drifted apart. The field ordering and offsets no longer match, which corrupts the memory layout when ImGui and NRI share this struct. This breaks using ImGui textures with NRI.

This change adds the missing QueueUserData field back, restoring the correct layout.

@dzhdanNV

Copy link
Copy Markdown
Collaborator

Thanks. I will merge it today (and update all my stuff). Which ImGui version did add QueueUserData? This comment should be updated too: https://github.com/NVIDIA-RTX/NRI/blob/main/Include/Extensions/NRIImgui.h#L11.

@eyalezer

Copy link
Copy Markdown
Contributor Author

@dzhdanNV ahh totally missed that comment.. let me fix it

the version is: v1.92.9

Add the missing "QueueUserData" field to ImTextureData, matching the
ImGui struct introduced in ocornut/imgui@b335bf4.
This keeps the interface struct in sync with the current ImGui version.
@eyalezer
eyalezer force-pushed the imgui-imTextureData-struct-fix branch from a8c13d6 to 8c9abcb Compare August 28, 2026 06:49
@eyalezer

Copy link
Copy Markdown
Contributor Author

@dzhdanNV - Done ✅

@dzhdanNV
dzhdanNV merged commit e960111 into NVIDIA-RTX:main Aug 28, 2026
@dzhdanNV

Copy link
Copy Markdown
Collaborator

Thanks! Merged.

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.

2 participants