Skip to content

Commit ff8096c

Browse files
authored
Possible fix for corrupted CBuffers [r_ComputePass]
This does not affect anything but custom CS setups. Optional.
1 parent 9eab077 commit ff8096c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ void CBlender_Compile::r_TessPass(LPCSTR vs, LPCSTR hs, LPCSTR ds, LPCSTR gs, LP
252252

253253
void CBlender_Compile::r_ComputePass(LPCSTR cs)
254254
{
255+
//LVutner: Sometimes CBuffers would be either empty or corrupted.
256+
//That often happens with multipass CS setups. Needs more testing.
257+
if(strstr(Core.Params, "-clear_cs_constants"))
258+
ctable.clear();
259+
255260
dest.cs = DEV->_CreateCS(cs);
256261

257262
ctable.merge(&dest.cs->constants);

0 commit comments

Comments
 (0)