forked from GPUOpen-Archive/common-src-ShaderUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSUCommon.cpp
executable file
·37 lines (29 loc) · 1.18 KB
/
SUCommon.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//=====================================================================
// Copyright (c) 2010 Advanced Micro Devices, Inc. All rights reserved.
//
/// \author GPU Developer Tools
/// \file $File: //devtools/main/Common/Src/ShaderUtils/SUCommon.cpp $
/// \version $Revision: #5 $
/// \brief This file defines enums and structs used in ShaderDebugger
/// and APP Profiler.
//
//=====================================================================
// $Id: //devtools/main/Common/Src/ShaderUtils/SUCommon.cpp#5 $
// Last checkin: $DateTime: 2016/04/14 04:43:34 $
// Last edited by: $Author: AMD Developer Tools Team
// Change list: $Change: 569084 $
//=====================================================================
#include "SUCommon.h"
using namespace ShaderUtils;
const ThreadID ShaderUtils::g_tID_Error = ThreadID(TID_2D, -1, -1, -1, -1);
bool ShaderUtils::IsValid(const ThreadID& threadID)
{
switch (threadID.type)
{
case TID_1D: return (threadID.x >= 0);
case TID_2D: return (threadID.x >= 0 && threadID.y >= 0);
case TID_3D: return (threadID.x >= 0 && threadID.y >= 0 && threadID.z >= 0);
default: break;
}
return false;
}