dreamcast/holly/region_array.hpp
Zack Buhman bcaa9789cf texture_memory_alloc: rework texture memory allocation
The previous texture_memory_alloc.hpp was written based on an
incorrect understanding of the "32-bit" and "64-bit" texture memory
address mapping.

The primary motivation is to rearrange the texture memory address map
so that "textures" (64-bit access) do not overlap with 32-bit
accesses, such as REGION_BASE or PARAM_BASE.
2024-05-12 17:06:00 +08:00

33 lines
1019 B
C++

#pragma once
#include <cstdint>
struct opb_size {
uint32_t opaque;
uint32_t opaque_modifier;
uint32_t translucent;
uint32_t translucent_modifier;
uint32_t punch_through;
uint32_t total() const
{
return opaque
+ opaque_modifier
+ translucent
+ translucent_modifier
+ punch_through;
}
};
void region_array(const uint32_t width, // in tile units (1 tile unit = 32 pixels)
const uint32_t height); // in tile units (1 tile unit = 32 pixels)
void region_array2(const uint32_t width, // in tile units (1 tile unit = 32 pixels)
const uint32_t height, // in tile units (1 tile unit = 32 pixels)
const struct opb_size& opb_size);
void region_array_multipass(const uint32_t width, // in tile units (1 tile unit = 32 pixels)
const uint32_t height, // in tile units (1 tile unit = 32 pixels)
const struct opb_size * opb_size,
const uint32_t num_render_passes);