mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-04-15 13:52:23 +00:00
fixed a couple of raytracing-related crashes
This commit is contained in:
parent
e69dc0c57b
commit
c592ef22d6
2 changed files with 6 additions and 6 deletions
|
@ -171,11 +171,6 @@ void Raytracing::Init()
|
|||
desc.shortLifeTime = true;
|
||||
desc.structureByteCount = structByteCount;
|
||||
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
|
||||
for(uint32_t i = 0; i < BLASBucket::Count; i++)
|
||||
|
@ -185,6 +180,11 @@ void Raytracing::ProcessWorld(world_t& world)
|
|||
dynamicBLASBuffers[i] = {};
|
||||
}
|
||||
tlasBuffer = RHI_MAKE_NULL_HANDLE();
|
||||
}
|
||||
|
||||
void Raytracing::ProcessWorld(world_t& world)
|
||||
{
|
||||
TagMapSurfacesRecursively(world.nodes);
|
||||
|
||||
BLASBuilder staticBLASes[BLASBucket::Count];
|
||||
WorldSurfaceList surfaceList;
|
||||
|
|
|
@ -1338,7 +1338,7 @@ void R_AddRTSurf( const surfaceType_t* surface, const shader_t* shader )
|
|||
return;
|
||||
|
||||
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 ||
|
||||
ent->reType == RT_LIGHTNING ||
|
||||
ent->reType == RT_POLY ||
|
||||
|
|
Loading…
Reference in a new issue