1 /*========================== begin_copyright_notice ============================ 2 3 Copyright (C) 2019-2021 Intel Corporation 4 5 SPDX-License-Identifier: MIT 6 7 ============================= end_copyright_notice ===========================*/ 8 9 10 #pragma once 11 12 #include "Compiler/CISACodeGen/ShaderCodeGen.hpp" 13 14 namespace IGC 15 { 16 class CComputeShaderBase : public CShader 17 { 18 public: 19 CComputeShaderBase(llvm::Function* pFunc, CShaderProgram* pProgram); 20 virtual ~CComputeShaderBase(); 21 protected: 22 void selectWalkOrder( 23 bool useLinearWalk, 24 uint numberOfTypedAccess, 25 uint numberOfUntypedAccess, 26 uint num1DAccesses, 27 uint threadGroupSize_X, 28 uint threadGroupSize_Y, 29 uint threadGroupSize_Z); 30 31 ThreadIDLayout m_ThreadIDLayout = ThreadIDLayout::X; 32 33 enum WALK_ORDER { 34 WO_XYZ, 35 WO_XZY, 36 WO_YXZ, 37 WO_ZXY, 38 WO_YZX, 39 WO_ZYX 40 }; 41 WALK_ORDER m_walkOrder = WALK_ORDER::WO_XYZ; 42 }; 43 } 44