Commit b2f17e5
committed
Add native texture upload & fix Vulkan capture
Vulkan: account for ImGui viewport scaling and clamp capture region before calling the swapchain capture helper so screen captures map correctly to window pixels.
Metal: implement a native source upload path using a compute pipeline. Add a Metal compute shader to decode multiple host pixel formats (u8/u16/u32/f16/f32/f64) with arbitrary row pitch and channel counts, create/upload helpers (create_upload_pipeline, upload_source_texture, prepare_source_upload), and switch source textures to private storage with compute-based initialization. Handles double->float conversion and validates stride/size limits.
OpenGL: add missing GL format/type constants and support native uploads via GL_UNPACK_ROW_LENGTH with a SourceTextureUploadDesc. New logic selects matching internal formats/types when possible, falls back to RGBA32F conversion for unsupported types or misaligned stride, and allocates preview textures separately. Also handle 2-channel inputs in preview shaders and minor API/refactor changes.1 parent ffaebd4 commit b2f17e5
3 files changed
Lines changed: 547 additions & 95 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | | - | |
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
421 | 462 | | |
422 | 463 | | |
423 | 464 | | |
| |||
0 commit comments