mirror of
https://github.com/encounter/aurora.git
synced 2026-07-09 18:19:33 -07:00
Guard create_render_texture (#184)
Getting a *lot* of crashes in Sentry that seem to be this function allocating invalid render textures? So let's add a guard so we maybe can catch it in the act.
This commit is contained in:
committed by
GitHub
parent
a41a0fb310
commit
59240bf387
@@ -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<uint32_t>(format), multisampled);
|
||||
}
|
||||
const wgpu::TextureDescriptor textureDescriptor{
|
||||
.label = "Render texture",
|
||||
.usage = wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::CopySrc |
|
||||
|
||||
Reference in New Issue
Block a user