Implements the GPUCompilationInfo and GPUCompilationMessage interfaces,
adds the GPUCompilationMessageType enum, and adds the compilationInfo
method to GPUShaderModule.
BUG: dawn:746
Change-Id: Ied70cbbfedbf4890916ec076993714e5042f70e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The attribute was just in the wrong place, I shouldn't have removed it
completely.
Bug: chromium:1195827
Change-Id: Iad2a5fdcc2e8bd76ddb82cc09cde62c3a57e3c54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46800
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL adds depth clamping support to Metal by invoking
MTLRenderCommandEncoder::setDepthClipMode. I only implemented the
feature for the new-style of RenderPipelineDescriptor since the
old one seems to be deprecated.
Bug: dawn:716
Change-Id: Icd63c72294546042ae452360863a7f9c16b40f95
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45640
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL support subrect copy. Use scale/offset to copy from subrect of
source texture and viewport for copy to subrect of dstTexture.
BUG=dawn:465
Change-Id: Ice43c0da15f6d9526912879e2e734f6570f2d673
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46422
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Converts each of the native API backends to use RPD2 natively, started
converting the old format to the new one in the deprecated entry point,
removed all other handling and validation of the old format, and turned
on the deprecation warning.
BUG: dawn:642
Change-Id: I20b671960a83f65ecb4ce6ce1165a563025983cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46726
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Refactors the existing general reflection code to either use Tint or
SPIRV-Cross, depending on the backend being used and provided flags.
Tint is used when UseTintGenerator is enabled, otherwise SPIRV-Cross is
used.
For OpenGL, when Tint is used, additional reflection is performed using
SPIRV-Cross to support GLSL generation.
There still exists backend specific reflection that needs to be
implemented in Tint for the complete removal of SPIRV-Cross for
non-OpenGL when UseTintGenerator is enabled.
BUG=dawn:743
Change-Id: Ie77afa83a2c960b3c87a3419997a16f8392991fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This ends up incorrectly reporting live objects from previous CTS tests.
We should find a better way to call ReportLiveObjects, but doing so on
backend initialization is probably not the right time.
Bug: dawn:745
Change-Id: I9d0beb5f8b20af9c83f5e78f19630d5c78ef4da2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46721
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is the first patch to implement 3D texture copy. It starts with
implementation for 3D texture copy on D3D12 backend with the simplest
case: copy to the entire 3D texture. And texture's width is aligned
with 256 bytes.
The implementation for 3d texture copy might be inaccurate/incorrect
in some functions for complicated cases. But don't panic. The previous
implementation is also incorrect because many functions assumes that
we are copying to/from 2D textures only. And I will incrementally fix
the incorrect functions via upcoming tests for 3d texture copy.
BUG: dawn:547
Change-Id: I588b09fc8d0f0398e0798573415ba3a6a3f576fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
We are going to send another PSA about new APIs in Dawn/Chromium and
want developers to be able to use CreatePipelineAsync. The
implementation is safe, it just doesn't offload the work to a different
thread yet.
Bug: dawn:529
Change-Id: Ia093e46f8c3d389fd42eb5c1ad6b94ab8e64957b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46448
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Adds GPUExternalTexture-related types, as well as
Device::ImportExternalTexture. Adds a basic unit and end2end test.
Bug: dawn:728
Change-Id: Iee9533eb872c493a089cccd500748f1a61457407
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Each quadrant now uses a unique color so
a test result failure can better indiciate any
unexpected sampling behavior.
BUG=dawn:733
Change-Id: If0e814956c1d686bdddcfb6de4dbf24f05d5a027
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This fixes a failure when use_tint_generator on D3D12, but also preps
the code for the future where WGSL requires that return values from
functions are used.
Bug: None
Change-Id: I6b8a5e0aef6550ef39d2972cdc510e05e4be3662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This is another incremental change towards using the new render
pipeline descriptor throughout the entire stack. Creates blueprints for
hashing with the new descriptor when provided before then converting it
to the old format for the native backend creation.
BUG: dawn:642
Change-Id: I1927b12fd02b2fedf25ef4428f07e339fa666715
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46541
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is a preparation CL for 3D texture copy. It refactors texture
result comparison MACROs and their implementations, in order to
add texture result comparison for 3D texture. Prior to this change,
texture result comparison supports 1D/2D texture only.
BUG: dawn:547
Change-Id: Ia242356e05f4762e33a8278ec0d038b8580f7aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
It was used to avoid requiring the dependency on Tint so it isn't needed
anymore now that Dawn unconditionally dependent on Tint.
Bug: dawn:686
Bug: dawn:706
Change-Id: Ifd12c2f94fcaaa70120ae7ef72bcdc34f970fbea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46004
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is in preparation for a change that will change all the
CreateFooInternal to be CreateFoo so they can be called in a
reentrant manner without special refcounting.
This also standardizes all the backends (except OpenGL and Null)
to use Object::Create that returns a Ref<T> or ResultOrError<Ref<T>>,
something we wanted to do for a long time.
Bug: dawn:723
Change-Id: I9e0baced333ffeb0affbc6a276c9bd9de082263a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL propagates errors from reentrant WriteBuffer calls and makes
procy methods on BufferBase to show that it is safe to call
GetMappedRange and Unmap without handling errors.
Bug: dawn:723
Change-Id: I4ea43adc4844505314bf84e2357b2d928f1d1f8c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46003
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
In the service of keeping these changes incremental and easier to
review this change only validates the RenderPipelineDescriptor2
before converting it back to a RenderPipelineDescriptor.
BUG: dawn:642
Change-Id: Ie24c999756fa74f7d3cd10662a6bc95649602b14
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46120
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This case is failed weirdly on Intel TGL (Window Vulkan) which says the
destination buffer keep sentinel value in the second case, it cannot be
reproduced with any debug actions including Vulkan validation layers
enabled, and takes time to find out if the WriteBuffer and
ResolveQuerySet are not executed in order or the ResolveQuerySet does
not copy the results to the buffer. In order to integrate end2end tests
to Intel driver CL without unknown issues, skip it until we find the
root cause.
Bug:dawn:434
Change-Id: Ibdba667cb662ba69c8468d5b2ac2e84bcd3df5bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46321
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Using the new tint::transform::BindingRemapper.
Provides symmetry with TranslateToHLSLWithSPIRVCross().
Bug: tint:621
Bug: tint:671
Change-Id: I1a26c8cac236ac1133c688cf84bb810e15e30978
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46341
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
BUG=dawn:700
Change-Id: I5234d48867b500aece79b82515818afdfc3a6d9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
https://gpuweb.github.io/gpuweb/wgsl.html#variables:
> "Variables in the storage storage class and variables with a storage texture type must have an access attribute applied to the store type."
Bug: tint:692
Change-Id: I61774bb6bda9a7d31e3a85c24fcdb6e2fc25e7b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46378
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
An async callback which calls Queue::Submit will cause
reentrance in QueueBase::Tick and CreatePipelineAsyncTracker::Tick,
which invalidates the task queue being used by the original call,
and leads to a crash from an invalid pointer.
The Tick functions should remove the tasks from the queues before
the callbacks are called, so invalidation doesn't cause a crash.
Bug: dawn:729
Change-Id: I0d952d51040a3d1a475767400de3333a8b9b0821
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45900
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Otherwise errors in Tick could cause the device to be lost and further
processing in Queue::SubmitImpl to fail in interesting ways.
Bug: dawn:723
Bug: chromium:1191777
Change-Id: I586c6b0f97c89938b9e7deeb6f31231ec19e826c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46002
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Previously various places in dawn_native were using Device::GetQueue to
get the queue for some operations, and were inadvertently adding a
reference to the queue. Fix this by adding a getter that doesn't add a
ref.
Bug: dawn:723
Bug: chromium:1185070
Change-Id: Iba127dbd631305762f4cc6c37816407056c52cff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46001
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>