The 3 tests run failed with Metal validation layer, which block end2end tests run with validation layer in CQ. Suppress temporarily while we're fixing.
BUG=dawn:139
Change-Id: I0b6c99ac731b90cd10b8b1f7bb5d3f5e1976fb07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8241
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This prevents dirty textures to be used when memory is recycled while
destroying/creating new textures. If a texture is being used for the
first time and has not yet been initialized, it will be cleared
to zeros.
Bug: dawn:145
Change-Id: I8b9571c5a8fdd366717ffbd0fafca89b86653cea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8062
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL tries to make generator_lib.py easier to reuse in
other projects (e.g. non Dawn-related), by doing the following:
- Removing dawn-specific variables from the script and
replacing them by path-relative defaults, or through
additional command-line parameters (e.g. --root-dir can
now be used to pass the root source directory for Python
dependency computations).
- Move project-agnostic processing from dawn_generator
GN template into a new generator_lib:generator_lib_action
template. The new generator_lib.gni file does not
contain Dawn-specific settings and can be reused more
easily outside of Dawn.
+ Replace --extra-python-path with --jinja2-path to be
more explicit.
+ Add a few documentation comments in the Python scripts.
R=cwallez@chromium.org
Bug: NONE
Change-Id: I3e89f4bc32bdb6a019d251473222c6ce5cdc5f9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8280
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
When pipeline topology is set to Point_List, PointSize must be written
in vertex shader for Vulkan backend.
BUG=dawn:146
Change-Id: Id5aac73bb7e60646503f1ea06c2aa0d39c8384b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7820
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Texture formats have plenty of properties we'd like to query on them
like their texel size, whether they are compressend or if they are depth
stencil. Instead of making switch statements for each of these
properties, we store them in a new `Format` structure. Textures compute
their format only onces and then pass a const reference to it on
GetFormat().
This is in preparation of adding all WebGPU texture formats.
BUG=dawn:128
Change-Id: Iad2831cf16f14e1a1bfce2c10b22527fc982d1aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8166
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
In order to debug single frame applications such as unit tests with
with PIX, you need to call BeginCapture() at the start of your
application.
This change adds a begin-capture-on-startup flag to the Dawn test
environment. The flag, when set, will call BeginCapture() right after
the DXGI factory is created.
Bug: dawn:44
Change-Id: Ibb8f7b05707915510f9886524f0144c0576d2603
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8200
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Also ensure depth stencil texture is clear in begin render pass.
Bug: dawn:175, dawn:145
Change-Id: I19fc857dedf9f353a4834b8e1c9616d02c5a15ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8140
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
The currently used method, SetShaderModel has been deprecated in
favour of SetHLSLShaderModel. This CL migrates Dawn, so that the
deprecated method can be removed from upstream.
BUG=chromium:976798
Change-Id: Id1e655b77291179dd6e15f1a85c8664f07cf8396
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8220
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Uses the functionality in depot_tools/roll-dep to generate a patch
rolling all of the shaderc dependencies in DEPS to
origin/master. Still will require manual testing to confirm this roll
is good.
Change-Id: Iadf6ee0f75ac84ce9bc7ec1ba82247dd96560088
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8180
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Roll third_party/SPIRV-Tools/ 0125b28ed..001e823b6 (24 commits)
0125b28ed4..001e823b65
$ git log 0125b28ed..001e823b6 --date=short --no-merges --format='%ad %ae %s'
2019-06-18 afdx Add fuzzer pass to obfuscate constants. (#2671)
2019-06-17 33432579+alan-baker Handle volatile memory semantics in upgrade (#2674)
2019-06-17 33432579+alan-baker Validate Volatile memory semantics bit (#2672)
2019-06-17 33432579+alan-baker Disallow stores to UBOs (#2651)
2019-06-17 dneto Another fix uint -> uint32_t (#2676)
2019-06-15 33432579+alan-baker Validate variable initializer type (#2668)
2019-06-14 dneto Fix uint -> uint32_t in fuzz.cpp (#2675)
2019-06-13 afdx Add replayer tool for spirv-fuzz. (#2664)
2019-06-13 33432579+alan-baker Add validation for Subgroup builtins (#2637)
2019-06-11 afdx Add constant == uniform facts. (#2660)
2019-06-07 stevenperron Cast __LINE__ to size_t (#2661)
2019-06-06 afdx Add transformation to replace a boolean constant with a numeric comparison (#2659)
2019-06-06 dgkoch Add builtin validation for SPV_NV_shader_sm_builtins (#2656)
2019-06-06 greg Instrument: Fix code for version 2 output format. (#2655)
2019-06-05 afdx Fix bug in 'split blocks', and add tests for fuzzer. (#2658)
2019-06-05 dneto Optimizer: Handle array type with OpSpecConstantOp length (#2652)
2019-06-05 afdx Add fuzzer pass to add dead breaks. (#2654)
2019-06-04 afdx Add fuzzer pass that adds useful constructs to a module (#2647)
2019-06-03 jbolz Add validation for SPV_EXT_fragment_shader_interlock (#2650)
2019-05-31 zoddicus Remove asserts from GetUnderlyingType (#2646)
2019-05-31 dsinclair Close opened file handles. (#2644)
2019-05-31 kevin.petit Validate OpenCL rules for ImageRead and OpImageSampleExplicitLod (#2643)
2019-05-31 afdx Add spirv-fuzz pass to permute blocks. (#2642)
2019-05-29 pierremoreau Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer (#2580)
Roll third_party/glslang/ f88e5824d..f9d08a25f (44 commits)
f88e5824d2..f9d08a25fb
$ git log f88e5824d..f9d08a25f --date=short --no-merges --format='%ad %ae %s'
2019-06-18 cepheus Bump revision.
2019-06-17 cepheus AST/SPV: Fix#930: translate uvec4 <-> uint64 for SubgroupGeMask et. al.
2019-06-18 cepheus Bump revision.
2019-06-17 cepheus SPV: Add a switch for favoring non-NaN operands in min, max, and clamp.
2019-06-17 cepheus Bump revision.
2019-06-17 siglesias Delete duplicated gl_SubGroupSizeARB builtin treatment
2019-06-12 siglesias Add missing GL_ARB_shader_ballot builtins to Geometry and Tessellation shaders
2019-06-14 jbolz Add gl_SemanticsVolatile to GL_KHR_memory_scope_semantics, and make volatile-qualified atomics generate MemorySemanticsVolatile when using the Vulkan memory model
2019-06-13 alanbaker Update test expectations for new SPIRV-Tools
2019-06-13 alanbaker Update known good SPIRV-Tools
2019-06-04 dkoch Add support for GL_NV_shader_sm_builtins
2019-06-08 cepheus GLSL: Revert f6873f7 to fix#1764.
2019-06-07 jbolz Use spvValidatorOptionsSetBeforeHlslLegalization for pre-legalized HLSL
2019-06-06 greg Uppdate spirv-tools known-good
2019-06-05 dsinclair Remove unused parameter
2019-06-04 jbolz Add missing NV_EXTENSIONS ifdef
2019-06-03 jbolz Support GL_ARB_fragment_shader_interlock
2019-05-27 dkoch Fix subgroup support for ray tracing
2019-05-30 dkoch Add AST tests for ray tracing shaders
2019-05-30 dkoch Add AST tests for mesh and task shaders
2019-05-30 dkoch Add more subgroup testing
2019-05-30 jbolz Allow runtime-sized arrays of acceleration structures
2019-05-28 dkoch Fix include guard for GL_EXT_multiview
2019-05-28 dkoch Return consistent names from CapabilityString
2019-05-23 mattparks5855 Fixed .dll install on MSVC.
2019-05-17 thomasanderson Remove non-source sources from binary targets
2019-05-16 syoussefi Build.gn: allow optimization in glslang lib and standalone
2019-05-16 dneto Update SPIRV-Tools, SPIRV-Headers
2019-05-10 cepheus Build: Fix 3 warnings.
2019-05-10 cepheus Bump version and revision.
2019-05-09 cepheus SPV 1.4: Move to 1.4 validation, removing all 1.4 validation failures.
2019-03-31 cepheus SPV 1.4: Emit SignExtend and ZeroExtend for integer image reads/writes.
2019-02-07 cepheus SPV 1.4: Lookup tables: Use variable initializer and NonWritable...
2019-01-15 cepheus SPV 1.4: Add support for OpCopyLogical, careful of Boolean differences.
2019-01-12 cepheus SPV 1.4: Implement the 5 new loop controls.
2019-01-10 cepheus SPV 1.4: Use OpSelect for trivial typed non-scalar/vector expressions.
2019-01-04 cepheus SPV 1.4: Add testing infrastructure for SPV 1.4 tests.
2019-01-04 cepheus SPV 1.4: Generate all globals on OpEntryPoint interface list.
2019-05-09 cepheus SPV: Move to the SPIR-V 1.4 header.
2019-05-09 cepheus Latest known-good SPIRV-Tools: WARNING: Needs python 3.x.
2019-05-09 cepheus Bump revision.
2019-05-08 jbolz For nonuniformEXT constructor, make a copy of the node to decorate
2019-03-08 jbolz Add support for GL_EXT_buffer_reference2
2019-02-17 jbolz Add Float16/Int8/Int16 capabilities for private variables and function parameters
Roll third_party/spirv-cross/ fce83b7e8..05ea05509 (46 commits)
fce83b7e8b..05ea055096
$ git log fce83b7e8..05ea05509 --date=short --no-merges --format='%ad %ae %s'
2019-06-18 post Make sure args.msl22 is set in test_shaders.py.
2019-06-18 post MSL: Fix path check in test_shaders.py.
2019-06-17 post MSL: Conditionally validate MSL 2.2 shaders.
2019-06-14 post MSL: New SDK errors out on cull distance.
2019-06-13 post MSL: Fix regression with Private parameter declaration.
2019-06-12 post MSL: Support stencil export.
2019-06-12 post GLSL: Support GL_ARB_shader_stencil_export.
2019-06-11 post MSL: Support Invariant qualifier on position.
2019-06-12 post Add MSL 2.2 path in test_shaders.py.
2019-06-10 post Expand constexpr sampler sanity check.
2019-06-10 post MSL: Support remapping constexpr samplers by set/binding.
2019-06-10 post Employ heuristics to figure out how to emit SSBO/UAV reflection names.
2019-06-06 post Deal with nested loops.
2019-06-06 post Use the existing loop dominator when doing loop variable preservation.
2019-06-06 post Rewrite how loop dominators are propagated.
2019-06-06 post Deal with case where a variable is dominated by inner part of a loop.
2019-06-05 pmours Fix storage packing qualifiers missing on "shaderRecordNV" buffers
2019-06-05 pmours Add test for callable data
2019-06-05 pmours Fix callable data variables
2019-06-03 pmours Add support for "shaderRecordNV" qualifier
2019-06-05 post Deal with case where a block is somehow emitted in a duplicated fashion.
2019-06-02 post Fix erronous default for emit_line_directives.
2019-05-31 post MSL: Fix declaration of unused input variables.
2019-05-28 post Fixup OpLine parsing comments.
2019-05-28 post Support emitting OpLine directive.
2019-05-28 post GLSL: Support std430 in UBOs with scalar layout.
2019-05-27 post Run format_all.sh.
2019-05-27 post MSL: Use correct address space when passing array-of-buffers.
2019-05-27 post OpArrayLength must trigger active variables.
2019-05-27 post MSL: Implement OpArrayLength.
2019-05-24 post Add Git/timestamp --revision support.
2019-05-23 post MSL: Add test case for complex type alias.
2019-05-23 post MSL: Fix struct declaration order with complex type aliases.
2019-05-18 post Fix formatting, update C ABI version.
2019-05-09 post MSL: Support argument buffers and image swizzling.
2019-05-08 stuart.carnie Add get_member_name and active_buffer_ranges to C APIs
2019-05-17 amerkoleci Fix spvc_type_get_vector_size C function.
2019-05-16 cdavis Remove fallback for OpGroupNonUniformElect.
2019-05-15 cdavis MSL: Add support for subgroup operations.
2019-05-14 post Only deploy on new tags.
2019-05-14 post Add setup for Github releases via Travis.
2019-05-14 post Validate that C ABI in CMakeLists.txt matches code.
2019-05-14 post Run format_all.sh.
2019-05-11 laszlo.agocs GLSL: Add option to disable buffer blocks regardless of version
2019-05-13 post Fix nonuniform test for MSL.
2019-05-13 post HLSL/MSL: Deal correctly with nonuniformEXT qualifier.
Roll third_party/spirv-headers/ c4f8f6579..de99d4d83 (17 commits)
c4f8f65792..de99d4d834
$ git log c4f8f6579..de99d4d83 --date=short --no-merges --format='%ad %ae %s'
2019-06-12 dneto Add Volatile to Memory Semantics, for SPV_KHR_vulkan_memory_model
2019-06-10 ehsannas Add grammar and symbols for UserTypeGOOGLE extension to unified1.
2019-06-07 cepheus Add missing "version" : "None" to a bunch of reserved enumerants.
2019-06-07 cepheus Add more detail about reserving tokens to the README.
2019-06-07 cepheus Restore numerical order in enumerants.
2019-06-02 jbolz Add SPV_EXT_fragment_shader_interlock
2019-05-17 dkoch Add support for SPV_NV_sm_shader_builtins
2019-05-31 cepheus OpenCL ext. inst. header: Support C in addition to C++.
2019-05-27 michael.kinsner Proposed LoopControl bitfield allocation mechanism in spir-v.xml
2019-05-23 victor Reserve token range for Codeplay
2019-05-18 mchiasson Update CMakeLists.txt
2019-05-16 jbolz Update HasResultAndType code generation to skip duplicate enum values. There weren't any until SPIR-V 1.4 release, now there are two.
2019-05-16 mchiasson updated as per code review
2019-05-12 alan Compare enum names rather than values to determine last element
2019-05-11 mchiasson cmake development configuration package Fixes#104
2019-05-09 rex.xu Enable Groups capability by the extension SPV_AMD_shader_ballot
2019-04-30 ian.d.romanick Add INTEL_shader_integer_functions2
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/spirv-cross third_party/spirv-headers
Change-Id: Ie30848dc4e2d6932dc86d42c632537a19828329a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8181
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This patch adds the validation on the texture copies with BC formats.
1. BufferCopyView.offset in B2T and T2B copies must be a multiple of the
compressed texel block size in bytes.
2. BufferCopyView.rowPitch in B2T and T2B copies refers to the number of
bytes from the start of one row of blocks to the start of the next
row of blocks.
3. BufferCopyView.imageHeight must be a multiple of the compressed texel
block height (4 for BC formats).
4. All members in TextureCopyView.origin must be a multiple of the
corresponding dimensions of the compressed texel block (4x4x1 for BC
formats).
5. All the mumbers in 'copySize' must be a multiple of the corresponding
dimensions of the compressed texel block (4x4x1 for BC formats)
because D3D12 requires the width and height of a texture in BC
formats must be multiples of 4.
6. Compute the texture size in non-zero mipmap levels with paddings for
textures in BC formats when necessary.
BUG=dawn:42
TEST=dawn_unittests
Change-Id: Iac8d6c93ab8b37bb46becffd4175339722ab6016
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7860
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This completely removes the dependency on glad by generating the GL
headers from gl.xml directly.
This requires adding khrplatform.h so all Khronos dependencies are
gathered in third_party/khronos.
Also removes a stray CMakeLists.txt that was still hanging out.
BUG=dawn:165
Change-Id: Ia64bc51bc8b18c6b48613918e2f309f7405ecb3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8163
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This move all the OpenGL-specific code for swapchain handling in a new
NativeSwapChainImpl in the OpenGL backend so no code outside of
dawn_native needs OpenGL.
BUG=dawn:165
Change-Id: I3c0c1055e3215a59fdc8e9550baf30762a7014b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8161
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
When transitioning from the COMMON state, an explicit ResourceBarrier
call is unnecessary and can be handled implicitly by the driver. This
acts as an optimization because no synchronization waits are required
when transitioning from the COMMON state.
Bug: dawn:167
Change-Id: Ifd45236dc51c339de8b9945e6f4e2a00934f3676
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7920
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The generated OpenGLFunctionsBase code uses the MemoryBarrier identifier
which is a macro defined in windows.h. Undefined it in
windows_with_undefs.
BUG=dawn:165
Change-Id: I6fcfef8fa14074e946d6c13536c1ae33b38c2ac2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8160
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This makes the OpenGL entry points loaded at Adapter creation from the
getProcAddress passed in the DiscoveryOptions and update all GL calls in
the backend to go through the new OpenGLFunctions object.
A code generator is added that generates the function loader and list of
GL procs from Khronos' gl.xml file but we can't get rid of glad yet
because it is used to have the PROC typedefs and enum values.
BUG=dawn:165
Change-Id: I2a583d79752f55877fa4190846f5be16cf91651a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7983
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch adds VK_IMAGE_USAGE_TRANSFER_DST_BIT usage when creating
Vulkan images because when we do resource initialization with
vkCmdClearColorImage() and vkCmdClearDepthStencilImage(), the image must
have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag
according to Vulkan SPEC.
BUG=dawn:171
TEST=dawn_end2end_tests
Change-Id: Iaba6c04c6942354cc6be502eeee04457d3f43ba7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This is necessary because we currently use GLAD to generate all the
OpenGL enums and proc typedef that we use.
BUG=dawn:165
Change-Id: Ie1b88fd676421703e9af63dafe6dee168c600d4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7982
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Gather device info at device initialization rather than adapter initialization.
BUG=dawn:144
Change-Id: I07e114731a37f3738daa585afa99675f2fd36289
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7700
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch fixes a bug in the computation of texture copy buffer size.
As the 'width' and 'height' in copy commands are all in pixels, while
the buffer size is counted in bytes, we shoud first convert 'width' into
bytes before calculating the buffer size.
BUG=dawn:42
TEST=dawn_unittests
Change-Id: Iebd5ed07a54eea762f4a653e295ecacb845ba32f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7940
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
We need a negative number in a buffer of uint32_t, to test negative
baseVertex. MSVC requires an explicit cast here.
Bug: dawn:172
Change-Id: Iea6c609f11054ba02e5c041fff89def0557c8091
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8060
Commit-Queue: Idan Raiter <idanr@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This prevents dirty textures to be used when memory is recycled
while destroying/creating textures. If a texture is not cleared at load,
it will be cleared to 0 before it is used.
Bug: dawn:145
Change-Id: Ia3f02427478fb48649089829186ccb377caa1912
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6960
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This merges all the files for main.py together again except
generator_lib.py because there doesn't seeem to be a good way to
separate the pure dawn.json generators and the dawn wire generator.
Also updates the GN templates to make it easier to define new generators
based on generator_lib, and move the Jinja2 template "stdlib" to
generator_lib.py
BUG=dawn:165
Change-Id: I1b5b2ef0a59cb142e214f3af9a58048a88ae949a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7880
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
We need a 32-bit Dawn CQ builders to catch build breakages on those
platforms.
Bug: dawn:168
Change-Id: Iafc1af9002992fbf16c9ca996fd578dc21aa516d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8040
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is a reland of 7eb6be186b
Fixes casting issue on 32 bit machines
Original change's description:
> dawn_native: Indirect draw/dispatch
>
> Adds indirect draw and dispatch for all backends (without validation).
>
> Tests for opengl negative offset are skipped since there is no easy
> way to add the index buffer offset. Current idea is to use a compute
> shader to modify the indirect draw buffer.
>
> Change-Id: I1d3eec7c699b211423f4b911769cca17bfbcd045
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7481
> Commit-Queue: Idan Raiter <idanr@google.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Change-Id: Id28c5658ee18ec5c030f721fb44d9f11ebe21ff9
Bug:dawn:54,chromium:972358
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7961
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Idan Raiter <idanr@google.com>
Now that CreateBufferMapped is implemented. Buffers of any usage may
be initialized with staging data. All buffers need to have backing data
otherwise copying from staging data to the buffer will dereference nullptr.
Bug: chromium:971542
Change-Id: I623cc236ffab918ec048cd1949520a4cb329c1b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7980
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Getting the autorollers fully working is going to take a while, so
rolling ahead the DEPS by hand, so the new shaderc API can be used and
some tasks unblocked.
BUG=chromium:970300
Change-Id: I2137deb27e867cd8439ef0143b36cf91d89d8b1b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8000
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This reverts commit 7eb6be186b.
Reason for revert: This change is breaking Clusterfuzz bots. crbug.com/972358
Bug: chromium:972358
Original change's description:
> dawn_native: Indirect draw/dispatch
>
> Adds indirect draw and dispatch for all backends (without validation).
>
> Tests for opengl negative offset are skipped since there is no easy
> way to add the index buffer offset. Current idea is to use a compute
> shader to modify the indirect draw buffer.
>
> Change-Id: I1d3eec7c699b211423f4b911769cca17bfbcd045
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7481
> Commit-Queue: Idan Raiter <idanr@google.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,idanr@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I9b7b63de0900e20c4da8561ceb9b2dece77c3885
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7960
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Adds indirect draw and dispatch for all backends (without validation).
Tests for opengl negative offset are skipped since there is no easy
way to add the index buffer offset. Current idea is to use a compute
shader to modify the indirect draw buffer.
Change-Id: I1d3eec7c699b211423f4b911769cca17bfbcd045
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7481
Commit-Queue: Idan Raiter <idanr@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Instead of looping through usages and calling ResourceBarrier for
each transition, we should load all transitions into a single call.
This allows the driver to make better optimization decisions.
Bug: dawn:163
Change-Id: I4859aa2c71b60a40249df00ad67ab13eb0389cd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7680
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Also adds a test that would have fired the ASSERT.
BUG=dawn:80
BUG=dawn:107
Change-Id: I56cdbc91956465c8941b45bb5e9da4c27da301ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7840
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is in preparation for using it to generate code for replacing glad
with our own OpenGL function pointer loading code.
BUG=dawn:165
Change-Id: Ic3e774ab207e85a1491f299ad06131c8095416ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7781
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This command internally used a BufferCopy struct which is meant for
Buffer->Texture / Texture->Buffer copies. It contained unnecessary rowPitch
and imageHeight. This patch changes the members of CopyBufferToBufferCmd to
match the CopyBufferToBuffer api call.
Bug: dawn:164
Change-Id: I4737eb4ceb655e8282964c438242627070e355dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This requires some changes in the wire because WireCmd doesn't know the
size of void. This also adds a handwritten implementation of the Wire
commands for SetSubData that internally converts to uint8_t so that
WireCmd can generate the de/serialization.
BUG=dawn:160
Change-Id: Icbf0fd7dd841639ee6f67333844e027b27a8afcc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7780
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch changed the front end code and tests and examples.
BUG=dawn:80, dawn:107
Change-Id: Ia6c60232c04a1bfb862263766eb28e9afc3bc8db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7620
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This uses an intermediate staging buffer to copy data into the buffer.
Bug: dawn:7
Change-Id: I3bda19a8450ef0eddc5b4382ce1b9120f074b917
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7500
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
StagingBuffers need to be created and explicitly released outside of
the RingBuffer for CreateBufferMapped since the staging buffer must live
until the Buffer is Unmapped or Destroyed. This patch adds methods to the
DynamicUploaded for creating and tracking the release of StagingBuffers.
This patch also fixes SerialQueue for non-copy-constructible types.
Bug: dawn:7
Change-Id: I582c4d9cf452f808a8a7ab4164ff833087619a18
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7720
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This conforms to the Vulkan usage validation rules and is otherwise a
noop because primitive restart would do nothing for "list" topologies.
BUG=dawn:162
Change-Id: Icda96b15e2f931a0abd3fba794c2aff56dccb714
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7660
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This patch adds all the BC compressed texture formats and the checks on
the creation of textures in BC formats. If a texture is in BC format,
then:
1. The width and height of the texture must be multiple of 4.
2. The usage of the texture can only be Sampled or TransferSrc or
TransferDst.
3. The sample count of the texture can only be 1.
BUG=dawn:42
TEST=dawn_unittests
Change-Id: I0844fb6a1aadbb96d94a61fd969db07c21b6adf5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7600
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>