Skip to content

Commit

Permalink
xrRender_RX: removed software processor from details manager
Browse files Browse the repository at this point in the history
It was only used when your GPU doesn't support the vertex shaders....
  • Loading branch information
Xottab-DUTY committed Oct 1, 2018
1 parent 84e1800 commit 71b5db5
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 227 deletions.
19 changes: 5 additions & 14 deletions src/Layers/xrRender/DetailManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ CDetailManager::CDetailManager() : xrc("detail manager")
{
dtFS = nullptr;
dtSlots = nullptr;
soft_Geom = nullptr;
hw_Geom = nullptr;
hw_BatchSize = 0;
hw_VB = 0;
Expand Down Expand Up @@ -194,11 +193,7 @@ void CDetailManager::Load()
// Make dither matrix
bwdithermap(2, dither);

// Hardware specific optimizations
if (UseVS())
hw_Load();
else
soft_Load();
hw_Load();

// swing desc
// normal
Expand All @@ -217,10 +212,7 @@ void CDetailManager::Load()
#endif
void CDetailManager::Unload()
{
if (UseVS())
hw_Unload();
else
soft_Unload();
hw_Unload();

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

RCache.set_CullMode(CULL_NONE);
RCache.set_xform_world(Fidentity);
if (UseVS())
hw_Render();
else
soft_Render();

hw_Render();

RCache.set_CullMode(CULL_CCW);

g_pGamePersistent->m_pGShaderConstants->m_blender_mode.w = 0.0f; //--#SM+#-- Флаг конца рендера травы [end of grass render]
Expand Down
7 changes: 0 additions & 7 deletions src/Layers/xrRender/DetailManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ class ECORE_API CDetailManager
virtual ObjectList* GetSnapList() = 0;
#endif

bool UseVS() { return HW.Caps.geometry_major >= 1; }
// Software processor
ref_geom soft_Geom;
void soft_Load();
void soft_Unload();
void soft_Render();

// Hardware processor
ref_geom hw_Geom;
u32 hw_BatchSize;
Expand Down
17 changes: 5 additions & 12 deletions src/Layers/xrRender/DetailManager_Decompress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,24 +299,17 @@ gray255[3] = 255.f*float(c_pal->a3)/15.f;

// Vis-sorting
#ifndef DBG_SWITCHOFF_RANDOMIZE
if (!UseVS())
{
// Always still on CPU pipe
if (Dobj->m_Flags.is(DO_NO_WAVING))
Item.vis_ID = 0;
}
else
{
if (Dobj->m_Flags.is(DO_NO_WAVING))
Item.vis_ID = 0;
if (::Random.randI(0, 3) == 0)
Item.vis_ID = 2; // Second wave
else
{
if (::Random.randI(0, 3) == 0)
Item.vis_ID = 2; // Second wave
else
Item.vis_ID = 1; // First wave
}
Item.vis_ID = 1; // First wave
}
#else
// Always still on CPU pipe
Item.vis_ID = 0;
#endif
// Save it
Expand Down
174 changes: 0 additions & 174 deletions src/Layers/xrRender/DetailManager_soft.cpp

This file was deleted.

1 change: 0 additions & 1 deletion src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
<ClCompile Include="..\xrRender\DetailManager.cpp" />
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
<ClCompile Include="..\xrRender\DetailModel.cpp" />
<ClCompile Include="..\xrRender\dxParticleCustom.cpp" />
<ClCompile Include="..\xrRender\ETextureParams.cpp" />
Expand Down
3 changes: 0 additions & 3 deletions src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,6 @@
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailModel.cpp">
<Filter>Details</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion src/Layers/xrRenderPC_R1/xrRender_R1.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@
<ClCompile Include="..\xrRender\DetailManager.cpp" />
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
<ClCompile Include="..\xrRender\DetailModel.cpp" />
<ClCompile Include="..\xrRender\du_box.cpp" />
Expand Down
3 changes: 0 additions & 3 deletions src/Layers/xrRenderPC_R1/xrRender_R1.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,6 @@
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_VS.cpp">
<Filter>Details</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion src/Layers/xrRenderPC_R2/xrRender_R2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@
<ClCompile Include="..\xrRender\DetailManager.cpp" />
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
<ClCompile Include="..\xrRender\DetailModel.cpp" />
<ClCompile Include="..\xrRender\du_box.cpp" />
Expand Down
3 changes: 0 additions & 3 deletions src/Layers/xrRenderPC_R2/xrRender_R2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,6 @@
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_VS.cpp">
<Filter>Details</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion src/Layers/xrRenderPC_R3/xrRender_R3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@
<ClCompile Include="..\xrRender\DetailManager.cpp" />
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
<ClCompile Include="..\xrRender\DetailModel.cpp" />
<ClCompile Include="..\xrRender\du_box.cpp" />
Expand Down
3 changes: 0 additions & 3 deletions src/Layers/xrRenderPC_R3/xrRender_R3.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,6 @@
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_VS.cpp">
<Filter>Details</Filter>
</ClCompile>
Expand Down
1 change: 0 additions & 1 deletion src/Layers/xrRenderPC_R4/xrRender_R4.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@
<ClCompile Include="..\xrRender\DetailManager.cpp" />
<ClCompile Include="..\xrRender\DetailManager_CACHE.cpp" />
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp" />
<ClCompile Include="..\xrRender\DetailManager_soft.cpp" />
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
<ClCompile Include="..\xrRender\DetailModel.cpp" />
<ClCompile Include="..\xrRender\du_box.cpp" />
Expand Down
3 changes: 0 additions & 3 deletions src/Layers/xrRenderPC_R4/xrRender_R4.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,6 @@
<ClCompile Include="..\xrRender\DetailManager_Decompress.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_soft.cpp">
<Filter>Details</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\DetailManager_VS.cpp">
<Filter>Details</Filter>
</ClCompile>
Expand Down

0 comments on commit 71b5db5

Please sign in to comment.