forge
Explore
Log in

Don't you dare go Hollow

U17: vk-video-ffi delete d3d11_imports/dmabuf_imports and their ImportCache counters (read only by the deleted dmabuf_smoke example)

Browse files at this commit

a1cd1425e4b9df41dca5182f83a00e6084272cd2Ahmet Kaan GümüşParent: 213534f
shims/vk-video-ffi/src/av1_encode.rsmodified+0 -12
@@ -309,18 +309,6 @@ impl Av1EncodeSession {
309309 self.enc.flush_last()
310310 }
311311
312- /// Number of D3D11 texture imports made so far; a texture re-used by id is imported once.
313- #[cfg(windows)]
314- pub fn d3d11_imports(&self) -> usize {
315- self.enc.import_count()
316- }
317-
318- /// Number of DMA-BUF imports made so far; a buffer re-used by fd is imported once.
319- #[cfg(target_os = "linux")]
320- pub fn dmabuf_imports(&self) -> usize {
321- self.enc.import_count()
322- }
323-
324312 fn encode_uploaded(&mut self, pic: &Av1Picture) -> Result<Option<Vec<u8>>, Error> {
325313 let extent = self.enc.extent;
326314
shims/vk-video-ffi/src/d3d11.rsmodified+0 -2
@@ -194,7 +194,6 @@ fn import_memory(
194194 pub(crate) struct ImportCache {
195195 entries: Vec<(Key, Import)>,
196196 next_id: u64,
197- pub(crate) count: usize,
198197 }
199198
200199 impl ImportCache {
@@ -224,7 +223,6 @@ impl ImportCache {
224223 }
225224 self.next_id += 1;
226225 let import = Import::new(gpu, src, self.next_id)?;
227- self.count += 1;
228226 self.entries.push((key, import));
229227 }
230228 }
shims/vk-video-ffi/src/dmabuf.rsmodified+0 -2
@@ -388,7 +388,6 @@ fn device_memory(gpu: &Gpu, image: vk::Image) -> Result<vk::DeviceMemory, Error>
388388 pub(crate) struct ImportCache {
389389 entries: Vec<(Key, Import)>,
390390 next_id: u64,
391- pub(crate) count: usize,
392391 }
393392
394393 impl ImportCache {
@@ -417,7 +416,6 @@ impl ImportCache {
417416 }
418417 self.next_id += 1;
419418 let import = Import::new(gpu, src, self.next_id)?;
420- self.count += 1;
421419 self.entries.push((key, import));
422420 }
423421 }
shims/vk-video-ffi/src/h264_encode.rsmodified+0 -12
@@ -406,18 +406,6 @@ impl H264EncodeSession {
406406 self.enc.flush_last()
407407 }
408408
409- /// Number of D3D11 texture imports made so far; a texture re-used by id is imported once.
410- #[cfg(windows)]
411- pub fn d3d11_imports(&self) -> usize {
412- self.enc.import_count()
413- }
414-
415- /// Number of DMA-BUF imports made so far; a buffer re-used by fd is imported once.
416- #[cfg(target_os = "linux")]
417- pub fn dmabuf_imports(&self) -> usize {
418- self.enc.import_count()
419- }
420-
421409 fn encode_uploaded(&mut self, pic: &H264Picture) -> Result<Option<Vec<u8>>, Error> {
422410 let extent = self.enc.extent;
423411
shims/vk-video-ffi/src/h265_encode.rsmodified+0 -12
@@ -351,18 +351,6 @@ impl H265EncodeSession {
351351 self.enc.flush_last()
352352 }
353353
354- /// Number of D3D11 texture imports made so far; a texture re-used by id is imported once.
355- #[cfg(windows)]
356- pub fn d3d11_imports(&self) -> usize {
357- self.enc.import_count()
358- }
359-
360- /// Number of DMA-BUF imports made so far; a buffer re-used by fd is imported once.
361- #[cfg(target_os = "linux")]
362- pub fn dmabuf_imports(&self) -> usize {
363- self.enc.import_count()
364- }
365-
366354 fn encode_uploaded(&mut self, pic: &H265Picture) -> Result<Option<Vec<u8>>, Error> {
367355 let extent = self.enc.extent;
368356
shims/vk-video-ffi/src/session.rsmodified+0 -5
@@ -1356,11 +1356,6 @@ impl Encoder {
13561356 slot.upload.submit_with(&[], &[slot.ready])
13571357 }
13581358
1359- #[cfg(any(target_os = "linux", windows))]
1360- pub(crate) fn import_count(&self) -> usize {
1361- self.imports.count
1362- }
1363-
13641359 /// Records the encode of the uploaded slot and submits it without waiting. Returns the oldest picture once FLIGHT are queued.
13651360 pub(crate) fn submit(
13661361 &mut self,