gpu: make ShaderModule an enum with methods

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:23:33 -07:00 committed by Stephen Gutekanst
parent 40306320f6
commit 4413860d92
3 changed files with 7 additions and 3 deletions

View file

@ -1 +0,0 @@
ptr: *anyopaque,

View file

@ -28,7 +28,7 @@ pub const RenderBundleEncoder = @import("render_bundle_encoder.zig").RenderBundl
pub const RenderPassEncoder = @import("render_pass_encoder.zig").RenderPassEncoder;
pub const RenderPipeline = @import("render_pipeline.zig").RenderPipeline;
pub const Sampler = @import("sampler.zig").Sampler;
pub const ShaderModule = @import("ShaderModule.zig");
pub const ShaderModule = @import("shader_module.zig").ShaderModule;
pub const Surface = @import("Surface.zig");
pub const SwapChain = @import("SwapChain.zig");
pub const Texture = @import("Texture.zig");
@ -56,7 +56,7 @@ test {
refAllDecls(@import("render_pass_encoder.zig"));
refAllDecls(@import("render_pipeline.zig"));
refAllDecls(@import("sampler.zig"));
refAllDecls(@import("ShaderModule.zig"));
refAllDecls(@import("shader_module.zig"));
refAllDecls(@import("Surface.zig"));
refAllDecls(@import("SwapChain.zig"));
refAllDecls(@import("Texture.zig"));

View file

@ -0,0 +1,5 @@
pub const ShaderModule = enum(usize) {
_,
pub const none: ShaderModule = @intToEnum(ShaderModule, 0);
};