1 /*========================== begin_copyright_notice ============================ 2 3 Copyright (C) 2017-2021 Intel Corporation 4 5 SPDX-License-Identifier: MIT 6 7 ============================= end_copyright_notice ===========================*/ 8 9 #pragma once 10 11 #include "inc/common/sku_wa.h" 12 #include "usc.h" 13 #include "3d/common/iStdLib/types.h" 14 15 /*****************************************************************************\ 16 STRUCT: S3DRender 17 \*****************************************************************************/ 18 struct S3DRenderUnitCapabilities 19 { 20 unsigned int IsBarycentricInterpolationSupported : 1; // BIT(0) 21 unsigned int IsInstructionCompactionSupported : 1; // BIT(1) 22 unsigned int : 14; 23 }; 24 25 /*****************************************************************************\ 26 STRUCT: S3DDataPort 27 \*****************************************************************************/ 28 struct S3DDataPortCapabilities 29 { 30 unsigned int OwordBlockTypes; 31 unsigned int OwordBlockCount[3]; 32 unsigned int OwordDualBlockTypes; 33 unsigned int OwordDualBlockCount[2]; 34 }; 35 36 /*****************************************************************************\ 37 STRUCT: S3DKernelHardwareCapabilities 38 \*****************************************************************************/ 39 struct S3DKernelHardwareCapabilities 40 { 41 unsigned int SliceCount; 42 unsigned int SubSliceCount; 43 unsigned int ThreadCount; 44 unsigned int EUCount; 45 unsigned int EUCountPerSubSlice; 46 unsigned int EUThreadsPerEU; 47 unsigned int EUCountPerPoolMax; 48 unsigned int KernelPointerAlignSize; 49 unsigned int CsrSizeInMb; 50 }; 51 52 namespace IGC 53 { 54 /*****************************************************************************\ 55 STRUCT: S3DHardwareCapabilities 56 \*****************************************************************************/ 57 struct SCompilerHwCaps 58 { 59 unsigned int VertexShaderThreads; 60 unsigned int VertexShaderThreadsPosh; 61 unsigned int HullShaderThreads; 62 unsigned int DomainShaderThreads; 63 unsigned int GeometryShaderThreads; 64 unsigned int PixelShaderThreadsWindowerRange; 65 unsigned int MediaShaderThreads; 66 unsigned int SharedLocalMemoryBlockSize; 67 68 S3DKernelHardwareCapabilities KernelHwCaps; 69 }; 70 71 struct OCLCaps { 72 // minimal value for MaxParameterSize specified by OpenCL spec 73 static const unsigned MINIMAL_MAX_PARAMETER_SIZE = 1024; 74 75 // maximum size (in bytes) of the arguments that can be passed to OCL kernel 76 uint32_t MaxParameterSize = 2048; 77 78 }; 79 80 class CPlatform; 81 82 void SetCompilerCaps(const SUscSkuFeatureTable* pSkuFeatureTable, CPlatform* platform); 83 void SetCompilerCaps(SKU_FEATURE_TABLE* pSkuFeatureTable, CPlatform* platform); 84 85 } 86