mirror of https://bitbucket.org/CPMADevs/cnq3
fixed a couple of raytracing-related crashes
This commit is contained in:
parent
e69dc0c57b
commit
c592ef22d6
|
@ -171,11 +171,6 @@ void Raytracing::Init()
|
||||||
desc.shortLifeTime = true;
|
desc.shortLifeTime = true;
|
||||||
desc.structureByteCount = structByteCount;
|
desc.structureByteCount = structByteCount;
|
||||||
tlasInstanceBuffer = CreateBuffer(desc);
|
tlasInstanceBuffer = CreateBuffer(desc);
|
||||||
}
|
|
||||||
|
|
||||||
void Raytracing::ProcessWorld(world_t& world)
|
|
||||||
{
|
|
||||||
TagMapSurfacesRecursively(world.nodes);
|
|
||||||
|
|
||||||
// make sure we're not trying to use deleted buffers after a video restart
|
// make sure we're not trying to use deleted buffers after a video restart
|
||||||
for(uint32_t i = 0; i < BLASBucket::Count; i++)
|
for(uint32_t i = 0; i < BLASBucket::Count; i++)
|
||||||
|
@ -185,6 +180,11 @@ void Raytracing::ProcessWorld(world_t& world)
|
||||||
dynamicBLASBuffers[i] = {};
|
dynamicBLASBuffers[i] = {};
|
||||||
}
|
}
|
||||||
tlasBuffer = RHI_MAKE_NULL_HANDLE();
|
tlasBuffer = RHI_MAKE_NULL_HANDLE();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Raytracing::ProcessWorld(world_t& world)
|
||||||
|
{
|
||||||
|
TagMapSurfacesRecursively(world.nodes);
|
||||||
|
|
||||||
BLASBuilder staticBLASes[BLASBucket::Count];
|
BLASBuilder staticBLASes[BLASBucket::Count];
|
||||||
WorldSurfaceList surfaceList;
|
WorldSurfaceList surfaceList;
|
||||||
|
|
|
@ -1338,7 +1338,7 @@ void R_AddRTSurf( const surfaceType_t* surface, const shader_t* shader )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (*surface == SF_ENTITY) {
|
if (*surface == SF_ENTITY) {
|
||||||
const refEntity_t* const ent = &backEnd.refdef.entities[tr.currentEntityNum].e;
|
const refEntity_t* const ent = &tr.refdef.entities[tr.currentEntityNum].e;
|
||||||
if (ent->reType == RT_SPRITE ||
|
if (ent->reType == RT_SPRITE ||
|
||||||
ent->reType == RT_LIGHTNING ||
|
ent->reType == RT_LIGHTNING ||
|
||||||
ent->reType == RT_POLY ||
|
ent->reType == RT_POLY ||
|
||||||
|
|
Loading…
Reference in New Issue