Cleanup: renaming of GPU contexts for clarity #108723

Merged
Brecht Van Lommel merged 3 commits from brecht/blender:context-names into main 2023-06-08 15:47:00 +02:00
  • opengl_context -> system_gpu_context. This is the operating system OpenGL,
    Metal or Vulkan context provided by GHOST.
  • gpu_context -> blender_gpu_context. This is the GPUContext provided by
    the Blender GPU module, which wraps the GHOST context and adds some state.
  • Various functions create/destroy/enable/disable both contexts, these have
    just gpu_context in the name now.
* opengl_context -> system_gpu_context. This is the operating system OpenGL, Metal or Vulkan context provided by GHOST. * gpu_context -> blender_gpu_context. This is the GPUContext provided by the Blender GPU module, which wraps the GHOST context and adds some state. * Various functions create/destroy/enable/disable both contexts, these have just gpu_context in the name now.
Brecht Van Lommel added 1 commit 2023-06-07 20:07:21 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
30239542b3
Cleanup: renaming of GPU contexts for clarity
* opengl_context -> system_gpu_context. This is the operating system OpenGL,
  Metal or Vulkan context provided by GHOST.
* gpu_context -> blender_gpu_context. This is the GPUContext provided by
  the Blender GPU module, which wraps the GHOST context and adds some state.
* Various functions create/destroy/enable/disable both contexts, these have
  just gpu_context in the name now.
Brecht Van Lommel requested review from Jeroen Bakker 2023-06-07 20:07:34 +02:00
Brecht Van Lommel requested review from Clément Foucault 2023-06-07 20:07:35 +02:00
Member

@blender-bot build

@blender-bot build
Jeroen Bakker reviewed 2023-06-08 08:21:57 +02:00
@ -68,2 +67,3 @@
GHOST_glDebugContext = (1 << 1),
GHOST_gpuStereoVisual = (1 << 0),
GHOST_gpuDebugContext = (1 << 1),
} GHOST_GLFlags;
Member

For consistency GHOST_GPUFlags

For consistency GHOST_GPUFlags
brecht marked this conversation as resolved
Clément Foucault approved these changes 2023-06-08 09:01:40 +02:00
Clément Foucault left a comment
Member

I don't know if the scope of this patch is to be more thorough or not.

This is already a much needed and welcome cleanup. I just highlighted some further cleanup in the same areas. Feel free to just commit this patch as it is if you want.

I don't know if the scope of this patch is to be more thorough or not. This is already a much needed and welcome cleanup. I just highlighted some further cleanup in the same areas. Feel free to just commit this patch as it is if you want.
@ -231,3 +231,3 @@
* \param height: The height the window.
* \param state: The state of the window when opened.
* \param glSettings: Misc OpenGL settings.
* \param gpuSettings: Misc OpenGL settings.

Still mention of OpenGL, maybe mention other backend as well? or just "GPU backend".

Still mention of OpenGL, maybe mention other backend as well? or just "GPU backend".
brecht marked this conversation as resolved
@ -78,3 +78,3 @@
* \param height: The height the window.
* \param state: The state of the window when opened.
* \param glSettings: Misc OpenGL settings.
* \param gpuSettings: Misc OpenGL settings.

same

same
brecht marked this conversation as resolved
@ -104,3 +104,3 @@
* \param height: The height the window.
* \param state: The state of the window when opened.
* \param glSettings: Misc OpenGL settings.
* \param gpuSettings: Misc OpenGL settings.

same

same
brecht marked this conversation as resolved
@ -169,3 +168,4 @@
void DRW_gpu_context_disable(void);
#ifdef WITH_XR_OPENXR
/* XXX: see comment on #DRW_xr_opengl_context_get() */

Missed occurence.

Missed occurence.
brecht marked this conversation as resolved
@ -3159,3 +3159,3 @@
{
if (G.background && DST.gl_context == NULL) {
if (G.background && DST.system_gpu_context == NULL) {
WM_init_opengl();

I think it's a good opportunity to also rename this.

I think it's a good opportunity to also rename this.
brecht marked this conversation as resolved
@ -1296,3 +1296,3 @@
if (engine->wm_gpu_context) {
if (engine->wm_blender_gpu_context) {
/* Activate new OpenGL Context for GPUContext creation. */

Fix comments in this file. Rename OpenGL Context to System Context.

Fix comments in this file. Rename `OpenGL Context` to `System Context`.
brecht marked this conversation as resolved
@ -880,41 +880,41 @@ void RE_test_break_cb(Render *re, void *handle, bool (*f)(void *handle))
/** \name OpenGL Context

Fix comments in this file.

Fix comments in this file.
brecht marked this conversation as resolved
Jeroen Bakker approved these changes 2023-06-08 09:14:04 +02:00
Brecht Van Lommel added 1 commit 2023-06-08 12:51:10 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
1aeaeef68b
More OpenGL to GPU renaming
Author
Owner

@blender-bot build

@blender-bot build
Brecht Van Lommel added 1 commit 2023-06-08 14:06:56 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
4b0980541e
Fix OpenXR
Brecht Van Lommel merged commit a2bd080cf3 into main 2023-06-08 15:47:00 +02:00
Brecht Van Lommel deleted branch context-names 2023-06-08 15:47:01 +02:00
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
3 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#108723
No description provided.