From 332f986f39db9b0477830d22dcbe7988bf9ca517 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Thu, 16 Jun 2005 12:46:56 +0000 Subject: [PATCH] modified 3d reload flag to support 32 clones, added clone counter as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13175 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/nvidia/InitAccelerant.c | 6 ++++-- .../accelerants/nvidia/engine/nv_acc_dma.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/InitAccelerant.c b/src/add-ons/accelerants/nvidia/InitAccelerant.c index 545f4c9587..26d8854f54 100644 --- a/src/add-ons/accelerants/nvidia/InitAccelerant.c +++ b/src/add-ons/accelerants/nvidia/InitAccelerant.c @@ -161,8 +161,10 @@ status_t INIT_ACCELERANT(int the_fd) { /* count of issued parameters or commands */ si->engine.last_idle = si->engine.count = 0; - /* tell a 3D add-on that it should reload it's state */ - si->engine.reload_state_3D = true; + /* no 3D clones are currently loaded */ + si->engine.threeD.clones = 0; + /* tell all 3D add-ons that they should reload their rendering states */ + si->engine.threeD.reload_state_3D = 0xffffffff; INIT_BEN(si->engine.lock); INIT_BEN(si->overlay.lock); diff --git a/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c b/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c index 198b9d4047..f11e395cde 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c @@ -1558,9 +1558,6 @@ void nv_acc_assert_fifo_dma(void) /* tell the engine to fetch and execute all (new) commands in the DMA buffer */ nv_start_dma(); } - - /* the 3D add-on needs to reload the rendering state: issuing 2D cmds kills it! */ - si->engine.reload_state_3D = true; } /* @@ -1625,6 +1622,9 @@ void SCREEN_TO_SCREEN_BLIT_DMA(engine_token *et, blit_params *list, uint32 count * executed before. */ nv_start_dma(); } + + /* tell all 3D add-ons that they should reload their rendering states */ + si->engine.threeD.reload_state_3D = 0xffffffff; } /* rectangle fill - i.e. workspace and window background color */ @@ -1674,6 +1674,9 @@ void FILL_RECTANGLE_DMA(engine_token *et, uint32 colorIndex, fill_rect_params *l * executed before. */ nv_start_dma(); } + + /* tell all 3D add-ons that they should reload their rendering states */ + si->engine.threeD.reload_state_3D = 0xffffffff; } /* span fill - i.e. (selected) menuitem background color (Dano) */ @@ -1722,6 +1725,9 @@ void FILL_SPAN_DMA(engine_token *et, uint32 colorIndex, uint16 *list, uint32 cou * executed before. */ nv_start_dma(); } + + /* tell all 3D add-ons that they should reload their rendering states */ + si->engine.threeD.reload_state_3D = 0xffffffff; } /* rectangle invert - i.e. text cursor and text selection */ @@ -1771,4 +1777,7 @@ void INVERT_RECTANGLE_DMA(engine_token *et, fill_rect_params *list, uint32 count * executed before. */ nv_start_dma(); } + + /* tell all 3D add-ons that they should reload their rendering states */ + si->engine.threeD.reload_state_3D = 0xffffffff; }