Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WGSL] Add overloads for textureSample #11934

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented Mar 24, 2023

9b4dfec

[WGSL] Add overloads for textureSample
https://bugs.webkit.org/show_bug.cgi?id=254431
rdar://107190590

Reviewed by Myles C. Maxfield.

Add the definitions for the overloads of textureSample that operate on non-depth
textures. This requires minor modifications to the DSL to support concrete instances
of types that can also be abstract (i.e. Vector and Matrix). The definitions are a
little hard to read, and I might revisit it soon, but for now it matches the existing
definitions.

* Source/WebGPU/WGSL/Overload.h:
* Source/WebGPU/WGSL/TypeDeclarations.rb:
* Source/WebGPU/WGSL/generator/main.rb:

Canonical link: https://commits.webkit.org/262204@main

803292f

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@tadeuzagallo tadeuzagallo self-assigned this Mar 24, 2023
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label Mar 24, 2023
Copy link
Contributor

@litherum litherum left a comment

Choose a reason for hiding this comment

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

yolo ruby

Copy link
Contributor

@djg djg left a comment

Choose a reason for hiding this comment

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

:shipit:

@@ -11,3 +11,17 @@
[T < Float, C, R].(Matrix[T, C, R], Vector[T, C]) => Vector[T, R],
[T < Float, C, R].(Vector[T, R], Matrix[T, C, R]) => Vector[T, C],
}

operator :textureSample, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we document the missing textureSample functions with a FIXME?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a link to a bugzilla bug that lists all the missing overloads

@tadeuzagallo tadeuzagallo force-pushed the eng/WGSL-Add-overloads-for-textureSample branch 2 times, most recently from 8f5e896 to 803292f Compare March 28, 2023 09:08
@tadeuzagallo tadeuzagallo added the merge-queue Applied to send a pull request to merge-queue label Mar 28, 2023
https://bugs.webkit.org/show_bug.cgi?id=254431
rdar://107190590

Reviewed by Myles C. Maxfield.

Add the definitions for the overloads of textureSample that operate on non-depth
textures. This requires minor modifications to the DSL to support concrete instances
of types that can also be abstract (i.e. Vector and Matrix). The definitions are a
little hard to read, and I might revisit it soon, but for now it matches the existing
definitions.

* Source/WebGPU/WGSL/Overload.h:
* Source/WebGPU/WGSL/TypeDeclarations.rb:
* Source/WebGPU/WGSL/generator/main.rb:

Canonical link: https://commits.webkit.org/262204@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-Add-overloads-for-textureSample branch from 803292f to 9b4dfec Compare March 28, 2023 10:14
@webkit-commit-queue
Copy link
Collaborator

Committed 262204@main (9b4dfec): https://commits.webkit.org/262204@main

Reviewed commits have been landed. Closing PR #11934 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 28, 2023
@webkit-commit-queue webkit-commit-queue merged commit 9b4dfec into WebKit:main Mar 28, 2023
@tadeuzagallo tadeuzagallo deleted the eng/WGSL-Add-overloads-for-textureSample branch May 17, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
5 participants