Skip to content

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

Closed

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

Activity

  1. opencode-agent commented on Jun 18, 2026

    @opencode-agent

    Created PR #37

    New%20session%20-%202026-06-18T16%3A05%3A30.971Z
    opencode session  |  github run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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