-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
spirv: OpenCL printf support #24321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spirv: OpenCL printf support #24321
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
I suggest you to not integrate it with |
This comment was marked as outdated.
This comment was marked as outdated.
.OpTypeArray => blk: { | ||
// TODO: The length of an OpTypeArray is determined by a constant (which may be a spec constant), | ||
// and so some consideration must be taken when entering this in the type system. | ||
return self.todo("process OpTypeArray", .{}); | ||
const element_type = try self.resolveRefId(operands[1].ref_id); | ||
const length = try self.resolveRefId(operands[2].ref_id); | ||
const result_id = self.spv.allocId(); | ||
try section.emit(self.spv.gpa, .OpTypeArray, .{ | ||
.id_result = result_id, | ||
.element_type = element_type, | ||
.length = length, | ||
}); | ||
break :blk result_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unrelated change to the PR - I hoped to make better "string constants with c constraint" testing in tests/behavior/asm.zig. It does work though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I drop this commit since I am not trusted and no single test cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah it looks correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few nitpicks that i can fix myself but otherwise LGTM. Hopefully we can switch to an std.format
version later
This comment was marked as outdated.
This comment was marked as outdated.
Rebased. |
Cannot test with recent changes. Tracking:
|
I want to have
std.debug.printf()
implemented for GPGPU, because it lowers entry point for newcomers, and this feature allows to catch bugs faster (like I had withsigned_integer - 0
).To test this PR you need to clone zig-spirv-test-executor in root dir and run:
Better to review per commit.