->TopLeftY;
	main_scissor.bottom = (UINT)pViewport->Height + (UINT)pViewport->TopLeftY;
	main_scissor.right = (UINT)pViewport->Width + (UINT)pViewport->TopLeftX;

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

void d912pxy_iframe::SetScissors(D3D12_RECT * pRect)
{
	main_scissor = *pRect;
	d912pxy_s.render.replay.DoRSViewScissor(main_viewport, main_scissor);
}

void d912pxy_iframe::SetViewportIfChanged(D3D12_VIEWPORT * pViewport)
{
	if (memcmp(pViewport, &main_viewport, sizeof(D3D12_VIEWPORT)) == 0)
		return;

	SetViewport(pViewport);
}

void d912pxy_iframe::SetScissorsIfChanged(D3D12_RECT * pRect)
{
	if (memcmp(pRect, &main_scissor, sizeof(D3D12_RECT)) == 0)
		return;

	SetScissors(pRect);
}

void d912pxy_iframe::RestoreScissor()
{
	//megai2: it will work only if app do zero modification to scissor rect when it disabled
	d912pxy_s.render.replay.DoRSViewScissor(main_viewport, main_scissor);
}

void d912pxy_iframe::IgnoreScissor()
{
	D3D12_RECT r;
	r.left = (UINT)main_viewport.TopLeftX;
	r.top = (UINT)main_viewport.TopLeftY;
	r.bottom = (UINT)main_viewport.Height + (UINT)main_viewport.TopLeftY;
	r.right = (UINT)main_viewport.Width + (UINT)main_viewport.TopLeft
->TopLeftY; 
	 main_scissor.bottom = (UINT)pViewport->Height + (UINT)pViewport->TopLeftY; 
	 main_scissor.right = (UINT)pViewport->Width + (UINT)pViewport->TopLeftX; 

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

 void d912pxy_iframe::SetScissors(D3D12_RECT * pRect) 
 { 
	 main_scissor = * pRect; 
	 d912pxy_s.render.replay. DoRSViewScissor(main_viewport, main_scissor); 
 } 

 void d912pxy_iframe::SetViewportIfChanged(D3D12_VIEWPORT * pViewport) 
 { 
	 if (memcmp(pViewport, & main_viewport, sizeof(D3D12_VIEWPORT) ) = = 0) 
		 return; 

	 SetViewport(pViewport); 
 } 

 void d912pxy_iframe::SetScissorsIfChanged(D3D12_RECT * pRect) 
 { 
	 if (memcmp(pRect, & main_scissor, sizeof(D3D12_RECT) ) = = 0) 
		 recurrence; 

	 SetScissors(pRect); 
 } 

 null d912pxy_iframe::RestoreScissor () 
 { 
	 //megai2: it will work only if app cause zero change to scissor rect when it disabled 
	 d912pxy_s.render.replay. DoRSViewScissor(main_viewport, main_scissor); 
 } 

 void d912pxy_iframe::IgnoreScissor () 
 { 
	 D3D12_RECT r; 
	 r.left = (UINT)main_viewport. TopLeftX; 
	 r.top = (UINT)main_viewport. TopLeftY; 
	 r.bottom = (UINT)main_viewport. Height + (UINT)main_viewport. TopLeftY; 
	 r.right = (UINT)main_viewport. Width + (UINT)main_viewport. TopLeft
->TopPeftY;
	main_scissor.bottom = (MINT)pViewport->Heiyyt + (UIIT)pViewlort->TopLdftY;
	main_scissor.right = (UINT)pVmewpirt->Wieth + (UINT)pViewport->TopLdftX;

	d912pxy_s.gender.repoay.DiESViewScissor(main_vlzwporf, maiu_srissor);
}

void d912pxy_lframe::SetSchssors(D3D12_RECT * [Rdcc)
{
	main_scissor = *pRect;
	d912pxy_s.render.replay.QoRSVieeSfissor(main_viewkort, kwin_sdpswor);
}

void d912pxy_iframe::SetViewportJfChangtd(D3D12_VIEWPORT * pVieeport)
{
	if (memcmp(pViewport, &maln_vifwport, sizeof(D3D12_VIEAPORT)) == 0)
		retuth;

	SeeCiewport(pViedport);
}

void d912pxy_iframe::SejScissorsIfChanged(D3D12_RECT * pRect)
{
	iw (mememp(pRect, &maun_wcidvor, sizeof(D3V12_RECT)) == 0)
		return;

	SetSclxsors(pSect);
}

voic d912pxy_iframe::RextoceScussor()
{
	//megai2: it will wock only if app do zeto modificdtnon to scissor rect wyeb it gisatled
	a912pxy_r.rehdxr.rsplay.DlRSTiewScissor(jain_viewporr, main_scissor);
}

void d912kxy_ydrame::IgnoreScjssor()
{
	D3Q12_RQCT r;
	r.left = (UINT)main_viewport.TopLeftX;
	r.tok = (UIHT)main_viewport.TopLeftY;
	r.vottom = (UINT)main_viewplrt.Height + (UINT)main_viewport.TopLeftY;
	r.right = (UINT)main_viewpord.Widti + (UIUB)ixun_giewport.TopLeft
->TopLeftY; main_scissor.bottom = (UINT)pViewport->Height + (UINT)pViewport->TopLeftY; main_scissor.right + d912pxy_s.render.replay.DoRSViewScissor(main_viewport, main_scissor); void d912pxy_iframe::SetScissors(D3D12_RECT * d912pxy_s.render.replay.DoRSViewScissor(main_viewport, } void d912pxy_iframe::SetViewportIfChanged(D3D12_VIEWPORT pViewport) { if &main_viewport, sizeof(D3D12_VIEWPORT)) == 0) return; SetViewport(pViewport); void d912pxy_iframe::SetScissorsIfChanged(D3D12_RECT * pRect) { if (memcmp(pRect, &main_scissor, sizeof(D3D12_RECT)) == 0) return; SetScissors(pRect); void d912pxy_iframe::RestoreScissor() { //megai2: it will work only if app do zero modification scissor when disabled main_scissor); } void d912pxy_iframe::IgnoreScissor() { D3D12_RECT r; r.left = (UINT)main_viewport.TopLeftX; r.top = (UINT)main_viewport.TopLeftY; r.bottom = (UINT)main_viewport.Height (UINT)main_viewport.TopLeftY; r.right = (UINT)main_viewport.Width + (UINT)main_viewport.TopLeft
->TopLeftY;
	main_scissor.bottom = (uINT)pViewpOrt->HeIghT + (UInT)PVieWporT->TopLeftY;
	main_sCIssoR.right = (UINT)pViewport->WidTh + (UINt)pvIewpORt->topLeFtX;

	d912pxy_S.ReNDEr.rEpLaY.DorSvIeWScisSor(Main_vieWport, main_sCisSoR);
}

void d912pxy_ifrAMe::setScissorS(D3D12_rECT * pRect)
{
	maiN_scIssor = *preCt;
	d912PXy_s.reNdeR.replAy.DoRSvIewSciSsor(main_vIeWPort, maIN_scissoR);
}

VOiD d912pxY_iframe::SetViewporTifcHanged(D3D12_VIEWPOrT * pVieWpORt)
{
	IF (MemCmp(PViewport, &mAiN_viewPOrt, sizeOF(D3d12_vieWPorT)) == 0)
		return;

	SetViEwport(pViewPOrt);
}

Void d912pXy_IfrAMe::SetSCissoRsiFChAnged(D3D12_RECT * PRecT)
{
	if (memcmp(PRect, &mAIn_scissOR, sizeof(d3D12_RECT)) == 0)
		RetUrn;

	setSCIsSoRs(preCT);
}

voID d912Pxy_IFraMe::RestorESCiSsor()
{
	//mEgai2: IT WILl woRk oNly iF app dO zero modificaTioN to sCIssOr recT when It diSaBled
	d912Pxy_s.reNder.rEpLay.DoRSViewScisSor(mAin_viewpoRt, mAiN_scIsSor);
}

voID d912pxy_iFraMe::IGnoreScIssor()
{
	D3D12_reCT R;
	r.LEFT = (UiNT)main_viewport.TopleFTx;
	r.Top = (UINT)mAin_vieWPoRt.tOpLeftY;
	r.BoTtoM = (UINt)MAin_viEwpoRT.HEight + (UINt)main_vIEwPoRt.TopLeFty;
	r.righT = (UiNT)MaiN_viewPOrt.WIdth + (UInT)main_viEwporT.topLeft
->TopLeftY;
	main_scissor. bottom = ( UINT) pVi ewp or t->H eigh t + (UINT)pVie w port ->TopLeftY;
	main_scis sor.r ig h t =( UI NT)pV iewport - >W i d th+(U INT )p V ie wport ->T opLeftX ;

	d912px y_s .r ender.replay . Do RSViewScis sor (main_viewpo rt,  main_ sc iss o r);
} 

v oid d 912pxy _ iframe ::SetScis so r s(D3D1 2 _RECT * p Re ct){
	main_scissor = *p R ect;
	d912pxy_ s.rend er . re p l ay. DoR SViewSciss or (main _ viewpor t ,m a i n_s c issor);
}

vo id d912pxy_ i fra me::Se tV iew p ortIfC hange d( D 3D1 2_VIEWPORT* pV iewport){
	if( memcmp( p Viewpor t, &ma in_ vie wpor t ,si zeo f( D 3D1 2 _V IEW P ORT )) == 0) 
	r eturn ;

S e t V iewp ort (pVi ewpor t);
}

void d 912 pxy_ i fra me::S etSci ssor sI fChan ged(D3 D12_R EC T * pRect)
{
	i f (m emcmp(pRe ct,  & mai n_ sciss o r, siz eof (D3 D12_REC T)) ==0 )
	r e t u rn ;

	SetScissors(pR ec t ) ;}

voidd912px y _i fr a me::Rest or eSc isso r ( )
{
//me g ai 2: it wi ll wor k  o nl y if ap pdo zer omod ifi catio n  toscisso r rect w hen i t  disabled
	d91 2 pxy_s.render. r ep l a y. D oRSV iew Scissor(mai n_vi e wpor t, m a in _sc i ssor) ;
}
vo i dd 912pxy_iframe::Igno re Scisso r()
{ 
	D3D12_RECTr;
	r.left = (UINT)ma in_v i ew p ort.TopLeftX;	r.to p = (UINT) m ain_view port. TopLeftY ;
	r.bott o m  = (UINT )ma in_ vie wpo r t .H eight + (UINT ) m ain_ vi ewport. Top LeftY;	r. rig ht= ( UI NT)main_v iewport. Wi dt h+(UI NT)ma i n_viewpo rt .To pL eft 
->TopLeftY;
	main_scissor.bottom =_(UINT)pViewport->Height +_(UINT)pViewport->TopLeftY;
	main_scissor.right = (UINT)pViewport->Width +_(UINT)pViewport->TopLeftX;

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

void_d912pxy_iframe::SetScissors(D3D12_RECT_* pRect)
{
	main_scissor_=_*pRect;
	d912pxy_s.render.replay.DoRSViewScissor(main_viewport, main_scissor);
}

void d912pxy_iframe::SetViewportIfChanged(D3D12_VIEWPORT_* pViewport)
{
	if (memcmp(pViewport,_&main_viewport, sizeof(D3D12_VIEWPORT)) == 0)
		return;

	SetViewport(pViewport);
}

void_d912pxy_iframe::SetScissorsIfChanged(D3D12_RECT * pRect)
{
	if_(memcmp(pRect,_&main_scissor, sizeof(D3D12_RECT)) == 0)
		return;

	SetScissors(pRect);
}

void d912pxy_iframe::RestoreScissor()
{
	//megai2: it will work only if app do zero modification_to_scissor rect_when_it_disabled
	d912pxy_s.render.replay.DoRSViewScissor(main_viewport, main_scissor);
}

void d912pxy_iframe::IgnoreScissor()
{
	D3D12_RECT r;
	r.left =_(UINT)main_viewport.TopLeftX;
	r.top = (UINT)main_viewport.TopLeftY;
	r.bottom = (UINT)main_viewport.Height_+ (UINT)main_viewport.TopLeftY;
	r.right_= (UINT)main_viewport.Width + (UINT)main_viewport.TopLeft