Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/test_mesh_serial_waves.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,14 @@ def test_serial_mesh_compute_module(make_shader, name):
assert "OpLoad %v4float %ms_pos\n" not in main[loop_end:] # no write from the last pass's own variables
offset = re.search(r"%mli_w1 = OpIAdd %uint %msw_erl (%\w+)", main).group(1)
assert re.search(rf"^\s*{re.escape(offset)} = OpConstant %uint 64$", spvasm, re.M)
# As many slot stores per pass as the module without passes has in all.
# As many slot stores per pass as the module without passes has in all (an OpBitcast of the address pair
# since lower_addr64, OpConvertUToPtr with --int64-addresses).
_, plain, _ = _translate(make_shader, name, False, compute=True)
plain_main = plain[plain.index("%main = OpFunction"):]
stores = len(re.findall(r"%mp\d+ = OpConvertUToPtr %_ptr_PSB_uint", plain_main)) # the slot's
stores = len(re.findall(r"%mp\d+ = Op(?:ConvertUToPtr|Bitcast) %_ptr_PSB_uint", plain_main)) # the slot's
assert stores
for w in (0, 1):
assert len(re.findall(rf"%mp\d+_w{w} = OpConvertUToPtr %_ptr_PSB_uint", main)) == stores
assert len(re.findall(rf"%mp\d+_w{w} = Op(?:ConvertUToPtr|Bitcast) %_ptr_PSB_uint", main)) == stores


@requires_tools
Expand Down
Loading