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 = {};