Merge branch 'master' into separate-web-and-emscripten
This commit is contained in:
commit
d0848b72fa
42 changed files with 15836 additions and 1059 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -2204,6 +2204,30 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||
// these require SPIR-V 1.3
|
||||
if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_3)
|
||||
error(loc, "requires SPIR-V 1.3", "subgroup op", "");
|
||||
|
||||
// Check that if extended types are being used that the correct extensions are enabled.
|
||||
if (arg0 != nullptr) {
|
||||
const TType& type = arg0->getType();
|
||||
switch (type.getBasicType()) {
|
||||
default:
|
||||
break;
|
||||
case EbtInt8:
|
||||
case EbtUint8:
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int8, type.getCompleteString().c_str());
|
||||
break;
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int16, type.getCompleteString().c_str());
|
||||
break;
|
||||
case EbtInt64:
|
||||
case EbtUint64:
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int64, type.getCompleteString().c_str());
|
||||
break;
|
||||
case EbtFloat16:
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_float16, type.getCompleteString().c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -300,6 +300,12 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float16] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float32] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float64] = EBhDisable;
|
||||
|
||||
// subgroup extended types
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int8] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int16] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
|
||||
}
|
||||
#endif // GLSLANG_WEB
|
||||
|
||||
|
|
@ -447,6 +453,11 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_EXT_shader_explicit_arithmetic_types_float16 1\n"
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types_float32 1\n"
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types_float64 1\n"
|
||||
|
||||
"#define GL_EXT_shader_subgroup_extended_types_int8 1\n"
|
||||
"#define GL_EXT_shader_subgroup_extended_types_int16 1\n"
|
||||
"#define GL_EXT_shader_subgroup_extended_types_int64 1\n"
|
||||
"#define GL_EXT_shader_subgroup_extended_types_float16 1\n"
|
||||
;
|
||||
|
||||
if (version >= 150) {
|
||||
|
|
@ -826,6 +837,15 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
|
|||
updateExtensionBehavior(line, "GL_EXT_buffer_reference", behaviorString);
|
||||
else if (strcmp(extension, "GL_NV_integer_cooperative_matrix") == 0)
|
||||
updateExtensionBehavior(line, "GL_NV_cooperative_matrix", behaviorString);
|
||||
// subgroup extended types to explicit types
|
||||
else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int8") == 0)
|
||||
updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int8", behaviorString);
|
||||
else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int16") == 0)
|
||||
updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int16", behaviorString);
|
||||
else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int64") == 0)
|
||||
updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int64", behaviorString);
|
||||
else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_float16") == 0)
|
||||
updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_float16", behaviorString);
|
||||
}
|
||||
|
||||
void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ const char* const E_GL_OES_tessellation_point_size = "GL_OES_tessel
|
|||
const char* const E_GL_OES_texture_buffer = "GL_OES_texture_buffer";
|
||||
const char* const E_GL_OES_texture_cube_map_array = "GL_OES_texture_cube_map_array";
|
||||
|
||||
// KHX
|
||||
// EXT
|
||||
const char* const E_GL_EXT_shader_explicit_arithmetic_types = "GL_EXT_shader_explicit_arithmetic_types";
|
||||
const char* const E_GL_EXT_shader_explicit_arithmetic_types_int8 = "GL_EXT_shader_explicit_arithmetic_types_int8";
|
||||
const char* const E_GL_EXT_shader_explicit_arithmetic_types_int16 = "GL_EXT_shader_explicit_arithmetic_types_int16";
|
||||
|
|
@ -267,6 +267,11 @@ const char* const E_GL_EXT_shader_explicit_arithmetic_types_float16 = "GL_EXT_s
|
|||
const char* const E_GL_EXT_shader_explicit_arithmetic_types_float32 = "GL_EXT_shader_explicit_arithmetic_types_float32";
|
||||
const char* const E_GL_EXT_shader_explicit_arithmetic_types_float64 = "GL_EXT_shader_explicit_arithmetic_types_float64";
|
||||
|
||||
const char* const E_GL_EXT_shader_subgroup_extended_types_int8 = "GL_EXT_shader_subgroup_extended_types_int8";
|
||||
const char* const E_GL_EXT_shader_subgroup_extended_types_int16 = "GL_EXT_shader_subgroup_extended_types_int16";
|
||||
const char* const E_GL_EXT_shader_subgroup_extended_types_int64 = "GL_EXT_shader_subgroup_extended_types_int64";
|
||||
const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shader_subgroup_extended_types_float16";
|
||||
|
||||
// Arrays of extensions for the above AEP duplications
|
||||
|
||||
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue