Skip to content

Commit 1c7a558

Browse files
Merge pull request #2533 from DiligentGraphics/diligent-sdk-1.4.321
Add source language to parsed IR source data
2 parents 2ea5d37 + c5f8ea1 commit 1c7a558

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spirv_cross_parsed_ir.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class ParsedIR
111111

112112
struct Source
113113
{
114+
spv::SourceLanguage lang = spv::SourceLanguageUnknown;
114115
uint32_t version = 0;
115116
bool es = false;
116117
bool known = false;

spirv_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ void Parser::parse(const Instruction &instruction)
213213

214214
case OpSource:
215215
{
216-
auto lang = static_cast<SourceLanguage>(ops[0]);
217-
switch (lang)
216+
ir.source.lang = static_cast<SourceLanguage>(ops[0]);
217+
switch (ir.source.lang)
218218
{
219219
case SourceLanguageESSL:
220220
ir.source.es = true;

0 commit comments

Comments
 (0)