IResource and RefCountPtr and RefCounter<T> use unsigned long which does not have a consistent size on different x64 compilers. With MSVC it is 32 bits, with GCC and Clang it is 64 bits.
This makes it difficult to write portable code if you interact with NVRHI refcounts at all, which is often necessary e.g. to implement interfaces like ICommandListLifetimeTracker.
I think the best fix would be to use uint32_t to make it consistent with Microsoft's IUnknown which always uses a 32-bit refcount (e.g. in Wine, ULONG is always 32-bits).
IResourceandRefCountPtrandRefCounter<T>useunsigned longwhich does not have a consistent size on different x64 compilers. With MSVC it is 32 bits, with GCC and Clang it is 64 bits.This makes it difficult to write portable code if you interact with NVRHI refcounts at all, which is often necessary e.g. to implement interfaces like
ICommandListLifetimeTracker.I think the best fix would be to use
uint32_tto make it consistent with Microsoft'sIUnknownwhich always uses a 32-bit refcount (e.g. in Wine,ULONGis always 32-bits).