Skip to content

Commit 0154744

Browse files
committed
Removal of stale code
Klockwork fix Change-Id: I81d2bf82962744f07cd6b922ccdb5a1ed387d919
1 parent b5401ca commit 0154744

19 files changed

+154
-336
lines changed

Source/GmmLib/CachePolicy/GmmGen10CachePolicy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HEAP_INDIRECT_OBJECT
9191
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HEAP_INSTRUCTION , 1 , 0 , 1 , 0 , 3 , 0, 0, 0, 0, 0);
9292
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HIZ , 1 , 0 , 0 , 0 , 3 , 0, 0, 0, 0, 0);
9393
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_INDEX_BUFFER , 0 , 0 , 0 , 0 , 3 , 0, 0, 0, 0, 0);
94-
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_MCS , 1 , 0 , 0 , 0 , 3 , 0, 0, 0, 0, 0); // SKL-TODO: Remove after clients update their code.
94+
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_MCS , 1 , 0 , 0 , 0 , 3 , 0, 0, 0, 0, 0);
9595
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_PUSH_CONSTANT_BUFFER , 0 , 0 , 0 , 0 , 3 , 0, 0, 0, 0, 0);
9696
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_PULL_CONSTANT_BUFFER , 1 , 0 , 1 , 0 , 3 , 0, 0, 0, 0, 1);
9797
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_QUERY , 1 , 1 , 1 , 0 , 3 , 0, 0, 0, 0, 0);

Source/GmmLib/CachePolicy/GmmGen9CachePolicy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HEAP_INDIRECT_OBJECT
107107
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HEAP_INSTRUCTION , 1 , 1 , 1 ,3 , WB );
108108
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HIZ , !GT3e , EDRAM , 1 ,3 , WB );
109109
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_INDEX_BUFFER , !GT3e , EDRAM , 1 ,3 , WB );
110-
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_MCS , 0 , EDRAM , 0 ,3 , UC ); // SKL-TODO: Remove after clients update their code.
110+
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_MCS , 0 , EDRAM , 0 ,3 , UC );
111111
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_PUSH_CONSTANT_BUFFER , 0 , EDRAM , 0 ,3 , UC );
112112
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_PULL_CONSTANT_BUFFER , !GT3e , EDRAM , 1 ,3 , WB );
113113
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_QUERY , !GT3e , EDRAM , 0 ,3 , WB );

Source/GmmLib/Platform/GmmPlatform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ GmmLib::PlatformInfo::PlatformInfo(PLATFORM &Platform) {
6565
/////////////////////////////////////////////////////////////////////////////////////
6666
const GMM_PLATFORM_INFO* GMM_STDCALL __GmmGetPlatformInfo()
6767
{
68-
__GMM_ASSERT(pGmmGlobalContext != NULL)
68+
__GMM_ASSERTPTR(pGmmGlobalContext, NULL)
6969

7070
if (pGmmGlobalContext->GetPlatformInfoObj() != NULL)
7171
{

Source/GmmLib/Resource/GmmResourceInfo.cpp

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -178,24 +178,6 @@ uint32_t GMM_STDCALL GmmResGetSizeOfStruct(void)
178178
return (sizeof(GMM_RESOURCE_INFO));
179179
}
180180

181-
/////////////////////////////////////////////////////////////////////////////////////
182-
/// This function returns resource flags
183-
///
184-
/// @param[in] pGmmResource: Pointer to the GmmResourceInfo class
185-
/// @param[out] pFlags: Memory where resource flags will be copied
186-
/////////////////////////////////////////////////////////////////////////////////////
187-
void GMM_STDCALL GmmResGetFlags(GMM_RESOURCE_INFO* pGmmResource,
188-
GMM_RESOURCE_FLAG* pFlags /*output*/)
189-
{
190-
GMM_DPF_ENTER;
191-
__GMM_ASSERTPTR(pGmmResource, VOIDRETURN);
192-
__GMM_ASSERTPTR(pFlags, VOIDRETURN);
193-
194-
*pFlags = GmmResGetResourceFlags(pGmmResource);
195-
196-
GMM_DPF_EXIT;
197-
}
198-
199181
/////////////////////////////////////////////////////////////////////////////////////
200182
/// C wrapper for GmmLib::GmmResourceInfoCommon::GetResourceType.
201183
/// @see GmmLib::GmmResourceInfoCommon::GetResourceType()
@@ -1031,7 +1013,7 @@ GMM_GFX_SIZE_T GMM_STDCALL GmmResGetSizeMainSurface(const GMM_RESOURCE_INFO *pR
10311013
return pResourceInfo->GetSizeMainSurface();
10321014
}
10331015

1034-
//TODO(Low) : Remove when vpg-compute-neo moves to new interface
1016+
//TODO(Low) : Remove when client moves to new interface
10351017
/////////////////////////////////////////////////////////////////////////////////////
10361018
/// C wrapper for GmmResourceInfoCommon::GetSizeSurface
10371019
/// @see GmmLib::GmmResourceInfoCommon::GetSizeSurface()
@@ -1341,19 +1323,6 @@ uint8_t GMM_STDCALL GmmIsSurfaceFaultable(GMM_RESOURCE_INFO *pGmmResource)
13411323
return pGmmResource->IsSurfaceFaultable();
13421324
}
13431325

1344-
/////////////////////////////////////////////////////////////////////////////////////
1345-
/// C wrapper for GmmResourceInfoCommon::GetResFlags
1346-
/// @see GmmLib::GmmResourceInfoCommon::GetResFlags()
1347-
///
1348-
/// @param[in] pGmmResource: Pointer to GmmResourceInfo class
1349-
/// @return Copy of ::GMM_RESOURCE_FLAGS
1350-
/////////////////////////////////////////////////////////////////////////////////////
1351-
GMM_RESOURCE_FLAG GMM_STDCALL GmmResGetResourceFlags(const GMM_RESOURCE_INFO* pGmmResource)
1352-
{
1353-
__GMM_ASSERT(pGmmResource);
1354-
return const_cast<GMM_RESOURCE_INFO*>(pGmmResource)->GetResFlags();
1355-
}
1356-
13571326
/////////////////////////////////////////////////////////////////////////////////////
13581327
/// C wrapper for GmmResourceInfoCommon::GetMaximumRenamingListLength
13591328
/// @see GmmLib::GmmResourceInfoCommon::GetMaximumRenamingListLength()

Source/GmmLib/Resource/GmmResourceInfoCommon.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,6 @@ uint8_t GMM_STDCALL GmmLib::GmmResourceInfoCommon::GetMappingSpanDesc(GMM_GET_MA
15041504
{
15051505
// If the resource was a planar surface then need to iterate over the remaining planes
15061506
WasFinalSpan = pMapping->Scratch.Plane == pMapping->Scratch.LastPlane;
1507-
//GMM_DPF( GFXDBG_CRITICAL, "\n" ); // TODO (rmadayik): Remove when done testing.
15081507
}
15091508
}
15101509
}
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
@echo off
2-
REM Copyright (2014) Intel Corporation All Rights Reserved.
2+
REM Copyright(c) 2017 Intel Corporation
33
REM
4-
REM The source code, information and material ("Material") contained
5-
REM herein is owned by Intel Corporation or its suppliers or licensors,
6-
REM and title to such Material remains with Intel Corporation or its
7-
REM suppliers or licensors. The Material contains proprietary information
8-
REM of Intel or its suppliers and licensors. The Material is protected by
9-
REM worldwide copyright laws and treaty provisions. No part of the
10-
REM Material may be used, copied, reproduced, modified, published,
11-
REM uploaded, posted, transmitted, distributed or disclosed in any way
12-
REM without Intel's prior express written permission. No license under any
13-
REM patent, copyright or other intellectual property rights in the
14-
REM Material is granted to or conferred upon you, either expressly, by
15-
REM implication, inducement, estoppel or otherwise. Any license under such
16-
REM intellectual property rights must be express and approved by Intel in
17-
REM writing.
18-
REM
19-
REM Unless otherwise agreed by Intel in writing, you may not remove or alter
20-
REM this notice or any other notice embedded in Materials by Intel or Intel's
21-
REM suppliers or licensors in any way.
4+
REM Permission is hereby granted, free of charge, to any person obtaining a
5+
REM copy of this software and associated documentation files(the "Software"),
6+
REM to deal in the Software without restriction, including without limitation
7+
REM the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
REM and / or sell copies of the Software, and to permit persons to whom the
9+
REM Software is furnished to do so, subject to the following conditions:
10+
REM
11+
REM The above copyright notice and this permission notice shall be included
12+
REM in all copies or substantial portions of the Software.
13+
REM
14+
REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
REM OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
REM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
REM THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
REM OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
REM ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
REM OTHER DEALINGS IN THE SOFTWARE.
2221
cscript //nologo %~dp0\GmmCheckCodingStandard.wsf %~dp0\..

Source/GmmLib/Scripts/GmmCheckCodingStandard.wsf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
//============================================================================
2+
// Copyright(c) 2017 Intel Corporation
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a
5+
// copy of this software and associated documentation files(the "Software"),
6+
// to deal in the Software without restriction, including without limitation
7+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
// and / or sell copies of the Software, and to permit persons to whom the
9+
// Software is furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included
12+
// in all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
// OTHER DEALINGS IN THE SOFTWARE.
21+
//============================================================================
122
<job>
223
<script>
324

Source/GmmLib/Texture/GmmTexture.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,11 @@ GMM_INLINE GMM_STATUS __GmmTexFillHAlignVAlign(GMM_TEXTURE_INFO *pTexInfo)
259259
UnitAlignWidth = 16;
260260
UnitAlignHeight = 4;
261261
}
262-
/// TODO(Minor): Temp D3D12 WHQL WA. Remove once GMM switches to optimized H/VALIGN...
263262
else if(pTexInfo->Flags.Wa.__ForceOtherHVALIGN4)
264263
{
265264
UnitAlignWidth = 4;
266265
UnitAlignHeight = 4;
267266
}
268-
// FIXME: Resolve semantics of NoRestriction defaulting to 1/1 or 16/4 for H/VAlign for D3D
269267
#ifndef _WIN32
270268
else if(pTexInfo->Flags.Gpu.NoRestriction)
271269
{

Source/GmmLib/inc/External/Common/GmmCommonExt.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -72,41 +72,12 @@ typedef uint32_t GMM_GLOBAL_GFX_ADDRESS, GMM_GLOBAL_GFX_SIZE_T;
7272
#define GMM_GLOBAL_GFX_SIZE_T_CAST(x) ((GMM_GLOBAL_GFX_SIZE_T)(x))
7373
#endif
7474

75-
#define GMM_GMADR_OFFSET_T GMM_GLOBAL_GFX_ADDRESS
76-
#define GMM_GMADR_SIZE_T GMM_GLOBAL_GFX_SIZE_T
77-
#define GMM_GMADR_OFFSET_T_CAST GMM_GLOBAL_GFX_ADDRESS_CAST
78-
#define GMM_GMADR_SIZE_T_CAST GMM_GLOBAL_GFX_SIZE_T_CAST
79-
80-
typedef uint32_t TODO_GFX32; // TODO(Medium): Fix and remove!!
81-
8275
#define GMM_GFX_ADDRESS_CANONIZE(a) (((int64_t)(a) << (64 - 48)) >> (64 - 48)) // TODO(Minor): When GMM adds platform-dependent VA size caps, change from 48.
8376
#define GMM_GFX_ADDRESS_DECANONIZE(a) ((uint64_t)(a) & (((uint64_t) 1 << 48) - 1)) // "
8477

8578
#define GMM_BIT_RANGE(endbit, startbit) ((endbit)-(startbit)+1)
8679
#define GMM_BIT(bit) (1)
8780

88-
// TODO(Benign): Where should this live?
89-
#define GMM_IA32e_BITS_PER_TABLE_INDEX 9
90-
#define GMM_IA32e_ENTRIES_PER_TABLE (1 << GMM_IA32e_BITS_PER_TABLE_INDEX)
91-
#define GMM_IA32e_PTE_SIZE 8
92-
#define GMM_IA32e_TABLE_SIZE 4096
93-
#define GMM_IA32e_PTE_PRESENT __BIT(0)
94-
#define GMM_IA32e_PTE_WRITABLE __BIT(1)
95-
#define GMM_IA32e_PTE_USER_ACCESSIBLE __BIT(2)
96-
#define GMM_IA32e_PTE_PWT __BIT(3)
97-
#define GMM_IA32e_PTE_PCD __BIT(4)
98-
#define GMM_IA32e_PTE_ACCESSED __BIT(5)
99-
#define GMM_IA32e_PTE_PAT __BIT(7)
100-
#define GMM_IA32e_PTE_U_W_P (GMM_IA32e_PTE_USER_ACCESSIBLE | GMM_IA32e_PTE_WRITABLE | GMM_IA32e_PTE_PRESENT)
101-
#define GMM_IA32e_PTE_U_R_P (GMM_IA32e_PTE_USER_ACCESSIBLE | GMM_IA32e_PTE_PRESENT)
102-
#define GMM_PAT_IDX_PTE_BITS(idx) ((((idx) & __BIT(2)) ? GMM_IA32e_PTE_PAT : 0) |\
103-
(((idx) & __BIT(1)) ? GMM_IA32e_PTE_PCD : 0) |\
104-
(((idx) & __BIT(0)) ? GMM_IA32e_PTE_PWT : 0) )
105-
#define GMM_SKL_PTE_NULL_PAGE __BIT(9)
106-
#define GMM_IA32e_PDE_IPS __BIT(11)
107-
108-
#define GMM_GFX_PHYS_ADDRESS_MAX (0xffffffffffffffff)
109-
#define GMM_WDDM_MAX_ALLOCATION_SIZE (0xffffffff) // WDDM allocation sizes are limited by the MDL byte count, which is a uint32_t
11081
//===========================================================================
11182
// typedef:
11283
// GMM_STATUS_ENUM

Source/GmmLib/inc/External/Common/GmmFormatTable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ GMM_FORMAT( P8A8_UNORM_PALETTE0 , 16, 1, 1, 1, R, x, 0x122, NC ,
164164
GMM_FORMAT( P8A8_UNORM_PALETTE1 , 16, 1, 1, 1, R, x, 0x123, NC , ALWAYS )
165165
GMM_FORMAT( PLANAR_420_8 , 8, 1, 1, 1, R, x, 0x1A5, NC , x ) // No current GMM support by this name.
166166
GMM_FORMAT( PLANAR_420_16 , 16, 1, 1, 1, R, x, 0x1A6, NC , x ) // "
167-
GMM_FORMAT( PLANAR_422_8 , 8, 1, 1, 1, R, x, 0x00F, NC , x ) // <-- TODO(Minor): Remove this HW-internal format.
167+
GMM_FORMAT( PLANAR_422_8 , 8, 1, 1, 1, R, x, 0x00F, NC , x ) // <-- TODO(Minor): Remove this HW-internal format.
168168
GMM_FORMAT( R1_UNORM , 1, 1, 1, 1, R, x, 0x181, NC , x ) // "
169169
GMM_FORMAT( R8_SINT , 8, 1, 1, 1, R, x, 0x142, 0xA , ALWAYS )
170170
GMM_FORMAT( R8_SNORM , 8, 1, 1, 1, R, x, 0x141, 0xA , ALWAYS )

Source/GmmLib/inc/External/Common/GmmResourceFlags.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ typedef struct GMM_RESOURCE_FLAG_REC
8282
uint32_t Vertex : 1;
8383
uint32_t Video : 1; // Apply Video restrictions when padding/aligning this resource (see GmmRestrictions.c)
8484
uint32_t VxdRenderTarget : 1; // Flag to indicate that the surface will be used by the MSVDX device. RT is xTiled and pitch alligned to VXD device.
85-
uint32_t __NonMsaaTileXCcs : 1; // Internal GMM flag--Clients dont set.
86-
uint32_t __NonMsaaTileYCcs : 1; // Internal GMM flag--Clients dont set.
87-
uint32_t __MsaaTileMcs : 1; // Internal GMM flag--Clients dont set.
85+
uint32_t __NonMsaaTileXCcs : 1; // Internal GMM flag--Clients don't set.
86+
uint32_t __NonMsaaTileYCcs : 1; // Internal GMM flag--Clients don't set.
87+
uint32_t __MsaaTileMcs : 1; // Internal GMM flag--Clients don't set.
8888
uint32_t __NonMsaaLinearCCS : 1; // Internal GMM flag--Clients don't set.
8989
uint32_t UmdDeferredMap : 1; // Defer resource mapping by GMM and let UMD manage map/unmap later.
9090

@@ -131,21 +131,21 @@ typedef struct GMM_RESOURCE_FLAG_REC
131131
uint32_t WddmProtected : 1; // Sets the DXGK_ALLOCATIONINFOFLAGS.Protected flag
132132
uint32_t XAdapter : 1; // For WinBlue: to support Hybrid graphics
133133
uint32_t YUVShaderFriendlyLayout : 1; // DX11.1+. Client wants non-std YUV memory layout, friendly to DX shader resource views. NV12 only.
134-
uint32_t __PreallocatedResInfo : 1; // Internal GMM flag--Clients dont set.
135-
uint32_t __PreWddm2SVM : 1; // Internal GMM flag--Clients dont set.
134+
uint32_t __PreallocatedResInfo : 1; // Internal GMM flag--Clients don't set.
135+
uint32_t __PreWddm2SVM : 1; // Internal GMM flag--Clients don't set.
136136
} Info;
137137

138138
// Wa: Any Surface specific Work Around will go in here
139139
struct
140140
{
141-
uint32_t GTMfx2ndLevelBatchRingSizeAlign : 1; // GT steppings prior to C0 require MFX 2nd level bb's to have certain alignment. (DCN_856778)
142-
uint32_t ILKNeedAvcMprRowStore32KAlign : 1; // ILK A0 requires 32K align WA for AVC MPR RowStore (DCN_683608)
143-
uint32_t ILKNeedAvcDmvBuffer32KAlign : 1; // ILK A0 requires 32K align WA for AVC DMV Buffers (DCN_683608)
141+
uint32_t GTMfx2ndLevelBatchRingSizeAlign : 1; // GT steppings prior to C0 require MFX 2nd level bb's to have certain alignment.
142+
uint32_t ILKNeedAvcMprRowStore32KAlign : 1; // ILK A0 requires 32K align WA for AVC MPR RowStore
143+
uint32_t ILKNeedAvcDmvBuffer32KAlign : 1; // ILK A0 requires 32K align WA for AVC DMV Buffers
144144
uint32_t NoBufferSamplerPadding : 1; // GMM not to add pre-BDW buffer sampler padding--UMD's take responsibility to flush L3 after sampling, etc.
145145
uint32_t NoLegacyPlanarLinearVideoRestrictions : 1; // GMM not to apply Legacy Planar "Linear Video" Restrictions (64B pitch alignment)
146146
uint32_t CHVAstcSkipVirtualMips : 1; // GMM adjusts mip-map allocation to skip mip0 size
147147
uint32_t DisablePackedMipTail : 1; // Disables Yf/Ys MIP Tail packing--forcing each MIP to its own tile boundary.
148-
uint32_t __ForceOtherHVALIGN4 : 1; // Temp D3D12 WHQL WA. TODO(Minor): Remove once GMM switches to optimized H/VALIGN.
148+
uint32_t __ForceOtherHVALIGN4 : 1;
149149
uint32_t DisableDisplayCcsClearColor : 1; // Disables display clear color
150150
uint32_t DisableDisplayCcsCompression : 1; // Disables display decompression on the surface (it disables display awareness of both fast clear/render compression)
151151
} Wa;

0 commit comments

Comments
 (0)