Skip to content

Commit 90dec4c

Browse files
committed
Optimization: don't create unused recources
1 parent 60fa0f9 commit 90dec4c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Layers/xrRenderPC_R3/r3_rendertarget.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,15 +659,14 @@ CRenderTarget::CRenderTarget()
659659
rt_ssao_temp.create(r2_RT_ssao_temp, w, h, D3DFMT_G16R16F, SampleCount);
660660
s_ssao.create(b_ssao, "r2\\ssao");
661661

662+
/* Should be used in r3_rendertarget_phase_ssao.cpp but it's commented there.
662663
if (RImplementation.o.dx10_msaa)
663664
{
664-
int bound = RImplementation.o.dx10_msaa_opt ? 1 : RImplementation.o.dx10_msaa_samples;
665+
const int bound = RImplementation.o.dx10_msaa_opt ? 1 : RImplementation.o.dx10_msaa_samples;
665666
666667
for (int i = 0; i < bound; ++i)
667-
{
668668
s_ssao_msaa[i].create(b_ssao_msaa[i], "null");
669-
}
670-
}
669+
}*/
671670
}
672671

673672
// COMBINE

src/Layers/xrRenderPC_R4/r4_rendertarget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,15 @@ CRenderTarget::CRenderTarget()
682682
rt_ssao_temp.create(r2_RT_ssao_temp, w, h, D3DFMT_G16R16F, SampleCount); // moved upper
683683
s_ssao.create(b_ssao, "r2\\ssao");
684684

685+
686+
/* Should be used in r4_rendertarget_phase_ssao.cpp but it's commented there.
685687
if (RImplementation.o.dx10_msaa)
686688
{
687689
const int bound = RImplementation.o.dx10_msaa_opt ? 1 : RImplementation.o.dx10_msaa_samples;
688690
689691
for (int i = 0; i < bound; ++i)
690692
s_ssao_msaa[i].create(b_ssao_msaa[i], "null");
691-
}
693+
}*/
692694
}
693695
}
694696

0 commit comments

Comments
 (0)