Skip to content

Commit

Permalink
Add engine version to shader cache path
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Aug 5, 2024
1 parent a972d9b commit 527bc74
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/Layers/xrRenderPC_R1/FStaticRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "../xrRender/dxRenderDeviceRender.h"
#include "../xrRender/dxWallMarkArray.h"
#include "../xrRender/dxUIShader.h"
//#include "../../xrServerEntities/smart_cast.h"
#include "../../xrCore/git_version.h"

using namespace R_dsgraph;

Expand Down Expand Up @@ -882,7 +882,9 @@ HRESULT CRender::shader_compile (
string_path file_name;
{
string_path file;
xr_strcpy(file, "shaders_cache\\r1\\");
xr_strcpy(file, "shaders_cache\\");
xr_strcat(file, _VER);
xr_strcat(file, "\\r1\\");
xr_strcat(file, name);
xr_strcat(file, ".");
xr_strcat(file, extension);
Expand Down
6 changes: 4 additions & 2 deletions src/Layers/xrRenderPC_R2/r2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "../xrRender/dxRenderDeviceRender.h"
#include "../xrRender/dxWallMarkArray.h"
#include "../xrRender/dxUIShader.h"
//#include "../../xrServerEntities/smart_cast.h"
#include "../../xrCore/git_version.h"

CRender RImplementation;

Expand Down Expand Up @@ -946,7 +946,9 @@ HRESULT CRender::shader_compile (
string_path file_name;
{
string_path file;
xr_strcpy(file, "shaders_cache\\r2\\");
xr_strcpy(file, "shaders_cache\\");
xr_strcat(file, _VER);
xr_strcat(file, "\\r2\\");
xr_strcat(file, name);
xr_strcat(file, ".");
xr_strcat(file, extension);
Expand Down
5 changes: 4 additions & 1 deletion src/Layers/xrRenderPC_R4/r4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "../xrRender/dxRenderDeviceRender.h"
#include "../xrRender/dxWallMarkArray.h"
#include "../xrRender/dxUIShader.h"
#include "../../xrCore/git_version.h"

#include "../xrRenderDX10/3DFluid/dx103DFluidManager.h"
#include "../xrRender/ShaderResourceTraits.h"
Expand Down Expand Up @@ -1110,7 +1111,9 @@ HRESULT CRender::shader_compile(
string_path file_name;
{
string_path file;
xr_strcpy(file, "shaders_cache\\d3d11\\");
xr_strcpy(file, "shaders_cache\\");
xr_strcat(file, _VER);
xr_strcat(file, "\\d3d11\\");
xr_strcat(file, name);
xr_strcat(file, ".");
xr_strcat(file, extension);
Expand Down

0 comments on commit 527bc74

Please sign in to comment.