Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2012

Merged
merged 2 commits into from
Sep 29, 2024
Merged

Fixes #2012

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zenovis/xinxinoptix/OptiXStuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
2 changes: 1 addition & 1 deletion zenovis/xinxinoptix/optixPathTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ static void buildLightSpheresGAS( PathTracerState& state, std::vector<float4>& l
raii<CUdeviceptr> d_vertex_buffer{};

{
auto data_length = sizeof( Vertex ) * sphere_count;
auto data_length = sizeof( float4 ) * sphere_count;

CUDA_CHECK( cudaMalloc( reinterpret_cast<void**>( &d_vertex_buffer.reset() ), data_length) );
CUDA_CHECK( cudaMemcpy( reinterpret_cast<void*>( (CUdeviceptr)d_vertex_buffer ), lightSpheres.data(),
Expand Down
Loading