Fixup tests

This commit is contained in:
ReinUsesLisp 2018-11-16 03:50:21 -03:00
parent 174263d906
commit fe67a427ff

View file

@ -45,19 +45,20 @@ public:
const auto main_func = Emit(Name(OpFunction(t_void, spv::FunctionControlMask::MaskNone, OpTypeFunction(t_void)), "main"));
Emit(OpLabel());
const auto ptr_pos_x = Emit(OpAccessChain(in_float, in_pos, {OpConstant(t_uint, 0u)}));
const auto ptr_pos_y = Emit(OpAccessChain(in_float, in_pos, {OpConstant(t_uint, 1u)}));
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, {Constant(t_uint, 1u)}));
const auto pos_x = Emit(OpLoad(t_float, ptr_pos_x));
const auto pos_y = Emit(OpLoad(t_float, ptr_pos_y));
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_y, tmp_position, {1}));
tmp_position = Emit(OpCompositeInsert(float4, OpConstant(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, 0.f), tmp_position, {2}));
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(OpReturn());