Fix: incorrect configuration of imbuf used for render passes #117184

Merged
Sergey Sharybin merged 2 commits from Sergey/blender:fix_render_result_planes into main 2024-01-17 10:03:09 +01:00

Some areas in Blender expect planes to set to a proper value, and also the float buffer color space is checked to make decisions. This PR contains 2 commits which addresses these two aspects.

In practice this solves assert failure in the GPU compositor code which checks expected and actual imbuf texture format when viewing Depth pass coming from multilayer EXR (it probably also fixes assert when the pass comes from the render result, but that is a bit more tricky yo check in the debug build).

Some areas in Blender expect planes to set to a proper value, and also the float buffer color space is checked to make decisions. This PR contains 2 commits which addresses these two aspects. In practice this solves assert failure in the GPU compositor code which checks expected and actual imbuf texture format when viewing Depth pass coming from multilayer EXR (it probably also fixes assert when the pass comes from the render result, but that is a bit more tricky yo check in the debug build).
Sergey Sharybin added 2 commits 2024-01-16 20:30:31 +01:00
02633498fd Fix incorrect number of planes for ImBuf used for render passes
Set the number of planes based on the number of pass channels.

If the pass contains 2 passes or more than 4 passes set the number
of planes to the previously used value of 32.

This is needed because quite some areas check for the number of
planes for various optimizations. For example, this is one of the
factors which make IMB_create_gpu_texture() to choose the texture
format. If the number of planes for the depth pass is set to the
previously used this function will never consider using single
channel GPU texture.

Unfortunately, this change is not enough to make the GPU texture
to use single channel format as the color space of the image
buffer is also checked, and that is nullptr which means scene linear.
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
3208a1818a
Render: Set non-color colorspace for ImBuf of data passes
This allows code outside of the render pipeline to make proper
decisions about how the imbuf of render passes are to be handled.

For example, IMB_create_gpu_texture() will now properly select
single channel grayscale texture format for depth pass coming from
multilayer EXR, additionally solving assert in the GPU compositor
code which verifies expected and actual imbuf texture format.
Author
Owner

@blender-bot build

@blender-bot build
Sergey Sharybin added the
Module
Render & Cycles
label 2024-01-16 20:32:16 +01:00
Sergey Sharybin requested review from Brecht Van Lommel 2024-01-16 20:32:31 +01:00
Hans Goudey changed title from Fix incorrect configuration of imbuf used for render passes to Fix: incorrect configuration of imbuf used for render passes 2024-01-16 20:45:51 +01:00
Brecht Van Lommel approved these changes 2024-01-16 20:49:50 +01:00
Sergey Sharybin merged commit 11c2028795 into main 2024-01-17 10:03:09 +01:00
Sergey Sharybin deleted branch fix_render_result_planes 2024-01-17 10:03:11 +01:00
Sign in to join this conversation.
No reviewers
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
2 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#117184
No description provided.