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