Bug 1882044 - Add some context to a few crashes. r=gfx-reviewers,aosmond

Differential Revision: https://phabricator.services.mozilla.com/D202708
This commit is contained in:
Nicolas Silva 2024-02-28 15:01:04 +00:00
parent 232508c0f4
commit 9a5200723e
3 changed files with 6 additions and 3 deletions

View file

@ -5014,7 +5014,7 @@ impl PicturePrimitive {
let content_device_rect = content_device_rect
.intersection(&max_content_rect)
.expect("bug: no intersection with tile dirty rect");
.expect("bug: no intersection with tile dirty rect: {content_device_rect:?} / {max_content_rect:?}");
let content_task_size = content_device_rect.size();
let normalized_content_rect = content_task_size.into();

View file

@ -10,7 +10,7 @@ use crate::clip::{ClipDataStore, ClipItemKind, ClipStore, ClipNodeRange};
use crate::command_buffer::{CommandBufferIndex, QuadFlags};
use crate::spatial_tree::SpatialNodeIndex;
use crate::filterdata::SFilterData;
use crate::frame_builder::{FrameBuilderConfig};
use crate::frame_builder::FrameBuilderConfig;
use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
use crate::gpu_types::{BorderInstance, ImageSource, UvRectKind, TransformPaletteId};
use crate::internal_types::{CacheTextureId, FastHashMap, TextureSource, Swizzle};
@ -940,6 +940,9 @@ impl RenderTask {
size: DeviceIntSize,
kind: RenderTaskKind,
) -> Self {
if size.is_empty() {
log::warn!("Bad {} render task size: {:?}", kind.as_str(), size);
}
RenderTask::new(
RenderTaskLocation::Unallocated { size },
kind,

View file

@ -660,7 +660,7 @@ impl UploadTexturePool {
ImageFormat::RGBA8 => 0,
ImageFormat::BGRA8 => 1,
ImageFormat::R8 => 2,
_ => { panic!("unexpected format"); }
_ => { panic!("unexpected format {:?}", format); }
}
}