This CL moves the constructor for a sem::MemberAccessorExpression to
protected to make it clear that only Swizzle and StructMemberAccess
classes can be created.
Change-Id: I85eef6c6f41c4c36192d88b84150f15205f1bf22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107361
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
To match the spec.
Also add a bunch of missing texture test cases to
src/tint/ast/builtin_texture_helper_test.cc. Fix all the tests that were
broken because these were not being exercised.
Fixed: tint:1526
Change-Id: I207b51d307bbdc054b595e0e0e0fd3330607e171
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106681
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This is a reland of commit 63463c2f77
Original change's description:
> tint::transform::VertexPulling: require SingleEntryPoint
>
> This change the vertex pulling transform to look for the single vertex
> entry point in the module, instead of taking the entry point name in the
> config. This is necessary because the renamer needs to run before
> VertexPulling so that builtins like min() don't end up referring to the
> input WGSL. Putting the renamer before VertexPulling makes the config
> entry point name no longer match.
>
> Bug: dawn:1583
> Change-Id: I4c96eb83518e0d6fe8ce23b37e238f4a890eeb2f
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107080
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Ben Clayton <bclayton@google.com>
Bug: dawn:1583
Change-Id: Ida4ac03003dff95c26d7b2bff82f4717c90c9691
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107320
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This reverts commit 63463c2f77.
Reason for revert: Breaks the kokoro build
Original change's description:
> tint::transform::VertexPulling: require SingleEntryPoint
>
> This change the vertex pulling transform to look for the single vertex
> entry point in the module, instead of taking the entry point name in the
> config. This is necessary because the renamer needs to run before
> VertexPulling so that builtins like min() don't end up referring to the
> input WGSL. Putting the renamer before VertexPulling makes the config
> entry point name no longer match.
>
> Bug: dawn:1583
> Change-Id: I4c96eb83518e0d6fe8ce23b37e238f4a890eeb2f
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107080
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Ben Clayton <bclayton@google.com>
TBR=cwallez@chromium.org,bclayton@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I26f521213db6ce80cdccad20cbaa6a1c0d37b2c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:1583
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107280
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL removes the parsing of a `-` in front of numerics when lexed.
This will cause the number to become a UnaryOperator negation then the
number instead of a negative number.
Bug: tint:1679, tint:1141, tint:1570
Change-Id: I217c0ffcbe5be934c8d56bd83141b47ade83bc60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106463
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This change the vertex pulling transform to look for the single vertex
entry point in the module, instead of taking the entry point name in the
config. This is necessary because the renamer needs to run before
VertexPulling so that builtins like min() don't end up referring to the
input WGSL. Putting the renamer before VertexPulling makes the config
entry point name no longer match.
Bug: dawn:1583
Change-Id: I4c96eb83518e0d6fe8ce23b37e238f4a890eeb2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This CL fix the spv code generated for atomicCompareExchangeWeak,
specifically the emulated `exchanged` field of the returned struct.
It should be true if and only if the `old_value`, i.e. the return value
of spv `OpAtomicCompareExchange`, equals to the comparator, rather than
equals to new value.
Fixed: tint:1663
Change-Id: I1cb0de6bb6b90ae681f5053b8bdd6f6b247146f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107180
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
This is a reland of commit f392c38b67
The new added structure ImageCopyExternalTexture used in dawn only. Adding
tags : ["dawn"] to fix compile error.
Original change's description:
> Add CopyExternalTextureForBrowser()
>
> This API accept ExternalTexture object as copy source and a dawn 2D texture
> as destination. It has similar functions as CopyTextureForBrowser().
> The API is used to support cases that source images are multi-planar format
> and want to do conversion and uploading to a dawn 2D texture.
>
> Bug: chromium:1361363
> Change-Id: Ie390acfb95b47d417f4a8faa2d1e19163d549154
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105880
> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bug: chromium:1361363
Change-Id: I213c3dc7fe81ccc35050592e491995d0d5425f6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106883
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
This fixes cases where input args of different type are mixed between
constant and runtime evaluated. We initially did this only for builtins
(https://dawn-review.googlesource.com/c/dawn/+/104545) to fix cases like
`select`, but we also need this for binary operators like shift
left/right that also take args of differing types. For consistency, this
change also includes passing in the earliest evaluation stage when
looking up unary ops and initializer/conversions.
Bug: tint:1713
Change-Id: I196c67acfe767aa01aa45298d75cfc4d345d08ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107140
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds const-eval for the `atanh` operator.
Bug: tint:1581
Change-Id: I7d8989a348ad1d8ca463dae90233fd82d6faf2d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106849
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
DXC will bail if these get too deeply nested (~256).
This is also a risk for stack-overflows, so apply a limit agreed by the
WGSL working group.
Fixed: tint:1518
Change-Id: Idacdba85b36b27a0a89a3a7958fd4c6cce7dc84d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105964
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
This CL updates atan2 and atan to use the ConcatIntoIf helper
instead of doing the case concatention.
Bug: tint:1581
Change-Id: I4ea3153aefcab18db88ab81dd499b9f9e37e7906
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106846
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Specifies the value to use for argument values when generating end-to-end tests.
Use this to provide a legal value for atanh().
Change-Id: I008050c856f9d687ab918c68e90678c4e74f3a1d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106887
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
I'm sure this was needed at one point, but I can't seem to find the
requirement in either the spec or implementation. *shrug*
Change-Id: I8c139747c2a6864867ecda0b82a5f7991ad9d3ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106886
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
These were incorrectly abstract-int, instead of i32. Oops.
Change-Id: Iafac4883ee431b04fb473392f545ae26436f8343
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106885
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Change 104120 enabled `EGL_EXT_create_context_robustness` to ensure that robustness is enabled for OpenGL.
Despite listing `EGL_EXT_create_context_robustness` in the extension list, Nvidia linux drivers will error with `EGL_BAD_ATTRIBUTE` when `EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT` is specified when requesting an OpenGL context (ES works fine!)
EGL promoted this extension to core in EGL 1.5, and requesting `EGL_CONTEXT_OPENGL_ROBUST_ACCESS` keeps Nvidia happy - so use this instead.
Note: We already require EGL 1.5 for EGLImage.
Change-Id: I6012773aef0d53b1d147228f40e0348865e98107
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106884
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Use a utils::EnumSet to hold type flags.
This scales better than adding a virtual method for each flag.
Change IsConstructable() from virtual to inline method.
Also remove sem::MemoryLayout. This was some cruft from something
removed a long time ago.
Change-Id: Ib3371946d7f4b07692255641425ccf621dc3e2f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106220
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Derived interfaces were not exposing their base interface's attributes / methods / constants.
By fixing this, we now correctly expose the `message` property on interfaces deriving from `GPUError`.
Change-Id: I2f8cb4145b589a7b148495ad36f1ae00e388a99e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106881
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This CL adds const-eval for the `atan` operator.
Bug: tint:1581
Change-Id: I3d9b417e86af010dc2f18c4e0424ddf971d55984
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106844
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
The dependency graph needs to traverse function return attributes
as they can contain expressions now.
Bug: chromium:1377630
Change-Id: I338aa7ff1105baed93871ec44ca02285fabf407d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106845
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL updates the name of primary_expression to match spec.
Bug: tint:1633
Change-Id: Iba0f681a47f80f80913a5ce3efb6f753201b072c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106581
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This reverts commit f392c38b67.
Reason for revert: Breaking the roll into Chromium, and breaks the CMake build of Dawn. https://chromium-review.googlesource.com/c/chromium/src/+/3974728
Original change's description:
> Add CopyExternalTextureForBrowser()
>
> This API accept ExternalTexture object as copy source and a dawn 2D texture
> as destination. It has similar functions as CopyTextureForBrowser().
> The API is used to support cases that source images are multi-planar format
> and want to do conversion and uploading to a dawn 2D texture.
>
> Bug: chromium:1361363
> Change-Id: Ie390acfb95b47d417f4a8faa2d1e19163d549154
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105880
> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
TBR=cwallez@chromium.org,shaobo.yan@intel.com,enga@chromium.org,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I3f057b1e5fe3bb0e41063eb402d2c269c27aaedf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1361363
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106842
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>