Roll third_party/SPIRV-Tools/ 0c4feb643..29af42df1 (44 commits)
0c4feb643b..29af42df12
$ git log 0c4feb643..29af42df1 --date=short --no-merges --format='%ad %ae %s'
2019-08-08 greg Add SPV_EXT_physical_storage_buffer to opt whitelists (#2779)
2019-08-07 stevenperron Handle RelaxedPrecision in SROA (#2788)
2019-08-07 zoddicus Add -fextra-semi to Clang builds (#2787)
2019-08-05 afdx Add 'copy object' transformation (#2766)
2019-08-02 paulthomson fuzz: change output extension and fix usage string (#2778)
2019-08-01 geoff Remove extra ';' after member function definition. (#2780)
2019-07-31 zoddicus Update WebGPU validation rules of OpAtomic*s (#2777)
2019-07-31 alanbaker Treat access chain indexes as signed in SROA (#2776)
2019-07-30 dneto Add pass to inject code for robust-buffer-access semantics (#2771)
2019-07-30 zoddicus Update OpMemoryBarriers rules for WebGPU (#2775)
2019-07-30 dneto Add opt test fixture method SinglePassRunAndFail (#2770)
2019-07-29 dneto Element type is const for analysis::Vector,Matrix,RuntimeArray (#2765)
2019-07-29 dnovillo Protect against out-of-bounds references when folding OpCompositeExtract (#2774)
2019-07-29 alanbaker Don't move debug or decorations when folding (#2772)
2019-07-29 zoddicus Update OpControlBarriers rules for WebGPU (#2769)
2019-07-26 dnovillo Fix#2609 - Handle out-of-bounds scalar replacements. (#2767)
2019-07-25 afdx Limit fuzzer tests so that they take less time to run (#2763)
2019-07-25 stevenperron Fix check for unreachable blocks in merge-return (#2762)
2019-07-25 afdx Transformation and fuzzer pass to add dead continues (#2758)
2019-07-24 zoddicus Remove unneeded future imports (#2739)
2019-07-24 stevenperron Process OpDecorateId in ADCE (#2761)
2019-07-24 stevenperron Record correct dominators in merge return (#2760)
2019-07-23 stevenperron SSA rewriter: Don't use trivial phis (#2757)
2019-07-23 alanbaker Fix block depth rule priority (#2755)
2019-07-23 alanbaker Case validation with repeated labels (#2689)
2019-07-22 greg Bindless Instrument: Make init check depend solely on input_init_enabled (#2753)
2019-07-22 kevin.petit Validate storage class OpenCL environment rules for atomics (#2750)
2019-07-22 51214578+jmacnak-nv Allow LOD ops in compute shaders with derivative group execution modes (#2752)
2019-07-18 dneto Document opt::Instruction::InsertBefore methods (#2751)
2019-07-17 stevenperron Revert "Do not inline OpKill Instructions (#2713)" (#2749)
2019-07-16 jbolz For Vulkan, disallow structures containing opaque types (#2546)
2019-07-16 stevenperron Fix bug in merge return (#2734)
2019-07-15 51214578+jmacnak-nv Allow ray tracing shaders in inst bindle check pass. (#2733)
2019-07-12 zoddicus Correctly implement WebGPU related flag exclusions (#2737)
2019-07-12 greg Remove Common Uniform Elimination Pass (#2731)
2019-07-12 cwallez BUILD.gn: Add deps and move files for `gn check` (#2735)
2019-07-11 zoddicus Update execution scope rules for WebGPU (#2730)
2019-07-11 33432579+alan-baker Extra small storage validation (#2732)
2019-07-11 jbolz Add validation for SPV_EXT_demote_to_helper_invocation (#2707)
2019-07-10 52076061+digit-google BUILD.gn: Add targets to build all command-line tools (#2727)
2019-07-10 stevenperron Change the order branches are simplified in dead branch elim (#2728)
2019-07-11 troughton Add —preserve-bindings and —preserve-spec-constants (#2693)
2019-07-10 stevenperron Handle decorations better in some optimizations (#2716)
2019-07-10 zoddicus Update memory scope rules for WebGPU (#2725)
Roll third_party/glslang/ 8aa9a7bb8..3cea2e588 (28 commits)
8aa9a7bb8f..3cea2e5882
$ git log 8aa9a7bb8..3cea2e588 --date=short --no-merges --format='%ad %ae %s'
2019-08-02 cepheus Bump revision and give the bots another chance to work.
2019-08-01 rharrison Add in header for uint32_t definition
2019-07-30 rharrison Convert no RTTI rule to be compiler specific
2019-07-28 lryer Fix Clang compiler warning.
2019-07-28 lryer Fix location distribution not in order
2019-07-25 stevenperron Remove execute permission from LICENSE.txt
2019-07-25 lryer Fix memory init issue, to make sure the class members are init in order.
2019-07-23 cepheus Revert "Merge pull request #1792 from Roy-AMD/automapping-opengl-location"
2019-07-22 alele Fix bugs in missing Builtin decoration for some NV builtins for tessellation control shaders. Fix bug in member remapping.
2019-07-22 cepheus SPV: Update to latest SPIR-V header.
2019-07-18 greg Update spirv-tools and spirv-headers known good.
2019-07-17 cepheus Build: shut up warning to add unnecessary parens.
2019-07-17 alele Fix bug in printing trailing comma when dumping AST for a structure.
2019-07-16 jmacnak Update known good SPIRV-Tools commit
2019-07-15 sparmar Allow unsized view array dimension for non-block perviewNV attributes
2019-07-15 cepheus ESSL: Fix#1823: Conditions for when derivatives are in compute shader.
2019-07-15 rex.xu OpIsHelperInvocationEXT should declare relevant SPV extension and capability
2019-07-13 cepheus GLSL: Fix#1833: Don't constant fold integer mix to a float.
2019-07-12 jmacnak spirv: Generate missing SampleMaskOverrideCoverageNV capability op
2019-07-12 rharrison Explicitly remove RTTI in the top-level build config
2019-07-10 aaron.hagan Add support for SPV_KHR_shader_clock
2019-07-10 jbolz Avoid generating 8/16-bit constants when 8/16-bit arithmetic extensions aren't enabled
2019-07-08 alanbaker Test updates
2019-07-08 alanbaker Update SPIRV-Tools revision
2019-07-03 cepheus SPV: Fix#1783: Don't do bounds checking for spec-const-expression size
2019-06-25 jbolz Handle SPIR-V type mismatch when constructing a composite
2019-06-07 lryer code format refine
2019-06-06 lryer Add interface symbol and uniform symbol location auto mapping for OpenGL shader.
Roll third_party/shaderc/ e9bb8f287..b3b228c60 (10 commits)
e9bb8f2874..b3b228c60d
$ git log e9bb8f287..b3b228c60 --date=short --no-merges --format='%ad %ae %s'
2019-08-07 zoddicus Rolling 7 dependencies (#776)
2019-08-01 zoddicus Only use -fPIC on compilers that support it (#772)
2019-08-01 zoddicus Turn on warnings on about missing semi-colons (#770)
2019-07-31 yizhou.jiang Remove extra semicolons in shaderc (#768)
2019-07-19 dneto Be more pythonic about "not in" (#763)
2019-07-18 dneto Fix typo (#762)
2019-07-16 dneto Avoid C-style cast for constants definitions (#760)
2019-07-16 jbolz SetBeforeHlslLegalization to use more relaxed validation rules (#676)
2019-07-16 krzysio.kurek Explicitly use python3 for git-sync-deps (#759)
2019-07-09 dneto Remove app_dummy call in Android test (#756)
Roll third_party/spirv-cross/ 53ab2144b..4ce04480e (79 commits)
53ab2144b9..4ce04480ec
$ git log 53ab2144b..4ce04480e --date=short --no-merges --format='%ad %ae %s'
2019-08-01 post Fix severe performance issue with invariant expression invalidation.
2019-07-26 cdavis MSL: Unify the get_*_address_space() methods.
2019-07-26 post MSL: Cleanup temporary use with emit_uninitialized_temporary.
2019-07-26 post MSL: Deal with Modf/Frexp where output is access chain to scalar.
2019-07-26 post Do not force temporary unless continue-only for loop dominates.
2019-07-25 post Missed case where DoWhile continue block deals with Phi.
2019-07-25 post Vulkan GLSL: Support disabling samplerless texture function EXT.
2019-07-25 post Workaround MSVC 2013 compiler issues.
2019-07-22 cdavis MSL: Adjust BuiltInWorkgroupId for vkCmdDispatchBase().
2019-07-24 post Fix some typos in comments.
2019-07-24 post Do not attempt to pack types which are already scalar.
2019-07-24 post HLSL query lod cleanups.
2019-07-24 post Do not eagerly invalidate all active variables on a branch.
2019-07-23 post Do not disable temporary forwarding when we suppress usage tracking.
2019-07-23 post Add another test for unpacking without load forwarding.
2019-07-23 post Look at pointee type when unpacking expressions.
2019-07-23 post Fix some warnings when building in MoltenVK.
2019-07-23 post Deal correctly with non-forwarded packed loads.
2019-07-23 post Test CompositeInsert/Extract/VectorShuffle on packed vectors.
2019-07-23 post Add test for array of scalar struct.
2019-07-23 post Recursively pack struct types when we find scalar packed structs.
2019-07-23 post Run format_all.sh.
2019-07-23 post Unpack vector expression in Matrix-Vector multiplies.
2019-07-23 post Test matrix multiplies in more complex scenarios.
2019-07-23 post Test implicit packing of struct members.
2019-07-23 post GLSL/HLSL: Verify member alignment for explicit offset as well.
2019-07-23 post Add tests for struct padding and self-alignment.
2019-07-23 post Use to_unpacked_row_major_expression to unify row-major in MSL/GLSL.
2019-07-23 post Simplify row-major matrix/vector multiplies.
2019-07-23 post Test array of std140 vectors.
2019-07-23 post Add struct size padding tests.
2019-07-22 post Add test for CompositeExtract from row-major loaded vector.
2019-07-22 post Add test for split access chain into row-major matrix.
2019-07-22 post Remove obsolete matrix workaround code.
2019-07-22 post Only transpose unpacked expressions.
2019-07-22 post Deal correctly with complete stores to row_major matrices.
2019-07-22 post Declare correct matrix type when unpacking.
2019-07-22 post Don't forget to register a write to LHS expression in certain case.
2019-07-22 post Deal with swizzled stores to std140 matrices.
2019-07-22 post Fix some row-major column store cases.
2019-07-22 post Fix more stray parens.
2019-07-22 post Fixup stray parent in output.
2019-07-22 post Correctly unpack row-major matrices when storing to LHS.
2019-07-22 post MSL: Add std140 and scalar matrix layouts.
2019-07-22 post MSL: Add std430 matrix access test.
2019-07-22 post MSL: Support storing to row-major column.
2019-07-22 post Tests run clean.
2019-07-19 post Fix unpacking of packed but not remapped types on load.
2019-07-19 post Traverse correct types when checking scalar layout.
2019-07-19 post Deal with scalar layout of entire structs.
2019-07-19 post Pass down row-major state to unpacking functions.
2019-07-19 post Deal with all forms of matrix writes ...
2019-07-19 post Can deal with std140 matrices now.
2019-07-18 post Start considering how to emit physical type ID.
2019-07-18 post Deal more cleanly with matrices and row-major.
2019-07-18 post Reintroduce struct_member_* MSL queries.
2019-07-18 post MSL: Begin rewrite of buffer packing logic.
2019-07-18 cdavis Don't forward uses of an OpIsHelperInvocationEXT op.
2019-07-13 cdavis Support the SPV_EXT_demote_to_helper_invocation extension.
2019-07-17 post Test glsl.std450 more exhaustively.
2019-07-11 cdavis MSL: Support the SPV_INTEL_shader_integer_functions2 extension.
2019-07-11 cdavis Update external repos.
2019-07-12 cdavis Support the SPV_KHR_device_group extension.
2019-07-11 cdavis MSL: Support the SPV_AMD_shader_trinary_minmax extension.
2019-07-12 post Run format_all.sh.
2019-07-12 post Deal correctly with return sign of bitscan operations.
2019-07-10 post MSVC 2015: Workaround bogus warning with move_backwards.
2019-07-10 post MSVC: Fix some warnings in C wrapper.
2019-07-10 cdavis MSL: Use the select() function for OpSelect.
2019-07-10 cdavis Support the SPV_KHR_post_depth_coverage extension.
2019-07-10 cdavis MSL: Handle coherent, volatile, and restrict.
2019-07-11 post GLSL: Need extension to use bitcast on GLSL < 330.
2019-07-11 lifeng.pan Remove unreasonable assertion for OpTypeImage Sampled parameter.
2019-07-10 cdavis MSL: Handle packed matrices.
2019-07-10 cdavis MSL: Fix alignment of packed types.
2019-07-10 post Forget loop variable enables after emitting block chain.
2019-07-10 post MSL: Re-roll array expressions in initializers.
2019-07-09 cdavis MSL: Support scalar block layout.
2019-07-09 post MSVC 2013: Work around another compiler bug with array init.
Roll third_party/spirv-headers/ 29c11140b..e4322e3be (2 commits)
29c11140ba..e4322e3be5
$ git log 29c11140b..e4322e3be --date=short --no-merges --format='%ad %ae %s'
2019-07-14 aaron.hagan Add SPV_KHR_shader_clock to spirv-headers
2019-07-12 michael.kinsner Reserve additional loop control bit for upcoming update to SPV_INTEL_fpga_loop_controls extension
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: I95453760ca570a96082672178b0ebd6908e112d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9840
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
GPURenderBundleEncoder and GPUCommandEncoder will need to share code
for tracking resource usages.
Bug: dawn:154
Change-Id: I0286f71c4c0638f89be2754c8e9691e67e5db335
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9700
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Unlike API objects, the AttachmentState object is only used internally
and should have no external references. We should not increment the
reference count on creation because it is Ref'ed internally. This patch
also adds ASSERTs that all Device caches are empty when the Device is
destroyed.
Bug: dawn:154
Change-Id: I5dd46bde03c0be920356444e6b1214ed38e833e8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9761
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch fixes
1. Inherit dynamic buffer offsets : dawn chooses vulkan
like inherit behaviour, so dynamic offsets need to be inherited.
This patch adds inherit dynamic offsets between pipelines support and
adds tests to cover it.
2. Dynamic offsets are skipped when groups have been set : in D3D12
backend, when invoke SetBindGroup, dawn will check whether this group
has already been set and skip updating root signature if the answer is
yes. However, this behaviour will affect dynamic offsets update. With
the latest patch, we always update dynamic offsets, even if they didn't
change and adds tests to cover it.
This patch also hit a dawn's issue about storage buffer validation in compute pass.
Currently the validation is a workaround to avoid access conflicts but will impact
using dynamic buffer offset in compute pipeline. Fix this issue is hard so disable
related test for now and will enable it after the issue been fixed. File dawn bug
198 to track this
BUG=dawn:55
Change-Id: I2b0f179b3555d37d5b350292eb729767b0d60ab6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9621
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch does some code clean-ups in CompressedTextureFormatTests as
the preparation of adding new tests in the following patches.
BUG=dawn:42
TEST=dawn_end2end_tests
Change-Id: Ie00eeca2d3a161f3673c554b91b54eebea4bf8bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9740
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch skips several flaky and failed tests on the related Dawn
backends.
1. Tests on all integer/unsigned integer formats in TextureFormatTest on
Intel OpenGL drivers.
2. All CompressedTextureBCFormatTest tests on Intel Vulkan Windows
drivers.
3. BufferSetSubDataTests/ManySetSubData on Intel Vulkan Linux drivers.
BUG=dawn:128, dawn:199, chromium:980737
Change-Id: Ia8912804ea762b458be0b48d9df341ff7637f608
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9800
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
They aren't guaranteed renderable in Vulkan nor core OpenGL 4.5 without
extensions. They happened to work on a lot of our CQ builders but failed
on Intel OpenGL Linux which helped understand this was an issue.
BUG=dawn:128
Change-Id: I83c4f8116c1125c3bac2f1dd6197976c9063e129
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9682
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Metal uses a physical addressing mode and buffers are just pointers in
GPU memory that don't have a size. This prevents implementing
OpArrayLength without any additional information. When a shader uses
OpArrayLength on unsized arrays, SPIRV-Cross requires an extra buffer
argument that gets the length of the buffers.
Use that workaround mechanism in the Metal backend by keeping track of
the storage buffer sizes and applying the extra "buffer length buffer"
when a pipeline requires it.
Also adds tests that OpArraySize works in all shader stages.
BUG=dawn:195
Change-Id: I6aa6089aaea85d0589ccad1756e55dd0befefcb5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9386
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Also adds GetGlobalInfo, similar to GetDeviceInfo, but for code that wants to query instance extensions or API version.
Bug: chromium:976495
Change-Id: Ia7131aa1780737ec2691cde0007acb86a120d307
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
The only missing one is BGRA8UnormSrgb because it doesn't exist in
OpenGL and will need further emulation.
Also suppress most tests on the Mesa Intel GL driver that fails tests
pending further debugging.
BUG=dawn:128
Change-Id: Id454a89711e25b14c7de75a36c7642f2429a0e1f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8364
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL makes sure debug markers commands are handled not only for
render pass encoder, but also compute pass encoder.
Bug: dawn:44
Change-Id: Iad1865d7c20e36d580e1f3f16496e4b90cc1ff34
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9680
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL makes fragment stage optional but still raises a validation
error if set to null in a RenderPipeline.
Bug: dawn:136
Change-Id: Ie900d2e768d251db1e0c4a90738f80b2de15dc2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9641
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Adds a structure that contains wait / signal semaphores and the current command buffer. Will allow us to have a list of pending semaphores after recording, either to consume or do something smarter with in the future.
Bug: chromium:976495
Change-Id: Ib61455039bd97ac8b0ff701af2b694cc8794226d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9600
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch refactors the current implementation of BC formats to treat
it as the first extension in Dawn and adds all the related tests.
Note that in Dawn all the extensions are disabled unless we enable them
when we create the device, which means the BC formats can only be used
when we enable the related extension on the creation of the device, and
the creation of the device will fail if the adapter does not support the
extension
BUG=dawn:42
TEST=dawn_end2end_tests
TEST=dawn_unittests
Change-Id: I04d818b0218ebb3b1b7a70a4fea71779f308f85f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9520
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
In a typical graphics application it is a common usage to update some uniforms once per draw,
and such uniforms include the word positions, orientations, and so on. In the current state of
WebGPU, this means that for each draw call we have to create a new bind group to set the right
uniform values. Bind group creation is expected to be more expensive than
recording draws because a memory allocation is required.
The functionality of dynamic buffer offset is to reduce the number of bind groups that need to
be created.
The patch implements dynamic buffer offset on D3D backend using root descriptor.
Bug=dawn:55
Change-Id: Ia713a4edb3c0ab8f3bba048d7813f343e9dee166
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9040
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch moves all the code related to Toggle from Instance.cpp to
Toggles.cpp to make the code in Instance.cpp cleaner.
BUG=dawn:56
Change-Id: Ica2a779569478a58ddf21e632a211c0c5b889b00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9580
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Introduces the buddy system for fast power-of-two sub-allocation.
BUG=dawn:27
Change-Id: I56836ae317ecc5a91d8341c843fc37d4f91fb5af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9260
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
bindgroup->GetLayout() was called before checking the bindgroup is an
error, causing an assert to fire in Debug. Adds a regression unittest.
BUG=dawn:196
Change-Id: I58e95879a7f2a7cf5c47c7b228f7e3b5bb72d8ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9560
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
In a typical graphics application it is a common usage to update some uniforms once per draw,
and such uniforms include the word positions, orientations, and so on. In the current state of
WebGPU, this means that for each draw call we have to create a new bind group to set the right
uniform values. Bind group creation is expected to be more expensive than
recording draws because a memory allocation is required.
The functionality of dynamic buffer offset is to reduce the number of bind groups that need to
be created.
The patch implements dynamic buffer offset on OpenGL backend using glBindBufferRange and adds
validation to check whether visibility of resources are none.
Bug=dawn:55
Change-Id: I77e10a9677d1737f377301ee89e29d904c91c298
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
WebGPU have a 2D pipeline layout plus a vertex buffer table while Metal
has a single vertex buffer table that contains everything (including
uniform and storage buffers). Previously the space for vertex buffers
was statically allocated in that table which made the last vertex buffer
go out of bound of the Metal vertex buffer table.
This fixes the issue by packing all the vertex buffers that are used
right after the vertex buffers used by the bind groups. This is a
drive-by fix found while looking at reserving Metal vertex buffer 30 to
contain the shader storage buffer lengths.
BUG=dawn:195
Change-Id: If5c67bbc0d15c976793ef43889e50e4a360217d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9387
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This both deduplicates shared state by multiple passes or pipelines and
makes checking pipeline compatibility a single pointer check. It will be
useful for also checking RenderBundle compatibility.
Bug: dawn:154
Change-Id: I0fb289fab5ac76a7fbd500f64b8a6409a246ab32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9461
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch adds the support of recreating a swapchain with SwapChain.
Configure() on Vulkan backends.
1. Query the Vulkan surface information again.
2. Clean up old swapchain.
BUG=dawn:177
Change-Id: Id7e9e07e9dbbba4a71322367cae10fb179106220
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9340
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Add test for many buffer writes.
BUG=dawn:27
Change-Id: I026c3b9a6d30c7c6634b89db9798902b036150c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9280
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch factors the CommandAllocator, CommandIterator, and error
handling out of CommandEncoderBase so it can later be used by the
RenderBundleEncoder.
Bug: dawn:154
Change-Id: Ia4f8c3ce7f432f0887b619bd8090aa9bec7330fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9181
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The information about formats in OpenGL will grow to include more
information than just (internalFormat, format, type) and will gain more
logic to depend on GL version and available extensions over time.
BUG=dawn:128
Change-Id: I63a6ac7d48797fb4a9f97a65871306e640cf41d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9201
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the missing header <tuple> in OpenGLFunctions.cpp to
fix a build error on Windows that the compiler cannot find the
definition of std::tie().
BUG=dawn:190
Change-Id: I35d1f258d3b6197187d626870f3347e195881da8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9300
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
OpenGLBackend.cpp would end up including KHR/khrplatform.h when the
libdawn_native target that contains it doesn't have a dependency on the
khr_platform target. Fix this by making libdawn_native_sources expose
some of its dependencies as public_deps.
BUG=
Change-Id: I45c05a064e4b73ab7ac6f5f6258e7983e5fc085d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9205
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This uses the OpenGL debug ouput functionality to make the driver call
us back when an error happens so we can ASSERT and fail.
BUG=dawn:190
Change-Id: I4b6d7a860384dfeccc1c37383fd4cbdc09d7dc05
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9204
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
We would incorrectly use the size of the first mip level to clear
non-zero mip levels. This was found while enabling debug output in
the OpenGL backend.
BUG=dawn:190
Change-Id: I29a87b87057d425d1c131d11afdc7ca4716607c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9202
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
In OpenGL we have to query a resource's location or index before we can
bind it. The driver can tell us that the resource doesn't exist using
special values (-1 for locations, GL_INVALID_INDEX for indices). This
happens when Dawn compiles a pipeline that has bind group bindings that
none of the shader modules uses.
This was found while enable OpenGL debug output.
BUG=dawn:190
Change-Id: I58b3a1a65f87b4408985c1258f1a95379e6b540e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9203
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is needed so that RenderBundleEncoder and RenderPassEncoder can
share code. This patch also moves EndPass out of ProgrammablePassEncoder
and into both RenderPassEncoder and ComputePassEncoder. Render bundles
do not have EndPass.
Bug: dawn:154
Change-Id: Ib7126b2ba718b0b93e3d6f15c429ac910c0d5d31
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9180
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Implement SetViewport on the rest backends: D3D12 and Metal
BUG=dawn:53
TEST=dawn_end2end_tests
Change-Id: I2e552867080eb8c35db641d1a61b0341d2a0a048
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9020
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Skia-dawn found these; not sure why Chrome and Dawn standalone don't.
Change-Id: I43706fbaca94d1718de0be727151dd8f3a191df2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9220
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
It was replaced by "cull mode" but we forgot to remove it.
BUG=dawn:22
Change-Id: I2195ed64d1df05b01baf37d477a2a7cc6cf1156c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9200
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This CL tests integration of the MemoryTransferService with buffer mapping.
It tests the basic success and error cases for buffer mapping, and it tests
mocked failures of each fallible MemoryTransferService method that an embedder
could implement.
Change-Id: Iece660fb49664cc6a09a0b0b8dbe59e2882a6017
Bug: dawn:156
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8841
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch adds MemoryTransfer client/server interfaces and
uses it to implement data transfers for buffer mapping.
This patch also provides a default "inline" implementation of
the MemoryTransfer which is used if the embedder does not
provide one on initialization.
Because implementations of MemoryTransfer perform their own
serialization, a skip_serialize option is added to WireCmd records.
Bug: dawn:156
Change-Id: I2fa035517628a3ad465b0bc18a6ffc477e2bd67f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8642
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Currently Dawn always doubles the size of the largest ring buffer
everytime when DynamicUploader::Allocate() is called, which is not
necessary and will cause out-of-memory errors when this function is
called for too many times. This time fixes this behaviour by only
doubling the size of the largest ring buffer when it is not big enough
for the request buffer size.
BUG=dawn:108
TEST=dawn_end2end_tests
Change-Id: I734493dbc632ca8e9a30c1ceeb0b7b9e0474656b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9160
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch meant to add tests for SetViewport to verify that the
viewport we set in one render pass will not impact the viewport(s)
in other render pass(es).
These newly added tests exposed a potential error on OpenGL backend.
This patch also implemented SetViewport and fixed the bug on OpenGL.
BUG=dawn:53, dawn:189
TEST=dawn_end2end_tests
Change-Id: Ia2e74f003c02acdcf983b24a3386efab30793652
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>