gpu: simplify callback context types

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-31 16:01:40 -07:00 committed by Stephen Gutekanst
parent 48c8964679
commit 4ed932be0f
6 changed files with 33 additions and 33 deletions

View file

@ -23,14 +23,14 @@ pub const ShaderModule = opaque {
pub inline fn getCompilationInfo(
shader_module: *ShaderModule,
comptime Context: type,
context: anytype,
comptime callback: fn (
status: CompilationInfoRequestStatus,
compilation_info: *const CompilationInfo,
ctx: Context,
ctx: @TypeOf(context),
) callconv(.Inline) void,
context: Context,
) void {
const Context = @TypeOf(context);
const Helper = struct {
pub fn callback(
status: CompilationInfoRequestStatus,