Web: Generalize _EXTENSIONS* in SPIR-V back-end.
About 50 fewer #ifdefs. About 14K smaller. Note, the base size is ill-defined due to optimizer settings (size vs. performance), compression, and target architecture. Some recent %'s are accidentally reported as 3X the real savings. Early %'s were accurate. What matters though is that each step got worthwhile gains, and what the final size ends up being.
This commit is contained in:
parent
b6d3ee5aca
commit
a28f7a75d1
11 changed files with 1188 additions and 1312 deletions
|
|
@ -703,7 +703,6 @@ public:
|
|||
case EsdBuffer:
|
||||
return GL_SAMPLER_BUFFER;
|
||||
}
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
|
|
@ -732,7 +731,6 @@ public:
|
|||
case EsdBuffer:
|
||||
return GL_FLOAT16_SAMPLER_BUFFER_AMD;
|
||||
}
|
||||
#endif
|
||||
case EbtInt:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
|
|
@ -795,7 +793,6 @@ public:
|
|||
case EsdBuffer:
|
||||
return GL_IMAGE_BUFFER;
|
||||
}
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
|
|
@ -814,7 +811,6 @@ public:
|
|||
case EsdBuffer:
|
||||
return GL_FLOAT16_IMAGE_BUFFER_AMD;
|
||||
}
|
||||
#endif
|
||||
case EbtInt:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
|
|
@ -880,9 +876,7 @@ public:
|
|||
switch (type.getBasicType()) {
|
||||
case EbtFloat: return GL_FLOAT_VEC2 + offset;
|
||||
case EbtDouble: return GL_DOUBLE_VEC2 + offset;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16: return GL_FLOAT16_VEC2_NV + offset;
|
||||
#endif
|
||||
case EbtInt: return GL_INT_VEC2 + offset;
|
||||
case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset;
|
||||
case EbtInt64: return GL_INT64_ARB + offset;
|
||||
|
|
@ -942,7 +936,6 @@ public:
|
|||
default: return 0;
|
||||
}
|
||||
}
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
switch (type.getMatrixCols()) {
|
||||
case 2:
|
||||
|
|
@ -967,7 +960,6 @@ public:
|
|||
default: return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -976,9 +968,7 @@ public:
|
|||
switch (type.getBasicType()) {
|
||||
case EbtFloat: return GL_FLOAT;
|
||||
case EbtDouble: return GL_DOUBLE;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16: return GL_FLOAT16_NV;
|
||||
#endif
|
||||
case EbtInt: return GL_INT;
|
||||
case EbtUint: return GL_UNSIGNED_INT;
|
||||
case EbtInt64: return GL_INT64_ARB;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue