diff --git a/Makefile.common b/Makefile.common index 1d93deb1c6..90ea670e95 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1361,6 +1361,7 @@ ifeq ($(HAVE_SPIRV_CROSS), 1) OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cfg.o OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_glsl.o OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_hlsl.o + #OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_msl.o endif ifeq ($(WANT_WGL), 1) diff --git a/Makefile.griffin b/Makefile.griffin index 182281628b..4f565c7a60 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -671,6 +671,10 @@ ifeq ($(HAVE_GRIFFIN_CPP), 1) OBJ += griffin/griffin_cpp.o endif +ifeq ($(WANT_GLSLANG), 1) + OBJ += griffin/griffin_glslang.o +endif + ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) diff --git a/deps/SPIRV-Cross/spirv_common.hpp b/deps/SPIRV-Cross/spirv_common.hpp index c4829f4643..550bc86e4d 100644 --- a/deps/SPIRV-Cross/spirv_common.hpp +++ b/deps/SPIRV-Cross/spirv_common.hpp @@ -723,16 +723,30 @@ struct SPIRConstant : IVariant { Constant r[4]; // If != 0, this element is a specialization constant, and we should keep track of it as such. - uint32_t id[4] = {}; + uint32_t id[4]; uint32_t vecsize = 1; + + ConstantVector() + { + unsigned i; + for (i = 0; i < 4; i++) + id[i] = 0; + } }; struct ConstantMatrix { ConstantVector c[4]; // If != 0, this column is a specialization constant, and we should keep track of it as such. - uint32_t id[4] = {}; + uint32_t id[4]; uint32_t columns = 1; + + ConstantMatrix() + { + unsigned i; + for (i = 0; i < 4; i++) + id[i] = 0; + } }; inline uint32_t specialization_constant_id(uint32_t col, uint32_t row) const diff --git a/deps/SPIRV-Cross/spirv_cross.cpp b/deps/SPIRV-Cross/spirv_cross.cpp index 996c0205c3..c5db07d60a 100644 --- a/deps/SPIRV-Cross/spirv_cross.cpp +++ b/deps/SPIRV-Cross/spirv_cross.cpp @@ -3368,7 +3368,7 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry) CFG cfg(*this, entry); // Analyze if there are parameters which need to be implicitly preserved with an "in" qualifier. - analyze_parameter_preservation(entry, cfg, handler.accessed_variables_to_block, + this->analyze_parameter_preservation(entry, cfg, handler.accessed_variables_to_block, handler.complete_write_variables_to_block); unordered_map potential_loop_variables; @@ -3393,7 +3393,7 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry) // The continue block is dominated by the inner part of the loop, which does not make sense in high-level // language output because it will be declared before the body, // so we will have to lift the dominator up to the relevant loop header instead. - builder.add_block(continue_block_to_loop_header[block]); + builder.add_block(this->continue_block_to_loop_header[block]); if (type.vecsize == 1 && type.columns == 1) { @@ -3447,7 +3447,7 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry) // If a temporary is used in more than one block, we might have to lift continue block // access up to loop header like we did for variables. if (blocks.size() != 1 && this->is_continue(block)) - builder.add_block(continue_block_to_loop_header[block]); + builder.add_block(this->continue_block_to_loop_header[block]); } uint32_t dominating_block = builder.get_dominator(); @@ -3462,10 +3462,10 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry) // This should be very rare, but if we try to declare a temporary inside a loop, // and that temporary is used outside the loop as well (spirv-opt inliner likes this) // we should actually emit the temporary outside the loop. - hoisted_temporaries.insert(var.first); - forced_temporaries.insert(var.first); + this->hoisted_temporaries.insert(var.first); + this->forced_temporaries.insert(var.first); - auto &block_temporaries = get(dominating_block).declare_temporary; + auto &block_temporaries = this->get(dominating_block).declare_temporary; block_temporaries.emplace_back(handler.result_id_to_type[var.first], var.first); } } diff --git a/deps/SPIRV-Cross/spirv_hlsl.cpp b/deps/SPIRV-Cross/spirv_hlsl.cpp index 3f2227cfea..6d486c6213 100644 --- a/deps/SPIRV-Cross/spirv_hlsl.cpp +++ b/deps/SPIRV-Cross/spirv_hlsl.cpp @@ -204,7 +204,7 @@ static string image_format_to_type(ImageFormat fmt, SPIRType::BaseType basetype) } // Returns true if an arithmetic operation does not change behavior depending on signedness. -static bool opcode_is_sign_invariant(Op opcode) +static bool hlsl_opcode_is_sign_invariant(Op opcode) { switch (opcode) { @@ -3054,15 +3054,24 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) auto ops = stream(instruction); auto opcode = static_cast(instruction.op); +#undef BOP +#undef BOP_CAST +#undef UOP +#undef QFOP +#undef TFOP +#undef BFOP +#undef BFOP_CAST +#undef BFOP +#undef UFOP #define BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define BOP_CAST(op, type) \ - emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) + emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, hlsl_opcode_is_sign_invariant(opcode)) #define UOP(op) emit_unary_op(ops[0], ops[1], ops[2], #op) #define QFOP(op) emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op) #define TFOP(op) emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op) #define BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define BFOP_CAST(op, type) \ - emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) + emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, hlsl_opcode_is_sign_invariant(opcode)) #define BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define UFOP(op) emit_unary_func_op(ops[0], ops[1], ops[2], #op) diff --git a/deps/SPIRV-Cross/spirv_msl.cpp b/deps/SPIRV-Cross/spirv_msl.cpp index a85b38c2eb..9ddfb81029 100644 --- a/deps/SPIRV-Cross/spirv_msl.cpp +++ b/deps/SPIRV-Cross/spirv_msl.cpp @@ -1230,7 +1230,13 @@ void CompilerMSL::emit_specialization_constants() // Override for MSL-specific syntax instructions void CompilerMSL::emit_instruction(const Instruction &instruction) { - +#undef BOP +#undef BOP_CAST +#undef UOP +#undef QFOP +#undef TFOP +#undef BFOP +#undef BFOP_CAST #define BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define BOP_CAST(op, type) \ emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) diff --git a/deps/glslang/glslang/glslang/MachineIndependent/LiveTraverser.h b/deps/glslang/glslang/glslang/MachineIndependent/LiveTraverser.h index 286efe6cef..af8f7755bc 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/LiveTraverser.h +++ b/deps/glslang/glslang/glslang/MachineIndependent/LiveTraverser.h @@ -33,6 +33,9 @@ //POSSIBILITY OF SUCH DAMAGE. // +#ifndef _MACHINE_INDEPENDENT_LIVE_TRAVERSER_H +#define _MACHINE_INDEPENDENT_LIVE_TRAVERSER_H + #include "../Include/Common.h" #include "reflection.h" #include "localintermediate.h" @@ -134,3 +137,5 @@ private: }; } // namespace glslang + +#endif diff --git a/deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp b/deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp index 3750645403..695e63d00c 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp +++ b/deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp @@ -52,6 +52,7 @@ // preprocessor includes #include "preprocessor/PpContext.h" #include "preprocessor/PpTokens.h" +#include "preprocessor/Compare.h" // Required to avoid missing prototype warnings for some compilers int yylex(YYSTYPE*, glslang::TParseContext&); @@ -287,38 +288,15 @@ protected: } // end namespace glslang // This is the function the glslang parser (i.e., bison) calls to get its next token -int yylex(YYSTYPE* glslangTokenDesc, glslang::TParseContext& parseContext) +int yylex(YYSTYPE* glslangTokenDesc, glslang::TParseContext& _parseContext) { glslang::TParserToken token(*glslangTokenDesc); - return parseContext.getScanContext()->tokenize(parseContext.getPpContext(), token); + return _parseContext.getScanContext()->tokenize(_parseContext.getPpContext(), token); } namespace { -struct str_eq -{ - bool operator()(const char* lhs, const char* rhs) const - { - return strcmp(lhs, rhs) == 0; - } -}; - -struct str_hash -{ - size_t operator()(const char* str) const - { - // djb2 - unsigned long hash = 5381; - int c; - - while ((c = *str++) != 0) - hash = ((hash << 5) + hash) + c; - - return hash; - } -}; - // A single global usable by all threads, by all versions, by all languages. // After a single process-level initialization, this is read only and thread safe std::unordered_map* KeywordMap = nullptr; @@ -670,7 +648,7 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) case '{': return LEFT_BRACE; case '}': return RIGHT_BRACE; case '\\': - parseContext.error(loc, "illegal use of escape character", "\\", ""); + _parseContext.error(loc, "illegal use of escape character", "\\", ""); break; case PpAtomAdd: return ADD_ASSIGN; @@ -722,7 +700,7 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) char buf[2]; buf[0] = (char)ppToken.token; buf[1] = 0; - parseContext.error(loc, "unexpected token", buf, ""); + _parseContext.error(loc, "unexpected token", buf, ""); break; } } while (true); @@ -761,8 +739,8 @@ int TScanContext::tokenizeIdentifier() case SWITCH: case DEFAULT: - if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < 130)) + if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < 130)) reservedWord(); return keyword; @@ -796,19 +774,19 @@ int TScanContext::tokenizeIdentifier() case ATTRIBUTE: case VARYING: - if (parseContext.profile == EEsProfile && parseContext.version >= 300) + if (_parseContext.profile == EEsProfile && _parseContext.version >= 300) reservedWord(); return keyword; case BUFFER: - if ((parseContext.profile == EEsProfile && parseContext.version < 310) || - (parseContext.profile != EEsProfile && parseContext.version < 430)) + if ((_parseContext.profile == EEsProfile && _parseContext.version < 310) || + (_parseContext.profile != EEsProfile && _parseContext.version < 430)) return identifierOrType(); return keyword; case ATOMIC_UINT: - if ((parseContext.profile == EEsProfile && parseContext.version >= 310) || - parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters)) + if ((_parseContext.profile == EEsProfile && _parseContext.version >= 310) || + _parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters)) return keyword; return es30ReservedFromGLSL(420); @@ -816,14 +794,14 @@ int TScanContext::tokenizeIdentifier() case RESTRICT: case READONLY: case WRITEONLY: - if (parseContext.profile == EEsProfile && parseContext.version >= 310) + if (_parseContext.profile == EEsProfile && _parseContext.version >= 310) return keyword; - return es30ReservedFromGLSL(parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store) ? 130 : 420); + return es30ReservedFromGLSL(_parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store) ? 130 : 420); case VOLATILE: - if (parseContext.profile == EEsProfile && parseContext.version >= 310) + if (_parseContext.profile == EEsProfile && _parseContext.version >= 310) return keyword; - if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile || (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) + if (!_parseContext.symbolTable.atBuiltInLevel() && (_parseContext.profile == EEsProfile || (_parseContext.version < 420 && ! _parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) reservedWord(); return keyword; @@ -832,28 +810,28 @@ int TScanContext::tokenizeIdentifier() const int numLayoutExts = 2; const char* layoutExts[numLayoutExts] = { E_GL_ARB_shading_language_420pack, E_GL_ARB_explicit_attrib_location }; - if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < 140 && - ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts))) + if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < 140 && + !_parseContext.extensionsTurnedOn(numLayoutExts, layoutExts))) return identifierOrType(); return keyword; } case SHARED: - if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < 140)) + if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < 140)) return identifierOrType(); return keyword; case PATCH: - if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) || - (parseContext.profile != EEsProfile && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader))) + if (_parseContext.symbolTable.atBuiltInLevel() || + (_parseContext.profile == EEsProfile && _parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) || + (_parseContext.profile != EEsProfile && _parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader))) return keyword; return es30ReservedFromGLSL(400); case SAMPLE: - if (parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation)) + if (_parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation)) return keyword; return es30ReservedFromGLSL(400); @@ -907,7 +885,7 @@ int TScanContext::tokenizeIdentifier() case IIMAGEBUFFER: case UIMAGEBUFFER: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) + if (_parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return firstGenerationImage(false); @@ -930,7 +908,7 @@ int TScanContext::tokenizeIdentifier() case IIMAGECUBEARRAY: case UIMAGECUBEARRAY: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + if (_parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; return secondGenerationImage(); @@ -948,7 +926,7 @@ int TScanContext::tokenizeIdentifier() case DVEC3: case DVEC4: afterType = true; - if (parseContext.profile == EEsProfile || parseContext.version < 400) + if (_parseContext.profile == EEsProfile || _parseContext.version < 400) reservedWord(); return keyword; @@ -961,9 +939,9 @@ int TScanContext::tokenizeIdentifier() case U64VEC3: case U64VEC4: afterType = true; - if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) && - parseContext.profile != EEsProfile && parseContext.version >= 450)) + if (_parseContext.symbolTable.atBuiltInLevel() || + (_parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) && + _parseContext.profile != EEsProfile && _parseContext.version >= 450)) return keyword; return identifierOrType(); @@ -997,9 +975,9 @@ int TScanContext::tokenizeIdentifier() case ISAMPLERCUBEARRAY: case USAMPLERCUBEARRAY: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + if (_parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; - if (parseContext.profile == EEsProfile || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array))) + if (_parseContext.profile == EEsProfile || (_parseContext.version < 400 && ! _parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array))) reservedWord(); return keyword; @@ -1036,14 +1014,14 @@ int TScanContext::tokenizeIdentifier() case SAMPLERBUFFER: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) + if (_parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return es30ReservedFromGLSL(130); case ISAMPLERBUFFER: case USAMPLERBUFFER: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) + if (_parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return es30ReservedFromGLSL(140); @@ -1051,7 +1029,7 @@ int TScanContext::tokenizeIdentifier() case ISAMPLER2DMS: case USAMPLER2DMS: afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version >= 310) + if (_parseContext.profile == EEsProfile && _parseContext.version >= 310) return keyword; return es30ReservedFromGLSL(150); @@ -1059,39 +1037,39 @@ int TScanContext::tokenizeIdentifier() case ISAMPLER2DMSARRAY: case USAMPLER2DMSARRAY: afterType = true; - if (parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array)) + if (_parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array)) return keyword; return es30ReservedFromGLSL(150); case SAMPLER1D: case SAMPLER1DSHADOW: afterType = true; - if (parseContext.profile == EEsProfile) + if (_parseContext.profile == EEsProfile) reservedWord(); return keyword; case SAMPLER3D: afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version < 300) { - if (! parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) + if (_parseContext.profile == EEsProfile && _parseContext.version < 300) { + if (!_parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) reservedWord(); } return keyword; case SAMPLER2DSHADOW: afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version < 300) + if (_parseContext.profile == EEsProfile && _parseContext.version < 300) reservedWord(); return keyword; case SAMPLER2DRECT: case SAMPLER2DRECTSHADOW: afterType = true; - if (parseContext.profile == EEsProfile) + if (_parseContext.profile == EEsProfile) reservedWord(); - else if (parseContext.version < 140 && ! parseContext.symbolTable.atBuiltInLevel() && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_rectangle)) { - if (parseContext.relaxedErrors()) - parseContext.requireExtensions(loc, 1, &E_GL_ARB_texture_rectangle, "texture-rectangle sampler keyword"); + else if (_parseContext.version < 140 && ! _parseContext.symbolTable.atBuiltInLevel() && ! _parseContext.extensionTurnedOn(E_GL_ARB_texture_rectangle)) { + if (_parseContext.relaxedErrors()) + _parseContext.requireExtensions(loc, 1, &E_GL_ARB_texture_rectangle, "texture-rectangle sampler keyword"); else reservedWord(); } @@ -1099,16 +1077,16 @@ int TScanContext::tokenizeIdentifier() case SAMPLER1DARRAY: afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version == 300) + if (_parseContext.profile == EEsProfile && _parseContext.version == 300) reservedWord(); - else if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < 130)) + else if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < 130)) return identifierOrType(); return keyword; case SAMPLEREXTERNALOES: afterType = true; - if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external)) + if (_parseContext.symbolTable.atBuiltInLevel() || _parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external)) return keyword; return identifierOrType(); @@ -1147,7 +1125,7 @@ int TScanContext::tokenizeIdentifier() case TEXTURE1DARRAY: case SAMPLER: case SAMPLERSHADOW: - if (parseContext.spvVersion.vulkan >= 100) + if (_parseContext.spvVersion.vulkan >= 100) return keyword; else return identifierOrType(); @@ -1158,7 +1136,7 @@ int TScanContext::tokenizeIdentifier() case ISUBPASSINPUTMS: case USUBPASSINPUT: case USUBPASSINPUTMS: - if (parseContext.spvVersion.vulkan >= 100) + if (_parseContext.spvVersion.vulkan >= 100) return keyword; else return identifierOrType(); @@ -1167,8 +1145,8 @@ int TScanContext::tokenizeIdentifier() return es30ReservedFromGLSL(130); case SMOOTH: - if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < 130)) + if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < 130)) return identifierOrType(); return keyword; @@ -1181,52 +1159,52 @@ int TScanContext::tokenizeIdentifier() #endif case FLAT: - if (parseContext.profile == EEsProfile && parseContext.version < 300) + if (_parseContext.profile == EEsProfile && _parseContext.version < 300) reservedWord(); - else if (parseContext.profile != EEsProfile && parseContext.version < 130) + else if (_parseContext.profile != EEsProfile && _parseContext.version < 130) return identifierOrType(); return keyword; case CENTROID: - if (parseContext.version < 120) + if (_parseContext.version < 120) return identifierOrType(); return keyword; case PRECISE: - if ((parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5)) || - (parseContext.profile != EEsProfile && parseContext.version >= 400)) + if ((_parseContext.profile == EEsProfile && _parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5)) || + (_parseContext.profile != EEsProfile && _parseContext.version >= 400)) return keyword; - if (parseContext.profile == EEsProfile && parseContext.version == 310) { + if (_parseContext.profile == EEsProfile && _parseContext.version == 310) { reservedWord(); return keyword; } return identifierOrType(); case INVARIANT: - if (parseContext.profile != EEsProfile && parseContext.version < 120) + if (_parseContext.profile != EEsProfile && _parseContext.version < 120) return identifierOrType(); return keyword; case PACKED: - if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < 330)) + if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < 330)) return reservedWord(); return identifierOrType(); case RESOURCE: { - bool reserved = (parseContext.profile == EEsProfile && parseContext.version >= 300) || - (parseContext.profile != EEsProfile && parseContext.version >= 420); + bool reserved = (_parseContext.profile == EEsProfile && _parseContext.version >= 300) || + (_parseContext.profile != EEsProfile && _parseContext.version >= 420); return identifierOrReserved(reserved); } case SUPERP: { - bool reserved = parseContext.profile == EEsProfile || parseContext.version >= 130; + bool reserved = _parseContext.profile == EEsProfile || _parseContext.version >= 130; return identifierOrReserved(reserved); } default: - parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); + _parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); return 0; } } @@ -1237,7 +1215,7 @@ int TScanContext::identifierOrType() if (field) return IDENTIFIER; - parserToken->sType.lex.symbol = parseContext.symbolTable.find(*parserToken->sType.lex.string); + parserToken->sType.lex.symbol = _parseContext.symbolTable.find(*parserToken->sType.lex.string); if (afterType == false && parserToken->sType.lex.symbol) { if (const TVariable* variable = parserToken->sType.lex.symbol->getAsVariable()) { if (variable->isUserType()) { @@ -1256,8 +1234,8 @@ int TScanContext::identifierOrType() // extension support before the extension is enabled. int TScanContext::reservedWord() { - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.error(loc, "Reserved word.", tokenText, "", ""); + if (!_parseContext.symbolTable.atBuiltInLevel()) + _parseContext.error(loc, "Reserved word.", tokenText, "", ""); return 0; } @@ -1270,8 +1248,8 @@ int TScanContext::identifierOrReserved(bool reserved) return 0; } - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future reserved keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future reserved keyword", tokenText, ""); return identifierOrType(); } @@ -1280,16 +1258,16 @@ int TScanContext::identifierOrReserved(bool reserved) // but then got reserved by ES 3.0. int TScanContext::es30ReservedFromGLSL(int version) { - if (parseContext.symbolTable.atBuiltInLevel()) + if (_parseContext.symbolTable.atBuiltInLevel()) return keyword; - if ((parseContext.profile == EEsProfile && parseContext.version < 300) || - (parseContext.profile != EEsProfile && parseContext.version < version)) { - if (parseContext.forwardCompatible) - parseContext.warn(loc, "future reserved word in ES 300 and keyword in GLSL", tokenText, ""); + if ((_parseContext.profile == EEsProfile && _parseContext.version < 300) || + (_parseContext.profile != EEsProfile && _parseContext.version < version)) { + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "future reserved word in ES 300 and keyword in GLSL", tokenText, ""); return identifierOrType(); - } else if (parseContext.profile == EEsProfile && parseContext.version >= 300) + } else if (_parseContext.profile == EEsProfile && _parseContext.version >= 300) reservedWord(); return keyword; @@ -1299,10 +1277,10 @@ int TScanContext::es30ReservedFromGLSL(int version) // showed up, both in an es version and a non-ES version. int TScanContext::nonreservedKeyword(int esVersion, int nonEsVersion) { - if ((parseContext.profile == EEsProfile && parseContext.version < esVersion) || - (parseContext.profile != EEsProfile && parseContext.version < nonEsVersion)) { - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future keyword", tokenText, ""); + if ((_parseContext.profile == EEsProfile && _parseContext.version < esVersion) || + (_parseContext.profile != EEsProfile && _parseContext.version < nonEsVersion)) { + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future keyword", tokenText, ""); return identifierOrType(); } @@ -1312,11 +1290,11 @@ int TScanContext::nonreservedKeyword(int esVersion, int nonEsVersion) int TScanContext::precisionKeyword() { - if (parseContext.profile == EEsProfile || parseContext.version >= 130) + if (_parseContext.profile == EEsProfile || _parseContext.version >= 130) return keyword; - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using ES precision qualifier keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using ES precision qualifier keyword", tokenText, ""); return identifierOrType(); } @@ -1325,11 +1303,11 @@ int TScanContext::matNxM() { afterType = true; - if (parseContext.version > 110) + if (_parseContext.version > 110) return keyword; - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future non-square matrix type keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future non-square matrix type keyword", tokenText, ""); return identifierOrType(); } @@ -1338,55 +1316,55 @@ int TScanContext::dMat() { afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version >= 300) { + if (_parseContext.profile == EEsProfile && _parseContext.version >= 300) { reservedWord(); return keyword; } - if (parseContext.profile != EEsProfile && parseContext.version >= 400) + if (_parseContext.profile != EEsProfile && _parseContext.version >= 400) return keyword; - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future type keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future type keyword", tokenText, ""); return identifierOrType(); } int TScanContext::firstGenerationImage(bool inEs310) { - if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.profile != EEsProfile && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || - (inEs310 && parseContext.profile == EEsProfile && parseContext.version >= 310)) + if (_parseContext.symbolTable.atBuiltInLevel() || + (_parseContext.profile != EEsProfile && (_parseContext.version >= 420 || _parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || + (inEs310 && _parseContext.profile == EEsProfile && _parseContext.version >= 310)) return keyword; - if ((parseContext.profile == EEsProfile && parseContext.version >= 300) || - (parseContext.profile != EEsProfile && parseContext.version >= 130)) { + if ((_parseContext.profile == EEsProfile && _parseContext.version >= 300) || + (_parseContext.profile != EEsProfile && _parseContext.version >= 130)) { reservedWord(); return keyword; } - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future type keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future type keyword", tokenText, ""); return identifierOrType(); } int TScanContext::secondGenerationImage() { - if (parseContext.profile == EEsProfile && parseContext.version >= 310) { + if (_parseContext.profile == EEsProfile && _parseContext.version >= 310) { reservedWord(); return keyword; } - if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.profile != EEsProfile && - (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) + if (_parseContext.symbolTable.atBuiltInLevel() || + (_parseContext.profile != EEsProfile && + (_parseContext.version >= 420 || _parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) return keyword; - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future type keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future type keyword", tokenText, ""); return identifierOrType(); } diff --git a/deps/glslang/glslang/glslang/MachineIndependent/ScanContext.h b/deps/glslang/glslang/glslang/MachineIndependent/ScanContext.h index f237bee9f2..7f0a1b513a 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/ScanContext.h +++ b/deps/glslang/glslang/glslang/MachineIndependent/ScanContext.h @@ -33,6 +33,9 @@ //POSSIBILITY OF SUCH DAMAGE. // +#ifndef _MACHINE_INDEPENDENT_SCAN_CONTEXT_H +#define _MACHINE_INDEPENDENT_SCAN_CONTEXT_H + // // This holds context specific to the GLSL scanner, which // sits between the preprocessor scanner and parser. @@ -48,7 +51,7 @@ class TParserToken; class TScanContext { public: - explicit TScanContext(TParseContextBase& pc) : parseContext(pc), afterType(false), field(false) { } + explicit TScanContext(TParseContextBase& pc) : _parseContext(pc), afterType(false), field(false) { } virtual ~TScanContext() { } static void fillInKeywordMap(); @@ -72,7 +75,7 @@ protected: int firstGenerationImage(bool inEs310); int secondGenerationImage(); - TParseContextBase& parseContext; + TParseContextBase& _parseContext; bool afterType; // true if we've recognized a type, so can only be looking for an identifier bool field; // true if we're on a field, right after a '.' TSourceLoc loc; @@ -84,3 +87,5 @@ protected: }; } // end namespace glslang + +#endif diff --git a/deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp b/deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp index e50b12f255..596e0ee649 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -217,15 +217,15 @@ bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profil intermediate.setSource(source); - std::unique_ptr parseContext(CreateParseContext(symbolTable, intermediate, version, profile, source, + std::unique_ptr _parseContext(CreateParseContext(symbolTable, intermediate, version, profile, source, language, infoSink, spvVersion, true, EShMsgDefault, true)); TShader::ForbidInclude includer; - TPpContext ppContext(*parseContext, "", includer); - TScanContext scanContext(*parseContext); - parseContext->setScanContext(&scanContext); - parseContext->setPpContext(&ppContext); + TPpContext ppContext(*_parseContext, "", includer); + TScanContext scanContext(*_parseContext); + _parseContext->setScanContext(&scanContext); + _parseContext->setPpContext(&ppContext); // // Push the symbol table to give it an initial scope. This @@ -244,7 +244,7 @@ bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profil return true; TInputScanner input(1, builtInShaders, builtInLengths); - if (! parseContext->parseShaderStrings(ppContext, input) != 0) { + if (!_parseContext->parseShaderStrings(ppContext, input) != 0) { infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins"); printf("Unable to parse built-ins\n%s\n", infoSink.info.c_str()); printf("%s\n", builtInShaders[0]); @@ -732,32 +732,32 @@ bool ProcessDeferred( // Now we can process the full shader under proper symbols and rules. // - TParseContextBase* parseContext = CreateParseContext(symbolTable, intermediate, version, profile, source, + TParseContextBase *_parseContext = CreateParseContext(symbolTable, intermediate, version, profile, source, compiler->getLanguage(), compiler->infoSink, spvVersion, forwardCompatible, messages, false, sourceEntryPointName); - TPpContext ppContext(*parseContext, names[numPre]? names[numPre]: "", includer); + TPpContext ppContext(*_parseContext, names[numPre]? names[numPre]: "", includer); // only GLSL (bison triggered, really) needs an externally set scan context - glslang::TScanContext scanContext(*parseContext); + glslang::TScanContext scanContext(*_parseContext); if ((messages & EShMsgReadHlsl) == 0) - parseContext->setScanContext(&scanContext); + _parseContext->setScanContext(&scanContext); - parseContext->setPpContext(&ppContext); - parseContext->setLimits(*resources); + _parseContext->setPpContext(&ppContext); + _parseContext->setLimits(*resources); if (! goodVersion) - parseContext->addError(); + _parseContext->addError(); if (warnVersionNotFirst) { TSourceLoc loc; loc.init(); - parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", ""); + _parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", ""); } - parseContext->initializeExtensionBehavior(); + _parseContext->initializeExtensionBehavior(); // Fill in the strings as outlined above. std::string preamble; - parseContext->getPreamble(preamble); + _parseContext->getPreamble(preamble); strings[0] = preamble.c_str(); lengths[0] = strlen(strings[0]); names[0] = nullptr; @@ -776,14 +776,14 @@ bool ProcessDeferred( // Push a new symbol allocation scope that will get used for the shader's globals. symbolTable.push(); - bool success = processingContext(*parseContext, ppContext, fullInput, + bool success = processingContext(*_parseContext, ppContext, fullInput, versionWillBeError, symbolTable, intermediate, optLevel, messages); // Clean up the symbol table. The AST is self-sufficient now. delete symbolTableMemory; - delete parseContext; + delete _parseContext; delete [] lengths; delete [] strings; delete [] names; @@ -860,7 +860,7 @@ private: // It places the result in the "string" argument to its constructor. struct DoPreprocessing { explicit DoPreprocessing(std::string* string): outputString(string) {} - bool operator()(TParseContextBase& parseContext, TPpContext& ppContext, + bool operator()(TParseContextBase&_parseContext, TPpContext& ppContext, TInputScanner& input, bool versionWillBeError, TSymbolTable&, TIntermediate&, EShOptimizationLevel, EShMessages) @@ -870,20 +870,20 @@ struct DoPreprocessing { static const std::string noSpaceBeforeTokens = ","; glslang::TPpToken token; - parseContext.setScanner(&input); + _parseContext.setScanner(&input); ppContext.setInput(input, versionWillBeError); std::stringstream outputStream; SourceLineSynchronizer lineSync( std::bind(&TInputScanner::getLastValidSourceIndex, &input), &outputStream); - parseContext.setExtensionCallback([&lineSync, &outputStream]( + _parseContext.setExtensionCallback([&lineSync, &outputStream]( int line, const char* extension, const char* behavior) { lineSync.syncToLine(line); outputStream << "#extension " << extension << " : " << behavior; }); - parseContext.setLineCallback([&lineSync, &outputStream, &parseContext]( + _parseContext.setLineCallback([&lineSync, &outputStream, &_parseContext]( int curLineNum, int newLineNum, bool hasSource, int sourceNum, const char* sourceName) { // SourceNum is the number of the source-string that is being parsed. lineSync.syncToLine(curLineNum); @@ -896,7 +896,7 @@ struct DoPreprocessing { outputStream << sourceNum; } } - if (parseContext.lineDirectiveShouldSetNextLine()) { + if (_parseContext.lineDirectiveShouldSetNextLine()) { // newLineNum is the new line number for the line following the #line // directive. So the new line number for the current line is newLineNum -= 1; @@ -906,7 +906,7 @@ struct DoPreprocessing { lineSync.setLineNum(newLineNum + 1); }); - parseContext.setVersionCallback( + _parseContext.setVersionCallback( [&lineSync, &outputStream](int line, int version, const char* str) { lineSync.syncToLine(line); outputStream << "#version " << version; @@ -915,7 +915,7 @@ struct DoPreprocessing { } }); - parseContext.setPragmaCallback([&lineSync, &outputStream]( + _parseContext.setPragmaCallback([&lineSync, &outputStream]( int line, const glslang::TVector& ops) { lineSync.syncToLine(line); outputStream << "#pragma "; @@ -924,7 +924,7 @@ struct DoPreprocessing { } }); - parseContext.setErrorCallback([&lineSync, &outputStream]( + _parseContext.setErrorCallback([&lineSync, &outputStream]( int line, const char* errorMessage) { lineSync.syncToLine(line); outputStream << "#error " << errorMessage; @@ -958,10 +958,10 @@ struct DoPreprocessing { *outputString = outputStream.str(); bool success = true; - if (parseContext.getNumErrors() > 0) { + if (_parseContext.getNumErrors() > 0) { success = false; - parseContext.infoSink.info.prefix(EPrefixError); - parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; + _parseContext.infoSink.info.prefix(EPrefixError); + _parseContext.infoSink.info << _parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; } return success; } @@ -971,28 +971,28 @@ struct DoPreprocessing { // DoFullParse is a valid ProcessingConext template argument for fully // parsing the shader. It populates the "intermediate" with the AST. struct DoFullParse{ - bool operator()(TParseContextBase& parseContext, TPpContext& ppContext, + bool operator()(TParseContextBase&_parseContext, TPpContext& ppContext, TInputScanner& fullInput, bool versionWillBeError, TSymbolTable&, TIntermediate& intermediate, EShOptimizationLevel optLevel, EShMessages messages) { bool success = true; // Parse the full shader. - if (! parseContext.parseShaderStrings(ppContext, fullInput, versionWillBeError)) + if (!_parseContext.parseShaderStrings(ppContext, fullInput, versionWillBeError)) success = false; if (success && intermediate.getTreeRoot()) { if (optLevel == EShOptNoGeneration) - parseContext.infoSink.info.message(EPrefixNone, "No errors. No code generation or linking was requested."); + _parseContext.infoSink.info.message(EPrefixNone, "No errors. No code generation or linking was requested."); else - success = intermediate.postProcess(intermediate.getTreeRoot(), parseContext.getLanguage()); + success = intermediate.postProcess(intermediate.getTreeRoot(), _parseContext.getLanguage()); } else if (! success) { - parseContext.infoSink.info.prefix(EPrefixError); - parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; + _parseContext.infoSink.info.prefix(EPrefixError); + _parseContext.infoSink.info << _parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; } if (messages & EShMsgAST) - intermediate.output(parseContext.infoSink, true); + intermediate.output(_parseContext.infoSink, true); return success; } diff --git a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Compare.h b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Compare.h new file mode 100644 index 0000000000..92d288c08d --- /dev/null +++ b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Compare.h @@ -0,0 +1,32 @@ +#ifndef _MACHINE_INDEPENDENT_COMPARE_H +#define _MACHINE_INDEPENDENT_COMPARE_H + +#include "../../../hlsl/hlslTokens.h" + +namespace { + + struct str_eq + { + bool operator()(const char* lhs, const char* rhs) const + { + return strcmp(lhs, rhs) == 0; + } + }; + + struct str_hash + { + size_t operator()(const char* str) const + { + // djb2 + unsigned long hash = 5381; + int c; + + while ((c = *str++) != 0) + hash = ((hash << 5) + hash) + c; + + return hash; + } + }; +}; + +#endif diff --git a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp index 824a69a9c7..9138d230ea 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -107,12 +107,12 @@ int TPpContext::CPPdefine(TPpToken* ppToken) // get macro name int token = scanToken(ppToken); if (token != PpAtomIdentifier) { - parseContext.ppError(ppToken->loc, "must be followed by macro name", "#define", ""); + _parseContext.ppError(ppToken->loc, "must be followed by macro name", "#define", ""); return token; } if (ppToken->loc.string >= 0) { // We are in user code; check for reserved name use: - parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#define"); + _parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#define"); } // save the original atom @@ -128,7 +128,7 @@ int TPpContext::CPPdefine(TPpToken* ppToken) if (argc == 0 && token == ')') break; if (token != PpAtomIdentifier) { - parseContext.ppError(ppToken->loc, "bad argument", "#define", ""); + _parseContext.ppError(ppToken->loc, "bad argument", "#define", ""); return token; } @@ -136,7 +136,7 @@ int TPpContext::CPPdefine(TPpToken* ppToken) bool duplicate = false; for (int a = 0; a < argc; ++a) { if (args[a] == ppToken->atom) { - parseContext.ppError(ppToken->loc, "duplicate macro parameter", "#define", ""); + _parseContext.ppError(ppToken->loc, "duplicate macro parameter", "#define", ""); duplicate = true; break; } @@ -145,12 +145,12 @@ int TPpContext::CPPdefine(TPpToken* ppToken) if (argc < maxMacroArgs) args[argc++] = ppToken->atom; else - parseContext.ppError(ppToken->loc, "too many macro parameters", "#define", ""); + _parseContext.ppError(ppToken->loc, "too many macro parameters", "#define", ""); } token = scanToken(ppToken); } while (token == ','); if (token != ')') { - parseContext.ppError(ppToken->loc, "missing parenthesis", "#define", ""); + _parseContext.ppError(ppToken->loc, "missing parenthesis", "#define", ""); return token; } @@ -178,11 +178,11 @@ int TPpContext::CPPdefine(TPpToken* ppToken) // "Two replacement lists are identical if and only if the preprocessing tokens in both have the same number, // ordering, spelling, and white-space separation, where all white-space separations are considered identical." if (symb->mac.argc != mac.argc) - parseContext.ppError(defineLoc, "Macro redefined; different number of arguments:", "#define", GetAtomString(defAtom)); + _parseContext.ppError(defineLoc, "Macro redefined; different number of arguments:", "#define", GetAtomString(defAtom)); else { for (int argc = 0; argc < mac.argc; argc++) { if (symb->mac.args[argc] != mac.args[argc]) - parseContext.ppError(defineLoc, "Macro redefined; different argument names:", "#define", GetAtomString(defAtom)); + _parseContext.ppError(defineLoc, "Macro redefined; different argument names:", "#define", GetAtomString(defAtom)); } RewindTokenStream(symb->mac.body); RewindTokenStream(mac.body); @@ -194,7 +194,7 @@ int TPpContext::CPPdefine(TPpToken* ppToken) oldToken = ReadToken(symb->mac.body, &oldPpToken); newToken = ReadToken(mac.body, &newPpToken); if (oldToken != newToken || oldPpToken != newPpToken) { - parseContext.ppError(defineLoc, "Macro redefined; different substitutions:", "#define", GetAtomString(defAtom)); + _parseContext.ppError(defineLoc, "Macro redefined; different substitutions:", "#define", GetAtomString(defAtom)); break; } } while (newToken > 0); @@ -215,12 +215,12 @@ int TPpContext::CPPundef(TPpToken* ppToken) int token = scanToken(ppToken); Symbol *symb; if (token != PpAtomIdentifier) { - parseContext.ppError(ppToken->loc, "must be followed by macro name", "#undef", ""); + _parseContext.ppError(ppToken->loc, "must be followed by macro name", "#undef", ""); return token; } - parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#undef"); + _parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#undef"); symb = LookUpSymbol(ppToken->atom); if (symb) { @@ -228,7 +228,7 @@ int TPpContext::CPPundef(TPpToken* ppToken) } token = scanToken(ppToken); if (token != '\n') - parseContext.ppError(ppToken->loc, "can only be followed by a single macro name", "#undef", ""); + _parseContext.ppError(ppToken->loc, "can only be followed by a single macro name", "#undef", ""); return token; } @@ -284,7 +284,7 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) break; } else if (atom == PpAtomElif) { if (elseSeen[elsetracker]) - parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); + _parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); /* we decrement ifdepth here, because CPPif will increment * it and we really want to leave it alone */ if (ifdepth) { @@ -297,13 +297,13 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) } } else if (atom == PpAtomElse) { if (elseSeen[elsetracker]) - parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); + _parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); else elseSeen[elsetracker] = true; token = extraTokenCheck(atom, ppToken, scanToken(ppToken)); } else if (atom == PpAtomElif) { if (elseSeen[elsetracker]) - parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); + _parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); } } @@ -330,10 +330,10 @@ int TPpContext::extraTokenCheck(int atom, TPpToken* ppToken, int token) else label = ""; - if (parseContext.relaxedErrors()) - parseContext.ppWarn(ppToken->loc, message, label, ""); + if (_parseContext.relaxedErrors()) + _parseContext.ppWarn(ppToken->loc, message, label, ""); else - parseContext.ppError(ppToken->loc, message, label, ""); + _parseContext.ppError(ppToken->loc, message, label, ""); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); @@ -421,7 +421,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo token = scanToken(ppToken); } if (token != PpAtomIdentifier) { - parseContext.ppError(loc, "incorrect directive, expected identifier", "preprocessor evaluation", ""); + _parseContext.ppError(loc, "incorrect directive, expected identifier", "preprocessor evaluation", ""); err = true; res = 0; @@ -432,7 +432,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo token = scanToken(ppToken); if (needclose) { if (token != ')') { - parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", ""); + _parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", ""); err = true; res = 0; @@ -452,7 +452,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo token = eval(token, MIN_PRECEDENCE, shortCircuit, res, err, ppToken); if (! err) { if (token != ')') { - parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", ""); + _parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", ""); err = true; res = 0; @@ -471,7 +471,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo token = eval(token, UNARY, shortCircuit, res, err, ppToken); res = unop[op].op(res); } else { - parseContext.ppError(loc, "bad expression", "preprocessor evaluation", ""); + _parseContext.ppError(loc, "bad expression", "preprocessor evaluation", ""); err = true; res = 0; @@ -507,7 +507,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo if (binop[op].op == op_div || binop[op].op == op_mod) { if (res == 0) { - parseContext.ppError(loc, "division by 0", "preprocessor evaluation", ""); + _parseContext.ppError(loc, "division by 0", "preprocessor evaluation", ""); res = 1; } } @@ -523,19 +523,19 @@ int TPpContext::evalToToken(int token, bool shortCircuit, int& res, bool& err, T while (token == PpAtomIdentifier && ppToken->atom != PpAtomDefined) { int macroReturn = MacroExpand(ppToken->atom, ppToken, true, false); if (macroReturn == 0) { - parseContext.ppError(ppToken->loc, "can't evaluate expression", "preprocessor evaluation", ""); + _parseContext.ppError(ppToken->loc, "can't evaluate expression", "preprocessor evaluation", ""); err = true; res = 0; token = scanToken(ppToken); break; } if (macroReturn == -1) { - if (! shortCircuit && parseContext.profile == EEsProfile) { + if (! shortCircuit && _parseContext.profile == EEsProfile) { const char* message = "undefined macro in expression not allowed in es profile"; - if (parseContext.relaxedErrors()) - parseContext.ppWarn(ppToken->loc, message, "preprocessor evaluation", ppToken->name); + if (_parseContext.relaxedErrors()) + _parseContext.ppWarn(ppToken->loc, message, "preprocessor evaluation", ppToken->name); else - parseContext.ppError(ppToken->loc, message, "preprocessor evaluation", ppToken->name); + _parseContext.ppError(ppToken->loc, message, "preprocessor evaluation", ppToken->name); } } token = scanToken(ppToken); @@ -551,7 +551,7 @@ int TPpContext::CPPif(TPpToken* ppToken) elsetracker++; ifdepth++; if (ifdepth > maxIfNesting) { - parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if", ""); + _parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if", ""); return 0; } int res = 0; @@ -570,20 +570,20 @@ int TPpContext::CPPifdef(int defined, TPpToken* ppToken) int token = scanToken(ppToken); int name = ppToken->atom; if (++ifdepth > maxIfNesting) { - parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#ifdef", ""); + _parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#ifdef", ""); return 0; } elsetracker++; if (token != PpAtomIdentifier) { if (defined) - parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifdef", ""); + _parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifdef", ""); else - parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifndef", ""); + _parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifndef", ""); } else { Symbol *s = LookUpSymbol(name); token = scanToken(ppToken); if (token != '\n') { - parseContext.ppError(ppToken->loc, "unexpected tokens following #ifdef directive - expected a newline", "#ifdef", ""); + _parseContext.ppError(ppToken->loc, "unexpected tokens following #ifdef directive - expected a newline", "#ifdef", ""); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); } @@ -601,18 +601,18 @@ int TPpContext::CPPinclude(TPpToken* ppToken) int token = scanToken(ppToken); if (token != PpAtomConstString) { // TODO: handle angle brackets. - parseContext.ppError(directiveLoc, "must be followed by a file designation", "#include", ""); + _parseContext.ppError(directiveLoc, "must be followed by a file designation", "#include", ""); } else { // Make a copy of the name because it will be overwritten by the next token scan. const std::string filename = ppToken->name; token = scanToken(ppToken); if (token != '\n' && token != EndOfInput) { - parseContext.ppError(ppToken->loc, "extra content after file designation", "#include", ""); + _parseContext.ppError(ppToken->loc, "extra content after file designation", "#include", ""); } else { TShader::Includer::IncludeResult* res = includer.include(filename.c_str(), TShader::Includer::EIncludeRelative, currentSourceFile.c_str(), includeStack.size() + 1); if (res && !res->file_name.empty()) { if (res->file_data && res->file_length) { - const bool forNextLine = parseContext.lineDirectiveShouldSetNextLine(); + const bool forNextLine = _parseContext.lineDirectiveShouldSetNextLine(); std::ostringstream prologue; std::ostringstream epilogue; prologue << "#line " << forNextLine << " " << "\"" << res->file_name << "\"\n"; @@ -620,14 +620,14 @@ int TPpContext::CPPinclude(TPpToken* ppToken) pushInput(new TokenizableIncludeFile(directiveLoc, prologue.str(), res, epilogue.str(), this)); } // At EOF, there's no "current" location anymore. - if (token != EndOfInput) parseContext.setCurrentColumn(0); + if (token != EndOfInput) _parseContext.setCurrentColumn(0); // Don't accidentally return EndOfInput, which will end all preprocessing. return '\n'; } else { std::string message = res ? std::string(res->file_data, res->file_length) : std::string("Could not process include directive"); - parseContext.ppError(directiveLoc, message.c_str(), "#include", ""); + _parseContext.ppError(directiveLoc, message.c_str(), "#include", ""); if (res) { includer.releaseInclude(res); } @@ -647,7 +647,7 @@ int TPpContext::CPPline(TPpToken* ppToken) int token = scanToken(ppToken); const TSourceLoc directiveLoc = ppToken->loc; if (token == '\n') { - parseContext.ppError(ppToken->loc, "must by followed by an integral literal", "#line", ""); + _parseContext.ppError(ppToken->loc, "must by followed by an integral literal", "#line", ""); return token; } @@ -664,31 +664,31 @@ int TPpContext::CPPline(TPpToken* ppToken) if (token == '\n') ++lineRes; - if (parseContext.lineDirectiveShouldSetNextLine()) + if (_parseContext.lineDirectiveShouldSetNextLine()) --lineRes; - parseContext.setCurrentLine(lineRes); + _parseContext.setCurrentLine(lineRes); if (token != '\n') { if (token == PpAtomConstString) { - parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line"); + _parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line"); // We need to save a copy of the string instead of pointing // to the name field of the token since the name field // will likely be overwritten by the next token scan. sourceName = GetAtomString(LookUpAddString(ppToken->name)); - parseContext.setCurrentSourceName(sourceName); + _parseContext.setCurrentSourceName(sourceName); hasFile = true; token = scanToken(ppToken); } else { token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken); if (! fileErr) { - parseContext.setCurrentString(fileRes); + _parseContext.setCurrentString(fileRes); hasFile = true; } } } } if (!fileErr && !lineErr) { - parseContext.notifyLineDirective(directiveLoc.line, lineToken, hasFile, fileRes, sourceName); + _parseContext.notifyLineDirective(directiveLoc.line, lineToken, hasFile, fileRes, sourceName); } token = extraTokenCheck(PpAtomLine, ppToken, token); @@ -718,9 +718,9 @@ int TPpContext::CPPerror(TPpToken* ppToken) message.append(" "); token = scanToken(ppToken); } - parseContext.notifyErrorDirective(loc.line, message.c_str()); + _parseContext.notifyErrorDirective(loc.line, message.c_str()); //store this msg into the shader's information log..set the Compile Error flag!!!! - parseContext.ppError(loc, message.c_str(), "#error", ""); + _parseContext.ppError(loc, message.c_str(), "#error", ""); return '\n'; } @@ -756,9 +756,9 @@ int TPpContext::CPPpragma(TPpToken* ppToken) } if (token == EndOfInput) - parseContext.ppError(loc, "directive must end with a newline", "#pragma", ""); + _parseContext.ppError(loc, "directive must end with a newline", "#pragma", ""); else - parseContext.handlePragma(loc, tokens); + _parseContext.handlePragma(loc, tokens); return token; } @@ -769,17 +769,17 @@ int TPpContext::CPPversion(TPpToken* ppToken) int token = scanToken(ppToken); if (errorOnVersion || versionSeen) - parseContext.ppError(ppToken->loc, "must occur first in shader", "#version", ""); + _parseContext.ppError(ppToken->loc, "must occur first in shader", "#version", ""); versionSeen = true; if (token == '\n') { - parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", ""); + _parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", ""); return token; } if (token != PpAtomConstInt) - parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", ""); + _parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", ""); ppToken->ival = atoi(ppToken->name); int versionNumber = ppToken->ival; @@ -787,20 +787,20 @@ int TPpContext::CPPversion(TPpToken* ppToken) token = scanToken(ppToken); if (token == '\n') { - parseContext.notifyVersion(line, versionNumber, nullptr); + _parseContext.notifyVersion(line, versionNumber, nullptr); return token; } else { if (ppToken->atom != PpAtomCore && ppToken->atom != PpAtomCompatibility && ppToken->atom != PpAtomEs) - parseContext.ppError(ppToken->loc, "bad profile name; use es, core, or compatibility", "#version", ""); - parseContext.notifyVersion(line, versionNumber, ppToken->name); + _parseContext.ppError(ppToken->loc, "bad profile name; use es, core, or compatibility", "#version", ""); + _parseContext.notifyVersion(line, versionNumber, ppToken->name); token = scanToken(ppToken); if (token == '\n') return token; else - parseContext.ppError(ppToken->loc, "bad tokens following profile -- expected newline", "#version", ""); + _parseContext.ppError(ppToken->loc, "bad tokens following profile -- expected newline", "#version", ""); } return token; @@ -814,36 +814,36 @@ int TPpContext::CPPextension(TPpToken* ppToken) char extensionName[MaxTokenLength + 1]; if (token=='\n') { - parseContext.ppError(ppToken->loc, "extension name not specified", "#extension", ""); + _parseContext.ppError(ppToken->loc, "extension name not specified", "#extension", ""); return token; } if (token != PpAtomIdentifier) - parseContext.ppError(ppToken->loc, "extension name expected", "#extension", ""); + _parseContext.ppError(ppToken->loc, "extension name expected", "#extension", ""); assert(strlen(ppToken->name) <= MaxTokenLength); strcpy(extensionName, ppToken->name); token = scanToken(ppToken); if (token != ':') { - parseContext.ppError(ppToken->loc, "':' missing after extension name", "#extension", ""); + _parseContext.ppError(ppToken->loc, "':' missing after extension name", "#extension", ""); return token; } token = scanToken(ppToken); if (token != PpAtomIdentifier) { - parseContext.ppError(ppToken->loc, "behavior for extension not specified", "#extension", ""); + _parseContext.ppError(ppToken->loc, "behavior for extension not specified", "#extension", ""); return token; } - parseContext.updateExtensionBehavior(line, extensionName, ppToken->name); - parseContext.notifyExtensionDirective(line, extensionName, ppToken->name); + _parseContext.updateExtensionBehavior(line, extensionName, ppToken->name); + _parseContext.notifyExtensionDirective(line, extensionName, ppToken->name); token = scanToken(ppToken); if (token == '\n') return token; else - parseContext.ppError(ppToken->loc, "extra tokens -- expected newline", "#extension",""); + _parseContext.ppError(ppToken->loc, "extra tokens -- expected newline", "#extension",""); return token; } @@ -859,18 +859,18 @@ int TPpContext::readCPPline(TPpToken* ppToken) break; case PpAtomElse: if (elsetracker[elseSeen]) - parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); + _parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); elsetracker[elseSeen] = true; if (! ifdepth) - parseContext.ppError(ppToken->loc, "mismatched statements", "#else", ""); + _parseContext.ppError(ppToken->loc, "mismatched statements", "#else", ""); token = extraTokenCheck(PpAtomElse, ppToken, scanToken(ppToken)); token = CPPelse(0, ppToken); break; case PpAtomElif: if (! ifdepth) - parseContext.ppError(ppToken->loc, "mismatched statements", "#elif", ""); + _parseContext.ppError(ppToken->loc, "mismatched statements", "#elif", ""); if (elseSeen[elsetracker]) - parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); + _parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); // this token is really a dont care, but we still need to eat the tokens token = scanToken(ppToken); while (token != '\n' && token != EndOfInput) @@ -879,7 +879,7 @@ int TPpContext::readCPPline(TPpToken* ppToken) break; case PpAtomEndif: if (! ifdepth) - parseContext.ppError(ppToken->loc, "mismatched statements", "#endif", ""); + _parseContext.ppError(ppToken->loc, "mismatched statements", "#endif", ""); else { elseSeen[elsetracker] = false; --elsetracker; @@ -897,8 +897,8 @@ int TPpContext::readCPPline(TPpToken* ppToken) token = CPPifdef(0, ppToken); break; case PpAtomInclude: - if(!parseContext.isReadingHLSL()) { - parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include"); + if(!_parseContext.isReadingHLSL()) { + _parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include"); } token = CPPinclude(ppToken); break; @@ -921,11 +921,11 @@ int TPpContext::readCPPline(TPpToken* ppToken) token = CPPextension(ppToken); break; default: - parseContext.ppError(ppToken->loc, "invalid directive:", "#", ppToken->name); + _parseContext.ppError(ppToken->loc, "invalid directive:", "#", ppToken->name); break; } } else if (token != '\n' && token != EndOfInput) - parseContext.ppError(ppToken->loc, "invalid directive", "#", ""); + _parseContext.ppError(ppToken->loc, "invalid directive", "#", ""); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); @@ -1017,22 +1017,22 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool ppToken->space = false; switch (atom) { case PpAtomLineMacro: - ppToken->ival = parseContext.getCurrentLoc().line; + ppToken->ival = _parseContext.getCurrentLoc().line; snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival); UngetToken(PpAtomConstInt, ppToken); return 1; case PpAtomFileMacro: { - if (parseContext.getCurrentLoc().name) - parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based __FILE__"); - ppToken->ival = parseContext.getCurrentLoc().string; + if (_parseContext.getCurrentLoc().name) + _parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based __FILE__"); + ppToken->ival = _parseContext.getCurrentLoc().string; snprintf(ppToken->name, sizeof(ppToken->name), "%s", ppToken->loc.getStringNameOrNum().c_str()); UngetToken(PpAtomConstInt, ppToken); return 1; } case PpAtomVersionMacro: - ppToken->ival = parseContext.version; + ppToken->ival = _parseContext.version; snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival); UngetToken(PpAtomConstInt, ppToken); return 1; @@ -1070,7 +1070,7 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool token = scanToken(ppToken); } if (token != '(') { - parseContext.ppError(loc, "expected '(' following", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(loc, "expected '(' following", "macro expansion", GetAtomString(atom)); UngetToken(token, ppToken); ppToken->atom = atom; @@ -1087,20 +1087,20 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool while (1) { token = scanToken(ppToken); if (token == EndOfInput) { - parseContext.ppError(loc, "End of input in macro", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(loc, "End of input in macro", "macro expansion", GetAtomString(atom)); delete in; return 0; } if (token == '\n') { if (! newLineOkay) { - parseContext.ppError(loc, "End of line in macro substitution:", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(loc, "End of line in macro substitution:", "macro expansion", GetAtomString(atom)); delete in; return 0; } continue; } if (token == '#') { - parseContext.ppError(ppToken->loc, "unexpected '#'", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(ppToken->loc, "unexpected '#'", "macro expansion", GetAtomString(atom)); delete in; return 0; } @@ -1125,7 +1125,7 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool } while (arg < in->mac->argc); if (arg < in->mac->argc) - parseContext.ppError(loc, "Too few args in Macro", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(loc, "Too few args in Macro", "macro expansion", GetAtomString(atom)); else if (token != ')') { depth=0; while (token != EndOfInput && (depth > 0 || token != ')')) { @@ -1137,11 +1137,11 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool } if (token == EndOfInput) { - parseContext.ppError(loc, "End of input in macro", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(loc, "End of input in macro", "macro expansion", GetAtomString(atom)); delete in; return 0; } - parseContext.ppError(loc, "Too many args in macro", "macro expansion", GetAtomString(atom)); + _parseContext.ppError(loc, "Too many args in macro", "macro expansion", GetAtomString(atom)); } for (int i = 0; i < in->mac->argc; i++) in->args[i] = PrescanMacroArg(in->args[i], ppToken, newLineOkay); diff --git a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp index 6791fef599..c0bbda814c 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp +++ b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp @@ -83,7 +83,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace glslang { TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) : - preamble(0), strings(0), parseContext(pc), includer(inclr), inComment(false), + preamble(0), strings(0), _parseContext(pc), includer(inclr), inComment(false), rootFileName(rootFileName), currentSourceFile(rootFileName) { diff --git a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.h index f1c2f31108..dcd858efab 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.h @@ -215,7 +215,7 @@ protected: // Scanner data: int previous_token; - TParseContextBase& parseContext; + TParseContextBase& _parseContext; // Get the next token from *stack* of input sources, popping input sources // that are out of tokens, down until an input source is found that has a token. @@ -372,7 +372,7 @@ protected: // Move past escaped newlines, as many as sequentially exist do { if (input->peek() == '\r' || input->peek() == '\n') { - bool allowed = pp->parseContext.lineContinuationCheck(input->getSourceLoc(), pp->inComment); + bool allowed = pp->_parseContext.lineContinuationCheck(input->getSourceLoc(), pp->inComment); if (! allowed && pp->inComment) return '\\'; @@ -475,14 +475,14 @@ protected: void notifyActivated() override { - prevScanner = pp->parseContext.getScanner(); - pp->parseContext.setScanner(&scanner); + prevScanner = pp->_parseContext.getScanner(); + pp->_parseContext.setScanner(&scanner); pp->push_include(includedFile_); } void notifyDeleted() override { - pp->parseContext.setScanner(prevScanner); + pp->_parseContext.setScanner(prevScanner); pp->pop_include(); } diff --git a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp index 518dbdee4c..0113532dc4 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -140,7 +140,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) } ch = getChar(); } else { - parseContext.ppError(ppToken->loc, "float literal too long", "", ""); + _parseContext.ppError(ppToken->loc, "float literal too long", "", ""); len = 1; str_len = 1; } @@ -152,7 +152,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) if (ch == 'e' || ch == 'E') { HasDecimalOrExponent = true; if (len >= MaxTokenLength) { - parseContext.ppError(ppToken->loc, "float literal too long", "", ""); + _parseContext.ppError(ppToken->loc, "float literal too long", "", ""); len = 1; str_len = 1; } else { @@ -171,13 +171,13 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) str[len++] = (char)ch; ch = getChar(); } else { - parseContext.ppError(ppToken->loc, "float literal too long", "", ""); + _parseContext.ppError(ppToken->loc, "float literal too long", "", ""); len = 1; str_len = 1; } } } else { - parseContext.ppError(ppToken->loc, "bad character in float exponent", "", ""); + _parseContext.ppError(ppToken->loc, "bad character in float exponent", "", ""); } } } @@ -187,9 +187,9 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) strcpy(str, "0.0"); } else { if (ch == 'l' || ch == 'L') { - parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); + _parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); if (! HasDecimalOrExponent) - parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); + _parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); int ch2 = getChar(); if (ch2 != 'f' && ch2 != 'F') { ungetChar(); @@ -200,7 +200,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) str[len++] = (char)ch2; isDouble = 1; } else { - parseContext.ppError(ppToken->loc, "float literal too long", "", ""); + _parseContext.ppError(ppToken->loc, "float literal too long", "", ""); len = 1,str_len=1; } } @@ -227,15 +227,15 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) } #endif } else if (ch == 'f' || ch == 'F') { - parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); - if (! parseContext.relaxedErrors()) - parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix"); + _parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); + if (!_parseContext.relaxedErrors()) + _parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix"); if (! HasDecimalOrExponent) - parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); + _parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); if (len < MaxTokenLength) str[len++] = (char)ch; else { - parseContext.ppError(ppToken->loc, "float literal too long", "", ""); + _parseContext.ppError(ppToken->loc, "float literal too long", "", ""); len = 1,str_len=1; } } else @@ -267,7 +267,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) int ch = 0; int ii = 0; unsigned long long ival = 0; - bool enableInt64 = pp->parseContext.version >= 450 && pp->parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64); + bool enableInt64 = pp->_parseContext.version >= 450 && pp->_parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64); ppToken->ival = 0; ppToken->i64val = 0; @@ -279,7 +279,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ch = getch(); } - ppToken->loc = pp->parseContext.getCurrentLoc(); + ppToken->loc = pp->_parseContext.getCurrentLoc(); len = 0; switch (ch) { default: @@ -304,7 +304,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ch = getch(); } else { if (! AlreadyComplained) { - pp->parseContext.ppError(ppToken->loc, "name too long", "", ""); + pp->_parseContext.ppError(ppToken->loc, "name too long", "", ""); AlreadyComplained = 1; } ch = getch(); @@ -347,11 +347,11 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) } else if (ch >= 'a' && ch <= 'f') { ii = ch - 'a' + 10; } else - pp->parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", ""); + pp->_parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", ""); ival = (ival << 4) | ii; } else { if (! AlreadyComplained) { - pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); + pp->_parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); AlreadyComplained = 1; } ival = 0xffffffffffffffffull; @@ -361,7 +361,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')); } else { - pp->parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", ""); + pp->_parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", ""); } if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) @@ -407,7 +407,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else if (! AlreadyComplained) { - pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); + pp->_parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } if (ival <= 0x1fffffff || (enableInt64 && ival <= 0x1fffffffffffffffull)) { @@ -425,7 +425,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else if (! AlreadyComplained) { - pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); + pp->_parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } ch = getch(); @@ -436,7 +436,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) // wasn't a float, so must be octal... if (nonOctal) - pp->parseContext.ppError(ppToken->loc, "octal literal digit too large", "", ""); + pp->_parseContext.ppError(ppToken->loc, "octal literal digit too large", "", ""); if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) @@ -462,7 +462,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len] = '\0'; if (octalOverflow) - pp->parseContext.ppError(ppToken->loc, "octal literal too big", "", ""); + pp->_parseContext.ppError(ppToken->loc, "octal literal too big", "", ""); if (isInt64) { ppToken->i64val = ival; @@ -481,7 +481,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else if (! AlreadyComplained) { - pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); + pp->_parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } ch = getch(); @@ -524,7 +524,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ch = ppToken->name[i] - '0'; if ((enableInt64 == false && ((ival > oneTenthMaxInt) || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt))) || (enableInt64 && ((ival > oneTenthMaxInt64) || (ival == oneTenthMaxInt64 && (unsigned long long)ch > remainderMaxInt64)))) { - pp->parseContext.ppError(ppToken->loc, "numeric literal too big", "", ""); + pp->_parseContext.ppError(ppToken->loc, "numeric literal too big", "", ""); ival = 0xFFFFFFFFFFFFFFFFull; break; } else @@ -682,14 +682,14 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) do { while (ch != '*') { if (ch == EndOfInput) { - pp->parseContext.ppError(ppToken->loc, "End of input in comment", "comment", ""); + pp->_parseContext.ppError(ppToken->loc, "End of input in comment", "comment", ""); return ch; } ch = getch(); } ch = getch(); if (ch == EndOfInput) { - pp->parseContext.ppError(ppToken->loc, "End of input in comment", "comment", ""); + pp->_parseContext.ppError(ppToken->loc, "End of input in comment", "comment", ""); return ch; } } while (ch != '/'); @@ -716,7 +716,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) tokenText[len] = '\0'; if (ch != '"') { ungetch(); - pp->parseContext.ppError(ppToken->loc, "End of line in string", "string", ""); + pp->_parseContext.ppError(ppToken->loc, "End of line in string", "string", ""); } return PpAtomConstString; } @@ -752,7 +752,7 @@ const char* TPpContext::tokenize(TPpToken* ppToken) } continue; } else { - parseContext.ppError(ppToken->loc, "preprocessor directive cannot be preceded by another token", "#", ""); + _parseContext.ppError(ppToken->loc, "preprocessor directive cannot be preceded by another token", "#", ""); return nullptr; } } @@ -780,15 +780,15 @@ const char* TPpContext::tokenize(TPpToken* ppToken) tokenString = ppToken->name; break; case PpAtomConstString: - if (parseContext.intermediate.getSource() == EShSourceHlsl) { + if (_parseContext.intermediate.getSource() == EShSourceHlsl) { // HLSL allows string literals. tokenString = ppToken->name; } else { - parseContext.ppError(ppToken->loc, "string literals not supported", "\"\"", ""); + _parseContext.ppError(ppToken->loc, "string literals not supported", "\"\"", ""); } break; case '\'': - parseContext.ppError(ppToken->loc, "character literals not supported", "\'", ""); + _parseContext.ppError(ppToken->loc, "character literals not supported", "\'", ""); break; default: tokenString = GetAtomString(token); @@ -804,7 +804,7 @@ const char* TPpContext::tokenize(TPpToken* ppToken) void TPpContext::missingEndifCheck() { if (ifdepth > 0) - parseContext.ppError(parseContext.getCurrentLoc(), "missing #endif", "", ""); + _parseContext.ppError(_parseContext.getCurrentLoc(), "missing #endif", "", ""); } } // end namespace glslang diff --git a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp index 23b617d37c..25e1720c0d 100644 --- a/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -177,7 +177,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) int ch; ltoken = lReadByte(pTok); - ppToken->loc = parseContext.getCurrentLoc(); + ppToken->loc = _parseContext.getCurrentLoc(); if (ltoken > 127) ltoken += 128; switch (ltoken) { @@ -185,9 +185,9 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) // Check for ##, unless the current # is the last character if (pTok->current < pTok->data.size()) { if (lReadByte(pTok) == '#') { - parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)"); - parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)"); - parseContext.error(ppToken->loc, "token pasting not implemented (internal error)", "##", ""); + _parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)"); + _parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)"); + _parseContext.error(ppToken->loc, "token pasting not implemented (internal error)", "##", ""); //return PpAtomPaste; return ReadToken(pTok, ppToken); } else @@ -213,7 +213,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) len++; ch = lReadByte(pTok); } else { - parseContext.error(ppToken->loc, "token too long", "", ""); + _parseContext.error(ppToken->loc, "token too long", "", ""); break; } } diff --git a/deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp b/deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp index f71fac9cb6..2edde83870 100644 --- a/deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp +++ b/deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp @@ -31,9 +31,9 @@ //ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE //POSSIBILITY OF SUCH DAMAGE. // - #include "../osinclude.h" +#undef STRICT #define STRICT #define VC_EXTRALEAN 1 #include diff --git a/deps/glslang/glslang/hlsl/hlslGrammar.cpp b/deps/glslang/glslang/hlsl/hlslGrammar.cpp index e676e95e10..c9152e2a14 100755 --- a/deps/glslang/glslang/hlsl/hlslGrammar.cpp +++ b/deps/glslang/glslang/hlsl/hlslGrammar.cpp @@ -67,12 +67,12 @@ bool HlslGrammar::parse() void HlslGrammar::expected(const char* syntax) { - parseContext.error(token.loc, "Expected", syntax, ""); + _parseContext.error(token.loc, "Expected", syntax, ""); } void HlslGrammar::unimplemented(const char* error) { - parseContext.error(token.loc, "Unimplemented", error, ""); + _parseContext.error(token.loc, "Unimplemented", error, ""); } // Only process the next token if it is an identifier. @@ -154,7 +154,7 @@ bool HlslGrammar::acceptSamplerState() if (! acceptTokenClass(EHTokLeftBrace)) return true; - parseContext.warn(token.loc, "unimplemented", "immediate sampler state", ""); + _parseContext.warn(token.loc, "unimplemented", "immediate sampler state", ""); do { // read state name @@ -311,7 +311,7 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) TString* fnName = idToken.string; // Potentially rename shader entry point function. No-op most of the time. - parseContext.renameShaderFunction(fnName); + _parseContext.renameShaderFunction(fnName); // function_parameters TFunction& function = *new TFunction(fnName, declaredType); @@ -322,18 +322,18 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) // compound_statement (function body definition) or just a prototype? if (peekTokenClass(EHTokLeftBrace)) { if (list) - parseContext.error(idToken.loc, "function body can't be in a declarator list", "{", ""); + _parseContext.error(idToken.loc, "function body can't be in a declarator list", "{", ""); if (typedefDecl) - parseContext.error(idToken.loc, "function body can't be in a typedef", "{", ""); + _parseContext.error(idToken.loc, "function body can't be in a typedef", "{", ""); return acceptFunctionDefinition(function, node, attributes); } else { if (typedefDecl) - parseContext.error(idToken.loc, "function typedefs not implemented", "{", ""); - parseContext.handleFunctionDeclarator(idToken.loc, function, true); + _parseContext.error(idToken.loc, "function typedefs not implemented", "{", ""); + _parseContext.handleFunctionDeclarator(idToken.loc, function, true); } } else { // A variable declaration. Fix the storage qualifier if it's a global. - if (declaredType.getQualifier().storage == EvqTemporary && parseContext.symbolTable.atGlobalLevel()) + if (declaredType.getQualifier().storage == EvqTemporary && _parseContext.symbolTable.atGlobalLevel()) declaredType.getQualifier().storage = EvqUniform; // We can handle multiple variables per type declaration, so @@ -356,7 +356,7 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) // In the most general case, arrayness is potentially coming both from the // declared type and from the variable: "int[] a[];" or just one or the other. // Merge it all to the variableType, so all arrayness is part of the variableType. - parseContext.arrayDimMerge(variableType, arraySizes); + _parseContext.arrayDimMerge(variableType, arraySizes); } // samplers accept immediate sampler state @@ -372,7 +372,7 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) TIntermTyped* expressionNode = nullptr; if (acceptTokenClass(EHTokAssign)) { if (typedefDecl) - parseContext.error(idToken.loc, "can't have an initializer", "typedef", ""); + _parseContext.error(idToken.loc, "can't have an initializer", "typedef", ""); if (! acceptAssignmentExpression(expressionNode)) { expected("initializer"); return false; @@ -383,21 +383,21 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) // TODO: things scoped within an annotation need their own name space; // TODO: strings are not yet handled. - if (variableType.getBasicType() != EbtString && parseContext.getAnnotationNestingLevel() == 0) { + if (variableType.getBasicType() != EbtString && _parseContext.getAnnotationNestingLevel() == 0) { if (typedefDecl) - parseContext.declareTypedef(idToken.loc, *idToken.string, variableType); + _parseContext.declareTypedef(idToken.loc, *idToken.string, variableType); else if (variableType.getBasicType() == EbtBlock) - parseContext.declareBlock(idToken.loc, variableType, idToken.string); + _parseContext.declareBlock(idToken.loc, variableType, idToken.string); else { if (variableType.getQualifier().storage == EvqUniform && ! variableType.containsOpaque()) { // this isn't really an individual variable, but a member of the $Global buffer - parseContext.growGlobalUniformBlock(idToken.loc, variableType, *idToken.string); + _parseContext.growGlobalUniformBlock(idToken.loc, variableType, *idToken.string); } else { // Declare the variable and add any initializer code to the AST. // The top-level node is always made into an aggregate, as that's // historically how the AST has been. node = intermediate.growAggregate(node, - parseContext.declareVariable(idToken.loc, *idToken.string, variableType, + _parseContext.declareVariable(idToken.loc, *idToken.string, variableType, expressionNode), idToken.loc); } @@ -456,7 +456,7 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) return false; } - node = parseContext.declareVariable(idToken.loc, *idToken.string, type, expressionNode); + node = _parseContext.declareVariable(idToken.loc, *idToken.string, type, expressionNode); return true; } @@ -479,10 +479,10 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type) return false; if (type.getBasicType() == EbtBlock) { // the type was a block, which set some parts of the qualifier - parseContext.mergeQualifiers(type.getQualifier(), qualifier); + _parseContext.mergeQualifiers(type.getQualifier(), qualifier); // further, it can create an anonymous instance of the block if (peekTokenClass(EHTokSemicolon)) - parseContext.declareBlock(loc, type); + _parseContext.declareBlock(loc, type); } else { // Some qualifiers are set when parsing the type. Merge those with // whatever comes from acceptQualifier. @@ -510,7 +510,7 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier) do { switch (peek()) { case EHTokStatic: - qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; + qualifier.storage = _parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; break; case EHTokExtern: // TODO: no meaning in glslang? @@ -572,27 +572,27 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier) // for output variables. case EHTokPoint: qualifier.storage = EvqIn; - if (!parseContext.handleInputGeometry(token.loc, ElgPoints)) + if (!_parseContext.handleInputGeometry(token.loc, ElgPoints)) return false; break; case EHTokLine: qualifier.storage = EvqIn; - if (!parseContext.handleInputGeometry(token.loc, ElgLines)) + if (!_parseContext.handleInputGeometry(token.loc, ElgLines)) return false; break; case EHTokTriangle: qualifier.storage = EvqIn; - if (!parseContext.handleInputGeometry(token.loc, ElgTriangles)) + if (!_parseContext.handleInputGeometry(token.loc, ElgTriangles)) return false; break; case EHTokLineAdj: qualifier.storage = EvqIn; - if (!parseContext.handleInputGeometry(token.loc, ElgLinesAdjacency)) + if (!_parseContext.handleInputGeometry(token.loc, ElgLinesAdjacency)) return false; break; case EHTokTriangleAdj: qualifier.storage = EvqIn; - if (!parseContext.handleInputGeometry(token.loc, ElgTrianglesAdjacency)) + if (!_parseContext.handleInputGeometry(token.loc, ElgTrianglesAdjacency)) return false; break; @@ -634,9 +634,9 @@ bool HlslGrammar::acceptLayoutQualifierList(TQualifier& qualifier) expected("expression"); return false; } - parseContext.setLayoutQualifier(idToken.loc, qualifier, *idToken.string, expr); + _parseContext.setLayoutQualifier(idToken.loc, qualifier, *idToken.string, expr); } else - parseContext.setLayoutQualifier(idToken.loc, qualifier, *idToken.string); + _parseContext.setLayoutQualifier(idToken.loc, qualifier, *idToken.string); // COMMA if (! acceptTokenClass(EHTokComma)) @@ -864,7 +864,7 @@ bool HlslGrammar::acceptAnnotations(TQualifier&) return false; // note that we are nesting a name space - parseContext.nestAnnotations(); + _parseContext.nestAnnotations(); // declaration SEMI_COLON ... declaration SEMICOLON RIGHT_ANGLE do { @@ -883,7 +883,7 @@ bool HlslGrammar::acceptAnnotations(TQualifier&) } } while (true); - parseContext.unnestAnnotations(); + _parseContext.unnestAnnotations(); return true; } @@ -1045,7 +1045,7 @@ bool HlslGrammar::acceptTextureType(TType& type) // Buffer, RWBuffer and RWTexture (images) require a TLayoutFormat. We handle only a limit set. if (image || dim == EsdBuffer) - format = parseContext.getLayoutFromTxType(token.loc, txType); + format = _parseContext.getLayoutFromTxType(token.loc, txType); // Non-image Buffers are combined if (dim == EsdBuffer && !image) { @@ -1099,7 +1099,7 @@ bool HlslGrammar::acceptType(TType& type) if (! acceptStreamOutTemplateType(type, geometry)) return false; - if (! parseContext.handleOutputGeometry(token.loc, geometry)) + if (!_parseContext.handleOutputGeometry(token.loc, geometry)) return false; return true; @@ -1144,7 +1144,7 @@ bool HlslGrammar::acceptType(TType& type) // An identifier could be for a user-defined type. // Note we cache the symbol table lookup, to save for a later rule // when this is not a type. - token.symbol = parseContext.symbolTable.find(*token.string); + token.symbol = _parseContext.symbolTable.find(*token.string); if (token.symbol && token.symbol->getAsVariable() && token.symbol->getAsVariable()->isUserType()) { type.shallowCopy(token.symbol->getType()); advanceToken(); @@ -1655,8 +1655,8 @@ bool HlslGrammar::acceptStruct(TType& type) // case the name is not a type.) if (type.getBasicType() != EbtBlock && structName.size() > 0) { TVariable* userTypeDef = new TVariable(&structName, type, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) - parseContext.error(token.loc, "redefinition", structName.c_str(), "struct"); + if (!_parseContext.symbolTable.insert(*userTypeDef)) + _parseContext.error(token.loc, "redefinition", structName.c_str(), "struct"); } return true; @@ -1788,7 +1788,7 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function) acceptArraySpecifier(arraySizes); if (arraySizes) { if (arraySizes->isImplicit()) { - parseContext.error(token.loc, "function parameter array cannot be implicitly sized", "", ""); + _parseContext.error(token.loc, "function parameter array cannot be implicitly sized", "", ""); return false; } @@ -1798,7 +1798,7 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function) // post_decls acceptPostDecls(type->getQualifier()); - parseContext.paramFix(*type); + _parseContext.paramFix(*type); TParameter param = { idToken.string, type }; function.addParameter(param); @@ -1810,16 +1810,16 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function) // parsing the body (compound_statement). bool HlslGrammar::acceptFunctionDefinition(TFunction& function, TIntermNode*& node, const TAttributeMap& attributes) { - TFunction& functionDeclarator = parseContext.handleFunctionDeclarator(token.loc, function, false /* not prototype */); + TFunction& functionDeclarator = _parseContext.handleFunctionDeclarator(token.loc, function, false /* not prototype */); TSourceLoc loc = token.loc; // This does a pushScope() - node = parseContext.handleFunctionDefinition(loc, functionDeclarator, attributes); + node = _parseContext.handleFunctionDefinition(loc, functionDeclarator, attributes); // compound_statement TIntermNode* functionBody = nullptr; if (acceptCompoundStatement(functionBody)) { - parseContext.handleFunctionBody(loc, functionDeclarator, functionBody, node); + _parseContext.handleFunctionBody(loc, functionDeclarator, functionBody, node); return true; } @@ -1991,11 +1991,11 @@ bool HlslGrammar::acceptAssignmentExpression(TIntermTyped*& node) return false; } - node = parseContext.handleAssign(loc, assignOp, node, rightNode); - node = parseContext.handleLvalue(loc, "assign", node); + node = _parseContext.handleAssign(loc, assignOp, node, rightNode); + node = _parseContext.handleLvalue(loc, "assign", node); if (node == nullptr) { - parseContext.error(loc, "could not create assignment", "", ""); + _parseContext.error(loc, "could not create assignment", "", ""); return false; } @@ -2083,7 +2083,7 @@ bool HlslGrammar::acceptBinaryExpression(TIntermTyped*& node, PrecedenceLevel pr node = intermediate.addBinaryMath(op, node, rightNode, loc); if (node == nullptr) { - parseContext.error(loc, "Could not perform requested binary operation", "", ""); + _parseContext.error(loc, "Could not perform requested binary operation", "", ""); return false; } } while (true); @@ -2114,14 +2114,14 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node) return false; // Hook it up like a constructor - TFunction* constructorFunction = parseContext.handleConstructorCall(loc, castType); + TFunction* constructorFunction = _parseContext.handleConstructorCall(loc, castType); if (constructorFunction == nullptr) { expected("type that can be constructed"); return false; } TIntermTyped* arguments = nullptr; - parseContext.handleFunctionArgument(constructorFunction, arguments, node); - node = parseContext.handleFunctionCall(loc, constructorFunction, arguments); + _parseContext.handleFunctionArgument(constructorFunction, arguments, node); + node = _parseContext.handleFunctionCall(loc, constructorFunction, arguments); return true; } else { @@ -2160,7 +2160,7 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node) // These unary ops require lvalues if (unaryOp == EOpPreIncrement || unaryOp == EOpPreDecrement) - node = parseContext.handleLvalue(loc, "unary operator", node); + node = _parseContext.handleLvalue(loc, "unary operator", node); return node != nullptr; } @@ -2203,7 +2203,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) } else if (acceptIdentifier(idToken)) { // identifier or function_call name if (! peekTokenClass(EHTokLeftParen)) { - node = parseContext.handleVariable(idToken.loc, idToken.symbol, token.string); + node = _parseContext.handleVariable(idToken.loc, idToken.symbol, token.string); } else if (acceptFunctionCall(idToken, node)) { // function_call (nothing else to do yet) } else { @@ -2218,16 +2218,16 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) // This is to guarantee we do this no matter how we get out of the stack frame. // This way there's no bug if an early return forgets to do it. struct tFinalize { - tFinalize(HlslParseContext& p) : parseContext(p) { } - ~tFinalize() { parseContext.finalizeFlattening(); } - HlslParseContext& parseContext; - } finalize(parseContext); + tFinalize(HlslParseContext& p) : _parseContext(p) { } + ~tFinalize() { _parseContext.finalizeFlattening(); } + HlslParseContext& _parseContext; + } finalize(_parseContext); // Initialize the flattening accumulation data, so we can track data across multiple bracket or // dot operators. This can also be nested, e.g, for [], so we have to track each nesting // level: hence the init and finalize. Even though in practice these must be // constants, they are parsed no matter what. - parseContext.initFlattening(); + _parseContext.initFlattening(); // Something was found, chain as many postfix operations as exist. do { @@ -2259,7 +2259,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) } TIntermTyped* base = node; // preserve for method function calls - node = parseContext.handleDotDereference(field.loc, node, *field.string); + node = _parseContext.handleDotDereference(field.loc, node, *field.string); // In the event of a method node, we look for an open paren and accept the function call. if (node != nullptr && node->getAsMethodNode() != nullptr && peekTokenClass(EHTokLeftParen)) { @@ -2281,7 +2281,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) return false; } advanceToken(); - node = parseContext.handleBracketDereference(indexNode->getLoc(), node, indexNode); + node = _parseContext.handleBracketDereference(indexNode->getLoc(), node, indexNode); break; } case EOpPostIncrement: @@ -2290,7 +2290,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) case EOpPostDecrement: // DEC_OP node = intermediate.addUnaryMath(postOp, node, loc); - node = parseContext.handleLvalue(loc, "unary operator", node); + node = _parseContext.handleLvalue(loc, "unary operator", node); break; default: assert(0); @@ -2307,7 +2307,7 @@ bool HlslGrammar::acceptConstructor(TIntermTyped*& node) // type TType type; if (acceptType(type)) { - TFunction* constructorFunction = parseContext.handleConstructorCall(token.loc, type); + TFunction* constructorFunction = _parseContext.handleConstructorCall(token.loc, type); if (constructorFunction == nullptr) return false; @@ -2319,7 +2319,7 @@ bool HlslGrammar::acceptConstructor(TIntermTyped*& node) } // hook it up - node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments); + node = _parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments); return true; } @@ -2340,12 +2340,12 @@ bool HlslGrammar::acceptFunctionCall(HlslToken idToken, TIntermTyped*& node, TIn // methods have an implicit first argument of the calling object. if (base != nullptr) - parseContext.handleFunctionArgument(function, arguments, base); + _parseContext.handleFunctionArgument(function, arguments, base); if (! acceptArguments(function, arguments)) return false; - node = parseContext.handleFunctionCall(idToken.loc, function, arguments); + node = _parseContext.handleFunctionCall(idToken.loc, function, arguments); return true; } @@ -2369,7 +2369,7 @@ bool HlslGrammar::acceptArguments(TFunction* function, TIntermTyped*& arguments) break; // hook it up - parseContext.handleFunctionArgument(function, arguments, arg); + _parseContext.handleFunctionArgument(function, arguments, arg); // COMMA if (! acceptTokenClass(EHTokComma)) @@ -2434,7 +2434,7 @@ bool HlslGrammar::acceptCompoundStatement(TIntermNode*& retStatement) if (branch != nullptr && (branch->getFlowOp() == EOpCase || branch->getFlowOp() == EOpDefault)) { // hook up individual subsequences within a switch statement - parseContext.wrapupSwitchSubsequence(compoundStatement, statement); + _parseContext.wrapupSwitchSubsequence(compoundStatement, statement); compoundStatement = nullptr; } else { // hook it up to the growing compound statement @@ -2452,18 +2452,18 @@ bool HlslGrammar::acceptCompoundStatement(TIntermNode*& retStatement) bool HlslGrammar::acceptScopedStatement(TIntermNode*& statement) { - parseContext.pushScope(); + _parseContext.pushScope(); bool result = acceptStatement(statement); - parseContext.popScope(); + _parseContext.popScope(); return result; } bool HlslGrammar::acceptScopedCompoundStatement(TIntermNode*& statement) { - parseContext.pushScope(); + _parseContext.pushScope(); bool result = acceptCompoundStatement(statement); - parseContext.popScope(); + _parseContext.popScope(); return result; } @@ -2642,7 +2642,7 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) // so that something declared in the condition is scoped to the lifetimes // of the then-else statements - parseContext.pushScope(); + _parseContext.pushScope(); // LEFT_PAREN expression RIGHT_PAREN TIntermTyped* condition; @@ -2669,7 +2669,7 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) // Put the pieces together statement = intermediate.addSelection(condition, thenElse, loc); - parseContext.popScope(); + _parseContext.popScope(); return true; } @@ -2685,21 +2685,21 @@ bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement) return false; // LEFT_PAREN expression RIGHT_PAREN - parseContext.pushScope(); + _parseContext.pushScope(); TIntermTyped* switchExpression; if (! acceptParenExpression(switchExpression)) { - parseContext.popScope(); + _parseContext.popScope(); return false; } // compound_statement - parseContext.pushSwitchSequence(new TIntermSequence); + _parseContext.pushSwitchSequence(new TIntermSequence); bool statementOkay = acceptCompoundStatement(statement); if (statementOkay) - statement = parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() : nullptr); + statement = _parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() : nullptr); - parseContext.popSwitchSequence(); - parseContext.popScope(); + _parseContext.popSwitchSequence(); + _parseContext.popScope(); return statementOkay; } @@ -2725,8 +2725,8 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) case EHTokWhile: // so that something declared in the condition is scoped to the lifetime // of the while sub-statement - parseContext.pushScope(); - parseContext.nestLooping(); + _parseContext.pushScope(); + _parseContext.nestLooping(); // LEFT_PAREN condition RIGHT_PAREN if (! acceptParenExpression(condition)) @@ -2738,15 +2738,15 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) return false; } - parseContext.unnestLooping(); - parseContext.popScope(); + _parseContext.unnestLooping(); + _parseContext.popScope(); statement = intermediate.addLoop(statement, condition, nullptr, true, loc); return true; case EHTokDo: - parseContext.nestLooping(); + _parseContext.nestLooping(); if (! acceptTokenClass(EHTokLeftBrace)) expected("{"); @@ -2774,7 +2774,7 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) if (! acceptTokenClass(EHTokSemicolon)) expected(";"); - parseContext.unnestLooping(); + _parseContext.unnestLooping(); statement = intermediate.addLoop(statement, condition, 0, false, loc); @@ -2788,7 +2788,7 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) // so that something declared in the condition is scoped to the lifetime // of the for sub-statement - parseContext.pushScope(); + _parseContext.pushScope(); // initializer TIntermNode* initNode = nullptr; @@ -2801,7 +2801,7 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) if (! acceptTokenClass(EHTokSemicolon)) expected(";"); - parseContext.nestLooping(); + _parseContext.nestLooping(); // condition SEMI_COLON acceptExpression(condition); @@ -2822,8 +2822,8 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) statement = intermediate.addForLoop(statement, initNode, condition, iterator, true, loc); - parseContext.popScope(); - parseContext.unnestLooping(); + _parseContext.popScope(); + _parseContext.unnestLooping(); return true; } @@ -2872,7 +2872,7 @@ bool HlslGrammar::acceptJumpStatement(TIntermNode*& statement) TIntermTyped* node; if (acceptExpression(node)) { // hook it up - statement = parseContext.handleReturnValue(token.loc, node); + statement = _parseContext.handleReturnValue(token.loc, node); } else statement = intermediate.addBranch(EOpReturn, token.loc); break; @@ -2910,7 +2910,7 @@ bool HlslGrammar::acceptCaseLabel(TIntermNode*& statement) return false; } - statement = parseContext.intermediate.addBranch(EOpCase, expression, loc); + statement = _parseContext.intermediate.addBranch(EOpCase, expression, loc); return true; } @@ -2929,7 +2929,7 @@ bool HlslGrammar::acceptDefaultLabel(TIntermNode*& statement) return false; } - statement = parseContext.intermediate.addBranch(EOpDefault, loc); + statement = _parseContext.intermediate.addBranch(EOpDefault, loc); return true; } @@ -2964,7 +2964,7 @@ void HlslGrammar::acceptArraySpecifier(TArraySizes*& arraySizes) if (hasArraySize) { TArraySize arraySize; - parseContext.arraySizeCheck(loc, sizeExpr, arraySize); + _parseContext.arraySizeCheck(loc, sizeExpr, arraySize); arraySizes->addInnerSize(arraySize); } else { arraySizes->addInnerSize(0); // sized by initializers. @@ -3009,7 +3009,7 @@ void HlslGrammar::acceptPostDecls(TQualifier& qualifier) expected(")"); break; } - parseContext.handlePackOffset(locationToken.loc, qualifier, *locationToken.string, componentToken.string); + _parseContext.handlePackOffset(locationToken.loc, qualifier, *locationToken.string, componentToken.string); } else if (! acceptIdentifier(idToken)) { expected("layout, semantic, packoffset, or register"); return; @@ -3063,10 +3063,10 @@ void HlslGrammar::acceptPostDecls(TQualifier& qualifier) expected(")"); break; } - parseContext.handleRegister(registerDesc.loc, qualifier, profile.string, *registerDesc.string, subComponent, spaceDesc.string); + _parseContext.handleRegister(registerDesc.loc, qualifier, profile.string, *registerDesc.string, subComponent, spaceDesc.string); } else { // semantic, in idToken.string - parseContext.handleSemantic(idToken.loc, qualifier, *idToken.string); + _parseContext.handleSemantic(idToken.loc, qualifier, *idToken.string); } } else if (peekTokenClass(EHTokLeftAngle)) acceptAnnotations(qualifier); diff --git a/deps/glslang/glslang/hlsl/hlslGrammar.h b/deps/glslang/glslang/hlsl/hlslGrammar.h index ad124cb755..3de13b317b 100755 --- a/deps/glslang/glslang/hlsl/hlslGrammar.h +++ b/deps/glslang/glslang/hlsl/hlslGrammar.h @@ -50,8 +50,8 @@ namespace glslang { class HlslGrammar : public HlslTokenStream { public: - HlslGrammar(HlslScanContext& scanner, HlslParseContext& parseContext) - : HlslTokenStream(scanner), parseContext(parseContext), intermediate(parseContext.intermediate) { } + HlslGrammar(HlslScanContext& scanner, HlslParseContext&_parseContext) + : HlslTokenStream(scanner), _parseContext(_parseContext), intermediate(_parseContext.intermediate) { } virtual ~HlslGrammar() { } bool parse(); @@ -112,7 +112,7 @@ namespace glslang { void acceptArraySpecifier(TArraySizes*&); void acceptPostDecls(TQualifier&); - HlslParseContext& parseContext; // state of parsing and helper functions for building the intermediate + HlslParseContext&_parseContext; // state of parsing and helper functions for building the intermediate TIntermediate& intermediate; // the final product, the intermediate representation, includes the AST }; diff --git a/deps/glslang/glslang/hlsl/hlslScanContext.cpp b/deps/glslang/glslang/hlsl/hlslScanContext.cpp index 4e355ba7ca..abd59389cf 100755 --- a/deps/glslang/glslang/hlsl/hlslScanContext.cpp +++ b/deps/glslang/glslang/hlsl/hlslScanContext.cpp @@ -52,329 +52,306 @@ // preprocessor includes #include "../glslang/MachineIndependent/preprocessor/PpContext.h" #include "../glslang/MachineIndependent/preprocessor/PpTokens.h" +#include "../glslang/MachineIndependent/preprocessor/Compare.h" namespace { -struct str_eq -{ - bool operator()(const char* lhs, const char* rhs) const - { - return strcmp(lhs, rhs) == 0; - } -}; - -struct str_hash -{ - size_t operator()(const char* str) const - { - // djb2 - unsigned long hash = 5381; - int c; - - while ((c = *str++) != 0) - hash = ((hash << 5) + hash) + c; - - return hash; - } -}; - // A single global usable by all threads, by all versions, by all languages. // After a single process-level initialization, this is read only and thread safe -std::unordered_map* KeywordMap = nullptr; -std::unordered_set* ReservedSet = nullptr; - +std::unordered_map* hlslKeywordMap = nullptr; +std::unordered_set* hlslReservedSet = nullptr; }; namespace glslang { void HlslScanContext::fillInKeywordMap() { - if (KeywordMap != nullptr) { + if (hlslKeywordMap != nullptr) { // this is really an error, as this should called only once per process // but, the only risk is if two threads called simultaneously return; } - KeywordMap = new std::unordered_map; + hlslKeywordMap = new std::unordered_map; - (*KeywordMap)["static"] = EHTokStatic; - (*KeywordMap)["const"] = EHTokConst; - (*KeywordMap)["unorm"] = EHTokUnorm; - (*KeywordMap)["snorm"] = EHTokSNorm; - (*KeywordMap)["extern"] = EHTokExtern; - (*KeywordMap)["uniform"] = EHTokUniform; - (*KeywordMap)["volatile"] = EHTokVolatile; - (*KeywordMap)["precise"] = EHTokPrecise; - (*KeywordMap)["shared"] = EHTokShared; - (*KeywordMap)["groupshared"] = EHTokGroupShared; - (*KeywordMap)["linear"] = EHTokLinear; - (*KeywordMap)["centroid"] = EHTokCentroid; - (*KeywordMap)["nointerpolation"] = EHTokNointerpolation; - (*KeywordMap)["noperspective"] = EHTokNoperspective; - (*KeywordMap)["sample"] = EHTokSample; - (*KeywordMap)["row_major"] = EHTokRowMajor; - (*KeywordMap)["column_major"] = EHTokColumnMajor; - (*KeywordMap)["packoffset"] = EHTokPackOffset; - (*KeywordMap)["in"] = EHTokIn; - (*KeywordMap)["out"] = EHTokOut; - (*KeywordMap)["inout"] = EHTokInOut; - (*KeywordMap)["layout"] = EHTokLayout; + (*hlslKeywordMap)["static"] = EHTokStatic; + (*hlslKeywordMap)["const"] = EHTokConst; + (*hlslKeywordMap)["unorm"] = EHTokUnorm; + (*hlslKeywordMap)["snorm"] = EHTokSNorm; + (*hlslKeywordMap)["extern"] = EHTokExtern; + (*hlslKeywordMap)["uniform"] = EHTokUniform; + (*hlslKeywordMap)["volatile"] = EHTokVolatile; + (*hlslKeywordMap)["precise"] = EHTokPrecise; + (*hlslKeywordMap)["shared"] = EHTokShared; + (*hlslKeywordMap)["groupshared"] = EHTokGroupShared; + (*hlslKeywordMap)["linear"] = EHTokLinear; + (*hlslKeywordMap)["centroid"] = EHTokCentroid; + (*hlslKeywordMap)["nointerpolation"] = EHTokNointerpolation; + (*hlslKeywordMap)["noperspective"] = EHTokNoperspective; + (*hlslKeywordMap)["sample"] = EHTokSample; + (*hlslKeywordMap)["row_major"] = EHTokRowMajor; + (*hlslKeywordMap)["column_major"] = EHTokColumnMajor; + (*hlslKeywordMap)["packoffset"] = EHTokPackOffset; + (*hlslKeywordMap)["in"] = EHTokIn; + (*hlslKeywordMap)["out"] = EHTokOut; + (*hlslKeywordMap)["inout"] = EHTokInOut; + (*hlslKeywordMap)["layout"] = EHTokLayout; - (*KeywordMap)["point"] = EHTokPoint; - (*KeywordMap)["line"] = EHTokLine; - (*KeywordMap)["triangle"] = EHTokTriangle; - (*KeywordMap)["lineadj"] = EHTokLineAdj; - (*KeywordMap)["triangleadj"] = EHTokTriangleAdj; + (*hlslKeywordMap)["point"] = EHTokPoint; + (*hlslKeywordMap)["line"] = EHTokLine; + (*hlslKeywordMap)["triangle"] = EHTokTriangle; + (*hlslKeywordMap)["lineadj"] = EHTokLineAdj; + (*hlslKeywordMap)["triangleadj"] = EHTokTriangleAdj; - (*KeywordMap)["PointStream"] = EHTokPointStream; - (*KeywordMap)["LineStream"] = EHTokLineStream; - (*KeywordMap)["TriangleStream"] = EHTokTriangleStream; + (*hlslKeywordMap)["PointStream"] = EHTokPointStream; + (*hlslKeywordMap)["LineStream"] = EHTokLineStream; + (*hlslKeywordMap)["TriangleStream"] = EHTokTriangleStream; - (*KeywordMap)["Buffer"] = EHTokBuffer; - (*KeywordMap)["vector"] = EHTokVector; - (*KeywordMap)["matrix"] = EHTokMatrix; + (*hlslKeywordMap)["Buffer"] = EHTokBuffer; + (*hlslKeywordMap)["vector"] = EHTokVector; + (*hlslKeywordMap)["matrix"] = EHTokMatrix; - (*KeywordMap)["void"] = EHTokVoid; - (*KeywordMap)["string"] = EHTokString; - (*KeywordMap)["bool"] = EHTokBool; - (*KeywordMap)["int"] = EHTokInt; - (*KeywordMap)["uint"] = EHTokUint; - (*KeywordMap)["dword"] = EHTokDword; - (*KeywordMap)["half"] = EHTokHalf; - (*KeywordMap)["float"] = EHTokFloat; - (*KeywordMap)["double"] = EHTokDouble; - (*KeywordMap)["min16float"] = EHTokMin16float; - (*KeywordMap)["min10float"] = EHTokMin10float; - (*KeywordMap)["min16int"] = EHTokMin16int; - (*KeywordMap)["min12int"] = EHTokMin12int; - (*KeywordMap)["min16uint"] = EHTokMin16uint; + (*hlslKeywordMap)["void"] = EHTokVoid; + (*hlslKeywordMap)["string"] = EHTokString; + (*hlslKeywordMap)["bool"] = EHTokBool; + (*hlslKeywordMap)["int"] = EHTokInt; + (*hlslKeywordMap)["uint"] = EHTokUint; + (*hlslKeywordMap)["dword"] = EHTokDword; + (*hlslKeywordMap)["half"] = EHTokHalf; + (*hlslKeywordMap)["float"] = EHTokFloat; + (*hlslKeywordMap)["double"] = EHTokDouble; + (*hlslKeywordMap)["min16float"] = EHTokMin16float; + (*hlslKeywordMap)["min10float"] = EHTokMin10float; + (*hlslKeywordMap)["min16int"] = EHTokMin16int; + (*hlslKeywordMap)["min12int"] = EHTokMin12int; + (*hlslKeywordMap)["min16uint"] = EHTokMin16uint; - (*KeywordMap)["bool1"] = EHTokBool1; - (*KeywordMap)["bool2"] = EHTokBool2; - (*KeywordMap)["bool3"] = EHTokBool3; - (*KeywordMap)["bool4"] = EHTokBool4; - (*KeywordMap)["float1"] = EHTokFloat1; - (*KeywordMap)["float2"] = EHTokFloat2; - (*KeywordMap)["float3"] = EHTokFloat3; - (*KeywordMap)["float4"] = EHTokFloat4; - (*KeywordMap)["int1"] = EHTokInt1; - (*KeywordMap)["int2"] = EHTokInt2; - (*KeywordMap)["int3"] = EHTokInt3; - (*KeywordMap)["int4"] = EHTokInt4; - (*KeywordMap)["double1"] = EHTokDouble1; - (*KeywordMap)["double2"] = EHTokDouble2; - (*KeywordMap)["double3"] = EHTokDouble3; - (*KeywordMap)["double4"] = EHTokDouble4; - (*KeywordMap)["uint1"] = EHTokUint1; - (*KeywordMap)["uint2"] = EHTokUint2; - (*KeywordMap)["uint3"] = EHTokUint3; - (*KeywordMap)["uint4"] = EHTokUint4; + (*hlslKeywordMap)["bool1"] = EHTokBool1; + (*hlslKeywordMap)["bool2"] = EHTokBool2; + (*hlslKeywordMap)["bool3"] = EHTokBool3; + (*hlslKeywordMap)["bool4"] = EHTokBool4; + (*hlslKeywordMap)["float1"] = EHTokFloat1; + (*hlslKeywordMap)["float2"] = EHTokFloat2; + (*hlslKeywordMap)["float3"] = EHTokFloat3; + (*hlslKeywordMap)["float4"] = EHTokFloat4; + (*hlslKeywordMap)["int1"] = EHTokInt1; + (*hlslKeywordMap)["int2"] = EHTokInt2; + (*hlslKeywordMap)["int3"] = EHTokInt3; + (*hlslKeywordMap)["int4"] = EHTokInt4; + (*hlslKeywordMap)["double1"] = EHTokDouble1; + (*hlslKeywordMap)["double2"] = EHTokDouble2; + (*hlslKeywordMap)["double3"] = EHTokDouble3; + (*hlslKeywordMap)["double4"] = EHTokDouble4; + (*hlslKeywordMap)["uint1"] = EHTokUint1; + (*hlslKeywordMap)["uint2"] = EHTokUint2; + (*hlslKeywordMap)["uint3"] = EHTokUint3; + (*hlslKeywordMap)["uint4"] = EHTokUint4; - (*KeywordMap)["min16float1"] = EHTokMin16float1; - (*KeywordMap)["min16float2"] = EHTokMin16float2; - (*KeywordMap)["min16float3"] = EHTokMin16float3; - (*KeywordMap)["min16float4"] = EHTokMin16float4; - (*KeywordMap)["min10float1"] = EHTokMin10float1; - (*KeywordMap)["min10float2"] = EHTokMin10float2; - (*KeywordMap)["min10float3"] = EHTokMin10float3; - (*KeywordMap)["min10float4"] = EHTokMin10float4; - (*KeywordMap)["min16int1"] = EHTokMin16int1; - (*KeywordMap)["min16int2"] = EHTokMin16int2; - (*KeywordMap)["min16int3"] = EHTokMin16int3; - (*KeywordMap)["min16int4"] = EHTokMin16int4; - (*KeywordMap)["min12int1"] = EHTokMin12int1; - (*KeywordMap)["min12int2"] = EHTokMin12int2; - (*KeywordMap)["min12int3"] = EHTokMin12int3; - (*KeywordMap)["min12int4"] = EHTokMin12int4; - (*KeywordMap)["min16uint1"] = EHTokMin16uint1; - (*KeywordMap)["min16uint2"] = EHTokMin16uint2; - (*KeywordMap)["min16uint3"] = EHTokMin16uint3; - (*KeywordMap)["min16uint4"] = EHTokMin16uint4; + (*hlslKeywordMap)["min16float1"] = EHTokMin16float1; + (*hlslKeywordMap)["min16float2"] = EHTokMin16float2; + (*hlslKeywordMap)["min16float3"] = EHTokMin16float3; + (*hlslKeywordMap)["min16float4"] = EHTokMin16float4; + (*hlslKeywordMap)["min10float1"] = EHTokMin10float1; + (*hlslKeywordMap)["min10float2"] = EHTokMin10float2; + (*hlslKeywordMap)["min10float3"] = EHTokMin10float3; + (*hlslKeywordMap)["min10float4"] = EHTokMin10float4; + (*hlslKeywordMap)["min16int1"] = EHTokMin16int1; + (*hlslKeywordMap)["min16int2"] = EHTokMin16int2; + (*hlslKeywordMap)["min16int3"] = EHTokMin16int3; + (*hlslKeywordMap)["min16int4"] = EHTokMin16int4; + (*hlslKeywordMap)["min12int1"] = EHTokMin12int1; + (*hlslKeywordMap)["min12int2"] = EHTokMin12int2; + (*hlslKeywordMap)["min12int3"] = EHTokMin12int3; + (*hlslKeywordMap)["min12int4"] = EHTokMin12int4; + (*hlslKeywordMap)["min16uint1"] = EHTokMin16uint1; + (*hlslKeywordMap)["min16uint2"] = EHTokMin16uint2; + (*hlslKeywordMap)["min16uint3"] = EHTokMin16uint3; + (*hlslKeywordMap)["min16uint4"] = EHTokMin16uint4; - (*KeywordMap)["bool1x1"] = EHTokBool1x1; - (*KeywordMap)["bool1x2"] = EHTokBool1x2; - (*KeywordMap)["bool1x3"] = EHTokBool1x3; - (*KeywordMap)["bool1x4"] = EHTokBool1x4; - (*KeywordMap)["bool2x1"] = EHTokBool2x1; - (*KeywordMap)["bool2x2"] = EHTokBool2x2; - (*KeywordMap)["bool2x3"] = EHTokBool2x3; - (*KeywordMap)["bool2x4"] = EHTokBool2x4; - (*KeywordMap)["bool3x1"] = EHTokBool3x1; - (*KeywordMap)["bool3x2"] = EHTokBool3x2; - (*KeywordMap)["bool3x3"] = EHTokBool3x3; - (*KeywordMap)["bool3x4"] = EHTokBool3x4; - (*KeywordMap)["bool4x1"] = EHTokBool4x1; - (*KeywordMap)["bool4x2"] = EHTokBool4x2; - (*KeywordMap)["bool4x3"] = EHTokBool4x3; - (*KeywordMap)["bool4x4"] = EHTokBool4x4; - (*KeywordMap)["int1x1"] = EHTokInt1x1; - (*KeywordMap)["int1x2"] = EHTokInt1x2; - (*KeywordMap)["int1x3"] = EHTokInt1x3; - (*KeywordMap)["int1x4"] = EHTokInt1x4; - (*KeywordMap)["int2x1"] = EHTokInt2x1; - (*KeywordMap)["int2x2"] = EHTokInt2x2; - (*KeywordMap)["int2x3"] = EHTokInt2x3; - (*KeywordMap)["int2x4"] = EHTokInt2x4; - (*KeywordMap)["int3x1"] = EHTokInt3x1; - (*KeywordMap)["int3x2"] = EHTokInt3x2; - (*KeywordMap)["int3x3"] = EHTokInt3x3; - (*KeywordMap)["int3x4"] = EHTokInt3x4; - (*KeywordMap)["int4x1"] = EHTokInt4x1; - (*KeywordMap)["int4x2"] = EHTokInt4x2; - (*KeywordMap)["int4x3"] = EHTokInt4x3; - (*KeywordMap)["int4x4"] = EHTokInt4x4; - (*KeywordMap)["uint1x1"] = EHTokUint1x1; - (*KeywordMap)["uint1x2"] = EHTokUint1x2; - (*KeywordMap)["uint1x3"] = EHTokUint1x3; - (*KeywordMap)["uint1x4"] = EHTokUint1x4; - (*KeywordMap)["uint2x1"] = EHTokUint2x1; - (*KeywordMap)["uint2x2"] = EHTokUint2x2; - (*KeywordMap)["uint2x3"] = EHTokUint2x3; - (*KeywordMap)["uint2x4"] = EHTokUint2x4; - (*KeywordMap)["uint3x1"] = EHTokUint3x1; - (*KeywordMap)["uint3x2"] = EHTokUint3x2; - (*KeywordMap)["uint3x3"] = EHTokUint3x3; - (*KeywordMap)["uint3x4"] = EHTokUint3x4; - (*KeywordMap)["uint4x1"] = EHTokUint4x1; - (*KeywordMap)["uint4x2"] = EHTokUint4x2; - (*KeywordMap)["uint4x3"] = EHTokUint4x3; - (*KeywordMap)["uint4x4"] = EHTokUint4x4; - (*KeywordMap)["bool1x1"] = EHTokBool1x1; - (*KeywordMap)["bool1x2"] = EHTokBool1x2; - (*KeywordMap)["bool1x3"] = EHTokBool1x3; - (*KeywordMap)["bool1x4"] = EHTokBool1x4; - (*KeywordMap)["bool2x1"] = EHTokBool2x1; - (*KeywordMap)["bool2x2"] = EHTokBool2x2; - (*KeywordMap)["bool2x3"] = EHTokBool2x3; - (*KeywordMap)["bool2x4"] = EHTokBool2x4; - (*KeywordMap)["bool3x1"] = EHTokBool3x1; - (*KeywordMap)["bool3x2"] = EHTokBool3x2; - (*KeywordMap)["bool3x3"] = EHTokBool3x3; - (*KeywordMap)["bool3x4"] = EHTokBool3x4; - (*KeywordMap)["bool4x1"] = EHTokBool4x1; - (*KeywordMap)["bool4x2"] = EHTokBool4x2; - (*KeywordMap)["bool4x3"] = EHTokBool4x3; - (*KeywordMap)["bool4x4"] = EHTokBool4x4; - (*KeywordMap)["float1x1"] = EHTokFloat1x1; - (*KeywordMap)["float1x2"] = EHTokFloat1x2; - (*KeywordMap)["float1x3"] = EHTokFloat1x3; - (*KeywordMap)["float1x4"] = EHTokFloat1x4; - (*KeywordMap)["float2x1"] = EHTokFloat2x1; - (*KeywordMap)["float2x2"] = EHTokFloat2x2; - (*KeywordMap)["float2x3"] = EHTokFloat2x3; - (*KeywordMap)["float2x4"] = EHTokFloat2x4; - (*KeywordMap)["float3x1"] = EHTokFloat3x1; - (*KeywordMap)["float3x2"] = EHTokFloat3x2; - (*KeywordMap)["float3x3"] = EHTokFloat3x3; - (*KeywordMap)["float3x4"] = EHTokFloat3x4; - (*KeywordMap)["float4x1"] = EHTokFloat4x1; - (*KeywordMap)["float4x2"] = EHTokFloat4x2; - (*KeywordMap)["float4x3"] = EHTokFloat4x3; - (*KeywordMap)["float4x4"] = EHTokFloat4x4; - (*KeywordMap)["double1x1"] = EHTokDouble1x1; - (*KeywordMap)["double1x2"] = EHTokDouble1x2; - (*KeywordMap)["double1x3"] = EHTokDouble1x3; - (*KeywordMap)["double1x4"] = EHTokDouble1x4; - (*KeywordMap)["double2x1"] = EHTokDouble2x1; - (*KeywordMap)["double2x2"] = EHTokDouble2x2; - (*KeywordMap)["double2x3"] = EHTokDouble2x3; - (*KeywordMap)["double2x4"] = EHTokDouble2x4; - (*KeywordMap)["double3x1"] = EHTokDouble3x1; - (*KeywordMap)["double3x2"] = EHTokDouble3x2; - (*KeywordMap)["double3x3"] = EHTokDouble3x3; - (*KeywordMap)["double3x4"] = EHTokDouble3x4; - (*KeywordMap)["double4x1"] = EHTokDouble4x1; - (*KeywordMap)["double4x2"] = EHTokDouble4x2; - (*KeywordMap)["double4x3"] = EHTokDouble4x3; - (*KeywordMap)["double4x4"] = EHTokDouble4x4; + (*hlslKeywordMap)["bool1x1"] = EHTokBool1x1; + (*hlslKeywordMap)["bool1x2"] = EHTokBool1x2; + (*hlslKeywordMap)["bool1x3"] = EHTokBool1x3; + (*hlslKeywordMap)["bool1x4"] = EHTokBool1x4; + (*hlslKeywordMap)["bool2x1"] = EHTokBool2x1; + (*hlslKeywordMap)["bool2x2"] = EHTokBool2x2; + (*hlslKeywordMap)["bool2x3"] = EHTokBool2x3; + (*hlslKeywordMap)["bool2x4"] = EHTokBool2x4; + (*hlslKeywordMap)["bool3x1"] = EHTokBool3x1; + (*hlslKeywordMap)["bool3x2"] = EHTokBool3x2; + (*hlslKeywordMap)["bool3x3"] = EHTokBool3x3; + (*hlslKeywordMap)["bool3x4"] = EHTokBool3x4; + (*hlslKeywordMap)["bool4x1"] = EHTokBool4x1; + (*hlslKeywordMap)["bool4x2"] = EHTokBool4x2; + (*hlslKeywordMap)["bool4x3"] = EHTokBool4x3; + (*hlslKeywordMap)["bool4x4"] = EHTokBool4x4; + (*hlslKeywordMap)["int1x1"] = EHTokInt1x1; + (*hlslKeywordMap)["int1x2"] = EHTokInt1x2; + (*hlslKeywordMap)["int1x3"] = EHTokInt1x3; + (*hlslKeywordMap)["int1x4"] = EHTokInt1x4; + (*hlslKeywordMap)["int2x1"] = EHTokInt2x1; + (*hlslKeywordMap)["int2x2"] = EHTokInt2x2; + (*hlslKeywordMap)["int2x3"] = EHTokInt2x3; + (*hlslKeywordMap)["int2x4"] = EHTokInt2x4; + (*hlslKeywordMap)["int3x1"] = EHTokInt3x1; + (*hlslKeywordMap)["int3x2"] = EHTokInt3x2; + (*hlslKeywordMap)["int3x3"] = EHTokInt3x3; + (*hlslKeywordMap)["int3x4"] = EHTokInt3x4; + (*hlslKeywordMap)["int4x1"] = EHTokInt4x1; + (*hlslKeywordMap)["int4x2"] = EHTokInt4x2; + (*hlslKeywordMap)["int4x3"] = EHTokInt4x3; + (*hlslKeywordMap)["int4x4"] = EHTokInt4x4; + (*hlslKeywordMap)["uint1x1"] = EHTokUint1x1; + (*hlslKeywordMap)["uint1x2"] = EHTokUint1x2; + (*hlslKeywordMap)["uint1x3"] = EHTokUint1x3; + (*hlslKeywordMap)["uint1x4"] = EHTokUint1x4; + (*hlslKeywordMap)["uint2x1"] = EHTokUint2x1; + (*hlslKeywordMap)["uint2x2"] = EHTokUint2x2; + (*hlslKeywordMap)["uint2x3"] = EHTokUint2x3; + (*hlslKeywordMap)["uint2x4"] = EHTokUint2x4; + (*hlslKeywordMap)["uint3x1"] = EHTokUint3x1; + (*hlslKeywordMap)["uint3x2"] = EHTokUint3x2; + (*hlslKeywordMap)["uint3x3"] = EHTokUint3x3; + (*hlslKeywordMap)["uint3x4"] = EHTokUint3x4; + (*hlslKeywordMap)["uint4x1"] = EHTokUint4x1; + (*hlslKeywordMap)["uint4x2"] = EHTokUint4x2; + (*hlslKeywordMap)["uint4x3"] = EHTokUint4x3; + (*hlslKeywordMap)["uint4x4"] = EHTokUint4x4; + (*hlslKeywordMap)["bool1x1"] = EHTokBool1x1; + (*hlslKeywordMap)["bool1x2"] = EHTokBool1x2; + (*hlslKeywordMap)["bool1x3"] = EHTokBool1x3; + (*hlslKeywordMap)["bool1x4"] = EHTokBool1x4; + (*hlslKeywordMap)["bool2x1"] = EHTokBool2x1; + (*hlslKeywordMap)["bool2x2"] = EHTokBool2x2; + (*hlslKeywordMap)["bool2x3"] = EHTokBool2x3; + (*hlslKeywordMap)["bool2x4"] = EHTokBool2x4; + (*hlslKeywordMap)["bool3x1"] = EHTokBool3x1; + (*hlslKeywordMap)["bool3x2"] = EHTokBool3x2; + (*hlslKeywordMap)["bool3x3"] = EHTokBool3x3; + (*hlslKeywordMap)["bool3x4"] = EHTokBool3x4; + (*hlslKeywordMap)["bool4x1"] = EHTokBool4x1; + (*hlslKeywordMap)["bool4x2"] = EHTokBool4x2; + (*hlslKeywordMap)["bool4x3"] = EHTokBool4x3; + (*hlslKeywordMap)["bool4x4"] = EHTokBool4x4; + (*hlslKeywordMap)["float1x1"] = EHTokFloat1x1; + (*hlslKeywordMap)["float1x2"] = EHTokFloat1x2; + (*hlslKeywordMap)["float1x3"] = EHTokFloat1x3; + (*hlslKeywordMap)["float1x4"] = EHTokFloat1x4; + (*hlslKeywordMap)["float2x1"] = EHTokFloat2x1; + (*hlslKeywordMap)["float2x2"] = EHTokFloat2x2; + (*hlslKeywordMap)["float2x3"] = EHTokFloat2x3; + (*hlslKeywordMap)["float2x4"] = EHTokFloat2x4; + (*hlslKeywordMap)["float3x1"] = EHTokFloat3x1; + (*hlslKeywordMap)["float3x2"] = EHTokFloat3x2; + (*hlslKeywordMap)["float3x3"] = EHTokFloat3x3; + (*hlslKeywordMap)["float3x4"] = EHTokFloat3x4; + (*hlslKeywordMap)["float4x1"] = EHTokFloat4x1; + (*hlslKeywordMap)["float4x2"] = EHTokFloat4x2; + (*hlslKeywordMap)["float4x3"] = EHTokFloat4x3; + (*hlslKeywordMap)["float4x4"] = EHTokFloat4x4; + (*hlslKeywordMap)["double1x1"] = EHTokDouble1x1; + (*hlslKeywordMap)["double1x2"] = EHTokDouble1x2; + (*hlslKeywordMap)["double1x3"] = EHTokDouble1x3; + (*hlslKeywordMap)["double1x4"] = EHTokDouble1x4; + (*hlslKeywordMap)["double2x1"] = EHTokDouble2x1; + (*hlslKeywordMap)["double2x2"] = EHTokDouble2x2; + (*hlslKeywordMap)["double2x3"] = EHTokDouble2x3; + (*hlslKeywordMap)["double2x4"] = EHTokDouble2x4; + (*hlslKeywordMap)["double3x1"] = EHTokDouble3x1; + (*hlslKeywordMap)["double3x2"] = EHTokDouble3x2; + (*hlslKeywordMap)["double3x3"] = EHTokDouble3x3; + (*hlslKeywordMap)["double3x4"] = EHTokDouble3x4; + (*hlslKeywordMap)["double4x1"] = EHTokDouble4x1; + (*hlslKeywordMap)["double4x2"] = EHTokDouble4x2; + (*hlslKeywordMap)["double4x3"] = EHTokDouble4x3; + (*hlslKeywordMap)["double4x4"] = EHTokDouble4x4; - (*KeywordMap)["sampler"] = EHTokSampler; - (*KeywordMap)["sampler1D"] = EHTokSampler1d; - (*KeywordMap)["sampler2D"] = EHTokSampler2d; - (*KeywordMap)["sampler3D"] = EHTokSampler3d; - (*KeywordMap)["samplerCube"] = EHTokSamplerCube; - (*KeywordMap)["sampler_state"] = EHTokSamplerState; - (*KeywordMap)["SamplerState"] = EHTokSamplerState; - (*KeywordMap)["SamplerComparisonState"] = EHTokSamplerComparisonState; - (*KeywordMap)["texture"] = EHTokTexture; - (*KeywordMap)["Texture1D"] = EHTokTexture1d; - (*KeywordMap)["Texture1DArray"] = EHTokTexture1darray; - (*KeywordMap)["Texture2D"] = EHTokTexture2d; - (*KeywordMap)["Texture2DArray"] = EHTokTexture2darray; - (*KeywordMap)["Texture3D"] = EHTokTexture3d; - (*KeywordMap)["TextureCube"] = EHTokTextureCube; - (*KeywordMap)["TextureCubeArray"] = EHTokTextureCubearray; - (*KeywordMap)["Texture2DMS"] = EHTokTexture2DMS; - (*KeywordMap)["Texture2DMSArray"] = EHTokTexture2DMSarray; - (*KeywordMap)["RWTexture1D"] = EHTokRWTexture1d; - (*KeywordMap)["RWTexture1DArray"] = EHTokRWTexture1darray; - (*KeywordMap)["RWTexture2D"] = EHTokRWTexture2d; - (*KeywordMap)["RWTexture2DArray"] = EHTokRWTexture2darray; - (*KeywordMap)["RWTexture3D"] = EHTokRWTexture3d; - (*KeywordMap)["RWBuffer"] = EHTokRWBuffer; + (*hlslKeywordMap)["sampler"] = EHTokSampler; + (*hlslKeywordMap)["sampler1D"] = EHTokSampler1d; + (*hlslKeywordMap)["sampler2D"] = EHTokSampler2d; + (*hlslKeywordMap)["sampler3D"] = EHTokSampler3d; + (*hlslKeywordMap)["samplerCube"] = EHTokSamplerCube; + (*hlslKeywordMap)["sampler_state"] = EHTokSamplerState; + (*hlslKeywordMap)["SamplerState"] = EHTokSamplerState; + (*hlslKeywordMap)["SamplerComparisonState"] = EHTokSamplerComparisonState; + (*hlslKeywordMap)["texture"] = EHTokTexture; + (*hlslKeywordMap)["Texture1D"] = EHTokTexture1d; + (*hlslKeywordMap)["Texture1DArray"] = EHTokTexture1darray; + (*hlslKeywordMap)["Texture2D"] = EHTokTexture2d; + (*hlslKeywordMap)["Texture2DArray"] = EHTokTexture2darray; + (*hlslKeywordMap)["Texture3D"] = EHTokTexture3d; + (*hlslKeywordMap)["TextureCube"] = EHTokTextureCube; + (*hlslKeywordMap)["TextureCubeArray"] = EHTokTextureCubearray; + (*hlslKeywordMap)["Texture2DMS"] = EHTokTexture2DMS; + (*hlslKeywordMap)["Texture2DMSArray"] = EHTokTexture2DMSarray; + (*hlslKeywordMap)["RWTexture1D"] = EHTokRWTexture1d; + (*hlslKeywordMap)["RWTexture1DArray"] = EHTokRWTexture1darray; + (*hlslKeywordMap)["RWTexture2D"] = EHTokRWTexture2d; + (*hlslKeywordMap)["RWTexture2DArray"] = EHTokRWTexture2darray; + (*hlslKeywordMap)["RWTexture3D"] = EHTokRWTexture3d; + (*hlslKeywordMap)["RWBuffer"] = EHTokRWBuffer; - (*KeywordMap)["struct"] = EHTokStruct; - (*KeywordMap)["cbuffer"] = EHTokCBuffer; - (*KeywordMap)["tbuffer"] = EHTokTBuffer; - (*KeywordMap)["typedef"] = EHTokTypedef; + (*hlslKeywordMap)["struct"] = EHTokStruct; + (*hlslKeywordMap)["cbuffer"] = EHTokCBuffer; + (*hlslKeywordMap)["tbuffer"] = EHTokTBuffer; + (*hlslKeywordMap)["typedef"] = EHTokTypedef; - (*KeywordMap)["true"] = EHTokBoolConstant; - (*KeywordMap)["false"] = EHTokBoolConstant; + (*hlslKeywordMap)["true"] = EHTokBoolConstant; + (*hlslKeywordMap)["false"] = EHTokBoolConstant; - (*KeywordMap)["for"] = EHTokFor; - (*KeywordMap)["do"] = EHTokDo; - (*KeywordMap)["while"] = EHTokWhile; - (*KeywordMap)["break"] = EHTokBreak; - (*KeywordMap)["continue"] = EHTokContinue; - (*KeywordMap)["if"] = EHTokIf; - (*KeywordMap)["else"] = EHTokElse; - (*KeywordMap)["discard"] = EHTokDiscard; - (*KeywordMap)["return"] = EHTokReturn; - (*KeywordMap)["switch"] = EHTokSwitch; - (*KeywordMap)["case"] = EHTokCase; - (*KeywordMap)["default"] = EHTokDefault; + (*hlslKeywordMap)["for"] = EHTokFor; + (*hlslKeywordMap)["do"] = EHTokDo; + (*hlslKeywordMap)["while"] = EHTokWhile; + (*hlslKeywordMap)["break"] = EHTokBreak; + (*hlslKeywordMap)["continue"] = EHTokContinue; + (*hlslKeywordMap)["if"] = EHTokIf; + (*hlslKeywordMap)["else"] = EHTokElse; + (*hlslKeywordMap)["discard"] = EHTokDiscard; + (*hlslKeywordMap)["return"] = EHTokReturn; + (*hlslKeywordMap)["switch"] = EHTokSwitch; + (*hlslKeywordMap)["case"] = EHTokCase; + (*hlslKeywordMap)["default"] = EHTokDefault; // TODO: get correct set here - ReservedSet = new std::unordered_set; + hlslReservedSet = new std::unordered_set; - ReservedSet->insert("auto"); - ReservedSet->insert("catch"); - ReservedSet->insert("char"); - ReservedSet->insert("class"); - ReservedSet->insert("const_cast"); - ReservedSet->insert("enum"); - ReservedSet->insert("explicit"); - ReservedSet->insert("friend"); - ReservedSet->insert("goto"); - ReservedSet->insert("long"); - ReservedSet->insert("mutable"); - ReservedSet->insert("new"); - ReservedSet->insert("operator"); - ReservedSet->insert("private"); - ReservedSet->insert("protected"); - ReservedSet->insert("public"); - ReservedSet->insert("reinterpret_cast"); - ReservedSet->insert("short"); - ReservedSet->insert("signed"); - ReservedSet->insert("sizeof"); - ReservedSet->insert("static_cast"); - ReservedSet->insert("template"); - ReservedSet->insert("this"); - ReservedSet->insert("throw"); - ReservedSet->insert("try"); - ReservedSet->insert("typename"); - ReservedSet->insert("union"); - ReservedSet->insert("unsigned"); - ReservedSet->insert("using"); - ReservedSet->insert("virtual"); + hlslReservedSet->insert("auto"); + hlslReservedSet->insert("catch"); + hlslReservedSet->insert("char"); + hlslReservedSet->insert("class"); + hlslReservedSet->insert("const_cast"); + hlslReservedSet->insert("enum"); + hlslReservedSet->insert("explicit"); + hlslReservedSet->insert("friend"); + hlslReservedSet->insert("goto"); + hlslReservedSet->insert("long"); + hlslReservedSet->insert("mutable"); + hlslReservedSet->insert("new"); + hlslReservedSet->insert("operator"); + hlslReservedSet->insert("private"); + hlslReservedSet->insert("protected"); + hlslReservedSet->insert("public"); + hlslReservedSet->insert("reinterpret_cast"); + hlslReservedSet->insert("short"); + hlslReservedSet->insert("signed"); + hlslReservedSet->insert("sizeof"); + hlslReservedSet->insert("static_cast"); + hlslReservedSet->insert("template"); + hlslReservedSet->insert("this"); + hlslReservedSet->insert("throw"); + hlslReservedSet->insert("try"); + hlslReservedSet->insert("typename"); + hlslReservedSet->insert("union"); + hlslReservedSet->insert("unsigned"); + hlslReservedSet->insert("using"); + hlslReservedSet->insert("virtual"); } void HlslScanContext::deleteKeywordMap() { - delete KeywordMap; - KeywordMap = nullptr; - delete ReservedSet; - ReservedSet = nullptr; + delete hlslKeywordMap; + hlslKeywordMap = nullptr; + delete hlslReservedSet; + hlslReservedSet = nullptr; } // Wrapper for tokenizeClass()"] = to get everything inside the token. @@ -426,7 +403,7 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token) case '{': return EHTokLeftBrace; case '}': return EHTokRightBrace; case '\\': - parseContext.error(loc, "illegal use of escape character", "\\", ""); + _parseContext.error(loc, "illegal use of escape character", "\\", ""); break; case PpAtomAdd: return EHTokAddAssign; @@ -477,7 +454,7 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token) char buf[2]; buf[0] = (char)ppToken.token; buf[1] = 0; - parseContext.error(loc, "unexpected token", buf, ""); + _parseContext.error(loc, "unexpected token", buf, ""); break; } } while (true); @@ -485,11 +462,11 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token) EHlslTokenClass HlslScanContext::tokenizeIdentifier() { - if (ReservedSet->find(tokenText) != ReservedSet->end()) + if (hlslReservedSet->find(tokenText) != hlslReservedSet->end()) return reservedWord(); - auto it = KeywordMap->find(tokenText); - if (it == KeywordMap->end()) { + auto it = hlslKeywordMap->find(tokenText); + if (it == hlslKeywordMap->end()) { // Should have an identifier of some sort return identifierOrType(); } @@ -738,7 +715,7 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() return keyword; default: - parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); + _parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); return EHTokNone; } } @@ -755,8 +732,8 @@ EHlslTokenClass HlslScanContext::identifierOrType() // extension support before the extension is enabled. EHlslTokenClass HlslScanContext::reservedWord() { - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.error(loc, "Reserved word.", tokenText, "", ""); + if (!_parseContext.symbolTable.atBuiltInLevel()) + _parseContext.error(loc, "Reserved word.", tokenText, "", ""); return EHTokNone; } @@ -769,8 +746,8 @@ EHlslTokenClass HlslScanContext::identifierOrReserved(bool reserved) return EHTokNone; } - if (parseContext.forwardCompatible) - parseContext.warn(loc, "using future reserved keyword", tokenText, ""); + if (_parseContext.forwardCompatible) + _parseContext.warn(loc, "using future reserved keyword", tokenText, ""); return identifierOrType(); } @@ -779,7 +756,7 @@ EHlslTokenClass HlslScanContext::identifierOrReserved(bool reserved) // showed up. EHlslTokenClass HlslScanContext::nonreservedKeyword(int version) { - if (parseContext.version < version) + if (_parseContext.version < version) return identifierOrType(); return keyword; diff --git a/deps/glslang/glslang/hlsl/hlslScanContext.h b/deps/glslang/glslang/hlsl/hlslScanContext.h index 144a85343f..32cd0e7f20 100755 --- a/deps/glslang/glslang/hlsl/hlslScanContext.h +++ b/deps/glslang/glslang/hlsl/hlslScanContext.h @@ -74,8 +74,8 @@ struct HlslToken { // class HlslScanContext { public: - HlslScanContext(TParseContextBase& parseContext, TPpContext& ppContext) - : parseContext(parseContext), ppContext(ppContext) { } + HlslScanContext(TParseContextBase& _parseContext, TPpContext& ppContext) + : _parseContext(_parseContext), ppContext(ppContext) { } virtual ~HlslScanContext() { } static void fillInKeywordMap(); @@ -94,7 +94,7 @@ protected: EHlslTokenClass identifierOrReserved(bool reserved); EHlslTokenClass nonreservedKeyword(int version); - TParseContextBase& parseContext; + TParseContextBase&_parseContext; TPpContext& ppContext; TSourceLoc loc; TPpToken* ppToken; diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index a630e9d6ab..4ec2e3349d 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -26,70 +26,6 @@ #include #endif -#ifdef WANT_GLSLANG -#include "../deps/glslang/glslang.cpp" -#if 0 -#include "../deps/glslang/glslang_tab.cpp" -#endif -#include "../deps/glslang/glslang/SPIRV/disassemble.cpp" -#include "../deps/glslang/glslang/SPIRV/doc.cpp" -#include "../deps/glslang/glslang/SPIRV/GlslangToSpv.cpp" -#include "../deps/glslang/glslang/SPIRV/InReadableOrder.cpp" -#include "../deps/glslang/glslang/SPIRV/Logger.cpp" -#include "../deps/glslang/glslang/SPIRV/SpvBuilder.cpp" -#include "../deps/glslang/glslang/SPIRV/SPVRemapper.cpp" - -#include "../deps/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp" -#include "../deps/glslang/glslang/glslang/GenericCodeGen/Link.cpp" - -#include "../deps/glslang/glslang/OGLCompilersDLL/InitializeDll.cpp" - -#include "../deps/glslang/glslang/glslang/MachineIndependent/Constant.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/glslang_tab.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/InfoSink.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/Initialize.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/intermOut.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/IntermTraverse.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/iomapper.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/limits.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/linkValidate.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/parseConst.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/ParseContextBase.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/ParseHelper.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/PoolAlloc.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/propagateNoContraction.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/reflection.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/Versions.cpp" - -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp" -#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp" - -#include "../deps/glslang/glslang/hlsl/hlslAttributes.cpp" -#include "../deps/glslang/glslang/hlsl/hlslGrammar.cpp" -#include "../deps/glslang/glslang/hlsl/hlslOpMap.cpp" -#include "../deps/glslang/glslang/hlsl/hlslParseables.cpp" -#include "../deps/glslang/glslang/hlsl/hlslParseHelper.cpp" -#include "../deps/glslang/glslang/hlsl/hlslScanContext.cpp" -#include "../deps/glslang/glslang/hlsl/hlslTokenStream.cpp" -#ifdef _WIN32 -#include "../deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp" -#endif - -#if defined(__linux__) && !defined(ANDROID) -#include "../deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp" -#endif -#endif - /*============================================================ MENU ============================================================ */ @@ -123,6 +59,11 @@ VIDEO DRIVER #ifdef HAVE_SPIRV_CROSS #include "../deps/SPIRV-Cross/spirv_cross.cpp" #include "../deps/SPIRV-Cross/spirv_cfg.cpp" +#include "../deps/SPIRV-Cross/spirv_glsl.cpp" +#include "../deps/SPIRV-Cross/spirv_hlsl.cpp" +#if 0 +#include "../deps/SPIRV-Cross/spirv_msl.cpp" +#endif #ifdef HAVE_SLANG #include "../gfx/drivers_shader/glslang_util.cpp" #include "../gfx/drivers_shader/slang_preprocess.cpp" @@ -137,3 +78,13 @@ FONTS #if defined(_XBOX360) #include "../gfx/drivers_font/xdk360_fonts.cpp" #endif + +#ifdef WANT_GLSLANG +#ifdef _WIN32 +#include "../deps/glslang/glslang/glslang/OSDependent/Windows/ossource.cpp" +#endif + +#if defined(__linux__) && !defined(ANDROID) +#include "../deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp" +#endif +#endif diff --git a/griffin/griffin_glslang.cpp b/griffin/griffin_glslang.cpp new file mode 100644 index 0000000000..31f0a09b0f --- /dev/null +++ b/griffin/griffin_glslang.cpp @@ -0,0 +1,58 @@ + +#ifdef WANT_GLSLANG +#ifdef _MSC_VER +#include +#endif + +#include "../deps/glslang/glslang.cpp" +#include "../deps/glslang/glslang/SPIRV/disassemble.cpp" +#include "../deps/glslang/glslang/SPIRV/doc.cpp" +#include "../deps/glslang/glslang/SPIRV/GlslangToSpv.cpp" +#include "../deps/glslang/glslang/SPIRV/InReadableOrder.cpp" +#include "../deps/glslang/glslang/SPIRV/Logger.cpp" +#include "../deps/glslang/glslang/SPIRV/SpvBuilder.cpp" +#include "../deps/glslang/glslang/SPIRV/SPVRemapper.cpp" + +#include "../deps/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp" +#include "../deps/glslang/glslang/glslang/GenericCodeGen/Link.cpp" + +#include "../deps/glslang/glslang/OGLCompilersDLL/InitializeDll.cpp" + +#include "../deps/glslang/glslang/glslang/MachineIndependent/Constant.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/glslang_tab.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/InfoSink.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/Initialize.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/intermOut.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/IntermTraverse.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/iomapper.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/limits.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/linkValidate.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/parseConst.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/ParseContextBase.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/ParseHelper.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/PoolAlloc.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/propagateNoContraction.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/reflection.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/Versions.cpp" + +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp" +#include "../deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp" + +#include "../deps/glslang/glslang/hlsl/hlslAttributes.cpp" +#include "../deps/glslang/glslang/hlsl/hlslGrammar.cpp" +#include "../deps/glslang/glslang/hlsl/hlslOpMap.cpp" +#include "../deps/glslang/glslang/hlsl/hlslParseables.cpp" +#include "../deps/glslang/glslang/hlsl/hlslParseHelper.cpp" +#include "../deps/glslang/glslang/hlsl/hlslScanContext.cpp" +#include "../deps/glslang/glslang/hlsl/hlslTokenStream.cpp" +#endif diff --git a/pkg/android/phoenix/jni/Android.mk b/pkg/android/phoenix/jni/Android.mk index a0642ec2f4..866b0f5158 100644 --- a/pkg/android/phoenix/jni/Android.mk +++ b/pkg/android/phoenix/jni/Android.mk @@ -71,7 +71,7 @@ DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DAN DEFINES += -DWANT_IFADDRS ifeq ($(HAVE_VULKAN),1) -DEFINES += -DHAVE_VULKAN -DHAVE_SLANG -DHAVE_SPIRV_CROSS +DEFINES += -DHAVE_VULKAN -DHAVE_SLANG -DHAVE_SPIRV_CROSS -DWANT_GLSLANG endif DEFINES += -DHAVE_7ZIP DEFINES += -DHAVE_CHEEVOS @@ -111,53 +111,7 @@ LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/$(DEPS_DIR)/glslang \ -I$(LOCAL_PATH)/$(DEPS_DIR)/SPIRV-Cross LOCAL_CFLAGS += -Wno-sign-compare -Wno-unused-variable -Wno-parentheses -LOCAL_SRC_FILES += $(DEPS_DIR)/glslang/glslang.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/SpvBuilder.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/Logger.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/SPVRemapper.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/InReadableOrder.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/doc.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/GlslangToSpv.cpp \ - $(DEPS_DIR)/glslang/glslang/SPIRV/disassemble.cpp \ - $(DEPS_DIR)/glslang/glslang/OGLCompilersDLL/InitializeDll.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/Link.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslAttributes.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslGrammar.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslOpMap.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslTokenStream.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslScanContext.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslParseHelper.cpp \ - $(DEPS_DIR)/glslang/glslang/hlsl/hlslParseables.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/propagateNoContraction.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/glslang_tab.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Versions.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/limits.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/intermOut.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Initialize.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/parseConst.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/ParseContextBase.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/ParseHelper.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/IntermTraverse.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/iomapper.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/InfoSink.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Constant.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/Scan.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/reflection.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/linkValidate.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/PoolAlloc.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \ - $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp +LOCAL_SRC_FILES += $(RARCH_DIR)/griffin/griffin_glslang.cpp endif LOCAL_LDLIBS += -lOpenSLES -lz diff --git a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj index 581fb094fa..c95534accc 100644 --- a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj +++ b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj @@ -84,7 +84,7 @@ Level3 Disabled - WIN32;HAVE_SPIRV_CROSS;HAVE_DYLIB;HAVE_DYNAMIC;HAVE_UPDATE_ASSETS;HAVE_MENU;HAVE_SLANG;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_D3D11;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) + WIN32;WANT_GLSLANG;HAVE_DYNAMIC;HAVE_SPIRV_CROSS;HAVE_DYLIB;HAVE_DYNAMIC;HAVE_UPDATE_ASSETS;HAVE_MENU;HAVE_SLANG;HAVE_XMB;HAVE_SHADERPIPELINE;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_D3D11;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;$(SolutionDir)\..\..\deps\SPIRV-Cross;%(AdditionalIncludeDirectories) @@ -99,7 +99,7 @@ Level3 Disabled - WIN32;HAVE_SPIRV_CROSS;HAVE_MENU;HAVE_SLANG;HAVE_UPDATE_ASSETS;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) + WIN32;WANT_GLSLANG;HAVE_DYNAMIC;HAVE_SPIRV_CROSS;HAVE_MENU;HAVE_SLANG;HAVE_UPDATE_ASSETS;HAVE_XMB;HAVE_SHADERPIPELINE;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;$(SolutionDir)\..\..\deps\SPIRV-Cross;%(AdditionalIncludeDirectories) @@ -115,7 +115,7 @@ MaxSpeed true true - WIN32;HAVE_SPIRV_CROSS;HAVE_DYLIB;HAVE_DYNAMIC;HAVE_UPDATE_ASSETS;HAVE_SLANG;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D10;HAVE_D3D9;HAVE_D3D11;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_COMMAND;HAVE_NETWORK_CMD;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) + WIN32;WANT_GLSLANG;HAVE_DYNAMIC;HAVE_SPIRV_CROSS;HAVE_DYLIB;HAVE_DYNAMIC;HAVE_UPDATE_ASSETS;HAVE_SLANG;HAVE_MENU;HAVE_XMB;HAVE_SHADERPIPELINE;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D10;HAVE_D3D9;HAVE_D3D11;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_COMMAND;HAVE_NETWORK_CMD;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;$(SolutionDir)\..\..\deps\SPIRV-Cross;%(AdditionalIncludeDirectories) @@ -134,7 +134,7 @@ MaxSpeed true true - WIN32;HAVE_SPIRV_CROSS;HAVE_MENU;HAVE_SLANG;HAVE_UPDATE_ASSETS;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) + WIN32;WANT_GLSLANG;HAVE_DYNAMIC;HAVE_SPIRV_CROSS;HAVE_MENU;HAVE_SLANG;HAVE_UPDATE_ASSETS;HAVE_XMB;HAVE_SHADERPIPELINE;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions) $(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;$(SolutionDir)\..\..\deps\SPIRV-Cross;%(AdditionalIncludeDirectories) @@ -152,8 +152,9 @@ CompileAsC + - \ No newline at end of file + diff --git a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters index a6f6d9197c..6c68b0c6e9 100644 --- a/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters +++ b/pkg/msvc/msvc-2013/RetroArch-msvc2013.vcxproj.filters @@ -21,5 +21,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj b/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj index 20411f8586..c30105e5c0 100644 --- a/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj +++ b/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj @@ -190,8 +190,8 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp Fast @@ -209,8 +209,8 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp Fast @@ -229,8 +229,8 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp Fast @@ -248,8 +248,8 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp Fast @@ -270,8 +270,8 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp Fast @@ -294,8 +294,8 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp Fast @@ -319,8 +319,8 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp Fast @@ -343,8 +343,8 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT - $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_UPDATE_ASSETS;HAVE_SLANG;WANT_GLSLANG;HAVE_VULKAN;HAVE_SPIRV_CROSS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\gfx\include\dxsdk;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp Fast @@ -371,8 +371,9 @@ CompileAsC + - + \ No newline at end of file diff --git a/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj.filters b/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj.filters index 5455441332..cbf777b405 100644 --- a/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj.filters +++ b/pkg/msvc/msvc-2015/RetroArch-msvc2015.vcxproj.filters @@ -15,5 +15,8 @@ griffin + + griffin + - + \ No newline at end of file diff --git a/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj b/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj index adfbdfd729..ed090f4aa3 100644 --- a/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj +++ b/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj @@ -191,7 +191,7 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp @@ -210,7 +210,7 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp @@ -230,7 +230,7 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp @@ -249,7 +249,7 @@ Level3 Disabled - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_FBO;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp @@ -271,7 +271,7 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp @@ -295,7 +295,7 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_MENU;HAVE_RGUI;HAVE_GL_SYNC;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp @@ -320,7 +320,7 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp @@ -344,7 +344,7 @@ MaxSpeed true true - WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT + WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_SPIRV_CROSS;HAVE_UPDATE_ASSETS;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;HAVE_CG;HAVE_GLSL;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_SHADERPIPELINE;WANT_ZLIB;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;WANT_ZLIB;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(CG_INC_PATH);$(MSBuildProjectDirectory)\..\..\..\deps\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp @@ -376,6 +376,7 @@ CompileAsC + diff --git a/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj.filters b/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj.filters index 0b7f0bbd44..cbf777b405 100644 --- a/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj.filters +++ b/pkg/msvc/msvc-2017/RetroArch-msvc2017.vcxproj.filters @@ -1,19 +1,22 @@ - - - - - - - - {9fc175c7-a869-47cf-a0ce-5447d6015ce9} - - - - - griffin - - - griffin - - - + + + + + + + + {9fc175c7-a869-47cf-a0ce-5447d6015ce9} + + + + + griffin + + + griffin + + + griffin + + + \ No newline at end of file