mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
arm64 : fix intptr_t size
This commit is contained in:
@@ -35,7 +35,7 @@ class IDataCache;
|
||||
//---------------------------------------------------------
|
||||
// Unique (per section) identifier for a cache item defined by client
|
||||
//---------------------------------------------------------
|
||||
typedef uint32 DataCacheClientID_t;
|
||||
typedef uintp DataCacheClientID_t;
|
||||
|
||||
|
||||
//---------------------------------------------------------
|
||||
@@ -491,7 +491,7 @@ public:
|
||||
m_pCache->EnsureCapacity(STORAGE_TYPE::EstimatedSize(createParams));
|
||||
STORAGE_TYPE *pStore = STORAGE_TYPE::CreateResource( createParams );
|
||||
DataCacheHandle_t handle;
|
||||
m_pCache->AddEx( (DataCacheClientID_t)pStore, pStore, pStore->Size(), flags, &handle);
|
||||
m_pCache->AddEx( (DataCacheClientID_t)(uintp)pStore, pStore, pStore->Size(), flags, &handle);
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,17 @@ namespace OptimizedModel
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef unsigned short MDLHandle_t;
|
||||
|
||||
// MoeMod : integer promotion keeps sign on arm, but discards sign on x86
|
||||
inline MDLHandle_t VoidPtrToMDLHandle( void *ptr )
|
||||
{
|
||||
return ( MDLHandle_t ) ( ( uintp ) ptr & 0xffff );
|
||||
}
|
||||
|
||||
inline void* MDLHandleToVirtual( MDLHandle_t hndl )
|
||||
{
|
||||
return (void*)(uintp)hndl;
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
MDLHANDLE_INVALID = (MDLHandle_t)~0
|
||||
|
||||
Reference in New Issue
Block a user