From d0f1d8f8806cd3880fbd730ad82d71098d1de45f Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Fri, 5 Jul 2024 09:01:04 -0500 Subject: [PATCH] Optimize structures for 64bit platforms and changed type MinWidth to uint32_t --- .../GmmLib/inc/External/Common/GmmPlatformExt.h | 16 ++++++++-------- .../inc/External/Common/GmmResourceInfoExt.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/GmmLib/inc/External/Common/GmmPlatformExt.h b/Source/GmmLib/inc/External/Common/GmmPlatformExt.h index 7482ffc..c5c4b2c 100644 --- a/Source/GmmLib/inc/External/Common/GmmPlatformExt.h +++ b/Source/GmmLib/inc/External/Common/GmmPlatformExt.h @@ -442,20 +442,20 @@ typedef struct GMM_TEXTURE_ALIGN_REC //--------------------------------------------------------------------------- typedef struct __GMM_BUFFER_TYPE_REC { - uint32_t Alignment; // Base Address Alignment + GMM_GFX_SIZE_T MinAllocationSize; // Minimum Allocation size requirement + GMM_GFX_SIZE_T MaxPitch; // Maximum pitch + uint32_t MinPitch; // Minimum pitch uint32_t PitchAlignment; // Pitch Alignment restriction. uint32_t RenderPitchAlignment; // Pitch Alignment for render surface uint32_t LockPitchAlignment; // Pitch Alignment for locked surface - uint32_t MinPitch; // Minimum pitch - GMM_GFX_SIZE_T MaxPitch; // Maximum pitch - GMM_GFX_SIZE_T MinAllocationSize; // Minimum Allocation size requirement + uint32_t Alignment; // Base Address Alignment - uint32_t MinHeight; // Mininum height in bytes - GMM_GFX_SIZE_T MinWidth; // Minimum width in bytes - uint32_t MinDepth; // Minimum depth (only for volume) - GMM_GFX_SIZE_T MaxHeight; // Maximum height in bytes GMM_GFX_SIZE_T MaxWidth; // Maximum Width in bytes + GMM_GFX_SIZE_T MaxHeight; // Maximum height in bytes + uint32_t MinWidth; // Minimum width in bytes + uint32_t MinHeight; // Mininum height in bytes uint32_t MaxDepth; // Maximum depth (only for volume) + uint32_t MinDepth; // Minimum depth (only for volume) uint32_t MaxArraySize; uint8_t NeedPow2LockAlignment; // Locking surface need to be power of 2 aligned } __GMM_BUFFER_TYPE; diff --git a/Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h b/Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h index 5dd38ec..a46990e 100644 --- a/Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h +++ b/Source/GmmLib/inc/External/Common/GmmResourceInfoExt.h @@ -381,8 +381,8 @@ typedef struct GMM_RESCREATE_CUSTOM_PARAMS_2_REC : public GMM_RESCREATE_CUSTOM_P { struct { - uint32_t Pitch; GMM_GFX_SIZE_T Size; + uint32_t Pitch; uint32_t BaseAlignment; struct {