Merge pull request #406 from steve-lunarg/pp_line
HLSL: enable #line extension by default for HLSL source.
This commit is contained in:
commit
64723c20b5
6 changed files with 160 additions and 2 deletions
|
|
@ -88,6 +88,14 @@ HlslParseContext::~HlslParseContext()
|
|||
{
|
||||
}
|
||||
|
||||
void HlslParseContext::initializeExtensionBehavior()
|
||||
{
|
||||
TParseContextBase::initializeExtensionBehavior();
|
||||
|
||||
// HLSL allows #line by default.
|
||||
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhEnable;
|
||||
}
|
||||
|
||||
void HlslParseContext::setLimits(const TBuiltInResource& r)
|
||||
{
|
||||
resources = r;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ public:
|
|||
int version, EProfile, const SpvVersion& spvVersion, EShLanguage, TInfoSink&,
|
||||
bool forwardCompatible = false, EShMessages messages = EShMsgDefault);
|
||||
virtual ~HlslParseContext();
|
||||
void initializeExtensionBehavior();
|
||||
|
||||
void setLimits(const TBuiltInResource&);
|
||||
bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false);
|
||||
void getPreamble(std::string&);
|
||||
|
|
@ -182,7 +184,6 @@ protected:
|
|||
HlslParseContext(HlslParseContext&);
|
||||
HlslParseContext& operator=(HlslParseContext&);
|
||||
|
||||
TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is set to
|
||||
static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2)); // see computeSamplerTypeIndex()
|
||||
bool afterEOF;
|
||||
TQualifier globalBufferDefaults;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue