spirv: self-referential pointers via new fwd_ptr_type

Its a little ugly but it works.
This commit is contained in:
Robin Voetter
2023-10-21 17:26:59 +02:00
parent 6e955af8c8
commit 6281ad91df
20 changed files with 226 additions and 174 deletions

View File

@@ -391,7 +391,6 @@ test "return 0 from function that has u0 return type" {
test "statically initialized struct" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
st_init_str_foo.x += 1;
try expect(st_init_str_foo.x == 14);
@@ -498,7 +497,6 @@ test "comptime shlWithOverflow" {
test "const ptr to variable data changes at runtime" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
try expect(foo_ref.name[0] == 'a');
foo_ref.name = "b";
@@ -1551,8 +1549,6 @@ test "comptime function turns function value to function pointer" {
}
test "container level const and var have unique addresses" {
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
const S = struct {
x: i32,
y: i32,