feat(graphics): migrate native target to 640x360
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Centralize the fixed 640x360 RGBA8888/60 Hz contract in the existing HAL. Preserve 8/16/32 tiles and composition, cover partial edges and mixed-size camera movement, and adapt firmware, fixtures, hosts and native tests. Share nearest-neighbor presentation geometry with pointer input. Measure actual framebuffer publications and successful host presentations separately from VM ticks, with bounded opt-in diagnostics and release harnesses. Validated with the complete tooling verify gate, native rendering tests, GPU readback, headless/process integration, formatting and strict clippy. The existing synchronous session path is documented; no worker/session architecture replacement or format compatibility layer is introduced. Work: WRK-0016 / DEC-0001 / PLN-0001 Commit and push explicitly authorized by the user after completion.
This commit is contained in:
@@ -43,6 +43,8 @@ pub struct Gfx {
|
||||
front: Vec<u32>,
|
||||
/// Back buffer: the working buffer where canonical game frames are composed
|
||||
back: Vec<u32>,
|
||||
/// Complete local framebuffer publications, including native Hub/Shell output.
|
||||
publication_count: u64,
|
||||
|
||||
/// Shared access to graphical memory banks (tiles and palettes).
|
||||
pub glyph_banks: Arc<dyn GlyphBankPoolAccess>,
|
||||
@@ -321,6 +323,7 @@ impl Gfx {
|
||||
h,
|
||||
front: vec![0; len],
|
||||
back: vec![0; len],
|
||||
publication_count: 0,
|
||||
glyph_banks,
|
||||
sprites: [EMPTY_SPRITE; 512],
|
||||
sprite_count: 0,
|
||||
@@ -570,6 +573,11 @@ impl Gfx {
|
||||
/// Typically called by the Host when it's time to display the finished frame.
|
||||
pub fn present(&mut self) {
|
||||
std::mem::swap(&mut self.front, &mut self.back);
|
||||
self.publication_count = self.publication_count.wrapping_add(1);
|
||||
}
|
||||
|
||||
pub fn publication_count(&self) -> u64 {
|
||||
self.publication_count
|
||||
}
|
||||
|
||||
pub fn load_frame_sprites(&mut self, sprites: &[Sprite]) {
|
||||
|
||||
Reference in New Issue
Block a user