gpu: implement CommandEncoder.injectValidationError
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
5cf71dae3d
commit
6cd03e5a0a
2 changed files with 11 additions and 2 deletions
|
|
@ -25,8 +25,7 @@ pub const VTable = struct {
|
||||||
copyTextureToBuffer: fn (ptr: *anyopaque, source: *const ImageCopyTexture, destination: *const ImageCopyBuffer, copy_size: *const Extent3D) void,
|
copyTextureToBuffer: fn (ptr: *anyopaque, source: *const ImageCopyTexture, destination: *const ImageCopyBuffer, copy_size: *const Extent3D) void,
|
||||||
copyTextureToTexture: fn (ptr: *anyopaque, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void,
|
copyTextureToTexture: fn (ptr: *anyopaque, source: *const ImageCopyTexture, destination: *const ImageCopyTexture, copy_size: *const Extent3D) void,
|
||||||
finish: fn (ptr: *anyopaque, descriptor: ?*const CommandBuffer.Descriptor) CommandBuffer,
|
finish: fn (ptr: *anyopaque, descriptor: ?*const CommandBuffer.Descriptor) CommandBuffer,
|
||||||
// injectValidationError: fn (ptr: *anyopaque, message: [*:0]const u8) void,
|
injectValidationError: fn (ptr: *anyopaque, message: [*:0]const u8) void,
|
||||||
// WGPU_EXPORT void wgpuCommandEncoderInjectValidationError(WGPUCommandEncoder commandEncoder, char const * message);
|
|
||||||
insertDebugMarker: fn (ptr: *anyopaque, marker_label: [*:0]const u8) void,
|
insertDebugMarker: fn (ptr: *anyopaque, marker_label: [*:0]const u8) void,
|
||||||
popDebugGroup: fn (ptr: *anyopaque) void,
|
popDebugGroup: fn (ptr: *anyopaque) void,
|
||||||
pushDebugGroup: fn (ptr: *anyopaque, group_label: [*:0]const u8) void,
|
pushDebugGroup: fn (ptr: *anyopaque, group_label: [*:0]const u8) void,
|
||||||
|
|
@ -100,6 +99,10 @@ pub inline fn finish(enc: CommandEncoder, descriptor: ?*const CommandBuffer.Desc
|
||||||
return enc.vtable.finish(enc.ptr, descriptor);
|
return enc.vtable.finish(enc.ptr, descriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub inline fn injectValidationError(enc: CommandEncoder, message: [*:0]const u8) void {
|
||||||
|
enc.vtable.injectValidationError(enc.ptr, message);
|
||||||
|
}
|
||||||
|
|
||||||
pub inline fn insertDebugMarker(enc: CommandEncoder, marker_label: [*:0]const u8) void {
|
pub inline fn insertDebugMarker(enc: CommandEncoder, marker_label: [*:0]const u8) void {
|
||||||
enc.vtable.insertDebugMarker(enc.ptr, marker_label);
|
enc.vtable.insertDebugMarker(enc.ptr, marker_label);
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +139,7 @@ test {
|
||||||
_ = copyTextureToBuffer;
|
_ = copyTextureToBuffer;
|
||||||
_ = copyTextureToTexture;
|
_ = copyTextureToTexture;
|
||||||
_ = finish;
|
_ = finish;
|
||||||
|
_ = injectValidationError;
|
||||||
_ = insertDebugMarker;
|
_ = insertDebugMarker;
|
||||||
_ = popDebugGroup;
|
_ = popDebugGroup;
|
||||||
_ = pushDebugGroup;
|
_ = pushDebugGroup;
|
||||||
|
|
|
||||||
|
|
@ -1498,6 +1498,11 @@ const command_encoder_vtable = CommandEncoder.VTable{
|
||||||
return wrapCommandBuffer(c.wgpuCommandEncoderFinish(@ptrCast(c.WGPUCommandEncoder, ptr), desc));
|
return wrapCommandBuffer(c.wgpuCommandEncoderFinish(@ptrCast(c.WGPUCommandEncoder, ptr), desc));
|
||||||
}
|
}
|
||||||
}).finish,
|
}).finish,
|
||||||
|
.injectValidationError = (struct {
|
||||||
|
pub fn injectValidationError(ptr: *anyopaque, message: [*:0]const u8) void {
|
||||||
|
c.wgpuCommandEncoderInjectValidationError(@ptrCast(c.WGPUCommandEncoder, ptr), message);
|
||||||
|
}
|
||||||
|
}).injectValidationError,
|
||||||
.insertDebugMarker = (struct {
|
.insertDebugMarker = (struct {
|
||||||
pub fn insertDebugMarker(ptr: *anyopaque, marker_label: [*:0]const u8) void {
|
pub fn insertDebugMarker(ptr: *anyopaque, marker_label: [*:0]const u8) void {
|
||||||
c.wgpuCommandEncoderInsertDebugMarker(@ptrCast(c.WGPUCommandEncoder, ptr), marker_label);
|
c.wgpuCommandEncoderInsertDebugMarker(@ptrCast(c.WGPUCommandEncoder, ptr), marker_label);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue