Skip to content
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

[SPIR-V][OpenCL] Type mismatch on OpStore instruction #72864

Closed
linehill opened this issue Nov 20, 2023 · 1 comment · Fixed by #78603
Closed

[SPIR-V][OpenCL] Type mismatch on OpStore instruction #72864

linehill opened this issue Nov 20, 2023 · 1 comment · Fixed by #78603
Assignees

Comments

@linehill
Copy link
Contributor

The following snippet:

kernel void k(global ulong *dst) {
  dst[0] = 123;
  dst[1] = 321;
  dst[2] = 1111;
}

Fails to validate:

$ clang -target spirv64v1.2 -O0 -fintegrated-objemitter store-issue.cl -c -o - | spirv-val -
error: line 31: OpStore Pointer <id> '17[%dst_addr]'s type does not match Object <id> '15[%dst]'s type.
  OpStore %dst_addr %dst Aligned 8

@karolherbst
Copy link

Could somebody look into this? We are considering moving to the llvm spirv target inside mesa and it's one of the major blockers as it's hit by almost every kernel.

@michalpaszkowski michalpaszkowski self-assigned this Jan 15, 2024
michalpaszkowski added a commit that referenced this issue Jan 29, 2024
…nd (#78603)

Handle a special case when StoreInst's value operand is a kernel
argument of a pointer type. Since these arguments could have either a
basic element type (e.g. float*) or OpenCL builtin type (sampler_t),
bitcast the StoreInst's value operand to default pointer element type
(i8).

This pull request addresses the issue
#72864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants