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 commita1cd1425e4b9df41dca5182f83a00e6084272cd2Parent: 213534f6 changed files +0 -45
- shims/vk-video-ffi/src/av1_encode.rs +0 -12
- shims/vk-video-ffi/src/d3d11.rs +0 -2
- shims/vk-video-ffi/src/dmabuf.rs +0 -2
- shims/vk-video-ffi/src/h264_encode.rs +0 -12
- shims/vk-video-ffi/src/h265_encode.rs +0 -12
- shims/vk-video-ffi/src/session.rs +0 -5
shims/vk-video-ffi/src/av1_encode.rsmodified+0 -12
| @@ -309,18 +309,6 @@ impl Av1EncodeSession { | |||
| 309 | self.enc.flush_last() | 309 | self.enc.flush_last() |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 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 | - | ||
| 324 | fn encode_uploaded(&mut self, pic: &Av1Picture) -> Result<Option<Vec<u8>>, Error> { | 312 | fn encode_uploaded(&mut self, pic: &Av1Picture) -> Result<Option<Vec<u8>>, Error> { |
| 325 | let extent = self.enc.extent; | 313 | let extent = self.enc.extent; |
| 326 | 314 | ||
shims/vk-video-ffi/src/d3d11.rsmodified+0 -2
| @@ -194,7 +194,6 @@ fn import_memory( | |||
| 194 | pub(crate) struct ImportCache { | 194 | pub(crate) struct ImportCache { |
| 195 | entries: Vec<(Key, Import)>, | 195 | entries: Vec<(Key, Import)>, |
| 196 | next_id: u64, | 196 | next_id: u64, |
| 197 | - pub(crate) count: usize, | ||
| 198 | } | 197 | } |
| 199 | 198 | ||
| 200 | impl ImportCache { | 199 | impl ImportCache { |
| @@ -224,7 +223,6 @@ impl ImportCache { | |||
| 224 | } | 223 | } |
| 225 | self.next_id += 1; | 224 | self.next_id += 1; |
| 226 | let import = Import::new(gpu, src, self.next_id)?; | 225 | let import = Import::new(gpu, src, self.next_id)?; |
| 227 | - self.count += 1; | ||
| 228 | self.entries.push((key, import)); | 226 | self.entries.push((key, import)); |
| 229 | } | 227 | } |
| 230 | } | 228 | } |
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> | |||
| 388 | pub(crate) struct ImportCache { | 388 | pub(crate) struct ImportCache { |
| 389 | entries: Vec<(Key, Import)>, | 389 | entries: Vec<(Key, Import)>, |
| 390 | next_id: u64, | 390 | next_id: u64, |
| 391 | - pub(crate) count: usize, | ||
| 392 | } | 391 | } |
| 393 | 392 | ||
| 394 | impl ImportCache { | 393 | impl ImportCache { |
| @@ -417,7 +416,6 @@ impl ImportCache { | |||
| 417 | } | 416 | } |
| 418 | self.next_id += 1; | 417 | self.next_id += 1; |
| 419 | let import = Import::new(gpu, src, self.next_id)?; | 418 | let import = Import::new(gpu, src, self.next_id)?; |
| 420 | - self.count += 1; | ||
| 421 | self.entries.push((key, import)); | 419 | self.entries.push((key, import)); |
| 422 | } | 420 | } |
| 423 | } | 421 | } |
shims/vk-video-ffi/src/h264_encode.rsmodified+0 -12
| @@ -406,18 +406,6 @@ impl H264EncodeSession { | |||
| 406 | self.enc.flush_last() | 406 | self.enc.flush_last() |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 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 | - | ||
| 421 | fn encode_uploaded(&mut self, pic: &H264Picture) -> Result<Option<Vec<u8>>, Error> { | 409 | fn encode_uploaded(&mut self, pic: &H264Picture) -> Result<Option<Vec<u8>>, Error> { |
| 422 | let extent = self.enc.extent; | 410 | let extent = self.enc.extent; |
| 423 | 411 | ||
shims/vk-video-ffi/src/h265_encode.rsmodified+0 -12
| @@ -351,18 +351,6 @@ impl H265EncodeSession { | |||
| 351 | self.enc.flush_last() | 351 | self.enc.flush_last() |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 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 | - | ||
| 366 | fn encode_uploaded(&mut self, pic: &H265Picture) -> Result<Option<Vec<u8>>, Error> { | 354 | fn encode_uploaded(&mut self, pic: &H265Picture) -> Result<Option<Vec<u8>>, Error> { |
| 367 | let extent = self.enc.extent; | 355 | let extent = self.enc.extent; |
| 368 | 356 | ||
shims/vk-video-ffi/src/session.rsmodified+0 -5
| @@ -1356,11 +1356,6 @@ impl Encoder { | |||
| 1356 | slot.upload.submit_with(&[], &[slot.ready]) | 1356 | slot.upload.submit_with(&[], &[slot.ready]) |
| 1357 | } | 1357 | } |
| 1358 | 1358 | ||
| 1359 | - #[cfg(any(target_os = "linux", windows))] | ||
| 1360 | - pub(crate) fn import_count(&self) -> usize { | ||
| 1361 | - self.imports.count | ||
| 1362 | - } | ||
| 1363 | - | ||
| 1364 | /// Records the encode of the uploaded slot and submits it without waiting. Returns the oldest picture once FLIGHT are queued. | 1359 | /// Records the encode of the uploaded slot and submits it without waiting. Returns the oldest picture once FLIGHT are queued. |
| 1365 | pub(crate) fn submit( | 1360 | pub(crate) fn submit( |
| 1366 | &mut self, | 1361 | &mut self, |