diff --git a/lib/webgpu/gpu.cpp b/lib/webgpu/gpu.cpp index d42a2eb..f67e98d 100644 --- a/lib/webgpu/gpu.cpp +++ b/lib/webgpu/gpu.cpp @@ -113,6 +113,9 @@ TextureWithSampler create_render_texture(uint32_t width, uint32_t height, bool m if (multisampled) { sampleCount = g_graphicsConfig.msaaSamples; } + if (width == 0 || height == 0) { + Log.fatal("Invalid render texture size! {}x{}, multisampled {}, format {}", width, height, static_cast(format), multisampled); + } const wgpu::TextureDescriptor textureDescriptor{ .label = "Render texture", .usage = wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::CopySrc |