mirror of
https://github.com/holub/mame
synced 2025-06-06 12:53:46 +03:00
voodoo: Eliminate auto_alloc (nw)
This commit is contained in:
parent
4a09c92a14
commit
b73bce6484
@ -5621,7 +5621,7 @@ void voodoo_device::device_start()
|
||||
|
||||
/* create a multiprocessor work queue */
|
||||
poly = poly_alloc(machine(), 64, sizeof(poly_extra_data), 0);
|
||||
thread_stats = auto_alloc_array(machine(), stats_block, WORK_MAX_THREADS);
|
||||
thread_stats = std::make_unique<stats_block[]>(WORK_MAX_THREADS);
|
||||
|
||||
/* create a table of precomputed 1/n and log2(n) values */
|
||||
/* n ranges from 1.0000 to 2.0000 */
|
||||
@ -5726,14 +5726,14 @@ void voodoo_device::device_start()
|
||||
if (vd_type <= TYPE_VOODOO_2)
|
||||
{
|
||||
/* separate FB/TMU memory */
|
||||
fbmem = auto_alloc_array(machine(), uint8_t, m_fbmem << 20);
|
||||
tmumem[0] = auto_alloc_array(machine(), uint8_t, m_tmumem0 << 20);
|
||||
tmumem[1] = (m_tmumem1 != 0) ? auto_alloc_array(machine(), uint8_t, m_tmumem1 << 20) : nullptr;
|
||||
fbmem = (m_fbmem_alloc = std::make_unique<uint8_t[]>(m_fbmem << 20)).get();
|
||||
tmumem[0] = (m_tmumem_alloc[0] = std::make_unique<uint8_t[]>(m_tmumem0 << 20)).get();
|
||||
tmumem[1] = (m_tmumem1 != 0) ? (m_tmumem_alloc[1] = std::make_unique<uint8_t[]>(m_tmumem1 << 20)).get() : nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* shared memory */
|
||||
tmumem[0] = tmumem[1] = fbmem = auto_alloc_array(machine(), uint8_t, m_fbmem << 20);
|
||||
tmumem[0] = tmumem[1] = fbmem = (m_fbmem_alloc = std::make_unique<uint8_t[]>(m_fbmem << 20)).get();
|
||||
tmumem0 = m_fbmem;
|
||||
if (vd_type == TYPE_VOODOO_3)
|
||||
tmumem1 = m_fbmem;
|
||||
|
@ -1311,6 +1311,9 @@ public:
|
||||
optional_device<screen_device> m_screen_finder; // the screen we are acting on
|
||||
optional_device<cpu_device> m_cpu_finder; // the CPU we interact with
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_fbmem_alloc;
|
||||
std::unique_ptr<uint8_t[]> m_tmumem_alloc[2];
|
||||
|
||||
uint8_t index; // index of board
|
||||
screen_device * m_screen; // the screen we are acting on
|
||||
cpu_device * m_cpu; // the CPU we interact with
|
||||
@ -1335,7 +1338,7 @@ public:
|
||||
banshee_info banshee; // Banshee state
|
||||
|
||||
legacy_poly_manager * poly; // polygon manager
|
||||
stats_block * thread_stats; // per-thread statistics
|
||||
std::unique_ptr<stats_block[]> thread_stats; // per-thread statistics
|
||||
|
||||
voodoo_stats stats; // internal statistics
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user