Vulkan: Add support for Framebuffer Depth Blit #112674

Merged
Jeroen Bakker merged 8 commits from Jeroen-Bakker/blender:vulkan/framebuffer-blit-depth into main 2023-09-28 10:00:32 +02:00
Member

This PR adds support for GPU_framebuffer_blit When used with GPU_DEPTH_BIT.
The challenge with is that not all GPUs support using a depth texture as a blit destination.

An AMD GPU doesn't support a depth buffer with stencil buffer as blit destination.
image

NOTE: AMD GPUs don't support 24 bit unsigned normalized depth textures at all.

In all cases when we use depth blitting we are blitting the whole texture
and in stead we can use a texture copy.

A negative effect is that we need to unbind the framebuffer when copying
depth textures, but a positive effect is that we can use a data transfer function what should
theoretically be faster.

This should be revisited when we are investigating in areas to improve the
performance of the Vulkan backend.

This PR adds support for `GPU_framebuffer_blit` When used with `GPU_DEPTH_BIT`. The challenge with is that not all GPUs support using a depth texture as a blit destination. An AMD GPU doesn't support a depth buffer with stencil buffer as blit destination. ![image](/attachments/130e7e38-2dbc-4653-950c-2234bd5bad52) > NOTE: AMD GPUs don't support 24 bit unsigned normalized depth textures at all. In all cases when we use depth blitting we are blitting the whole texture and in stead we can use a texture copy. A negative effect is that we need to unbind the framebuffer when copying depth textures, but a positive effect is that we can use a data transfer function what should theoretically be faster. This should be revisited when we are investigating in areas to improve the performance of the Vulkan backend.
Jeroen Bakker added this to the 4.0 milestone 2023-09-21 16:07:35 +02:00
Jeroen Bakker added the
Interest
Vulkan
label 2023-09-21 16:07:35 +02:00
Jeroen Bakker self-assigned this 2023-09-21 16:07:35 +02:00
Jeroen Bakker added 1 commit 2023-09-21 16:07:47 +02:00
Jeroen Bakker added this to the EEVEE & Viewport project 2023-09-21 16:08:19 +02:00
Jeroen Bakker added 1 commit 2023-09-22 08:26:15 +02:00
Jeroen Bakker added 2 commits 2023-09-22 11:28:51 +02:00
Jeroen Bakker added 2 commits 2023-09-26 14:05:08 +02:00
Jeroen Bakker added 2 commits 2023-09-28 09:42:44 +02:00
Jeroen Bakker modified the milestone from 4.0 to 4.1 2023-09-28 09:56:00 +02:00
Jeroen Bakker changed title from WIP: Vulkan: Add support for Framebuffer Depth Blit to Vulkan: Add support for Framebuffer Depth Blit 2023-09-28 09:57:18 +02:00
Jeroen Bakker merged commit ad93324580 into main 2023-09-28 10:00:32 +02: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 Assignees
1 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#112674
No description provided.