From fe67a427fff65acd4f3d7926ed2f35d6a710b579 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 16 Nov 2018 03:50:21 -0300 Subject: [PATCH] Fixup tests --- tests/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/main.cpp b/tests/main.cpp index 29c91f1..f8dce0f 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -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(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());