WIP[win64]: Sync this snipped with upstream to avoid texture indexing issues on Windows 64