Skip to content

Phase 15.5: CUDABackend::IsValid() only checks pointer, ignores cudaError/initialized #32

Description

@Cle2ment

Problem

CUDABackend::IsValid() (line 39) only checks m_CUDAState != nullptr.

If CUDARenderer_Init fails during stream creation, state->initialized remains false and state->cudaError may be set — but IsValid() still returns true.

The MOD-02b CPU fallback mechanism depends on IsValid() returning false when GPU is broken.

Fix

Add checks for state->initialized and state->cudaError in IsValid().

Files

  • RayTracing/src/CUDABackend.h
  • RayTracing/src/CUDABackend.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions