gpu: use ShaderModule.release in example

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-08 22:42:37 -07:00 committed by Stephen Gutekanst
parent 19277b7282
commit 53435cd134

View file

@ -133,8 +133,8 @@ pub fn main() !void {
const pipeline = c.wgpuDeviceCreateRenderPipeline(@ptrCast(c.WGPUDevice, setup.device.ptr), &pipeline_descriptor); const pipeline = c.wgpuDeviceCreateRenderPipeline(@ptrCast(c.WGPUDevice, setup.device.ptr), &pipeline_descriptor);
c.wgpuShaderModuleRelease(@ptrCast(c.WGPUShaderModule, vs_module.ptr)); vs_module.release();
c.wgpuShaderModuleRelease(@ptrCast(c.WGPUShaderModule, fs_module.ptr)); fs_module.release();
// Reconfigure the swap chain with the new framebuffer width/height, otherwise e.g. the Vulkan // Reconfigure the swap chain with the new framebuffer width/height, otherwise e.g. the Vulkan
// device would be lost after a resize. // device would be lost after a resize.