From a8e0c141b0184d629504b9f0ee8dbc4fefb90934 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Sat, 24 May 2025 15:45:54 +0200 Subject: 3011fps --- ppu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ppu.c') diff --git a/ppu.c b/ppu.c index 6f5a4eb..1cb29b8 100644 --- a/ppu.c +++ b/ppu.c @@ -26,8 +26,8 @@ static void ppu_reset(struct nes_state *state) { } -__attribute__((hot)) -static void ppu_evaluate_sprites(struct nes_state *state) { +// __attribute__((hot)) +static inline void ppu_evaluate_sprites(struct nes_state *state) { struct ppu_state *restrict ppu = &state->ppu; uint8_t sprite_height = (ppu->reg_ctrl & 0x20) ? 16 : 8; uint8_t n = 0; @@ -59,8 +59,8 @@ static void ppu_evaluate_sprites(struct nes_state *state) { ppu->sprite_count = n; } -__attribute__((hot)) -static void ppu_fetch_sprite_patterns(struct nes_state *state) { +// __attribute__((hot)) +static inline void ppu_fetch_sprite_patterns(struct nes_state *state) { struct ppu_state *restrict ppu = &state->ppu; uint32_t addr; uint32_t bank; @@ -105,7 +105,7 @@ static void ppu_fetch_sprite_patterns(struct nes_state *state) { } } -__attribute__((always_inline, hot)) +__attribute__((hot)) static inline void ppu_render_pixel(struct nes_state *state) { struct ppu_state *restrict ppu = &state->ppu; @@ -173,7 +173,7 @@ static inline void ppu_render_pixel(struct nes_state *state) { } __attribute__((hot, flatten)) -static void ppu_tick(struct nes_state *state) { +static inline void ppu_tick(struct nes_state *state) { struct ppu_state *restrict ppu = &state->ppu; uint32_t dot = ppu->dot; -- cgit v1.2.3