gpu: enable slice helpers to take arrays
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3104083143
commit
c09b587db9
2 changed files with 6 additions and 3 deletions
|
|
@ -86,8 +86,9 @@ pub const CommandEncoder = opaque {
|
||||||
command_encoder: *CommandEncoder,
|
command_encoder: *CommandEncoder,
|
||||||
buffer: *Buffer,
|
buffer: *Buffer,
|
||||||
buffer_offset_bytes: u64,
|
buffer_offset_bytes: u64,
|
||||||
data_slice: anytype,
|
data_span: anytype,
|
||||||
) void {
|
) void {
|
||||||
|
const data_slice = std.mem.span(data_span);
|
||||||
Impl.commandEncoderWriteBuffer(
|
Impl.commandEncoderWriteBuffer(
|
||||||
command_encoder,
|
command_encoder,
|
||||||
buffer,
|
buffer,
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,9 @@ pub const Queue = opaque {
|
||||||
queue: *Queue,
|
queue: *Queue,
|
||||||
buffer: *Buffer,
|
buffer: *Buffer,
|
||||||
buffer_offset_bytes: u64,
|
buffer_offset_bytes: u64,
|
||||||
data_slice: anytype,
|
data_span: anytype,
|
||||||
) void {
|
) void {
|
||||||
|
const data_slice = std.mem.span(data_span);
|
||||||
Impl.queueWriteBuffer(
|
Impl.queueWriteBuffer(
|
||||||
queue,
|
queue,
|
||||||
buffer,
|
buffer,
|
||||||
|
|
@ -74,8 +75,9 @@ pub const Queue = opaque {
|
||||||
destination: *const ImageCopyTexture,
|
destination: *const ImageCopyTexture,
|
||||||
data_layout: *const Texture.DataLayout,
|
data_layout: *const Texture.DataLayout,
|
||||||
write_size: *const Extent3D,
|
write_size: *const Extent3D,
|
||||||
data_slice: anytype,
|
data_span: anytype,
|
||||||
) void {
|
) void {
|
||||||
|
const data_slice = std.mem.span(data_span);
|
||||||
Impl.queueWriteTexture(
|
Impl.queueWriteTexture(
|
||||||
queue,
|
queue,
|
||||||
destination,
|
destination,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue