mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 19:50:05 +00:00
treat google user type as normal semantic google. It's a backport from diligent fork (#4632)
This commit is contained in:
parent
b9e255b366
commit
6926c3d9a3
@ -33,7 +33,8 @@ Pass::Status StripReflectInfoPass::Process() {
|
||||
for (auto& inst : context()->module()->annotations()) {
|
||||
switch (inst.opcode()) {
|
||||
case SpvOpDecorateStringGOOGLE:
|
||||
if (inst.GetSingleWordInOperand(1) == SpvDecorationHlslSemanticGOOGLE) {
|
||||
if (inst.GetSingleWordInOperand(1) == SpvDecorationHlslSemanticGOOGLE ||
|
||||
inst.GetSingleWordInOperand(1) == SpvDecorationUserTypeGOOGLE) {
|
||||
to_remove.push_back(&inst);
|
||||
} else {
|
||||
other_uses_for_decorate_string = true;
|
||||
@ -41,7 +42,8 @@ Pass::Status StripReflectInfoPass::Process() {
|
||||
break;
|
||||
|
||||
case SpvOpMemberDecorateStringGOOGLE:
|
||||
if (inst.GetSingleWordInOperand(2) == SpvDecorationHlslSemanticGOOGLE) {
|
||||
if (inst.GetSingleWordInOperand(2) == SpvDecorationHlslSemanticGOOGLE ||
|
||||
inst.GetSingleWordInOperand(2) == SpvDecorationUserTypeGOOGLE) {
|
||||
to_remove.push_back(&inst);
|
||||
} else {
|
||||
other_uses_for_decorate_string = true;
|
||||
@ -64,6 +66,8 @@ Pass::Status StripReflectInfoPass::Process() {
|
||||
const std::string ext_name = inst.GetInOperand(0).AsString();
|
||||
if (ext_name == "SPV_GOOGLE_hlsl_functionality1") {
|
||||
to_remove.push_back(&inst);
|
||||
} else if (0 == std::strcmp(ext_name, "SPV_GOOGLE_user_type")) {
|
||||
to_remove.push_back(&inst);
|
||||
} else if (!other_uses_for_decorate_string &&
|
||||
ext_name == "SPV_GOOGLE_decorate_string") {
|
||||
to_remove.push_back(&inst);
|
||||
|
Loading…
Reference in New Issue
Block a user