From 420934038707f21c763ef96f6c011e53c0dfd480 Mon Sep 17 00:00:00 2001 From: kinect-bot Date: Wed, 25 Nov 2026 16:37:03 -0500 Subject: [PATCH] diag(windows-nui): log all INuiFrameTexture methods to detect vtable-order mismatch --- fallback/windows-nui/src/frame_texture.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/fallback/windows-nui/src/frame_texture.cpp b/fallback/windows-nui/src/frame_texture.cpp index 034b0bc..488df65 100644 --- a/fallback/windows-nui/src/frame_texture.cpp +++ b/fallback/windows-nui/src/frame_texture.cpp @@ -53,10 +53,21 @@ ULONG STDMETHODCALLTYPE NuiFrameTexture::Release() { } int STDMETHODCALLTYPE NuiFrameTexture::BufferLen() { + static unsigned n = 0; + if (n < 8) { + ShimLog("tex BufferLen -> %d (%ux%u bpp=%u)", static_cast(bits_.size()), + width_, height_, bytes_per_pixel_); + } + ++n; return static_cast(bits_.size()); } int STDMETHODCALLTYPE NuiFrameTexture::Pitch() { + static unsigned n = 0; + if (n < 8) { + ShimLog("tex Pitch -> %d", static_cast(width_ * bytes_per_pixel_)); + } + ++n; return static_cast(width_ * bytes_per_pixel_); } @@ -84,6 +95,11 @@ HRESULT STDMETHODCALLTYPE NuiFrameTexture::LockRect(UINT Level, HRESULT STDMETHODCALLTYPE NuiFrameTexture::GetLevelDesc(UINT Level, NUI_SURFACE_DESC* pDesc) { + static unsigned n = 0; + if (n < 8) { + ShimLog("tex GetLevelDesc level=%u", Level); + } + ++n; if (pDesc == nullptr) { return E_POINTER; } @@ -96,6 +112,11 @@ HRESULT STDMETHODCALLTYPE NuiFrameTexture::GetLevelDesc(UINT Level, } HRESULT STDMETHODCALLTYPE NuiFrameTexture::UnlockRect(UINT Level) { + static unsigned n = 0; + if (n < 8) { + ShimLog("tex UnlockRect level=%u", Level); + } + ++n; return Level == 0 ? S_OK : E_INVALIDARG; }