Skip to content

Drop Render* prefix#7109

Closed
kurtkuehnert wants to merge 3 commits intobevyengine:mainfrom
kurtkuehnert:drop_render_prefix
Closed

Drop Render* prefix#7109
kurtkuehnert wants to merge 3 commits intobevyengine:mainfrom
kurtkuehnert:drop_render_prefix

Conversation

@kurtkuehnert
Copy link
Copy Markdown
Contributor

Objective

  • alternative to Rename Render* to Gpu* #6968
  • Instead of changing the prefix of our reexported wgpu types from Render* to Gpu*, we omit them entirely.
  • This makes our API more in line with the wgpu one.
  • This change is only really viable if it is followed up by Separate bevy_gpu from bevy_render #7000 or a similar PR.
  • Example: RenderDevice -> Device, WgpuSettings -> Settings
  • With Separate bevy_gpu from bevy_render #7000 we can export these types at the root of the bevy_gpu crate. This allows for usages like this: gpu::Device if the type names should conflict.

Solution

  • Remove the Render* and Wgpu* prefixes of all wgpu related type names.
  • Remove the render_* and wgpu_* prefixes of all wgpu related variable names.

Changelog

  • Remove the Render* and Wgpu* prefixes of all wgpu related type names.
  • Remove the render_* and wgpu_* prefixes of all wgpu related variable names.

Migration Guide

You have to remove the Render* and Wgpu* prefixes of all wgpu related type names, as well as, the render_* and wgpu_* prefixes of all wgpu related variable names.

…ce, Context} to Gpu{Device, Queue, Adapter, AdapterInfo, Instance, Context}

renamed variable names render_{device, queue, adapter, adapter_info, instance, context} to gpu_{device, queue, adapter, adapter_info, instance, context}

renamed occurrences of the variable name `device` that refer to a `GPUDevice` to `gpu_device`

renamed occurrences of the variable name `queue` that refer to a `GPUQueue` to `gpu_queue`

type aliased GpuCommandEncoder
renamed GpuContext::command_encoder to GpuContext::gpu_command_encoder
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change X-Needs-SME This type of work requires an SME to approve it. labels Jan 6, 2023
@alice-i-cecile alice-i-cecile mentioned this pull request Oct 26, 2023
@alice-i-cecile alice-i-cecile added X-Contentious There are nontrivial implications that should be thought through and removed X-Needs-SME This type of work requires an SME to approve it. labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change X-Contentious There are nontrivial implications that should be thought through

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants