-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
SET KERNEL only copies the first byte of the kernel argument to the buffer. Reproducer script:
kernel void foo(global int* out, int value) {
*out = value;
}
END
BUFFER out_buf DATA_TYPE uint32 DATA 0 END
PIPELINE compute p1
ATTACH my_shader ENTRY_POINT foo
BIND BUFFER out_buf KERNEL ARG_NAME out
SET KERNEL ARG_NAME value AS int32 300
END
RUN p1 1 1 1
EXPECT out_buf IDX 0 EQ 300Running this yields:
Line 32: Verifier failed: 44 == 300, at index 0
(44 is 300-256)
I believe this is because the buffer is created as R8_UINT, and the Buffer::SetDataWithOffset(Value) method uses the format to determine how many bytes to copy to the buffer, not the size of the values passed to it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels