vulkan: log information about mixed device use
This commit is contained in:
parent
89c9b8d2e0
commit
3ef408b5b4
3 changed files with 16 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ pub enum QueueTransfer {
|
||||||
pub enum VulkanImageMemory {
|
pub enum VulkanImageMemory {
|
||||||
DmaBuf(VulkanDmaBufImage),
|
DmaBuf(VulkanDmaBufImage),
|
||||||
Internal(VulkanShmImage),
|
Internal(VulkanShmImage),
|
||||||
Blend(#[expect(dead_code)] VulkanAllocation),
|
Blend(VulkanAllocation),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct VulkanDmaBufImage {
|
pub struct VulkanDmaBufImage {
|
||||||
|
|
|
||||||
|
|
@ -2117,6 +2117,18 @@ impl Debug for VulkanRenderer {
|
||||||
impl VulkanImage {
|
impl VulkanImage {
|
||||||
fn assert_device(&self, device: &Device) -> Result<(), VulkanError> {
|
fn assert_device(&self, device: &Device) -> Result<(), VulkanError> {
|
||||||
if self.renderer.device.device.handle() != device.handle() {
|
if self.renderer.device.device.handle() != device.handle() {
|
||||||
|
match &self.ty {
|
||||||
|
VulkanImageMemory::DmaBuf(v) => {
|
||||||
|
log::warn!("Mixed device use with dmabuf {}", v.template.dmabuf.id);
|
||||||
|
}
|
||||||
|
VulkanImageMemory::Internal(_v) => {
|
||||||
|
log::warn!("Mixed device use with internal image");
|
||||||
|
}
|
||||||
|
VulkanImageMemory::Blend(_v) => {
|
||||||
|
log::warn!("Mixed device use with blend buffer");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log::info!("Image address {:?}", ptr::from_ref(self));
|
||||||
return Err(VulkanError::MixedVulkanDeviceUse);
|
return Err(VulkanError::MixedVulkanDeviceUse);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,9 @@ impl RendererBase<'_> {
|
||||||
opaque: bool,
|
opaque: bool,
|
||||||
cd: &Rc<ColorDescription>,
|
cd: &Rc<ColorDescription>,
|
||||||
) {
|
) {
|
||||||
|
// log::info!("rendering texture {:?}", std::ptr::from_ref(&**texture) as *const u8);
|
||||||
|
// log::info!("{:?}", backtrace::Backtrace::new());
|
||||||
|
|
||||||
let mut texcoord = tpoints.unwrap_or_else(SampleRect::identity);
|
let mut texcoord = tpoints.unwrap_or_else(SampleRect::identity);
|
||||||
|
|
||||||
let (twidth, theight) = if let Some(size) = tsize {
|
let (twidth, theight) = if let Some(size) = tsize {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue