Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL
This CL removes the GLSLANG_WEB and GLSLANG_WEB_DEVEL cmake build options and their usage in the codebase. Issue #2958
This commit is contained in:
parent
c8c669fc2a
commit
d291b15911
48 changed files with 49 additions and 1540 deletions
|
|
@ -42,26 +42,9 @@
|
|||
// The .y bison file is not a source file, it is a derivative of the .m4 file.
|
||||
// The m4 file needs to be processed by m4 to generate the .y bison file.
|
||||
//
|
||||
// Code sandwiched between a pair:
|
||||
//
|
||||
// GLSLANG_WEB_EXCLUDE_ON
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
// GLSLANG_WEB_EXCLUDE_OFF
|
||||
//
|
||||
// Will be excluded from the grammar when m4 is executed as:
|
||||
//
|
||||
// m4 -P -DGLSLANG_WEB
|
||||
//
|
||||
// It will be included when m4 is executed as:
|
||||
//
|
||||
// m4 -P
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This is bison grammar and productions for parsing all versions of the
|
||||
* GLSL shading languages.
|
||||
|
|
@ -177,8 +160,6 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY
|
||||
%token <lex> UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY
|
||||
|
||||
|
||||
|
||||
%token <lex> ATTRIBUTE VARYING
|
||||
%token <lex> FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T
|
||||
%token <lex> INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T
|
||||
|
|
@ -282,8 +263,6 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
|
||||
%token <lex> ATTACHMENTEXT IATTACHMENTEXT UATTACHMENTEXT
|
||||
|
||||
|
||||
|
||||
%token <lex> LEFT_OP RIGHT_OP
|
||||
%token <lex> INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
|
||||
%token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
|
||||
|
|
@ -309,7 +288,6 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> UNIFORM SHARED BUFFER TILEIMAGEEXT
|
||||
%token <lex> FLAT SMOOTH LAYOUT
|
||||
|
||||
|
||||
%token <lex> DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT
|
||||
%token <lex> INT64CONSTANT UINT64CONSTANT
|
||||
%token <lex> SUBROUTINE DEMOTE
|
||||
|
|
@ -321,7 +299,6 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT
|
||||
%token <lex> PRECISE
|
||||
|
||||
|
||||
%type <interm> assignment_operator unary_operator
|
||||
%type <interm.intermTypedNode> variable_identifier primary_expression postfix_expression
|
||||
%type <interm.intermTypedNode> expression integer_expression assignment_expression
|
||||
|
|
@ -367,7 +344,6 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
|
||||
%type <interm.identifierList> identifier_list
|
||||
|
||||
|
||||
%type <interm.type> precise_qualifier non_uniform_qualifier
|
||||
%type <interm.typeList> type_name_list
|
||||
%type <interm.attributes> attribute attribute_list single_attribute
|
||||
|
|
@ -387,7 +363,6 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%type <interm.spirvInst> spirv_instruction_qualifier
|
||||
%type <interm.spirvInst> spirv_instruction_qualifier_list spirv_instruction_qualifier_id
|
||||
|
||||
|
||||
%start translation_unit
|
||||
%%
|
||||
|
||||
|
|
@ -419,7 +394,6 @@ primary_expression
|
|||
| BOOLCONSTANT {
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
|
||||
}
|
||||
|
||||
| STRING_LITERAL {
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true);
|
||||
}
|
||||
|
|
@ -457,7 +431,6 @@ primary_expression
|
|||
parseContext.float16Check($1.loc, "half float literal");
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
postfix_expression
|
||||
|
|
@ -583,13 +556,11 @@ function_identifier
|
|||
$$.function = new TFunction(empty, TType(EbtVoid), EOpNull);
|
||||
}
|
||||
}
|
||||
|
||||
| non_uniform_qualifier {
|
||||
// Constructor
|
||||
$$.intermNode = 0;
|
||||
$$.function = parseContext.handleConstructorCall($1.loc, $1);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
unary_expression
|
||||
|
|
@ -899,7 +870,6 @@ declaration
|
|||
$$ = 0;
|
||||
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
||||
}
|
||||
|
||||
| spirv_instruction_qualifier function_prototype SEMICOLON {
|
||||
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier");
|
||||
$2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier
|
||||
|
|
@ -912,7 +882,6 @@ declaration
|
|||
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier");
|
||||
$$ = 0;
|
||||
}
|
||||
|
||||
| init_declarator_list SEMICOLON {
|
||||
if ($1.intermNode && $1.intermNode->getAsAggregate())
|
||||
$1.intermNode->getAsAggregate()->setOperator(EOpSequence);
|
||||
|
|
@ -1182,9 +1151,7 @@ single_declaration
|
|||
: fully_specified_type {
|
||||
$$.type = $1;
|
||||
$$.intermNode = 0;
|
||||
|
||||
parseContext.declareTypeDefaults($$.loc, $$.type);
|
||||
|
||||
}
|
||||
| fully_specified_type IDENTIFIER {
|
||||
$$.type = $1;
|
||||
|
|
@ -1270,7 +1237,6 @@ interpolation_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.flat = true;
|
||||
}
|
||||
|
||||
| NOPERSPECTIVE {
|
||||
parseContext.globalCheck($1.loc, "noperspective");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
|
||||
|
|
@ -1335,7 +1301,6 @@ interpolation_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.perTaskNV = true;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
layout_qualifier
|
||||
|
|
@ -1370,7 +1335,6 @@ layout_qualifier_id
|
|||
}
|
||||
;
|
||||
|
||||
|
||||
precise_qualifier
|
||||
: PRECISE {
|
||||
parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
|
||||
|
|
@ -1380,7 +1344,6 @@ precise_qualifier
|
|||
}
|
||||
;
|
||||
|
||||
|
||||
type_qualifier
|
||||
: single_type_qualifier {
|
||||
$$ = $1;
|
||||
|
|
@ -1414,7 +1377,6 @@ single_type_qualifier
|
|||
// allow inheritance of storage qualifier from block declaration
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
| precise_qualifier {
|
||||
// allow inheritance of storage qualifier from block declaration
|
||||
$$ = $1;
|
||||
|
|
@ -1441,7 +1403,6 @@ single_type_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.setSpirvLiteral();
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
storage_qualifier
|
||||
|
|
@ -1496,7 +1457,6 @@ storage_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqBuffer;
|
||||
}
|
||||
|
||||
| ATTRIBUTE {
|
||||
parseContext.requireStage($1.loc, EShLangVertex, "attribute");
|
||||
parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute");
|
||||
|
|
@ -1689,10 +1649,8 @@ storage_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqtaskPayloadSharedEXT;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
|
||||
non_uniform_qualifier
|
||||
: NONUNIFORM {
|
||||
$$.init($1.loc);
|
||||
|
|
@ -1711,7 +1669,6 @@ type_name_list
|
|||
}
|
||||
;
|
||||
|
||||
|
||||
type_specifier
|
||||
: type_specifier_nonarray type_parameter_specifier_opt {
|
||||
$$ = $1;
|
||||
|
|
@ -1940,7 +1897,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtFloat;
|
||||
$$.setMatrix(4, 4);
|
||||
}
|
||||
|
||||
| DOUBLE {
|
||||
parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double");
|
||||
if (! parseContext.symbolTable.atBuiltInLevel())
|
||||
|
|
@ -2559,7 +2515,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtSampler;
|
||||
$$.sampler.set(EbtFloat, Esd1D);
|
||||
}
|
||||
|
||||
| SAMPLER2D {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
|
|
@ -2595,7 +2550,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtSampler;
|
||||
$$.sampler.set(EbtFloat, Esd2D, true, true);
|
||||
}
|
||||
|
||||
| SAMPLER1DSHADOW {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
|
|
@ -2704,7 +2658,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtSampler;
|
||||
$$.sampler.set(EbtInt, Esd1D);
|
||||
}
|
||||
|
||||
| ISAMPLER2D {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
|
|
@ -2740,7 +2693,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtSampler;
|
||||
$$.sampler.set(EbtUint, EsdCube);
|
||||
}
|
||||
|
||||
| ISAMPLER1DARRAY {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
|
|
@ -2781,7 +2733,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtSampler;
|
||||
$$.sampler.setTexture(EbtUint, EsdCube, true);
|
||||
}
|
||||
|
||||
| USAMPLER2DARRAY {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
|
|
@ -2857,7 +2808,6 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtSampler;
|
||||
$$.sampler.setPureSampler(true);
|
||||
}
|
||||
|
||||
| SAMPLER2DRECT {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
|
|
@ -3566,7 +3516,6 @@ type_specifier_nonarray
|
|||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtHitObjectNV;
|
||||
}
|
||||
|
||||
| struct_specifier {
|
||||
$$ = $1;
|
||||
$$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
|
||||
|
|
@ -3721,7 +3670,6 @@ initializer
|
|||
: assignment_expression {
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
| LEFT_BRACE initializer_list RIGHT_BRACE {
|
||||
const char* initFeature = "{ } style initializers";
|
||||
parseContext.requireProfile($1.loc, ~EEsProfile, initFeature);
|
||||
|
|
@ -3740,10 +3688,8 @@ initializer
|
|||
parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
|
||||
$$ = parseContext.intermediate.makeAggregate($1.loc);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
|
||||
initializer_list
|
||||
: initializer {
|
||||
$$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc());
|
||||
|
|
@ -3753,7 +3699,6 @@ initializer_list
|
|||
}
|
||||
;
|
||||
|
||||
|
||||
declaration_statement
|
||||
: declaration { $$ = $1; }
|
||||
;
|
||||
|
|
@ -3773,12 +3718,9 @@ simple_statement
|
|||
| case_label { $$ = $1; }
|
||||
| iteration_statement { $$ = $1; }
|
||||
| jump_statement { $$ = $1; }
|
||||
|
||||
| demote_statement { $$ = $1; }
|
||||
|
||||
;
|
||||
|
||||
|
||||
demote_statement
|
||||
: DEMOTE SEMICOLON {
|
||||
parseContext.requireStage($1.loc, EShLangFragment, "demote");
|
||||
|
|
@ -3787,7 +3729,6 @@ demote_statement
|
|||
}
|
||||
;
|
||||
|
||||
|
||||
compound_statement
|
||||
: LEFT_BRACE RIGHT_BRACE { $$ = 0; }
|
||||
| LEFT_BRACE {
|
||||
|
|
@ -3870,14 +3811,12 @@ selection_statement
|
|||
: selection_statement_nonattributed {
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
| attribute selection_statement_nonattributed {
|
||||
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||
parseContext.handleSelectionAttributes(*$1, $2);
|
||||
$$ = $2;
|
||||
}
|
||||
|
||||
|
||||
selection_statement_nonattributed
|
||||
: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement {
|
||||
parseContext.boolCheck($1.loc, $3);
|
||||
|
|
@ -3918,14 +3857,12 @@ switch_statement
|
|||
: switch_statement_nonattributed {
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
| attribute switch_statement_nonattributed {
|
||||
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||
parseContext.handleSwitchAttributes(*$1, $2);
|
||||
$$ = $2;
|
||||
}
|
||||
|
||||
|
||||
switch_statement_nonattributed
|
||||
: SWITCH LEFT_PAREN expression RIGHT_PAREN {
|
||||
// start new switch sequence on the switch stack
|
||||
|
|
@ -3983,14 +3920,12 @@ iteration_statement
|
|||
: iteration_statement_nonattributed {
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
| attribute iteration_statement_nonattributed {
|
||||
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||
parseContext.handleLoopAttributes(*$1, $2);
|
||||
$$ = $2;
|
||||
}
|
||||
|
||||
|
||||
iteration_statement_nonattributed
|
||||
: WHILE LEFT_PAREN {
|
||||
if (! parseContext.limits.whileLoops)
|
||||
|
|
@ -4103,7 +4038,6 @@ jump_statement
|
|||
parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation");
|
||||
$$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc);
|
||||
}
|
||||
|
||||
| TERMINATE_RAY SEMICOLON {
|
||||
parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT");
|
||||
$$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc);
|
||||
|
|
@ -4112,7 +4046,6 @@ jump_statement
|
|||
parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT");
|
||||
$$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
// Grammar Note: No 'goto'. Gotos are not supported.
|
||||
|
|
@ -4137,13 +4070,11 @@ external_declaration
|
|||
| declaration {
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
| SEMICOLON {
|
||||
parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon");
|
||||
parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
|
||||
$$ = nullptr;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
function_definition
|
||||
|
|
@ -4187,7 +4118,6 @@ function_definition
|
|||
}
|
||||
;
|
||||
|
||||
|
||||
attribute
|
||||
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
|
||||
$$ = $3;
|
||||
|
|
@ -4209,8 +4139,6 @@ single_attribute
|
|||
$$ = parseContext.makeAttributes(*$1.string, $3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
spirv_requirements_list
|
||||
: spirv_requirements_parameter {
|
||||
$$ = $1;
|
||||
|
|
@ -4488,5 +4416,4 @@ spirv_instruction_qualifier_id
|
|||
$$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i);
|
||||
}
|
||||
|
||||
|
||||
%%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue