Silicate crashes on files with many layers
Very cool project! I'm trying to use your compositor to automate exports of layer groups for my weird workflow, and finding that it crashes for the largest of my files (~1GB, 102 layers at 2732 x 2048px each) with the following error:
[src\compositor\dev.rs:52] adapter.get_info() = AdapterInfo {
name: "AMD Radeon RX 6800 XT",
vendor: 4098,
device: 29631,
device_type: DiscreteGpu,
driver: "AMD proprietary driver",
driver_info: "23.5.2 (AMD proprietary shader compiler)",
backend: Vulkan,
}
[src\compositor\dev.rs:53] adapter.limits() = Limits {
max_texture_dimension_1d: 16384,
max_texture_dimension_2d: 16384,
max_texture_dimension_3d: 8192,
max_texture_array_layers: 8192,
max_bind_groups: 8,
max_bindings_per_bind_group: 640,
max_dynamic_uniform_buffers_per_pipeline_layout: 8,
max_dynamic_storage_buffers_per_pipeline_layout: 8,
max_sampled_textures_per_shader_stage: 4294967295,
max_samplers_per_shader_stage: 4294967295,
max_storage_buffers_per_shader_stage: 4294967295,
max_storage_textures_per_shader_stage: 4294967295,
max_uniform_buffers_per_shader_stage: 4294967295,
max_uniform_buffer_binding_size: 2147483648,
max_storage_buffer_binding_size: 2147483648,
max_vertex_buffers: 16,
max_buffer_size: 18446744073709551615,
max_vertex_attributes: 64,
max_vertex_buffer_array_stride: 16383,
min_uniform_buffer_offset_alignment: 32,
min_storage_buffer_offset_alignment: 32,
max_inter_stage_shader_components: 128,
max_compute_workgroup_storage_size: 32768,
max_compute_invocations_per_workgroup: 1024,
max_compute_workgroup_size_x: 1024,
max_compute_workgroup_size_y: 1024,
max_compute_workgroup_size_z: 1024,
max_compute_workgroups_per_dimension: 65535,
max_push_constant_size: 128,
}
thread 'tokio-runtime-worker' panicked at 'wgpu error: Validation Error
Caused by:
In Device::create_texture
Not enough memory left
', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
stack backtrace:
0: 0x7ff772d93bc1 - <unknown>
1: 0x7ff772baf46b - <unknown>
2: 0x7ff772d87639 - <unknown>
3: 0x7ff772d95acb - <unknown>
4: 0x7ff772d95899 - <unknown>
5: 0x7ff772d9657b - <unknown>
6: 0x7ff772d96025 - <unknown>
7: 0x7ff772d95f79 - <unknown>
8: 0x7ff772d95f64 - <unknown>
9: 0x7ff77300b735 - <unknown>
10: 0x7ff772dcbcec - <unknown>
11: 0x7ff772dfd2de - <unknown>
12: 0x7ff772e3c342 - <unknown>
13: 0x7ff772ed6e29 - <unknown>
14: 0x7ff772f4490d - <unknown>
15: 0x7ff772b7086a - <unknown>
16: 0x7ff772b23a40 - <unknown>
17: 0x7ff772da0797 - <unknown>
18: 0x7ff772da054d - <unknown>
19: 0x7ff772d9333b - <unknown>
20: 0x7ffa755f7614 - BaseThreadInitThunk
21: 0x7ffa76ea26b1 - RtlUserThreadStart
I'm running the exe from the latest master build for windows with RUST_BACKTRACE=full. It sounds like the canvas data is being loaded into vmem and the representation used is punching through the available memory. Am new to rust but happy to dig into it if you've got pointers where to start.
The crash can be reproduced with any procreate file that has many layers, even an otherwise empty one. I've attached one, just rename the extension back to .procreate.
I'll check it out sometime, thanks for the details!
@wilywyrm It doesn't crash on my system. Can I know what kind of GPU you are using?
Every layer is currently loaded into GPU memory at the moment, so if you don't have enough GPU memory it will crash.
I'm running a RX 6800 XT which has 16GB mem, so it was surprising to see an error about running out of vram. I can try it again on my machine when I get back next week if you'd like.
Try with the latest master version if you can.
Just tried the binary from this build with the test_layers file I mentioned, and it still crashes with the earlier error.
thread 'tokio-runtime-worker' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\backend\direct.rs:3111:5:
wgpu error: Validation Error
Caused by:
In Device::create_texture
Not enough memory left.