From b20b3983d436b33acaf204f0bf2aec344f69bb52 Mon Sep 17 00:00:00 2001 From: iaomw Date: Sun, 29 Sep 2024 15:20:58 +0800 Subject: [PATCH] improve pipeline cache logic --- zenovis/xinxinoptix/OptiXStuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenovis/xinxinoptix/OptiXStuff.h b/zenovis/xinxinoptix/OptiXStuff.h index f9ba910311..1644843984 100644 --- a/zenovis/xinxinoptix/OptiXStuff.h +++ b/zenovis/xinxinoptix/OptiXStuff.h @@ -154,7 +154,7 @@ inline uint CachedPrimitiveTypeFlags = UINT_MAX; inline bool configPipeline(OptixPrimitiveTypeFlags usesPrimitiveTypeFlags) { - if (usesPrimitiveTypeFlags == CachedPrimitiveTypeFlags) { return false; } + if (CachedPrimitiveTypeFlags != UINT_MAX && (usesPrimitiveTypeFlags&CachedPrimitiveTypeFlags == usesPrimitiveTypeFlags)) { return false; } CachedPrimitiveTypeFlags = usesPrimitiveTypeFlags; pipeline_compile_options = {};