Skip to content

Conversation

@fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Nov 1, 2025

Description

This is a following up change for #24281.

@fs-eire fs-eire requested a review from Copilot November 1, 2025 17:49
@fs-eire fs-eire enabled auto-merge (squash) November 1, 2025 17:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the ShaderHelper class to store a reference to WebGpuContext instead of separate references to wgpu::Device and wgpu::Limits. This change improves encapsulation by centralizing device feature queries and device properties access through the context object.

  • Replaced device_ and separate limits_ parameters with a single webgpu_context_ reference in ShaderHelper
  • Updated all device_.HasFeature() calls to use webgpu_context_.DeviceHasFeature() for consistency
  • Simplified the ShaderHelper constructor signature by passing WebGpuContext instead of individual device components

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
webgpu_context.cc Updated device feature checks to use DeviceHasFeature() method
shader_helper.h Changed constructor and member variable from device_ and limits_ to webgpu_context_
shader_helper.cc Updated constructor, feature checks, and limits initialization to use webgpu_context_
program_manager.cc Simplified ShaderHelper construction by passing webgpu_context_ directly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

guschmue
guschmue previously approved these changes Nov 4, 2025
@fs-eire fs-eire merged commit a32ac42 into main Nov 5, 2025
92 checks passed
@fs-eire fs-eire deleted the fs-eire/webgpu-has-feature branch November 5, 2025 19:54
Rohanjames1997 pushed a commit to Rohanjames1997/onnxruntime that referenced this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants