Add hardware compatibility flags for CPU rendering and HIPRT control

- Introduced `--force-cpu-rendering` and `--disable-hiprt` flags to the runner command, allowing users to enforce CPU rendering and disable HIPRT acceleration.
- Updated the runner initialization and context structures to accommodate the new flags, enhancing flexibility in rendering configurations.
- Modified the rendering logic to respect these flags, improving compatibility and user control over rendering behavior in Blender.
This commit is contained in:
2026-03-13 21:15:44 -05:00
parent 5303f01f7c
commit dc525fbaa4
6 changed files with 52 additions and 6 deletions

View File

@@ -54,10 +54,15 @@ type Runner struct {
hasNVIDIA bool
gpuBackendProbed bool
gpuDetectionFailed bool
// forceCPURendering forces CPU rendering for all jobs regardless of metadata/backend detection.
forceCPURendering bool
// disableHIPRT disables HIPRT acceleration when configuring Cycles HIP devices.
disableHIPRT bool
}
// New creates a new runner.
func New(managerURL, name, hostname string) *Runner {
func New(managerURL, name, hostname string, forceCPURendering, disableHIPRT bool) *Runner {
manager := api.NewManagerClient(managerURL)
r := &Runner{
@@ -67,6 +72,9 @@ func New(managerURL, name, hostname string) *Runner {
processes: executils.NewProcessTracker(),
stopChan: make(chan struct{}),
processors: make(map[string]tasks.Processor),
forceCPURendering: forceCPURendering,
disableHIPRT: disableHIPRT,
}
// Generate fingerprint
@@ -307,6 +315,8 @@ func (r *Runner) executeJob(job *api.NextJobResponse) (err error) {
r.IsGPULockedOut(),
r.HasHIP(),
r.GPUDetectionFailed(),
r.forceCPURendering,
r.disableHIPRT,
func() { r.SetGPULockedOut(true) },
)