Skip to content

Commit 622357d

Browse files
Xottab-DUTYq4a
authored andcommitted
xrRender_RX: removed software processor from details manager
It was only used when your GPU doesn't support the vertex shaders....
1 parent a472cb2 commit 622357d

14 files changed

+10
-227
lines changed

src/Layers/xrRender/DetailManager.cpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ CDetailManager::CDetailManager() : xrc("detail manager")
7878
{
7979
dtFS = nullptr;
8080
dtSlots = nullptr;
81-
soft_Geom = nullptr;
8281
hw_Geom = nullptr;
8382
hw_BatchSize = 0;
8483
hw_VB = 0;
@@ -194,11 +193,7 @@ void CDetailManager::Load()
194193
// Make dither matrix
195194
bwdithermap(2, dither);
196195

197-
// Hardware specific optimizations
198-
if (UseVS())
199-
hw_Load();
200-
else
201-
soft_Load();
196+
hw_Load();
202197

203198
// swing desc
204199
// normal
@@ -217,10 +212,7 @@ void CDetailManager::Load()
217212
#endif
218213
void CDetailManager::Unload()
219214
{
220-
if (UseVS())
221-
hw_Unload();
222-
else
223-
soft_Unload();
215+
hw_Unload();
224216

225217
for (DetailIt it = objects.begin(); it != objects.end(); it++)
226218
{
@@ -399,10 +391,9 @@ void CDetailManager::Render()
399391

400392
RCache.set_CullMode(CULL_NONE);
401393
RCache.set_xform_world(Fidentity);
402-
if (UseVS())
403-
hw_Render();
404-
else
405-
soft_Render();
394+
395+
hw_Render();
396+
406397
RCache.set_CullMode(CULL_CCW);
407398

408399
g_pGamePersistent->m_pGShaderConstants->m_blender_mode.w = 0.0f; //--#SM+#-- Флаг конца рендера травы [end of grass render]

src/Layers/xrRender/DetailManager.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,6 @@ class ECORE_API CDetailManager
184184
virtual ObjectList* GetSnapList() = 0;
185185
#endif
186186

187-
bool UseVS() { return HW.Caps.geometry_major >= 1; }
188-
// Software processor
189-
ref_geom soft_Geom;
190-
void soft_Load();
191-
void soft_Unload();
192-
void soft_Render();
193-
194187
// Hardware processor
195188
ref_geom hw_Geom;
196189
u32 hw_BatchSize;

src/Layers/xrRender/DetailManager_Decompress.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -299,24 +299,17 @@ gray255[3] = 255.f*float(c_pal->a3)/15.f;
299299

300300
// Vis-sorting
301301
#ifndef DBG_SWITCHOFF_RANDOMIZE
302-
if (!UseVS())
303-
{
304-
// Always still on CPU pipe
302+
if (Dobj->m_Flags.is(DO_NO_WAVING))
305303
Item.vis_ID = 0;
306-
}
307304
else
308305
{
309-
if (Dobj->m_Flags.is(DO_NO_WAVING))
310-
Item.vis_ID = 0;
306+
if (::Random.randI(0, 3) == 0)
307+
Item.vis_ID = 2; // Second wave
311308
else
312-
{
313-
if (::Random.randI(0, 3) == 0)
314-
Item.vis_ID = 2; // Second wave
315-
else
316-
Item.vis_ID = 1; // First wave
317-
}
309+
Item.vis_ID = 1; // First wave
318310
}
319311
#else
312+
// Always still on CPU pipe
320313
Item.vis_ID = 0;
321314
#endif
322315
// Save it

src/Layers/xrRender/DetailManager_soft.cpp

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

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@
248248
<ClCompile Include="..\xrRender\DetailManager.cpp" />
249249
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
250250
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
251-
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
252251
<ClCompile Include="..\xrRender\DetailModel.cpp" />
253252
<ClCompile Include="..\xrRender\dxParticleCustom.cpp" />
254253
<ClCompile Include="..\xrRender\ETextureParams.cpp" />

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@
336336
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
337337
<Filter>Details</Filter>
338338
</ClCompile>
339-
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
340-
<Filter>Details</Filter>
341-
</ClCompile>
342339
<ClCompile Include="..\xrRender\DetailModel.cpp">
343340
<Filter>Details</Filter>
344341
</ClCompile>

src/Layers/xrRenderPC_R1/xrRender_R1.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@
329329
<ClCompile Include="..\xrRender\DetailManager.cpp" />
330330
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
331331
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
332-
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
333332
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
334333
<ClCompile Include="..\xrRender\DetailModel.cpp" />
335334
<ClCompile Include="..\xrRender\du_box.cpp" />

src/Layers/xrRenderPC_R1/xrRender_R1.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,6 @@
632632
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
633633
<Filter>Details</Filter>
634634
</ClCompile>
635-
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
636-
<Filter>Details</Filter>
637-
</ClCompile>
638635
<ClCompile Include="..\xrRender\DetailManager_VS.cpp">
639636
<Filter>Details</Filter>
640637
</ClCompile>

src/Layers/xrRenderPC_R2/xrRender_R2.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@
341341
<ClCompile Include="..\xrRender\DetailManager.cpp" />
342342
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
343343
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
344-
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
345344
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
346345
<ClCompile Include="..\xrRender\DetailModel.cpp" />
347346
<ClCompile Include="..\xrRender\du_box.cpp" />

src/Layers/xrRenderPC_R2/xrRender_R2.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,6 @@
686686
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
687687
<Filter>Details</Filter>
688688
</ClCompile>
689-
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
690-
<Filter>Details</Filter>
691-
</ClCompile>
692689
<ClCompile Include="..\xrRender\DetailManager_VS.cpp">
693690
<Filter>Details</Filter>
694691
</ClCompile>

0 commit comments

Comments
 (0)