Merge pull request #805 from KhronosGroup/fix-786
Handle FPRoundingMode decoration.
This commit is contained in:
Коммит
9f0a38f191
|
@ -1351,6 +1351,7 @@ struct Meta
|
||||||
uint32_t input_attachment = 0;
|
uint32_t input_attachment = 0;
|
||||||
uint32_t spec_id = 0;
|
uint32_t spec_id = 0;
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
|
spv::FPRoundingMode fp_rounding_mode = spv::FPRoundingModeMax;
|
||||||
bool builtin = false;
|
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;
|
meta[argument].hlsl_is_magic_counter_buffer = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DecorationFPRoundingMode:
|
||||||
|
dec.fp_rounding_mode = static_cast<FPRoundingMode>(argument);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -329,6 +333,8 @@ uint32_t ParsedIR::get_decoration(uint32_t id, Decoration decoration) const
|
||||||
return dec.matrix_stride;
|
return dec.matrix_stride;
|
||||||
case DecorationIndex:
|
case DecorationIndex:
|
||||||
return dec.index;
|
return dec.index;
|
||||||
|
case DecorationFPRoundingMode:
|
||||||
|
return dec.fp_rounding_mode;
|
||||||
default:
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -394,6 +400,10 @@ void ParsedIR::unset_decoration(uint32_t id, Decoration decoration)
|
||||||
dec.hlsl_semantic.clear();
|
dec.hlsl_semantic.clear();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DecorationFPRoundingMode:
|
||||||
|
dec.fp_rounding_mode = FPRoundingModeMax;
|
||||||
|
break;
|
||||||
|
|
||||||
case DecorationHlslCounterBufferGOOGLE:
|
case DecorationHlslCounterBufferGOOGLE:
|
||||||
{
|
{
|
||||||
auto &counter = meta[id].hlsl_magic_counter_buffer;
|
auto &counter = meta[id].hlsl_magic_counter_buffer;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче