Cycles Viewport broken on 3.5.0 Alpha Master since 2022-12-01 build (MacBook Pro 15.4 Intel) #102944

Closed
opened 2022-12-05 01:08:02 +01:00 by Caco Oportot · 15 comments

System Information
Operating system: macOS Big Sur (11.7.1)
Graphics card: Intel Iris Pro, NVIDIA GeForce GT 750M

Blender Version
Broken: 3.5.0, 9719fd6964, master, 2022-12-02
Worked: 3.5.0, 4aac5b92c1, master, 2022-11-30

Short description of error

Viewport on Cycles doesn´t work and shows gfx artifacts. (attached image)

Screen Shot 2022-12-04 at 20.15.05.png

MacBook Pro (Retina, 15-inch, Late 2013)
2,3 GHz Quad-Core Intel Core i7
16 GB 1600 MHz DDR3
Intel Iris Pro, NVIDIA GeForce GT 750M

Same happens on both macOS Big Sur (11.7.1) and macOS Catalina (10.15.7).

Problem first detected on 3.5.0 master 587b213fe1 build from 2022-12-01

Does not happen on my Mac Pro (Late 2013) with AMD FirePro D500 on macOS Mojave (10.14.6)

Exact steps for others to reproduce the error

Launch Blender, default cube scene, change Render Engine to Cycles, change Viewport Shading to Rendered

**System Information** Operating system: macOS Big Sur (11.7.1) Graphics card: Intel Iris Pro, NVIDIA GeForce GT 750M **Blender Version** Broken: 3.5.0, 9719fd696488, master, 2022-12-02 Worked: 3.5.0, 4aac5b92c1bb, master, 2022-11-30 **Short description of error** Viewport on Cycles doesn´t work and shows gfx artifacts. (attached image) ![Screen Shot 2022-12-04 at 20.15.05.png](https://archive.blender.org/developer/F13993975/Screen_Shot_2022-12-04_at_20.15.05.png) MacBook Pro (Retina, 15-inch, Late 2013) 2,3 GHz Quad-Core Intel Core i7 16 GB 1600 MHz DDR3 Intel Iris Pro, NVIDIA GeForce GT 750M Same happens on both macOS Big Sur (11.7.1) and macOS Catalina (10.15.7). Problem first detected on 3.5.0 master 587b213fe168 build from 2022-12-01 Does **not** happen on my Mac Pro (Late 2013) with AMD FirePro [D500](https://archive.blender.org/developer/D500) on macOS Mojave (10.14.6) **Exact steps for others to reproduce the error** Launch Blender, default cube scene, change Render Engine to Cycles, change Viewport Shading to Rendered
Author

Added subscriber: @Caco-Oportot

Added subscriber: @Caco-Oportot
Author

Rendering on Cycles seems to work fine, the problem appears only on the Viewport with Cycles

Rendering on Cycles seems to work fine, the problem appears only on the Viewport with Cycles
Member
Added subscribers: @Michael-Parkin-White-Apple, @OmarEmaraDev
Member

Looking at the commit range, it seems the culprit commit is b132e3b3ce. Though I can't confirm myself.

Looking at the commit range, it seems the culprit commit is b132e3b3ce. Though I can't confirm myself.

@OmarEmaraDev This would make sense as having introduced issues. I had been unable to test on every possible machine, though will take a look and try to understand what is causing this.
There may be an issue with the particular way syncs were handled on that machine, or perhaps even a zero-clear issue.

@OmarEmaraDev This would make sense as having introduced issues. I had been unable to test on every possible machine, though will take a look and try to understand what is causing this. There may be an issue with the particular way syncs were handled on that machine, or perhaps even a zero-clear issue.

@Caco-Oportot I presume this is happening when the Nvidia graphics card is engaged? I'm curious about Intel too, which may be used if Blender is launched on battery (and forced graphics acceleration is disabled).
Thanks!

@Caco-Oportot I presume this is happening when the Nvidia graphics card is engaged? I'm curious about Intel too, which may be used if Blender is launched on battery (and forced graphics acceleration is disabled). Thanks!
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Author

@Michael-Parkin-White-Apple Yes it happens only when NVIDIA GeForce GT 750M is engaged, I was able to force disable it on terminal and it worked but painfully slow and laggy.

Thank you for looking into this!

@Michael-Parkin-White-Apple Yes it happens only when NVIDIA GeForce GT 750M is engaged, I was able to force disable it on terminal and it worked but painfully slow and laggy. Thank you for looking into this!
Author

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

I haven't yet found a machine to repro, but looking at the code, while I'm not entirely sure if this was solely introduced from the patch porting the live viewport to GPU module, there is a listed Nvidia workaround for macOS which defers tile updates to drawing.

in intern/cycles/blender/display_driver.cpp

if (!background_ &&
      GPU_type_matches_ex(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY, GPU_BACKEND_ANY)) {
    tiles_->current_tile.need_update_texture_pixels = true;
  }
  else {
    update_tile_texture_pixels(tiles_->current_tile);
  }

While this part of the code was unchanged, it looks like the code to update the tile during draw was incorrectly deleted.

I'll submit a patch to add the following logic back in, to ensure textures are updated on Nvidia platforms. Though will need this to be verified!

void BlenderDisplayDriver::draw(const Params &params) {

...

if (tiles_->current_tile.need_update_texture_pixels) {
    update_tile_texture_pixels(tiles_->current_tile);
    tiles_->current_tile.need_update_texture_pixels = false;
  }

draw_tile(zoom_, texcoord_attribute, position_attribute, tiles_->current_tile.tile);

...

}
I haven't yet found a machine to repro, but looking at the code, while I'm not entirely sure if this was solely introduced from the patch porting the live viewport to GPU module, there is a listed Nvidia workaround for macOS which defers tile updates to drawing. in `intern/cycles/blender/display_driver.cpp` ``` if (!background_ && GPU_type_matches_ex(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY, GPU_BACKEND_ANY)) { tiles_->current_tile.need_update_texture_pixels = true; } else { update_tile_texture_pixels(tiles_->current_tile); } ``` While this part of the code was unchanged, it looks like the code to update the tile during draw was incorrectly deleted. I'll submit a patch to add the following logic back in, to ensure textures are updated on Nvidia platforms. Though will need this to be verified! ``` void BlenderDisplayDriver::draw(const Params &params) { ... if (tiles_->current_tile.need_update_texture_pixels) { update_tile_texture_pixels(tiles_->current_tile); tiles_->current_tile.need_update_texture_pixels = false; } draw_tile(zoom_, texcoord_attribute, position_attribute, tiles_->current_tile.tile); ... } ```
Author

@Michael-Parkin-White-Apple I wish I could help somehow, maybe if someone can compile a build that I can download and check if it fixed the issue... Please let me know!

Thank you!

@Michael-Parkin-White-Apple I wish I could help somehow, maybe if someone can compile a build that I can download and check if it fixed the issue... Please let me know! Thank you!

This issue was referenced by 96b6ea9ee6

This issue was referenced by 96b6ea9ee6b9a74513ee3627be514599b2412d43

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-12-07 18:19:04 +01:00
Author

Just reporting back, issue fixed on 3.5.0 master d5bcc1ef16 darwin.x86_64-release.

Thanks!!! :D

Just reporting back, issue fixed on 3.5.0 master d5bcc1ef16bd darwin.x86_64-release. Thanks!!! :D

@Caco-Oportot Glad to hear it! Thanks for confirming and raising the issue in the first place :)!

@Caco-Oportot Glad to hear it! Thanks for confirming and raising the issue in the first place :)!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#102944
No description provided.