summaryrefslogtreecommitdiff
path: root/ppu.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-05-24 15:45:54 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-05-24 15:45:54 +0200
commita8e0c141b0184d629504b9f0ee8dbc4fefb90934 (patch)
treecff0f7e64ce58dc8f1e4ff4501743d9b94449c94 /ppu.c
parente28ad1546509de31b706f0fd300a906e5bc55199 (diff)
3011fps
Diffstat (limited to 'ppu.c')
-rw-r--r--ppu.c12
1 files changed, 6 insertions, 6 deletions
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;