Apply constexpr on global constant varaibles

When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.

Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef


[ROCm/clr commit: fdef6f722f]
Tá an tiomantas seo le fáil i:
Tao Sang údaraithe agus Tao Sang tiomanta 2020-07-22 22:14:13 -04:00
1 tuismitheoir 11f8a869f1
tiomantas 44eb207f8d
62 comhad athraithe
+224 -227

Níor tháinig aon chomhaid le do chuardach

+2 -2
Féach ar an gComhad
@@ -766,7 +766,7 @@ struct FormatConvertion {
};
// The list of rejected data formats and corresponding conversion
static const FormatConvertion RejectedData[] = {
static constexpr FormatConvertion RejectedData[] = {
{CL_UNORM_INT8, CL_UNSIGNED_INT8}, {CL_UNORM_INT16, CL_UNSIGNED_INT16},
{CL_SNORM_INT8, CL_UNSIGNED_INT8}, {CL_SNORM_INT16, CL_UNSIGNED_INT16},
{CL_HALF_FLOAT, CL_UNSIGNED_INT16}, {CL_FLOAT, CL_UNSIGNED_INT32},
@@ -774,7 +774,7 @@ static const FormatConvertion RejectedData[] = {
{CL_UNORM_INT_101010, CL_UNSIGNED_INT8}, {CL_SIGNED_INT32, CL_UNSIGNED_INT32}};
// The list of rejected channel's order and corresponding conversion
static const FormatConvertion RejectedOrder[] = {
static constexpr FormatConvertion RejectedOrder[] = {
{CL_A, CL_R}, {CL_RA, CL_RG}, {CL_LUMINANCE, CL_R}, {CL_INTENSITY, CL_R},
{CL_RGB, CL_RGBA}, {CL_BGRA, CL_RGBA}, {CL_ARGB, CL_RGBA}, {CL_sRGB, CL_RGBA},
{CL_sRGBx, CL_RGBA}, {CL_sRGBA, CL_RGBA}, {CL_sBGRA, CL_RGBA}};