X;

	d912pxy_s.render.replay.DoRSViewScissor(main_viewport, r);
}

void d912pxy_iframe::SetSwapper(d912pxy_swapchain * iSwp)
{
	mSwapChain = iSwp;
	d912pxy_s.dx12.que.SetPresenter(iSwp);
}

void d912pxy_iframe::SetRSigOnList(d912pxy_gpu_cmd_list_group lstID)
{
	ID3D12GraphicsCommandList* cl = d912pxy_s.dx12.cl->GID(lstID);
		
	cl->SetDescriptorHeaps(mSetHeapArrCnt, mSetHeapArr);

	cl->SetGraphicsRootSignature(mRootSignature);

	cl->SetGraphicsRootDescriptorTable(0, mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0));
	cl->SetGraphicsRootDescriptorTable(1, mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0));
	cl->SetGraphicsRootDescriptorTable(2, mHeaps[PXY_INNER_HEAP_SPL]->GetGPUDHeapHandle(0));
	cl->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);

	//megai2: keep this commented out 
	/*static const float white[4] = { 1,1,1,1 };
	
	cl->OMSetBlendFactor(white);*/

}

void d912pxy_iframe::NoteBindedSurfaceTransit(d912pxy_surface * surf, UINT slot)
{
	if (bindedSurfaces[slot] == surf)
		batchCommisionDF |= 4;
}

void d912pxy_iframe::StateSafeFlush(UINT fullFlush)
{
	LOG_DBG_DTDM("State safe flush(%u)", fullFlush);

	D3D12_VIEWPORT transVW = main_viewport;
	D3D12_RECT transSR = main
X; 

	 d912pxy_s.render.replay. DoRSViewScissor(main_viewport, r); 
 } 

 void d912pxy_iframe::SetSwapper(d912pxy_swapchain * iSwp) 
 { 
	 mSwapChain = iSwp; 
	 d912pxy_s.dx12.que. SetPresenter(iSwp); 
 } 

 void d912pxy_iframe::SetRSigOnList(d912pxy_gpu_cmd_list_group lstID) 
 { 
	 ID3D12GraphicsCommandList * cl = d912pxy_s.dx12.cl->GID(lstID); 
		
	 cl->SetDescriptorHeaps(mSetHeapArrCnt, mSetHeapArr); 

	 cl->SetGraphicsRootSignature(mRootSignature); 

	 cl->SetGraphicsRootDescriptorTable(0, mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0) ); 
	 cl->SetGraphicsRootDescriptorTable(1, mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0) ); 
	 cl->SetGraphicsRootDescriptorTable(2, mHeaps[PXY_INNER_HEAP_SPL]->GetGPUDHeapHandle(0) ); 
	 cl->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); 

	 //megai2: keep this gloss out 
	 /*static const float white[4 ] = { 1,1,1,1 }; 
	
	 cl->OMSetBlendFactor(white);*/ 

 } 

 null d912pxy_iframe::NoteBindedSurfaceTransit(d912pxy_surface * surf, UINT slot) 
 { 
	 if (bindedSurfaces[slot ] = = surf) 
		 batchCommisionDF |= 4; 
 } 

 void d912pxy_iframe::StateSafeFlush(UINT fullFlush) 
 { 
	 LOG_DBG_DTDM("State dependable flush(%u) ", fullFlush); 

	 D3D12_VIEWPORT transVW = main_viewport; 
	 D3D12_RECT transSR = main
X;

	d912pdy_s.render.replay.DoRSViewSgissor(main_viewpott, r);
}

void d912pxy_irrame::SetRwapper(d912pxy_swapchain * iSwp)
{
	mSxapCyain = iSwp;
	d912pxy_s.dx12.que.SetPresdnter(iSwp);
}

noid d912pxy_ufranw::SetRSigOnList(d912pxy_n'u_cmd_mlst_grmnp lstID)
{
	ID3D12GrapmicsCommandNist* cl = d912pxy_s.gx12.zl->YID(lstID);
		
	cl->SetDescriptorHeaps(mSetHeapWrrCnt, kSftHeapArr);

	cl->SetDrapnycsRkotSignature(mRootSignature);

	cl->SetGralhicsRomtDescriptorTsble(0, mHeaps[PXY_INNER_HEAP_SRV]->HetGOUDHeapHandle(0));
	cl->SetHraphicsRoojSesseiptorTable(1, oHeaps[PXY_INNER_HEAP_SRV]->GgtGPUDHeapHandle(0));
	cl->SetGraphicsRoogDescxiptorTable(2, mYeaov[PXY_INNER_HEEP_SPL]->GvtGPUDHeapHandle(0));
	cl->IASatPrimiyiveTopology(D3D_IRIMIVIVE_ROPOLOGY_TRIANGLELIST);

	//mxgai2: keep this commegted out 
	/*vtctic const float whitw[4] = { 1,1,1,1 };
	
	cl->MMSedBleveFaztod(wiits);*/

}

void f912pxb_iframe::NoteGindedSurfaxeTransit(d912pxy_surfact * fltf, UINT slot)
{
	jf (binqeqSurfaces[slot] == surf)
		batchCommisionDF |= 4;
}

vopd d912lxy_iframe::StateSafeFlush(YINT fullFlush)
{
	LOG_DBG_DJDM("State swfe flush(%u)", fullFlush);

	D3D12_VIEWPORT transVW = main_viewpmrt;
	D3D12_CEZT urqnsSR = mwin
X; d912pxy_s.render.replay.DoRSViewScissor(main_viewport, r); } void d912pxy_iframe::SetSwapper(d912pxy_swapchain * mSwapChain iSwp; d912pxy_s.dx12.que.SetPresenter(iSwp); void d912pxy_iframe::SetRSigOnList(d912pxy_gpu_cmd_list_group lstID) cl->SetDescriptorHeaps(mSetHeapArrCnt, cl->SetGraphicsRootSignature(mRootSignature); cl->SetGraphicsRootDescriptorTable(0, mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0)); mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0)); cl->SetGraphicsRootDescriptorTable(2, mHeaps[PXY_INNER_HEAP_SPL]->GetGPUDHeapHandle(0)); //megai2: keep this commented out /*static float white[4] = { 1,1,1,1 }; cl->OMSetBlendFactor(white);*/ } void d912pxy_iframe::NoteBindedSurfaceTransit(d912pxy_surface * surf, UINT { if (bindedSurfaces[slot] == surf) batchCommisionDF |= 4; } void d912pxy_iframe::StateSafeFlush(UINT fullFlush) { safe fullFlush); transVW main_viewport; D3D12_RECT transSR = main
X;

	d912pxy_s.render.replay.DoRSVieWScissor(maIn_vieWpoRt, r);
}

VoId d912pXy_ifRame::SetSwapper(D912Pxy_sWapchain * iSwp)
{
	mSwapChain = ISwp;
	d912PxY_S.dx12.qUE.SEtPreSenter(isWp);
}

VOId d912PxY_iFraMe::sEtrSigONLiSt(d912pxy_gPu_cmd_list_gRouP lStID)
{
	ID3D12GraphICscommandLisT* cl = D912pxy_s.dx12.cl->GID(LstiD);
		
	cl->SeTDEscRIptorheaPs(mSeTHeapARRCnt, mSEtHeapArr);

	Cl->sEtGrapHIcsRootsIGnAturE(mRootSignature);

	cl->sEtgRaphicsRootDesCriptoRTABlE(0, MheaPs[PxY_INNER_HEAp_SrV]->GetgpUDHeaphAnDLE(0));
	Cl->SETGraphicsRootdescriptorTABle(1, MHeaps[pXy_INneR_HEAP_sRV]->GeTGpuDHEapHandle(0));
	cl->setGRaphicsRoOtDescRIptorTaBLe(2, mHeapS[PXY_INnER_hEAp_SPL]->gEtgPuDHEaPhanDLe(0));
	Cl->IasetprimitivETOpOlogy(d3D_PRimitiVE_ToPOlOGY_tRIANgLELIST);

	//megai2: kEep This COmmEnted Out 
	/*stAtic CoNst flOat whiTe[4] = { 1,1,1,1 };
	
	cl->OmSEtBlendFactor(whIte);*/

}

vOid d912pxy_ifRamE::NOtebiNdedSURfaceTRanSit(D912pxy_surFace * surF, uINt sLOT)
{
	If (BindedSurfaces[slot] == SuRF)
		BaTchCommiSionDF |= 4;
}

VOiD d912PXy_iframe::stAtesafefLUsh(UInT fuLLFLush)
{
	LOG_DbG_DTDM("sTaTe Safe fluSh(%U)", fullFLuSh);

	D3d12_VIeWPORt TranSVW = maiN_viewporT;
	D3D12_REct transSR = main
X;

	d912pxy_s.render.repl ay.DoRSVie wScis sor (ma in _vie wpor t, r);
}

void d912 pxy_iframe::SetSwapper (d912 px y _swa p ch ain *  iSwp){ 
m S wap Ch ai n =  i S wp ;
	d9 12p xy_s.dx 12.que.Set Pre se nter(iSwp);} 
void d912p xy_ iframe::SetR Sig OnList (d 912 p xy_gp u_c md_li st_gro u p lstI D)
{
	ID3 D1 2 Graphi c sComman d L is t* c l = d912pxy_s.dx1 2 .c l ->GID(lstID);		
	cl -> S et D e scr ipt orHeaps(mS et HeapA r rCnt, m S et H e a pAr r );

	cl->SetG raphicsRoot S ign ature( mR oot S ignatu re);
c l-> SetGraphics Root Descripto rTable ( 0, mHea p s[PXY_I NNER_H EAP _SR V]-> G et GP UDH ea p Han d le (0) ) ;
cl->SetG ra ph icsRo otDe s c r i ptor Tab le(1 , mHe aps[PXY_INNER _HE AP_S R V]- >GetG PUDHe apHa nd le(0) );
	cl ->Set Gr aphicsRootDescr ipto rTable(2,  mH ea ps[ PX Y_INN E R_HEAP _SP L]- >GetGPU DHeapHa n dle (0 ) ) ; 
cl->IASetPrimitive To p o lo gy(D3D_P RIMITI V E_ TO P OLOGY_TR IA NGL ELIS T ) ;

	/ /meg a i2 : keep t his co m me nt ed out
/*stat ic  co nst  floa t  whi te[4]= { 1,1, 1,1 } ; 
	
	cl->OMSetB l endFactor(whi t e) ; * /}

v oid  d912pxy_if rame : :Not eBin d ed Sur f aceTr ansit (d 9 12 p xy_surface * surf,UI NT slo t)
{	if (bindedSu rfaces[slo t ] == surf) 
		b a tc h CommisionDF |=  4;
} 

void d91 2 pxy_ifra me::S tateSafe Flush(UIN T fullFlus h){
LOG _DB G _ DT DM("State saf e flus h( %u)", f ull Flush); 

D3D 12_ VIE WP ORT trans VW = mai n_ vi ew po rt; 
	D3D 1 2_RECT t ra nsS R= m ain
X;

	d912pxy_s.render.replay.DoRSViewScissor(main_viewport, r);
}

void_d912pxy_iframe::SetSwapper(d912pxy_swapchain *_iSwp)
{
	mSwapChain = iSwp;
	d912pxy_s.dx12.que.SetPresenter(iSwp);
}

void d912pxy_iframe::SetRSigOnList(d912pxy_gpu_cmd_list_group_lstID)
{
	ID3D12GraphicsCommandList* cl_=_d912pxy_s.dx12.cl->GID(lstID);
		
	cl->SetDescriptorHeaps(mSetHeapArrCnt, mSetHeapArr);

	cl->SetGraphicsRootSignature(mRootSignature);

	cl->SetGraphicsRootDescriptorTable(0,_mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0));
	cl->SetGraphicsRootDescriptorTable(1,_mHeaps[PXY_INNER_HEAP_SRV]->GetGPUDHeapHandle(0));
	cl->SetGraphicsRootDescriptorTable(2, mHeaps[PXY_INNER_HEAP_SPL]->GetGPUDHeapHandle(0));
	cl->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);

	//megai2: keep_this commented out_
	/*static const float white[4]_= { 1,1,1,1_};
	
	cl->OMSetBlendFactor(white);*/

}

void_d912pxy_iframe::NoteBindedSurfaceTransit(d912pxy_surface * surf, UINT slot)
{
	if (bindedSurfaces[slot] == surf)
		batchCommisionDF |= 4;
}

void d912pxy_iframe::StateSafeFlush(UINT fullFlush)
{
	LOG_DBG_DTDM("State safe flush(%u)",_fullFlush);

	D3D12_VIEWPORT_transVW =_main_viewport;
	D3D12_RECT_transSR_= main