aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorReinUsesLisp <[email protected]>2018-11-16 03:50:21 -0300
committerReinUsesLisp <[email protected]>2018-11-16 03:50:21 -0300
commitfe67a427fff65acd4f3d7926ed2f35d6a710b579 (patch)
treecc00e385323709dde8044ad3e5221f691a4e242e /tests
parent174263d90652f3081618749799662aea9f7bf304 (diff)
downloadsirit-fe67a427fff65acd4f3d7926ed2f35d6a710b579.tar.gz
sirit-fe67a427fff65acd4f3d7926ed2f35d6a710b579.zip
Fixup tests
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp11
1 files 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<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());