Commit Graph

10 Commits

Author SHA1 Message Date
Brandon Jones 41cbf0279c Reland ExternalTexture Gamma/Gamut Correction
Adds configurable gamma and gamut correction in Tint's external texture
transform. Adds constants in Dawn to perform correct conversion from
BT.709 to sRGB.

Bug: dawn:1082
Change-Id: I68b7ad7ccec29977c637a0a0d4f526cd47fe73d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88367
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-04-29 21:00:14 +00:00
Ben Clayton 1d882f55b7 Revert "Add External Texture Gamma/Gamut Correction"
This reverts commit 857175e59b.

Reason for revert: Suspected change for Dawn -> Chromium roll failures:

* https://chromium-review.googlesource.com/c/chromium/src/+/3607875/
* https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/982037/overview
* https://chrome-public-gold.skia.org/search?issue=3607875&crs=gerrit&patchsets=3&corpus=chrome-gpu


Original change's description:
> Add External Texture Gamma/Gamut Correction
>
> Adds configurable gamma and gamut correction in Tint's external texture
> transform. Adds constants in Dawn to perform correct conversion from
> BT.709 to sRGB.
>
> Bug: dawn:1082
> Change-Id: Id5eecc37f0224541bf36e2f9757e7e2047e4b66b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87666
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>

TBR=cwallez@chromium.org,enga@chromium.org,brandon1.jones@intel.com,bclayton@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Id3880e506172a18ff1258462c8c4cedb5c51c235
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:1082
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-26 12:20:02 +00:00
Brandon Jones 857175e59b Add External Texture Gamma/Gamut Correction
Adds configurable gamma and gamut correction in Tint's external texture
transform. Adds constants in Dawn to perform correct conversion from
BT.709 to sRGB.

Bug: dawn:1082
Change-Id: Id5eecc37f0224541bf36e2f9757e7e2047e4b66b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87666
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
2022-04-25 22:22:51 +00:00
Stephen White 790e4c2d60 GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL.
The OpenGL ES 3.1 spec says:

"The point size is taken from the shader built-in gl_PointSize written by the vertex shader, and clamped to the implementation-dependent point size range. If the value written to gl_PointSize is less than or equal to zero, or if no value is written, the point size is undefined."

ANGLE/D3D11 will emit a warning on this and abort processing, causing dawn_end2end tests to fail.

Bug: dawn:1390
Change-Id: I6a56467842ba80d8a070af7240ee07bb111089dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87720
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-04-22 21:25:02 +00:00
Brandon Jones 6cb57a9847 Change External Texture YUV-to-RGB Conversion to Use Matrix
Changes Dawn and Tint to use a 3x3 matrix for external texture
YUV-to-RGB conversions. This will allow us to use standard matrices
as they exist in SkYuvMath.

Bugs: dawn::1082
Change-Id: I8e0c7c3dc1c085d8f336da956aea9496913b70fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86847
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
2022-04-21 16:02:36 +00:00
Jiawei Shao 9d27aaaaa1 Always use 0 for the Depth operand of OpTypeImage
This CL is based on the below one with changes on the unittests:
https://dawn-review.googlesource.com/c/tint/+/60860

Bug: dawn:1030
Test: tint_unittests

Change-Id: I4624a0abd3c4905137b6ce1b3f57e4d9a4510eb4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85324
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86065
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-08 08:33:28 +00:00
Antonio Maiorano a730eb738e Add option to auto generate bindings for external textures
With this change, the backend sanitizers always run the
MultiplanarExternalTexture transform. If the new option is enabled, it
auto-generates bindings for this transform.

This change also enables this auto-generation for the Tint commandline
application, as well as for the fuzzers.

Bug: chromium:1310623
Change-Id: I3c661c4753dc67c0212051d09024cbeda3939f8c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85542
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-04-06 13:57:54 +00:00
Stephen White b7e560dea0 GLSL: fix "uniform" qualifier on texture parameters.
Textures as function parameters should not have the "uniform"
qualifier. Fixed by handling StorageClass::kUniformConstant the
same as StorageClass::kUniform, and removing the unconditional
"uniform" qualifier output. (Global texture variables have
StorageClass::kUniformConstant set, while function parameters don't.)

Change-Id: I9d380550ac4554917527ff330171a76a90a290e8
Bug: tint:1492
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85820
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-04-05 18:51:15 +00:00
James Price 3b671cb377 wgsl: Separate struct members with commas
Use of semicolons is still supported, but deprecated.

Also updates the parsing methods for structures to better match the
WGSL grammar.

Bug: tint:1475
Change-Id: I7675ba42c13f91080b0ac173c352e0092021f80b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/84380
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2022-03-28 14:31:22 +00:00
Ryan Harrison dbc13af287 tint->dawn: Shuffle source tree in preperation of merging repos
docs/    -> docs/tint/
fuzzers/ -> src/tint/fuzzers/
samples/ -> src/tint/cmd/
src/     -> src/tint/
test/    -> test/tint/

BUG=tint:1418,tint:1433

Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2022-02-21 15:19:07 +00:00