mirror of
https://github.com/yuzu-emu/sirit
synced 2024-11-22 15:03:52 +00:00
Fixup tests
This commit is contained in:
parent
174263d906
commit
fe67a427ff
1 changed files with 6 additions and 5 deletions
|
@ -45,19 +45,20 @@ public:
|
||||||
const auto main_func = Emit(Name(OpFunction(t_void, spv::FunctionControlMask::MaskNone, OpTypeFunction(t_void)), "main"));
|
const auto main_func = Emit(Name(OpFunction(t_void, spv::FunctionControlMask::MaskNone, OpTypeFunction(t_void)), "main"));
|
||||||
Emit(OpLabel());
|
Emit(OpLabel());
|
||||||
|
|
||||||
const auto ptr_pos_x = Emit(OpAccessChain(in_float, in_pos, {OpConstant(t_uint, 0u)}));
|
const auto ptr_pos_x = Emit(OpAccessChain(in_float, in_pos, {Constant(t_uint, 0u)}));
|
||||||
const auto ptr_pos_y = Emit(OpAccessChain(in_float, in_pos, {OpConstant(t_uint, 1u)}));
|
const auto ptr_pos_y = Emit(OpAccessChain(in_float, in_pos, {Constant(t_uint, 1u)}));
|
||||||
|
|
||||||
const auto pos_x = Emit(OpLoad(t_float, ptr_pos_x));
|
const auto pos_x = Emit(OpLoad(t_float, ptr_pos_x));
|
||||||
const auto pos_y = Emit(OpLoad(t_float, ptr_pos_y));
|
const auto pos_y = Emit(OpLoad(t_float, ptr_pos_y));
|
||||||
|
|
||||||
auto tmp_position = Emit(OpUndef(float4));
|
auto tmp_position = Emit(OpUndef(float4));
|
||||||
|
Decorate(tmp_position, spv::Decoration::FPRoundingMode, {static_cast<u32>(spv::FPRoundingMode::RTE)});
|
||||||
tmp_position = Emit(OpCompositeInsert(float4, pos_x, tmp_position, {0}));
|
tmp_position = Emit(OpCompositeInsert(float4, pos_x, tmp_position, {0}));
|
||||||
tmp_position = Emit(OpCompositeInsert(float4, pos_y, tmp_position, {1}));
|
tmp_position = Emit(OpCompositeInsert(float4, pos_y, tmp_position, {1}));
|
||||||
tmp_position = Emit(OpCompositeInsert(float4, OpConstant(t_float, 0.f), tmp_position, {2}));
|
tmp_position = Emit(OpCompositeInsert(float4, Constant(t_float, 0.f), tmp_position, {2}));
|
||||||
tmp_position = Emit(OpCompositeInsert(float4, OpConstant(t_float, 1.f), tmp_position, {3}));
|
tmp_position = Emit(OpCompositeInsert(float4, Constant(t_float, 1.f), tmp_position, {3}));
|
||||||
|
|
||||||
const auto gl_position = Emit(OpAccessChain(out_float4, per_vertex, {OpConstant(t_uint, 0u)}));
|
const auto gl_position = Emit(OpAccessChain(out_float4, per_vertex, {Constant(t_uint, 0u)}));
|
||||||
Emit(OpStore(gl_position, tmp_position));
|
Emit(OpStore(gl_position, tmp_position));
|
||||||
|
|
||||||
Emit(OpReturn());
|
Emit(OpReturn());
|
||||||
|
|
Loading…
Reference in a new issue