Handle FPRoundingMode decoration.
Doesn't do anything, but we can parse it correctly for now.
This commit is contained in:
parent
169607cd28
commit
6e5df7a7dd
@ -1336,6 +1336,7 @@ struct Meta
|
||||
uint32_t input_attachment = 0;
|
||||
uint32_t spec_id = 0;
|
||||
uint32_t index = 0;
|
||||
spv::FPRoundingMode fp_rounding_mode = spv::FPRoundingModeMax;
|
||||
bool builtin = false;
|
||||
};
|
||||
|
||||
|
@ -184,6 +184,10 @@ void ParsedIR::set_decoration(uint32_t id, Decoration decoration, uint32_t argum
|
||||
meta[argument].hlsl_is_magic_counter_buffer = true;
|
||||
break;
|
||||
|
||||
case DecorationFPRoundingMode:
|
||||
dec.fp_rounding_mode = static_cast<FPRoundingMode>(argument);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -329,6 +333,8 @@ uint32_t ParsedIR::get_decoration(uint32_t id, Decoration decoration) const
|
||||
return dec.matrix_stride;
|
||||
case DecorationIndex:
|
||||
return dec.index;
|
||||
case DecorationFPRoundingMode:
|
||||
return dec.fp_rounding_mode;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
@ -394,6 +400,10 @@ void ParsedIR::unset_decoration(uint32_t id, Decoration decoration)
|
||||
dec.hlsl_semantic.clear();
|
||||
break;
|
||||
|
||||
case DecorationFPRoundingMode:
|
||||
dec.fp_rounding_mode = FPRoundingModeMax;
|
||||
break;
|
||||
|
||||
case DecorationHlslCounterBufferGOOGLE:
|
||||
{
|
||||
auto &counter = meta[id].hlsl_magic_counter_buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user