Skip to content

Commit 7ceaaf0

Browse files
intorrXottab-DUTY
authored andcommitted
Part 2 of the experiment to remove doug_lea_allocator.
1 parent a9eb04f commit 7ceaaf0

20 files changed

+53
-113
lines changed

src/Layers/xrRender/D3DXRenderBase.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class D3DXRenderBase : public IRender, public pureFrame
2424
BOOL val_bRecordMP; // record nearest for multi-pass
2525
R_feedback* val_feedback; // feedback for geometry being rendered
2626
u32 val_feedback_breakp; // breakpoint
27-
xr_vector<Fbox3, render_alloc<Fbox3>>* val_recorder; // coarse structure recorder
27+
xr_vector<Fbox3>* val_recorder; // coarse structure recorder
2828
u32 phase;
2929
u32 marker;
3030
bool pmask[2];
@@ -47,8 +47,8 @@ class D3DXRenderBase : public IRender, public pureFrame
4747
R_dsgraph::mapSorted_T mapHUDEmissive;
4848
#endif
4949

50-
xr_vector<R_dsgraph::_LodItem, render_alloc<R_dsgraph::_LodItem>> lstLODs;
51-
xr_vector<int, render_alloc<int>> lstLODgroups;
50+
xr_vector<R_dsgraph::_LodItem> lstLODs;
51+
xr_vector<int> lstLODgroups;
5252
xr_vector<ISpatial*> lstRenderables;
5353
xr_vector<ISpatial*> lstSpatial;
5454

@@ -75,7 +75,7 @@ class D3DXRenderBase : public IRender, public pureFrame
7575
val_feedback_breakp = id;
7676
val_feedback = V;
7777
}
78-
void set_Recorder(xr_vector<Fbox3, render_alloc<Fbox3>>* dest)
78+
void set_Recorder(xr_vector<Fbox3>* dest)
7979
{
8080
val_recorder = dest;
8181
if (dest)

src/Layers/xrRender/RenderAllocator.cpp

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/Layers/xrRender/RenderAllocator.hpp

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/Layers/xrRender/r__dsgraph_render.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ template <class T> IC bool cmp_textures_lexN(const T &lhs, const T &rhs)
7070
return std::lexicographical_compare(t1->begin(), t1->end(), t2->begin(), t2->end());
7171
}
7272

73-
template <class T> void sort_tlist(xr_vector<T::template TNode*, render_alloc<T::template TNode*>>& lst, T& textures)
73+
template <class T> void sort_tlist(xr_vector<T::template TNode*>& lst, T& textures)
7474
{
7575
int amount = textures.begin()->key->size();
7676

@@ -82,7 +82,7 @@ template <class T> void sort_tlist(xr_vector<T::template TNode*, render_alloc<T:
8282
}
8383
else
8484
{
85-
xr_vector<T::template TNode*, render_alloc<T::template TNode*>> temp;
85+
xr_vector<T::template TNode*> temp;
8686

8787
// Split into 2 parts
8888
for (auto &it : textures)
@@ -123,7 +123,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
123123
{
124124
mapNormalVS& vs = mapNormalPasses[_priority][iPass];
125125

126-
xr_vector<mapNormalVS::TNode*, render_alloc<mapNormalVS::TNode*>> nrmVS;
126+
xr_vector<mapNormalVS::TNode*> nrmVS;
127127
vs.getANY_P(nrmVS);
128128
std::sort(nrmVS.begin(), nrmVS.end(), cmp_val_ssa<mapNormalVS::TNode*>);
129129
for (auto & vs_it : nrmVS)
@@ -134,7 +134,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
134134
// GS setup
135135
mapNormalGS& gs = vs_it->val;
136136

137-
xr_vector<mapNormalGS::TNode*, render_alloc<mapNormalGS::TNode*>> nrmGS;
137+
xr_vector<mapNormalGS::TNode*> nrmGS;
138138
gs.getANY_P(nrmGS);
139139
std::sort(nrmGS.begin(), nrmGS.end(), cmp_val_ssa<mapNormalGS::TNode*>);
140140
for (auto & gs_it : nrmGS)
@@ -145,7 +145,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
145145
#else // USE_DX10
146146
mapNormalPS& ps = vs_it->val;
147147
#endif // USE_DX10
148-
xr_vector<mapNormalPS::TNode*, render_alloc<mapNormalPS::TNode*>> nrmPS;
148+
xr_vector<mapNormalPS::TNode*> nrmPS;
149149
ps.getANY_P(nrmPS);
150150
std::sort(nrmPS.begin(), nrmPS.end(), cmp_ps_val_ssa<mapNormalPS::TNode*>);
151151
for (auto &ps_it : nrmPS)
@@ -159,7 +159,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
159159
#else
160160
mapNormalCS& cs = ps_it->val;
161161
#endif
162-
xr_vector<mapNormalCS::TNode*, render_alloc<mapNormalCS::TNode*>> nrmCS;
162+
xr_vector<mapNormalCS::TNode*> nrmCS;
163163
cs.getANY_P(nrmCS);
164164
std::sort(nrmCS.begin(), nrmCS.end(), cmp_val_ssa<mapNormalCS::TNode*>);
165165
for (auto &cs_it : nrmCS)
@@ -168,7 +168,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
168168

169169
mapNormalStates& states = cs_it->val;
170170

171-
xr_vector<mapNormalStates::TNode*, render_alloc<mapNormalStates::TNode*>> nrmStates;
171+
xr_vector<mapNormalStates::TNode*> nrmStates;
172172
states.getANY_P(nrmStates);
173173
std::sort(nrmStates.begin(), nrmStates.end(), cmp_val_ssa<mapNormalStates::TNode*>);
174174
for (auto &state_it : nrmStates)
@@ -177,7 +177,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
177177

178178
mapNormalTextures& tex = state_it->val;
179179

180-
xr_vector<mapNormalTextures::TNode*, render_alloc<mapNormalTextures::TNode*>> nrmTextures;
180+
xr_vector<mapNormalTextures::TNode*> nrmTextures;
181181
sort_tlist<mapNormalTextures>(nrmTextures, tex);
182182
for (auto &tex_it : nrmTextures)
183183
{
@@ -221,7 +221,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
221221
{
222222
mapMatrixVS& vs = mapMatrixPasses[_priority][iPass];
223223

224-
xr_vector<mapMatrixVS::TNode*, render_alloc<mapMatrixVS::TNode*>> matVS;
224+
xr_vector<mapMatrixVS::TNode*> matVS;
225225
vs.getANY_P(matVS);
226226
std::sort(matVS.begin(), matVS.end(), cmp_val_ssa<mapMatrixVS::TNode*>);
227227
for (auto &vs_id : matVS)
@@ -231,7 +231,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
231231
#if defined(USE_DX10) || defined(USE_DX11)
232232
mapMatrixGS& gs = vs_id->val;
233233

234-
xr_vector<mapMatrixGS::TNode*, render_alloc<mapMatrixGS::TNode*>> matGS;
234+
xr_vector<mapMatrixGS::TNode*> matGS;
235235
gs.getANY_P(matGS);
236236
std::sort(matGS.begin(), matGS.end(), cmp_val_ssa<mapMatrixGS::TNode*>);
237237
for (auto &gs_it : matGS)
@@ -242,7 +242,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
242242
#else // USE_DX10
243243
mapMatrixPS& ps = vs_id->val;
244244
#endif // USE_DX10
245-
xr_vector<mapMatrixPS::TNode *, render_alloc<mapMatrixPS::TNode *>> matPS;
245+
xr_vector<mapMatrixPS::TNode *> matPS;
246246
ps.getANY_P(matPS);
247247
std::sort(matPS.begin(), matPS.end(), cmp_ps_val_ssa<mapMatrixPS::TNode *>);
248248
for (auto &ps_it : matPS)
@@ -256,7 +256,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
256256
#else
257257
mapMatrixCS& cs = ps_it->val;
258258
#endif
259-
xr_vector<mapMatrixCS::TNode*, render_alloc<mapMatrixCS::TNode*>> matCS;
259+
xr_vector<mapMatrixCS::TNode*> matCS;
260260
cs.getANY_P(matCS);
261261
std::sort(matCS.begin(), matCS.end(), cmp_val_ssa<mapMatrixCS::TNode*>);
262262
for (auto &cs_it : matCS)
@@ -265,7 +265,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
265265

266266
mapMatrixStates& states = cs_it->val;
267267

268-
xr_vector<mapMatrixStates::TNode*, render_alloc<mapMatrixStates::TNode*>> matStates;
268+
xr_vector<mapMatrixStates::TNode*> matStates;
269269
states.getANY_P(matStates);
270270
std::sort(matStates.begin(), matStates.end(), cmp_val_ssa<mapMatrixStates::TNode*>);
271271
for (auto &state_it : matStates)
@@ -274,7 +274,7 @@ void D3DXRenderBase::r_dsgraph_render_graph(u32 _priority)
274274

275275
mapMatrixTextures& tex = state_it->val;
276276

277-
xr_vector<mapMatrixTextures::TNode*, render_alloc<mapMatrixTextures::TNode*>> matTextures;
277+
xr_vector<mapMatrixTextures::TNode*> matTextures;
278278
sort_tlist<mapMatrixTextures>(matTextures, tex);
279279
for (auto &tex_it : matTextures)
280280
{
@@ -603,7 +603,7 @@ void D3DXRenderBase::r_dsgraph_render_subspace(IRender_Sector* _sector, CFrustum
603603

604604
void D3DXRenderBase::r_dsgraph_render_R1_box(IRender_Sector* S, Fbox& BB, int sh)
605605
{
606-
xr_vector<dxRender_Visual*, render_alloc<dxRender_Visual*>> lstVisuals;
606+
xr_vector<dxRender_Visual*> lstVisuals;
607607
lstVisuals.push_back(((CSector*)S)->root());
608608

609609
for (auto &it : lstVisuals)

src/Layers/xrRender/r__dsgraph_types.h

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

3-
#include "xrCore/fixedmap.h"
4-
#include "Layers/xrRender/RenderAllocator.hpp"
3+
#include "xrCore/FixedMap.h"
54

65
class dxRender_Visual;
76

@@ -61,24 +60,24 @@ using ps_type = ID3DPixelShader* ;
6160
#endif
6261

6362
// NORMAL
64-
using mapNormalDirect = xr_vector<_NormalItem, render_allocator::helper<_NormalItem>::result>;
63+
using mapNormalDirect = xr_vector<_NormalItem>;
6564

6665
struct mapNormalItems : public mapNormalDirect
6766
{
6867
float ssa;
6968
};
7069

71-
struct mapNormalTextures : public FixedMAP<STextureList*, mapNormalItems, render_allocator>
70+
struct mapNormalTextures : public FixedMAP<STextureList*, mapNormalItems>
7271
{
7372
float ssa;
7473
};
7574

76-
struct mapNormalStates : public FixedMAP<ID3DState*, mapNormalTextures, render_allocator>
75+
struct mapNormalStates : public FixedMAP<ID3DState*, mapNormalTextures>
7776
{
7877
float ssa;
7978
};
8079

81-
struct mapNormalCS : public FixedMAP<R_constant_table*, mapNormalStates, render_allocator>
80+
struct mapNormalCS : public FixedMAP<R_constant_table*, mapNormalStates>
8281
{
8382
float ssa;
8483
};
@@ -91,50 +90,50 @@ struct mapNormalAdvStages
9190
mapNormalCS mapCS;
9291
};
9392

94-
struct mapNormalPS : public FixedMAP<ps_type, mapNormalAdvStages, render_allocator>
93+
struct mapNormalPS : public FixedMAP<ps_type, mapNormalAdvStages>
9594
{
9695
float ssa;
9796
};
9897
#else
99-
struct mapNormalPS : public FixedMAP<ps_type, mapNormalCS, render_allocator>
98+
struct mapNormalPS : public FixedMAP<ps_type, mapNormalCS>
10099
{
101100
float ssa;
102101
};
103102
#endif // USE_DX11
104103

105104
#if defined(USE_DX10) || defined(USE_DX11)
106-
struct mapNormalGS : public FixedMAP<gs_type, mapNormalPS, render_allocator>
105+
struct mapNormalGS : public FixedMAP<gs_type, mapNormalPS>
107106
{
108107
float ssa;
109108
};
110109

111-
struct mapNormalVS : public FixedMAP<vs_type, mapNormalGS, render_allocator> {};
110+
struct mapNormalVS : public FixedMAP<vs_type, mapNormalGS> {};
112111
#else // USE_DX10
113-
struct mapNormalVS : public FixedMAP<vs_type, mapNormalPS, render_allocator> {};
112+
struct mapNormalVS : public FixedMAP<vs_type, mapNormalPS> {};
114113
#endif // USE_DX10
115114

116115
using mapNormal_T = mapNormalVS;
117116
using mapNormalPasses_T = mapNormal_T[SHADER_PASSES_MAX];
118117

119118
// MATRIX
120-
using mapMatrixDirect = xr_vector<_MatrixItem, render_allocator::helper<_MatrixItem>::result>;
119+
using mapMatrixDirect = xr_vector<_MatrixItem>;
121120

122121
struct mapMatrixItems : public mapMatrixDirect
123122
{
124123
float ssa;
125124
};
126125

127-
struct mapMatrixTextures : public FixedMAP<STextureList*, mapMatrixItems, render_allocator>
126+
struct mapMatrixTextures : public FixedMAP<STextureList*, mapMatrixItems>
128127
{
129128
float ssa;
130129
};
131130

132-
struct mapMatrixStates : public FixedMAP<ID3DState*, mapMatrixTextures, render_allocator>
131+
struct mapMatrixStates : public FixedMAP<ID3DState*, mapMatrixTextures>
133132
{
134133
float ssa;
135134
};
136135

137-
struct mapMatrixCS : public FixedMAP<R_constant_table*, mapMatrixStates, render_allocator>
136+
struct mapMatrixCS : public FixedMAP<R_constant_table*, mapMatrixStates>
138137
{
139138
float ssa;
140139
};
@@ -147,38 +146,38 @@ struct mapMatrixAdvStages
147146
mapMatrixCS mapCS;
148147
};
149148

150-
struct mapMatrixPS : public FixedMAP<ps_type, mapMatrixAdvStages, render_allocator>
149+
struct mapMatrixPS : public FixedMAP<ps_type, mapMatrixAdvStages>
151150
{
152151
float ssa;
153152
};
154153
#else
155-
struct mapMatrixPS : public FixedMAP<ps_type, mapMatrixCS, render_allocator>
154+
struct mapMatrixPS : public FixedMAP<ps_type, mapMatrixCS>
156155
{
157156
float ssa;
158157
};
159158
#endif // USE_DX11
160159

161160
#if defined(USE_DX10) || defined(USE_DX11)
162-
struct mapMatrixGS : public FixedMAP<gs_type, mapMatrixPS, render_allocator>
161+
struct mapMatrixGS : public FixedMAP<gs_type, mapMatrixPS>
163162
{
164163
float ssa;
165164
};
166165

167-
struct mapMatrixVS : public FixedMAP<vs_type, mapMatrixGS, render_allocator> {};
166+
struct mapMatrixVS : public FixedMAP<vs_type, mapMatrixGS> {};
168167
#else // USE_DX10
169-
struct mapMatrixVS : public FixedMAP<vs_type, mapMatrixPS, render_allocator> {};
168+
struct mapMatrixVS : public FixedMAP<vs_type, mapMatrixPS> {};
170169
#endif // USE_DX10
171170

172171
using mapMatrix_T = mapMatrixVS;
173172
using mapMatrixPasses_T = mapMatrix_T[SHADER_PASSES_MAX];
174173

175174
// Top level
176-
using mapSorted_T = FixedMAP<float, _MatrixItemS, render_allocator>;
175+
using mapSorted_T = FixedMAP<float, _MatrixItemS>;
177176
using mapSorted_Node = mapSorted_T::TNode;
178177

179-
using mapHUD_T = FixedMAP<float, _MatrixItemS, render_allocator>;
178+
using mapHUD_T = FixedMAP<float, _MatrixItemS>;
180179
using mapHUD_Node = mapHUD_T::TNode;
181180

182-
using mapLOD_T = FixedMAP<float, _LodItem, render_allocator>;
181+
using mapLOD_T = FixedMAP<float, _LodItem>;
183182
using mapLOD_Node = mapLOD_T::TNode;
184183
}

src/Layers/xrRenderPC_R1/xrRender_R1.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@
251251
<ClInclude Include="..\xrRender\ParticleEffectDef.h" />
252252
<ClInclude Include="..\xrRender\ParticleGroup.h" />
253253
<ClInclude Include="..\xrRender\PSLibrary.h" />
254-
<ClInclude Include="..\xrRender\RenderAllocator.hpp" />
255254
<ClInclude Include="..\xrRender\ResourceManager.h" />
256255
<ClInclude Include="..\xrRender\R_Backend.h" />
257256
<ClInclude Include="..\xrRender\R_Backend_hemi.h" />
@@ -372,7 +371,6 @@
372371
<ClCompile Include="..\xrRender\ParticleEffectDef.cpp" />
373372
<ClCompile Include="..\xrRender\ParticleGroup.cpp" />
374373
<ClCompile Include="..\xrRender\PSLibrary.cpp" />
375-
<ClCompile Include="..\xrRender\RenderAllocator.cpp" />
376374
<ClCompile Include="..\xrRender\ResourceManager.cpp" />
377375
<ClCompile Include="..\xrRender\ResourceManager_Loader.cpp" />
378376
<ClCompile Include="..\xrRender\ResourceManager_Reset.cpp" />

src/Layers/xrRenderPC_R1/xrRender_R1.vcxproj.filters

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,6 @@
579579
<ClInclude Include="..\xrRender\D3DXRenderBase.h">
580580
<Filter>Core</Filter>
581581
</ClInclude>
582-
<ClInclude Include="..\xrRender\RenderAllocator.hpp">
583-
<Filter>Core</Filter>
584-
</ClInclude>
585582
</ItemGroup>
586583
<ItemGroup>
587584
<ClCompile Include="stdafx.cpp">
@@ -968,9 +965,6 @@
968965
<ClCompile Include="..\xrRender\ParticleGroup.cpp">
969966
<Filter>Models\Visuals</Filter>
970967
</ClCompile>
971-
<ClCompile Include="..\xrRender\RenderAllocator.cpp">
972-
<Filter>Core</Filter>
973-
</ClCompile>
974968
</ItemGroup>
975969
<ItemGroup>
976970
<Text Include="Pipeline.txt" />

src/Layers/xrRenderPC_R2/r2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class CRender : public D3DXRenderBase
136136
light_Package LP_normal;
137137
light_Package LP_pending;
138138

139-
xr_vector<Fbox3, render_alloc<Fbox3>> main_coarse_structure;
139+
xr_vector<Fbox3> main_coarse_structure;
140140

141141
shared_str c_sbase;
142142
shared_str c_lmaterial;

0 commit comments

Comments
 (0)