Skip to content

gles: enable seamless cube map filtering on desktop GL - #10628

Open
kuntal-devrat wants to merge 1 commit into
gfx-rs:trunkfrom
kuntal-devrat:gles-seamless-cube-map
Open

kuntal-devrat wants to merge 1 commit into
gfx-rs:trunkfrom
kuntal-devrat:gles-seamless-cube-map

Conversation

@kuntal-devrat

Copy link
Copy Markdown

Connections

Fixes #10486

Description

Desktop OpenGL defaults to non-seamless cube map sampling (GL_TEXTURE_CUBE_MAP_SEAMLESS disabled), causing visible seam artifacts when filtering across cube map faces. In contrast, OpenGL ES 3.0+ and WebGL 2 mandate seamless cube map filtering by specification and don't require an enable flag, while Vulkan, Metal, and Direct3D 12 also sample cube maps seamlessly.

Since wgpu-hal requires at least OpenGL 3.3 for desktop GL, TEXTURE_CUBE_MAP_SEAMLESS (introduced in OpenGL 3.2 / GL_ARB_seamless_cube_map) is guaranteed to be supported whenever !self.shared.es.

This PR enables glow::TEXTURE_CUBE_MAP_SEAMLESS during device initialization in Adapter::open on desktop OpenGL contexts.

Testing

  • Ran cargo test -p wgpu-hal --lib (passed).
  • Verified cargo clippy -p wgpu-hal --all-targets --all-features (0 warnings).
  • Verified cargo fmt --check and cargo xtask sync-repo-files --check.

Squash or Rebase?

Ready to rebase onto trunk.

LLM Use?

Assisted with investigating the issue, locating the initialization site in wgpu-hal, and drafting the fix and description.

Checklist

  • I self-reviewed and fully understand this PR.
  • CHANGELOG.md entries for the user-facing effects of this change are present.
  • The PR is minimal, and doesn't make sense to land as multiple PRs.
  • Commits are logically scoped and individually reviewable.
  • The PR description has enough context to understand the motivation and solution implemented.
  • This PR was automatically created by an Agent.
  • The description was automatically written by an Agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

GL backend: desktop GL cube sampling is not seamless (GL_TEXTURE_CUBE_MAP_SEAMLESS is never enabled)

1 participant