Skip to content

Commit ef4002a

Browse files
committed
Fixed crash with volumetric fog
1 parent 0dd7254 commit ef4002a

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@
55

66
namespace
77
{
8-
const xr_token simulation_type_token[] = {{"Fog", dx103DFluidData::ST_FOG}, {"Fire", dx103DFluidData::ST_FIRE}, {0, 0}};
8+
const xr_token simulation_type_token[] = {
9+
{"Fog", dx103DFluidData::ST_FOG},
10+
{"Fire", dx103DFluidData::ST_FIRE},
11+
{0, 0}
12+
};
913

10-
const xr_token emitter_type_token[] = {{"SimpleGaussian", dx103DFluidEmitters::ET_SimpleGausian},
11-
{"SimpleDraught", dx103DFluidEmitters::ET_SimpleDraught}, {0, 0}};
14+
const xr_token emitter_type_token[] = {
15+
{"SimpleGaussian", dx103DFluidEmitters::ET_SimpleGausian},
16+
{"SimpleDraught", dx103DFluidEmitters::ET_SimpleDraught},
17+
{0, 0}
18+
};
1219
}
1320

1421
DXGI_FORMAT dx103DFluidData::m_VPRenderTargetFormats[VP_NUM_TARGETS] = {
@@ -20,7 +27,7 @@ DXGI_FORMAT dx103DFluidData::m_VPRenderTargetFormats[VP_NUM_TARGETS] = {
2027
dx103DFluidData::dx103DFluidData()
2128
{
2229
D3D_TEXTURE3D_DESC desc;
23-
desc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_RENDER_TARGET;
30+
desc.BindFlags = D3D_BIND_SHADER_RESOURCE | D3D_BIND_RENDER_TARGET;
2431
desc.CPUAccessFlags = 0;
2532
desc.MipLevels = 1;
2633
desc.MiscFlags = 0;

src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void dx103DFluidManager::Initialize(int width, int height, int depth)
104104
InitShaders();
105105

106106
D3D_TEXTURE3D_DESC desc;
107-
desc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_RENDER_TARGET;
107+
desc.BindFlags = D3D_BIND_SHADER_RESOURCE | D3D_BIND_RENDER_TARGET;
108108
desc.CPUAccessFlags = 0;
109109
desc.MipLevels = 1;
110110
desc.MiscFlags = 0;

src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ void CBlender_Compile::r_Pass(LPCSTR _vs, LPCSTR _gs, LPCSTR _ps, bool bFog, BOO
197197
#ifdef USE_DX11
198198
dest.hs = RImplementation.Resources->_CreateHS("null");
199199
dest.ds = RImplementation.Resources->_CreateDS("null");
200+
dest.cs = RImplementation.Resources->_CreateCS("null");
200201
#endif
201202
ctable.merge(&ps->constants);
202203
ctable.merge(&vs->constants);

0 commit comments

Comments
 (0)