GPU: Add platform parameter for GPU architecture #112566
No reviewers
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112566
Loading…
Reference in New Issue
No description provided.
Delete Branch "Jason-Fielder/blender:GPUPlatformArchitectureParam"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Authored by Apple: Michael Parkin-White
@ -56,2 +56,4 @@
} eGPUSupportLevel;
typedef enum eGPUArchitectureType {
GPU_ARCHITECTURE_IMR = 0,
These terms are not clear.
If I look further in the code it is unified memory or not.
Think eGPUMemoryModel would be more appropriate as an GPU architecture is typically used to refer to a processor type or series. Possible values might be
GPU_MEMORY_MODEL_INTEGRATED
GPU_MEMORY_MODEL_DEDICATED
GPU_MEMORY_MODEL_UNIFIED
I think it is more about the way how the chip is build to render. So it has nothing to do with the memory model. Some intel chip might have some dedicated memory but still work as tile renderer.
The memory model would also likely be a valid capability to expose, but would cover different use-cases.
Currently, the use-case for architecture type would be to determine which implementation of virtual shadow map updating to use as per: #111283 (Metal: EEVEE Next: Optimize Virtual shadow maps for Apple Silicon).
Granted, the memory model could be used to achieve the same switch, but the implementation of the technique is mostly depending on the architecture style of the GPU, as Clement outlined.
It could still theoretically be possible to have either type of architecture with any other type of memory model.
This architecture check may also be relevant for other APIs in future, especially also for windows machines running with Qualcomm Snapdragon GPUs. (Qualcomm is also a little iffy as technically these GPUs can also run in immediate mode, depending on the bits-per-pixel and workload being rendered)
Perhaps it's a technicality atm, as atm, there is a correlation between tile-based architectures and system-on-chip Unified memory architecture, so I guess it depends which parameter best represents this.
I see two options:
In that case it makes more sense to have a GPU capability setting where we can check if it uses tiled rendering. As this is still an internal property think it is enough to use a bool.
GPU_tiled_renderer_support()
or something similar.Can you elaborate a bit on the usage/use case you have in mind. We might be able to start with just a GPU_capability for the memory model which each backend can set.
I did some reading on this topic. GPU architecture seems to be the correct term according to wikipedia and blogs. https://www.rastergrid.com/blog/gpu-tech/2021/07/gpu-architecture-types-explained/
I am fine with adding this to GPG as it currently is.
I would suggest to add defined to the shader codes. As that could be used to enable/disable the depth bias.
#define GPU_ARCHITECTURE_TBDR
#define GPU_ARCHITECTURE_IMR
Perhaps just add a comment what TBDR and IMR means (
Tile-based deferred rendering.
andImmediate mode rendering
.The rest seems fine. And sorry for the confusion due to lacking information on my side.
No problem! Thanks for all of the feedback, so in conclusion, best to revert to the original method (I realise I updated my patch locally to the
GPU_tiled_renderer_support
, but believe I must have forgotten to push the patch -- possibly pushed it to the shadow branch instead of this one).Good idea on adding the changes to the shader definitions as well, can look at getting that sorted.
@ -55,6 +55,11 @@ typedef enum eGPUSupportLevel {
GPU_SUPPORT_LEVEL_UNSUPPORTED,
} eGPUSupportLevel;
typedef enum eGPUArchitectureType {
do not use
e
prefix. This is from an older codestyle no longer in place.Ah gotcha! Will update thanks, had originally just aimed to be consistent with the other Enums declared in this file.
@blender-bot build