Repository navigation
Conversation
DeviceFromView fills Device.GPU from the device a gpu.View reports in OnReady, and device rules can match a web operating system by idiom with no model. Classify starts a device whose known GPU lacks compute or compressed texture formats at Low on every operating system, and the quality YAML schema moves to version 2.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #1485's remaining slice:
DeviceFromEnvcannot fillDevice.GPUbecause a game only gets its GPU device inside agpu.View'sOnReady, and a web game could not overrideClassify's idiom defaults because a device rule required a model, which browsers never report. This addsquality.DeviceFromView(env, dev), which returns the environment's device withGPUset fromdev.Capabilities(); letsquality.DeviceRulematch an optionalidiom(phone,tablet,desktop,mac,tvorwatch) with no model; and applies the no-compute or no-compressed-texture-formats Low cap on every OS rather than only on the web. The quality YAML schema moves to version 2, so aversion: 1file must change its version. Tests cover the web phone, tablet and desktop capability matrix, rule matching by OS and idiom, theDeviceFromViewpath through a realgpu.Viewdevice, and the new validation errors. Thedocs/enanddocs/zhguides, the File Formats page, a changelog fragment and an agent note are updated.Related issue
Fixes #1485
Verification
gofmt -l .produces no outputgo tool nsgo test ./...passes from the repository root — not run; the affected packages pass:go tool nsgo test ./pkg/quality/... ./internal/repocheck/..., andgo tool nsgo test ./pkg/quality -- -racego tool nsgo check -target macos,windows,linux,android,webpasses from the repository root —go tool nsgo checkpasses; the cross-target run is left to CIgo tool nsgo check -target ios,ios_simulatorpasses (if on macOS with Xcode) — left to CIbun run buildpasses (fordocs/orwebsite/changes) — not run locally because the website dependencies were not installed; left to CIdocs/en/anddocs/zh/updated (when applicable)Also ran
go run ./tools/changelog checkandbun run verify-notes; both pass.Screenshots
None: this adds an API helper and a quality configuration field, with no visible UI change.
Acceptance for every editor PR
Not an editor PR.