dreamcast/holly/ta_fifo_polygon_converter.hpp
Zack Buhman 54f09bad01 ta_fifo_polygon_converter: properly calculate ta_next_opb_offset
The main issue with the previous code:

  constexpr uint32_t tiles = (640 / 32) * (320 / 32);

Should have been:

  constexpr uint32_t tiles = (640 / 32) * (480 / 32);

The consequence of this is some OPBs were being overwritten by
TA_NEXT_OPB, causing corruption (missing triangles, incomplete
drawings) in some tiles.
2023-12-25 21:59:26 +08:00

15 lines
552 B
C++

#pragma once
#include <cstdint>
void ta_polygon_converter_init(uint32_t opb_total_size, // for one tile, for all render passes
uint32_t ta_alloc,
uint32_t tile_width, // in tile units (e.g: (640 / 32))
uint32_t tile_height); // in tile units (e.g: (480 / 32))
void ta_polygon_converter_cont(uint32_t ol_base_offset,
uint32_t ta_alloc);
void ta_polygon_converter_transfer(volatile uint32_t * buf, uint32_t size);
void ta_wait_opaque_list();
void ta_wait_translucent_list();
void ta_wait_punch_through_list();