[WebGPU] Update several interface and enum names to match spec
authorjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Sep 2019 00:24:17 +0000 (00:24 +0000)
committerjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Sep 2019 00:24:17 +0000 (00:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201564

Reviewed by Dean Jackson.

Rename GPUShaderStageBit -> GPUShaderStage.
Rename GPUColorWriteBits -> GPUColorWrite.
Rename TRANSFER_SRC/DST -> COPY_SRC/DST.
Source/WebCore:

Rename GPUPipelineStageDescriptor -> GPUProgrammableStageDescriptor.

Existing tests trivially updated to match.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webgpu/GPUBindGroupLayoutBinding.h:
* Modules/webgpu/GPUBufferUsage.idl:
* Modules/webgpu/GPUColorStateDescriptor.idl:
* Modules/webgpu/GPUColorWrite.idl: Renamed from Source/WebCore/Modules/webgpu/GPUColorWriteBits.idl.
* Modules/webgpu/GPUShaderStage.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.h.
* Modules/webgpu/GPUShaderStage.idl: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.idl.
* Modules/webgpu/GPUTextureUsage.idl:
* Modules/webgpu/WebGPUComputePipelineDescriptor.cpp:
(WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
* Modules/webgpu/WebGPUComputePipelineDescriptor.h:
* Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
* Modules/webgpu/WebGPUDevice.cpp:
* Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.cpp.
(WebCore::WebGPUProgrammableStageDescriptor::tryCreateGPUProgrammableStageDescriptor const):
* Modules/webgpu/WebGPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h.
* Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl.
* Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
(WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
* Modules/webgpu/WebGPURenderPipelineDescriptor.h:
* Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* platform/graphics/gpu/GPUBuffer.h:
(WebCore::GPUBuffer::isCopySource const):
(WebCore::GPUBuffer::isCopyDestination const):
(WebCore::GPUBuffer::isTransferSource const): Deleted.
(WebCore::GPUBuffer::isTransferDestination const): Deleted.
* platform/graphics/gpu/GPUBufferUsage.h:
* platform/graphics/gpu/GPUColorStateDescriptor.h:
* platform/graphics/gpu/GPUColorWrite.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUColorWriteBits.h.
* platform/graphics/gpu/GPUComputePipelineDescriptor.h:
(WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
* platform/graphics/gpu/GPUPipelineDescriptorBase.h:
* platform/graphics/gpu/GPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUPipelineStageDescriptor.h.
(WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):
* platform/graphics/gpu/GPURenderPipelineDescriptor.h:
(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
* platform/graphics/gpu/GPUTexture.h:
(WebCore::GPUTexture::isCopySource const):
(WebCore::GPUTexture::isCopyDestination const):
(WebCore::GPUTexture::isReadOnly const):
(WebCore::GPUTexture::isTransferSource const): Deleted.
(WebCore::GPUTexture::isTransferDestination const): Deleted.
* platform/graphics/gpu/GPUTextureUsage.h:
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
(WebCore::GPUBindGroupLayout::tryCreate):
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
(WebCore::GPUBindGroup::tryCreate):
* platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
* platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
(WebCore::GPUCommandBuffer::copyBufferToBuffer):
(WebCore::GPUCommandBuffer::copyBufferToTexture):
(WebCore::GPUCommandBuffer::copyTextureToBuffer):
(WebCore::GPUCommandBuffer::copyTextureToTexture):
* platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
(WebCore::trySetFunctions):
* platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp:
(WebCore::convertShaderStageFlags):
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
(WebCore::trySetFunctions):
* platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
(WebCore::mtlTextureUsageForGPUTextureUsageFlags):

LayoutTests:

* webgpu/bind-groups.html:
* webgpu/blend-color-triangle-strip.html:
* webgpu/blit-commands.html:
* webgpu/buffer-errors.html:
* webgpu/color-write-mask-triangle-strip.html:
* webgpu/pipeline-layouts.html:
* webgpu/render-pipelines.html:
* webgpu/texture-triangle-strip.html:
* webgpu/textures-textureviews.html:
* webgpu/whlsl/arbitrary-vertex-attribute-locations.html:
* webgpu/whlsl/buffer-fragment.html:
* webgpu/whlsl/buffer-length.html:
* webgpu/whlsl/buffer-vertex.html:
* webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables.html:
* webgpu/whlsl/compute.html:
* webgpu/whlsl/dereference-pointer-should-type-check.html:
* webgpu/whlsl/device-proper-type-checker.html:
* webgpu/whlsl/do-while-loop-break.html:
* webgpu/whlsl/do-while-loop-continue.html:
* webgpu/whlsl/do-while-loop.html:
* webgpu/whlsl/dont-crash-parsing-enum.html:
* webgpu/whlsl/dot-expressions.html:
* webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors.html:
* webgpu/whlsl/ensure-proper-variable-lifetime-2.html:
* webgpu/whlsl/ensure-proper-variable-lifetime-3.html:
* webgpu/whlsl/ensure-proper-variable-lifetime.html:
* webgpu/whlsl/huge-array.html:
* webgpu/whlsl/js/test-harness.js:
(Harness.prototype.async.callTypedFunction):
(Harness.prototype._clearResults):
(Harness.prototype._setUpArguments):
* webgpu/whlsl/loops-break.html:
* webgpu/whlsl/loops-continue.html:
* webgpu/whlsl/loops.html:
* webgpu/whlsl/make-array-reference.html:
* webgpu/whlsl/matrix-2.html:
* webgpu/whlsl/matrix-alignment.html:
* webgpu/whlsl/matrix-memory-layout.html:
* webgpu/whlsl/matrix.html:
* webgpu/whlsl/nested-dot-expression-rvalue.html:
* webgpu/whlsl/nested-loop.html:
* webgpu/whlsl/oob-access.html:
* webgpu/whlsl/read-modify-write-high-zombies.html:
* webgpu/whlsl/return-local-variable.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html:
* webgpu/whlsl/separate-shader-modules/separate-shader-modules.html:
* webgpu/whlsl/simple-arrays.html:
* webgpu/whlsl/store-to-property-updates-properly.html:
* webgpu/whlsl/textures-load.html:
* webgpu/whlsl/textures-sample-bias.html:
* webgpu/whlsl/textures-sample-grad.html:
* webgpu/whlsl/textures-sample-level.html:
* webgpu/whlsl/textures-sample.html:
* webgpu/whlsl/two-dimensional-array.html:
* webgpu/whlsl/while-loop-break.html:
* webgpu/whlsl/while-loop-continue.html:
* webgpu/whlsl/whlsl.html:
* webgpu/whlsl/zero-initialize-values-2.html:
* webgpu/whlsl/zero-initialize-values.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249601 268f45cc-cd09-0410-ab3c-d52691b4dbfc

125 files changed:
LayoutTests/ChangeLog
LayoutTests/webgpu/bind-groups.html
LayoutTests/webgpu/blend-color-triangle-strip.html
LayoutTests/webgpu/blit-commands.html
LayoutTests/webgpu/buffer-errors.html
LayoutTests/webgpu/color-write-mask-triangle-strip.html
LayoutTests/webgpu/pipeline-layouts.html
LayoutTests/webgpu/render-pipelines.html
LayoutTests/webgpu/texture-triangle-strip.html
LayoutTests/webgpu/textures-textureviews.html
LayoutTests/webgpu/whlsl/arbitrary-vertex-attribute-locations.html
LayoutTests/webgpu/whlsl/buffer-fragment.html
LayoutTests/webgpu/whlsl/buffer-length.html
LayoutTests/webgpu/whlsl/buffer-vertex.html
LayoutTests/webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables.html
LayoutTests/webgpu/whlsl/compute.html
LayoutTests/webgpu/whlsl/dereference-pointer-should-type-check.html
LayoutTests/webgpu/whlsl/device-proper-type-checker.html
LayoutTests/webgpu/whlsl/do-while-loop-break.html
LayoutTests/webgpu/whlsl/do-while-loop-continue.html
LayoutTests/webgpu/whlsl/do-while-loop.html
LayoutTests/webgpu/whlsl/dont-crash-parsing-enum.html
LayoutTests/webgpu/whlsl/dot-expressions.html
LayoutTests/webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors.html
LayoutTests/webgpu/whlsl/ensure-proper-variable-lifetime-2.html
LayoutTests/webgpu/whlsl/ensure-proper-variable-lifetime-3.html
LayoutTests/webgpu/whlsl/ensure-proper-variable-lifetime.html
LayoutTests/webgpu/whlsl/huge-array.html
LayoutTests/webgpu/whlsl/js/test-harness.js
LayoutTests/webgpu/whlsl/loops-break.html
LayoutTests/webgpu/whlsl/loops-continue.html
LayoutTests/webgpu/whlsl/loops.html
LayoutTests/webgpu/whlsl/make-array-reference.html
LayoutTests/webgpu/whlsl/matrix-2.html
LayoutTests/webgpu/whlsl/matrix-alignment.html
LayoutTests/webgpu/whlsl/matrix-memory-layout.html
LayoutTests/webgpu/whlsl/matrix.html
LayoutTests/webgpu/whlsl/nested-dot-expression-rvalue.html
LayoutTests/webgpu/whlsl/nested-loop.html
LayoutTests/webgpu/whlsl/oob-access.html
LayoutTests/webgpu/whlsl/read-modify-write-high-zombies.html
LayoutTests/webgpu/whlsl/return-local-variable.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html
LayoutTests/webgpu/whlsl/separate-shader-modules/separate-shader-modules.html
LayoutTests/webgpu/whlsl/simple-arrays.html
LayoutTests/webgpu/whlsl/store-to-property-updates-properly.html
LayoutTests/webgpu/whlsl/textures-load.html
LayoutTests/webgpu/whlsl/textures-sample-bias.html
LayoutTests/webgpu/whlsl/textures-sample-grad.html
LayoutTests/webgpu/whlsl/textures-sample-level.html
LayoutTests/webgpu/whlsl/textures-sample.html
LayoutTests/webgpu/whlsl/two-dimensional-array.html
LayoutTests/webgpu/whlsl/while-loop-break.html
LayoutTests/webgpu/whlsl/while-loop-continue.html
LayoutTests/webgpu/whlsl/whlsl.html
LayoutTests/webgpu/whlsl/zero-initialize-values-2.html
LayoutTests/webgpu/whlsl/zero-initialize-values.html
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources-input.xcfilelist
Source/WebCore/DerivedSources-output.xcfilelist
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/webgpu/GPUBindGroupLayoutBinding.h
Source/WebCore/Modules/webgpu/GPUBufferUsage.idl
Source/WebCore/Modules/webgpu/GPUColorStateDescriptor.idl
Source/WebCore/Modules/webgpu/GPUColorWrite.idl [moved from Source/WebCore/Modules/webgpu/GPUColorWriteBits.idl with 98% similarity]
Source/WebCore/Modules/webgpu/GPUShaderStage.h [moved from Source/WebCore/Modules/webgpu/GPUShaderStageBit.h with 96% similarity]
Source/WebCore/Modules/webgpu/GPUShaderStage.idl [moved from Source/WebCore/Modules/webgpu/GPUShaderStageBit.idl with 98% similarity]
Source/WebCore/Modules/webgpu/GPUTextureUsage.idl
Source/WebCore/Modules/webgpu/WebGPUComputePipelineDescriptor.cpp
Source/WebCore/Modules/webgpu/WebGPUComputePipelineDescriptor.h
Source/WebCore/Modules/webgpu/WebGPUComputePipelineDescriptor.idl
Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
Source/WebCore/Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp [moved from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.cpp with 86% similarity]
Source/WebCore/Modules/webgpu/WebGPUProgrammableStageDescriptor.h [moved from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h with 87% similarity]
Source/WebCore/Modules/webgpu/WebGPUProgrammableStageDescriptor.idl [moved from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl with 96% similarity]
Source/WebCore/Modules/webgpu/WebGPURenderPipelineDescriptor.cpp
Source/WebCore/Modules/webgpu/WebGPURenderPipelineDescriptor.h
Source/WebCore/Modules/webgpu/WebGPURenderPipelineDescriptor.idl
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/platform/graphics/gpu/GPUBuffer.h
Source/WebCore/platform/graphics/gpu/GPUBufferUsage.h
Source/WebCore/platform/graphics/gpu/GPUColorStateDescriptor.h
Source/WebCore/platform/graphics/gpu/GPUColorWrite.h [moved from Source/WebCore/platform/graphics/gpu/GPUColorWriteBits.h with 96% similarity]
Source/WebCore/platform/graphics/gpu/GPUComputePipelineDescriptor.h
Source/WebCore/platform/graphics/gpu/GPUPipelineDescriptorBase.h
Source/WebCore/platform/graphics/gpu/GPUProgrammableStageDescriptor.h [moved from Source/WebCore/platform/graphics/gpu/GPUPipelineStageDescriptor.h with 85% similarity]
Source/WebCore/platform/graphics/gpu/GPURenderPipelineDescriptor.h
Source/WebCore/platform/graphics/gpu/GPUTexture.h
Source/WebCore/platform/graphics/gpu/GPUTextureUsage.h
Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm
Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm
Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm
Source/WebCore/platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm
Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm
Source/WebCore/platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp
Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm
Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm

index fa57187..2f25804 100644 (file)
@@ -1,3 +1,99 @@
+2019-09-06  Justin Fan  <justin_fan@apple.com>
+
+        [WebGPU] Update several interface and enum names to match spec
+        https://bugs.webkit.org/show_bug.cgi?id=201564
+
+        Reviewed by Dean Jackson.
+
+        Rename GPUShaderStageBit -> GPUShaderStage.
+        Rename GPUColorWriteBits -> GPUColorWrite.
+        Rename TRANSFER_SRC/DST -> COPY_SRC/DST.
+
+        * webgpu/bind-groups.html:
+        * webgpu/blend-color-triangle-strip.html:
+        * webgpu/blit-commands.html:
+        * webgpu/buffer-errors.html:
+        * webgpu/color-write-mask-triangle-strip.html:
+        * webgpu/pipeline-layouts.html:
+        * webgpu/render-pipelines.html:
+        * webgpu/texture-triangle-strip.html:
+        * webgpu/textures-textureviews.html:
+        * webgpu/whlsl/arbitrary-vertex-attribute-locations.html:
+        * webgpu/whlsl/buffer-fragment.html:
+        * webgpu/whlsl/buffer-length.html:
+        * webgpu/whlsl/buffer-vertex.html:
+        * webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables.html:
+        * webgpu/whlsl/compute.html:
+        * webgpu/whlsl/dereference-pointer-should-type-check.html:
+        * webgpu/whlsl/device-proper-type-checker.html:
+        * webgpu/whlsl/do-while-loop-break.html:
+        * webgpu/whlsl/do-while-loop-continue.html:
+        * webgpu/whlsl/do-while-loop.html:
+        * webgpu/whlsl/dont-crash-parsing-enum.html:
+        * webgpu/whlsl/dot-expressions.html:
+        * webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors.html:
+        * webgpu/whlsl/ensure-proper-variable-lifetime-2.html:
+        * webgpu/whlsl/ensure-proper-variable-lifetime-3.html:
+        * webgpu/whlsl/ensure-proper-variable-lifetime.html:
+        * webgpu/whlsl/huge-array.html:
+        * webgpu/whlsl/js/test-harness.js:
+        (Harness.prototype.async.callTypedFunction):
+        (Harness.prototype._clearResults):
+        (Harness.prototype._setUpArguments):
+        * webgpu/whlsl/loops-break.html:
+        * webgpu/whlsl/loops-continue.html:
+        * webgpu/whlsl/loops.html:
+        * webgpu/whlsl/make-array-reference.html:
+        * webgpu/whlsl/matrix-2.html:
+        * webgpu/whlsl/matrix-alignment.html:
+        * webgpu/whlsl/matrix-memory-layout.html:
+        * webgpu/whlsl/matrix.html:
+        * webgpu/whlsl/nested-dot-expression-rvalue.html:
+        * webgpu/whlsl/nested-loop.html:
+        * webgpu/whlsl/oob-access.html:
+        * webgpu/whlsl/read-modify-write-high-zombies.html:
+        * webgpu/whlsl/return-local-variable.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html:
+        * webgpu/whlsl/separate-shader-modules/separate-shader-modules.html:
+        * webgpu/whlsl/simple-arrays.html:
+        * webgpu/whlsl/store-to-property-updates-properly.html:
+        * webgpu/whlsl/textures-load.html:
+        * webgpu/whlsl/textures-sample-bias.html:
+        * webgpu/whlsl/textures-sample-grad.html:
+        * webgpu/whlsl/textures-sample-level.html:
+        * webgpu/whlsl/textures-sample.html:
+        * webgpu/whlsl/two-dimensional-array.html:
+        * webgpu/whlsl/while-loop-break.html:
+        * webgpu/whlsl/while-loop-continue.html:
+        * webgpu/whlsl/whlsl.html:
+        * webgpu/whlsl/zero-initialize-values-2.html:
+        * webgpu/whlsl/zero-initialize-values.html:
+
 2019-09-06  Ryan Haddad  <ryanhaddad@apple.com>
 
         REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
index 19e3b25..1877102 100644 (file)
@@ -21,7 +21,7 @@ let basicPipeline;
 tests["Create and use a basic GPUBindGroup."] = async device => {
     const bufferLayoutBinding = {
         binding: 0,
-        visibility: GPUShaderStageBit.COMPUTE,
+        visibility: GPUShaderStage.COMPUTE,
         type: "storage-buffer"
     };
 
@@ -60,7 +60,7 @@ tests["Create and use a basic GPUBindGroup."] = async device => {
 tests["Create and use many GPUBindGroups in a single compute pass."] = async device => {
     const bufferLayoutBinding = {
         binding: 0,
-        visibility: GPUShaderStageBit.COMPUTE,
+        visibility: GPUShaderStage.COMPUTE,
         type: "storage-buffer"
     };
 
@@ -111,11 +111,11 @@ tests["Create and access a uniform-buffer in a GPUBindGroup."] = async device =>
     const bindGroupLayout = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "uniform-buffer"
         }, {
             binding: 1,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "storage-buffer"
         }]
     });
@@ -171,7 +171,7 @@ compute void compute_main(Texture2D<uint> inputTexture : register(t0), sampler i
 `;
 
 tests["Create and access a sampled texture in a GPUBindGroup."] = async device => {
-    const [textureDataBuffer, textureArrayBuffer] = device.createBufferMapped({ size: 4, usage: GPUBufferUsage.TRANSFER_SRC });
+    const [textureDataBuffer, textureArrayBuffer] = device.createBufferMapped({ size: 4, usage: GPUBufferUsage.COPY_SRC });
     new Uint32Array(textureArrayBuffer).set([42]);
     textureDataBuffer.unmap();
 
@@ -179,7 +179,7 @@ tests["Create and access a sampled texture in a GPUBindGroup."] = async device =
     const texture = device.createTexture({
         size: textureSize,
         format: "rgba8uint",
-        usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST
+        usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST
     });
 
     const outputBuffer = device.createBuffer({ size: 4, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.MAP_READ });
@@ -187,15 +187,15 @@ tests["Create and access a sampled texture in a GPUBindGroup."] = async device =
     const bindGroupLayout = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "sampled-texture"
         }, {
             binding: 1,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "sampler"
         }, {
             binding: 2,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "storage-buffer"
         }]
     });
@@ -260,7 +260,7 @@ compute void compute_main(
 `;
 
 tests["Create and use multiple GPUBindGroups in a single dispatch."] = async device => {
-    const [textureDataBuffer, textureArrayBuffer] = device.createBufferMapped({ size: 4, usage: GPUBufferUsage.TRANSFER_SRC });
+    const [textureDataBuffer, textureArrayBuffer] = device.createBufferMapped({ size: 4, usage: GPUBufferUsage.COPY_SRC });
     new Uint32Array(textureArrayBuffer).set([17]);
     textureDataBuffer.unmap();
 
@@ -268,7 +268,7 @@ tests["Create and use multiple GPUBindGroups in a single dispatch."] = async dev
     const texture = device.createTexture({
         size: textureSize,
         format: "rgba8uint",
-        usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST
+        usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST
     });
 
     const [inputBuffer, inputArrayBuffer] = device.createBufferMapped({ size: 4, usage: GPUBufferUsage.UNIFORM });
@@ -280,28 +280,28 @@ tests["Create and use multiple GPUBindGroups in a single dispatch."] = async dev
     const bgl0 = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "sampled-texture"
         }]
     });
     const bgl1 = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "sampler"
         }]
     });
     const bgl2 = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "uniform-buffer"
         }]
     });
     const bgl3 = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "storage-buffer"
         }]
     })
@@ -386,11 +386,11 @@ tests["Bind a single GPUBuffer with different offsets in different GPUBindGroups
     const bindGroupLayout = device.createBindGroupLayout({
         bindings: [{
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "uniform-buffer"
         }, {
             binding: 1,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "storage-buffer"
         }]
     });
index 65a844c..5fd60b8 100644 (file)
@@ -54,7 +54,7 @@ async function start(device) {
             dstFactor: "blend-color",
             operation: "add"
         },
-        writeMask: GPUColorWriteBits.ALL
+        writeMask: GPUColorWrite.ALL
     }];
 
     const pipeline = createBasicPipeline(shaderModule, device, colorStates);
index 2f8141d..e3796a3 100644 (file)
@@ -43,11 +43,11 @@ async function test(device, image) {
 
     const bufferDescriptor = {
         size: imageData.data.byteLength,
-        usage: GPUBufferUsage.TRANSFER_SRC
+        usage: GPUBufferUsage.COPY_SRC
     };
     bufferA = createBufferWithData(device, bufferDescriptor, imageData.data.buffer);
 
-    bufferDescriptor.usage |= GPUBufferUsage.TRANSFER_DST;
+    bufferDescriptor.usage |= GPUBufferUsage.COPY_DST;
     const bufferB = device.createBuffer(bufferDescriptor);
     const bufferViewB = {
         buffer: bufferB,
@@ -63,7 +63,7 @@ async function test(device, image) {
     const textureDescriptor = {
         size: textureSize,
         format: "rgba8unorm",
-        usage: GPUTextureUsage.TRANSFER_SRC | GPUTextureUsage.TRANSFER_DST
+        usage: GPUTextureUsage.COPY_SRC | GPUTextureUsage.COPY_DST
     };
     const textureA = device.createTexture(textureDescriptor);
     const textureViewA = { texture: textureA };
@@ -73,7 +73,7 @@ async function test(device, image) {
 
     const readBufferDescriptor = {
         size: imageData.data.byteLength,
-        usage: GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ
+        usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ
     };
     const readBuffer = device.createBuffer(readBufferDescriptor);
     const readBufferView = {
index d504df4..d777c07 100644 (file)
@@ -12,7 +12,7 @@ tests["GPUBuffers can be created with both read-only and STORAGE usages."] = asy
     device.pushErrorScope("validation");
     device.createBuffer({
         size: 4,
-        usage: GPUBufferUsage.VERTEX | GPUBufferUsage.INDEX | GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.UNIFORM | GPUBufferUsage.STORAGE
+        usage: GPUBufferUsage.VERTEX | GPUBufferUsage.INDEX | GPUBufferUsage.COPY_SRC | GPUBufferUsage.UNIFORM | GPUBufferUsage.STORAGE
     });
     return popNullError(device);
 };
@@ -21,8 +21,8 @@ tests["unmap on already unmapped, mappable GPUBuffer should not generate error."
     const buffer = device.createBuffer({
         size: 4,
         usage: GPUBufferUsage.MAP_READ |
-            GPUBufferUsage.TRANSFER_SRC |
-            GPUBufferUsage.TRANSFER_DST |
+            GPUBufferUsage.COPY_SRC |
+            GPUBufferUsage.COPY_DST |
             GPUBufferUsage.VERTEX |
             GPUBufferUsage.INDEX |
             GPUBufferUsage.UNIFORM |
@@ -68,8 +68,8 @@ tests["mapReadAsync on non-MAP_READ GPUBuffer should fail."] = async device => {
     const buffer = device.createBuffer({
         size: 4,
         usage: GPUBufferUsage.MAP_WRITE |
-            GPUBufferUsage.TRANSFER_SRC |
-            GPUBufferUsage.TRANSFER_DST |
+            GPUBufferUsage.COPY_SRC |
+            GPUBufferUsage.COPY_DST |
             GPUBufferUsage.VERTEX |
             GPUBufferUsage.INDEX |
             GPUBufferUsage.UNIFORM |
@@ -85,8 +85,8 @@ tests["mapWriteAsync on non-MAP_WRITE GPUBuffer should fail."] = async device =>
     const buffer = device.createBuffer({
         size: 4,
         usage: GPUBufferUsage.MAP_READ |
-            GPUBufferUsage.TRANSFER_SRC |
-            GPUBufferUsage.TRANSFER_DST |
+            GPUBufferUsage.COPY_SRC |
+            GPUBufferUsage.COPY_DST |
             GPUBufferUsage.VERTEX |
             GPUBufferUsage.INDEX |
             GPUBufferUsage.UNIFORM |
@@ -101,8 +101,8 @@ tests["mapWriteAsync on non-MAP_WRITE GPUBuffer should fail."] = async device =>
 tests["unmap on non-mappable GPUBuffer should fail."] = async device => {
     const buffer = device.createBuffer({
         size: 4,
-        usage: GPUBufferUsage.TRANSFER_SRC |
-            GPUBufferUsage.TRANSFER_DST |
+        usage: GPUBufferUsage.COPY_SRC |
+            GPUBufferUsage.COPY_DST |
             GPUBufferUsage.VERTEX |
             GPUBufferUsage.INDEX |
             GPUBufferUsage.UNIFORM |
index 287efde..1fca5cb 100644 (file)
@@ -46,7 +46,7 @@ async function test(device) {
         format: "bgra8unorm",
         alphaBlend: {},
         colorBlend: {},
-        writeMask: GPUColorWriteBits.GREEN | GPUColorWriteBits.ALPHA
+        writeMask: GPUColorWrite.GREEN | GPUColorWrite.ALPHA
     }];
     const pipeline = createBasicPipeline(shaderModule, device, colorStates);
     const commandEncoder = device.createCommandEncoder();
index 34fa99e..8d2b798 100644 (file)
@@ -9,15 +9,15 @@
 function createBindGroupLayoutBinding() {
     return {
         binding: 0,
-        visibility: GPUShaderStageBit.FRAGMENT | GPUShaderStageBit.VERTEX,
+        visibility: GPUShaderStage.FRAGMENT | GPUShaderStage.VERTEX,
         type: "storage-buffer"
     };
 }
 
 test(() => {
     const bindGroupLayoutDescriptor = { bindings: [createBindGroupLayoutBinding()] };
-    assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & GPUShaderStageBit.FRAGMENT, 0);
-    assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & GPUShaderStageBit.VERTEX, 0);
+    assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & GPUShaderStage.FRAGMENT, 0);
+    assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & GPUShaderStage.VERTEX, 0);
     assert_equals(bindGroupLayoutDescriptor.bindings[0].type, "storage-buffer");
 }, "Create a basic GPUBindGroupLayoutDescriptor."); 
 
index ffd538d..f492b33 100644 (file)
@@ -35,7 +35,7 @@ promise_test(() => {
     return getBasicDevice().then(function(device) {
         const shaderModule = device.createShaderModule({ code: shaderCode });
 
-        const layoutBinding = { binding: 0, visibility: GPUShaderStageBit.VERTEX, type: "storage-buffer" };
+        const layoutBinding = { binding: 0, visibility: GPUShaderStage.VERTEX, type: "storage-buffer" };
         const bindGroupLayout = device.createBindGroupLayout({ bindings: [layoutBinding] });
         const pipelineLayout = device.createPipelineLayout({ bindGroupLayouts: [bindGroupLayout] });
 
index c68abc1..88a3595 100644 (file)
@@ -109,7 +109,7 @@ async function test(device) {
 
     const textureBufferDescriptor = {
         size: imageData.data.length,
-        usage: GPUBufferUsage.TRANSFER_SRC
+        usage: GPUBufferUsage.COPY_SRC
     };
     const textureBuffer = createBufferWithData(device, textureBufferDescriptor, imageData.data.buffer);
 
@@ -123,19 +123,19 @@ async function test(device) {
     const textureDescriptor = {
         size: { width: image.width, height: image.height, depth: 1 },
         format: "rgba8unorm",
-        usage: GPUTextureUsage.TRANSFER_DST | GPUTextureUsage.SAMPLED
+        usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.SAMPLED
     };
     const texture = device.createTexture(textureDescriptor);
 
     // Bind texture and a sampler to pipeline
     const textureLayoutBinding = { 
         binding: textureBindingNum, 
-        visibility: GPUShaderStageBit.FRAGMENT, 
+        visibility: GPUShaderStage.FRAGMENT, 
         type: "sampled-texture" 
     };
     const samplerLayoutBinding = {
         binding: samplerBindingNum,
-        visibility: GPUShaderStageBit.FRAGMENT,
+        visibility: GPUShaderStage.FRAGMENT,
         type: "sampler"
     };
 
index 69b9af0..d610052 100644 (file)
@@ -47,7 +47,7 @@ promise_test(() => {
     return getBasicDevice().then(function(device) {
         texDescriptor.sampleCount = 4;
         texDescriptor.format = "rgba8unorm";
-        texDescriptor.usage = GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_SRC
+        texDescriptor.usage = GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_SRC
 
         const multisampledTexture = device.createTexture(texDescriptor);
         assert_true(multisampledTexture instanceof GPUTexture, "Successfully created multisampled texture.");
index c239fae..3e3be34 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 173, format: "float4"};
index c62b325..205132a 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
index 96866e2..d631d8e 100644 (file)
@@ -27,14 +27,14 @@ async function start(device) {
 
     const size = Uint32Array.BYTES_PER_ELEMENT * 1337;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferUint32Array = new Uint32Array(bufferArrayBuffer);
     bufferUint32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 4a6ab1e..be17d6e 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const vertexInput = {vertexBuffers: []};
index 61b22c5..428f6a7 100644 (file)
@@ -29,14 +29,14 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 1;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
     bufferFloat32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 1cee6e6..ba381f8 100644 (file)
@@ -27,7 +27,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 8;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -41,7 +41,7 @@ async function start(device) {
     bufferFloat32Array[7] = 8;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 9adabd6..a2a713c 100644 (file)
@@ -39,7 +39,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index b531205..3e51db8 100644 (file)
@@ -37,7 +37,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 2;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -45,7 +45,7 @@ async function start(device) {
     bufferFloat32Array[1] = 43.0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 4bbfbf5..b129f49 100644 (file)
@@ -43,7 +43,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index d0a638b..2df677a 100644 (file)
@@ -45,7 +45,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 51b8c51..f9c897a 100644 (file)
@@ -40,7 +40,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index c65c5a7..316ca6e 100644 (file)
@@ -31,7 +31,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
index c6b6014..257cb27 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4"};
index 6a8b260..542a612 100644 (file)
@@ -52,7 +52,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 8;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -66,7 +66,7 @@ async function start(device) {
     bufferFloat32Array[7] = 8;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 86b810a..6ff958a 100644 (file)
@@ -63,7 +63,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4"};
index c2627fd..a4869fa 100644 (file)
@@ -64,7 +64,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4"};
index cf81186..e8496f7 100644 (file)
@@ -63,7 +63,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4"};
index d93abd4..846c916 100644 (file)
@@ -64,14 +64,14 @@ async function start(device) {
 
     const size = Int32Array.BYTES_PER_ELEMENT * 1;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Int32Array(bufferArrayBuffer);
     bufferFloat32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index bbaa527..67bfb1a 100644 (file)
@@ -192,13 +192,13 @@ class Harness {
         } else {
             this._resultBuffer = this.device.createBuffer({ 
                 size: Types.MAX_SIZE, 
-                usage: GPUBufferUsage.STORAGE | GPUBufferUsage.MAP_READ | GPUBufferUsage.TRANSFER_DST
+                usage: GPUBufferUsage.STORAGE | GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST
             });
         }
 
         argsLayouts.unshift({
             binding: 0,
-            visibility: GPUShaderStageBit.COMPUTE,
+            visibility: GPUShaderStage.COMPUTE,
             type: "storage-buffer"
         });
         argsResourceBindings.unshift({
@@ -295,7 +295,7 @@ compute void _compute_main() { }`;
         if (!this._clearBuffer) {
             this._clearBuffer = this._device.createBuffer({ 
                 size: Types.MAX_SIZE, 
-                usage: GPUBufferUsage.TRANSFER_SRC
+                usage: GPUBufferUsage.COPY_SRC
             });
         }
         const commandEncoder = this._device.createCommandEncoder();
@@ -324,7 +324,7 @@ compute void _compute_main() { }`;
             functionCallArgs.push(convertToWHLSLInputType(`arg${i}` + (arg.isBuffer ? "" : "[0]"), arg.type));
             argsLayouts.push({
                 binding: i,
-                visibility: GPUShaderStageBit.COMPUTE,
+                visibility: GPUShaderStage.COMPUTE,
                 type: "storage-buffer"
             });
             argsResourceBindings.push({
index f4dfd4d..f2643ca 100644 (file)
@@ -44,7 +44,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 9212a97..c5e2139 100644 (file)
@@ -44,7 +44,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 715d18f..8231e5b 100644 (file)
@@ -40,7 +40,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 67a8801..3d98737 100644 (file)
@@ -134,14 +134,14 @@ async function start(device) {
 
     const size = Int32Array.BYTES_PER_ELEMENT * 1;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Int32Array(bufferArrayBuffer);
     bufferFloat32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 201b523..fa3b165 100644 (file)
@@ -89,7 +89,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 8;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -103,7 +103,7 @@ async function start(device) {
     bufferFloat32Array[7] = 8;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 4ac49c9..18248f2 100644 (file)
@@ -127,7 +127,7 @@ async function start(device) {
     const inputSize = Float32Array.BYTES_PER_ELEMENT * 32;
     const outputSize = Float32Array.BYTES_PER_ELEMENT * 2;
 
-    const uploadBufferDescriptor = {size: inputSize, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const uploadBufferDescriptor = {size: inputSize, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const uploadBuffer = device.createBuffer(uploadBufferDescriptor);
     const uploadBufferArrayBuffer = await uploadBuffer.mapWriteAsync();
     const uploadBufferFloat32Array = new Float32Array(uploadBufferArrayBuffer);
@@ -135,7 +135,7 @@ async function start(device) {
         uploadBufferFloat32Array[i] = i;
     uploadBuffer.unmap();
 
-    const inputBufferDescriptor = {size: inputSize, usage: GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.STORAGE};
+    const inputBufferDescriptor = {size: inputSize, usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.STORAGE};
     const inputBuffer = device.createBuffer(inputBufferDescriptor);
 
     const outputBufferDescriptor = {size: outputSize, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.MAP_READ};
index bd09748..3101085 100644 (file)
@@ -55,7 +55,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 16;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -77,7 +77,7 @@ async function start(device) {
     bufferFloat32Array[15] = 15;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index dc9e47f..bc602bb 100644 (file)
@@ -109,7 +109,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 8;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -123,7 +123,7 @@ async function start(device) {
     bufferFloat32Array[7] = 8;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 90767b3..abd70e5 100644 (file)
@@ -48,7 +48,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4"};
index 71d2329..2f7e826 100644 (file)
@@ -76,7 +76,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 3b634a3..8c914d8 100644 (file)
@@ -30,7 +30,7 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 8;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
@@ -44,7 +44,7 @@ async function start(device) {
     bufferFloat32Array[7] = 8;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index ba4dd08..a1b4d44 100644 (file)
@@ -48,14 +48,14 @@ async function start(device) {
 
     const size = Float32Array.BYTES_PER_ELEMENT * 1;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Float32Array(bufferArrayBuffer);
     bufferFloat32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index 75d1c9c..670c283 100644 (file)
@@ -41,7 +41,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4"};
index baba264..deb8431 100644 (file)
@@ -30,7 +30,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 6424b1b..c1e1f35 100644 (file)
@@ -33,7 +33,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index bdd6b8b..f344b96 100644 (file)
@@ -32,7 +32,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index e29cfd1..4b34122 100644 (file)
@@ -30,7 +30,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 868483b..58e6d93 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 0422d9c..8942b72 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index fc7c49e..a901509 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index f6c25ba..551b15e 100644 (file)
@@ -31,7 +31,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 50388c2..cbc8b87 100644 (file)
@@ -36,7 +36,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 0adbdec..172509e 100644 (file)
@@ -36,7 +36,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index d3d4d58..ad7b367 100644 (file)
@@ -31,7 +31,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 6dba78b..2dcbff5 100644 (file)
@@ -32,7 +32,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 295b84b..943ee36 100644 (file)
@@ -28,7 +28,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 49a2ee9..520d82c 100644 (file)
@@ -32,7 +32,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 01b2a0d..9b88931 100644 (file)
@@ -32,7 +32,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 2330f76..bc63da6 100644 (file)
@@ -31,7 +31,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index baf73cb..fa46df5 100644 (file)
@@ -30,7 +30,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index cb516af..2d25e93 100644 (file)
@@ -32,7 +32,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 51db69d..6542fee 100644 (file)
@@ -30,7 +30,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 15d3320..fdcf921 100644 (file)
@@ -29,7 +29,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 7d372eb..0bcabbc 100644 (file)
@@ -28,7 +28,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 89455c7..239a8b8 100644 (file)
@@ -31,7 +31,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index daba687..53082af 100644 (file)
@@ -30,7 +30,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 2eaf049..e377db6 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 5e76d90..4bd05ad 100644 (file)
@@ -29,7 +29,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index aa6a785..9383f53 100644 (file)
@@ -27,7 +27,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index bf0ddf1..ea9d855 100644 (file)
@@ -28,7 +28,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute = {shaderLocation: 0, format: "float4"};
index 5b33db2..e73acd4 100644 (file)
@@ -72,14 +72,14 @@ async function start(device) {
 
     const size = Int32Array.BYTES_PER_ELEMENT * 1;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Int32Array(bufferArrayBuffer);
     bufferFloat32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index bee9475..8c893c5 100644 (file)
@@ -56,7 +56,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index ea4d681..e0822c8 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
@@ -64,7 +64,7 @@ async function start(device) {
     vertexBuffer0Float32Array[15] = 1;
     vertexBuffer0.unmap();
 
-    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2, usage: GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.MAP_WRITE};
+    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2, usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.MAP_WRITE};
     const textureDataBuffer = device.createBuffer(textureDataBufferDescriptor);
     const textureDataBufferArrayBuffer = await textureDataBuffer.mapWriteAsync();
     const textureDataBufferUint8Array = new Uint8Array(textureDataBufferArrayBuffer);
@@ -86,7 +86,7 @@ async function start(device) {
     textureDataBufferUint8Array[15] = 255;
     textureDataBuffer.unmap();
 
-    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST};
+    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST};
     const texture = device.createTexture(textureDescriptor);
     const textureView = texture.createDefaultView();
 
index 22f3546..004d0ad 100644 (file)
@@ -34,7 +34,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
@@ -82,7 +82,7 @@ async function start(device) {
     vertexBuffer0Float32Array[23] = 100;
     vertexBuffer0.unmap();
 
-    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2 + Uint8Array.BYTES_PER_ELEMENT * 4 * 1 * 1, usage: GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.MAP_WRITE};
+    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2 + Uint8Array.BYTES_PER_ELEMENT * 4 * 1 * 1, usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.MAP_WRITE};
     const textureDataBuffer = device.createBuffer(textureDataBufferDescriptor);
     const textureDataBufferArrayBuffer = await textureDataBuffer.mapWriteAsync();
     const textureDataBufferUint8Array = new Uint8Array(textureDataBufferArrayBuffer);
@@ -108,7 +108,7 @@ async function start(device) {
     textureDataBufferUint8Array[19] = 255;
     textureDataBuffer.unmap();
 
-    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, mipLevelCount: 2, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST};
+    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, mipLevelCount: 2, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST};
     const texture = device.createTexture(textureDescriptor);
     const textureView = texture.createDefaultView();
 
index f045822..f93366e 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
@@ -64,7 +64,7 @@ async function start(device) {
     vertexBuffer0Float32Array[15] = 1;
     vertexBuffer0.unmap();
 
-    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2 + Uint8Array.BYTES_PER_ELEMENT * 4 * 1 * 1, usage: GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.MAP_WRITE};
+    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2 + Uint8Array.BYTES_PER_ELEMENT * 4 * 1 * 1, usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.MAP_WRITE};
     const textureDataBuffer = device.createBuffer(textureDataBufferDescriptor);
     const textureDataBufferArrayBuffer = await textureDataBuffer.mapWriteAsync();
     const textureDataBufferUint8Array = new Uint8Array(textureDataBufferArrayBuffer);
@@ -90,7 +90,7 @@ async function start(device) {
     textureDataBufferUint8Array[19] = 255;
     textureDataBuffer.unmap();
 
-    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, mipLevelCount: 2, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST};
+    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, mipLevelCount: 2, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST};
     const texture = device.createTexture(textureDescriptor);
     const textureView = texture.createDefaultView();
 
index 6b58375..04c78e1 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
@@ -64,7 +64,7 @@ async function start(device) {
     vertexBuffer0Float32Array[15] = 1;
     vertexBuffer0.unmap();
 
-    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2 + Uint8Array.BYTES_PER_ELEMENT * 4 * 1 * 1, usage: GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.MAP_WRITE};
+    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2 + Uint8Array.BYTES_PER_ELEMENT * 4 * 1 * 1, usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.MAP_WRITE};
     const textureDataBuffer = device.createBuffer(textureDataBufferDescriptor);
     const textureDataBufferArrayBuffer = await textureDataBuffer.mapWriteAsync();
     const textureDataBufferUint8Array = new Uint8Array(textureDataBufferArrayBuffer);
@@ -90,7 +90,7 @@ async function start(device) {
     textureDataBufferUint8Array[19] = 255;
     textureDataBuffer.unmap();
 
-    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, mipLevelCount: 2, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST};
+    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, mipLevelCount: 2, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST};
     const texture = device.createTexture(textureDescriptor);
     const textureView = texture.createDefaultView();
 
index 8603c84..8d86ab5 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
@@ -64,7 +64,7 @@ async function start(device) {
     vertexBuffer0Float32Array[15] = 1;
     vertexBuffer0.unmap();
 
-    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2, usage: GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.MAP_WRITE};
+    const textureDataBufferDescriptor = {size: Uint8Array.BYTES_PER_ELEMENT * 4 * 2 * 2, usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.MAP_WRITE};
     const textureDataBuffer = device.createBuffer(textureDataBufferDescriptor);
     const textureDataBufferArrayBuffer = await textureDataBuffer.mapWriteAsync();
     const textureDataBufferUint8Array = new Uint8Array(textureDataBufferArrayBuffer);
@@ -86,7 +86,7 @@ async function start(device) {
     textureDataBufferUint8Array[15] = 255;
     textureDataBuffer.unmap();
 
-    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.TRANSFER_DST};
+    const textureDescriptor = {size: {width: 2, height: 2, depth: 1}, format: "rgba8unorm", usage: GPUTextureUsage.SAMPLED | GPUTextureUsage.COPY_DST};
     const texture = device.createTexture(textureDescriptor);
     const textureView = texture.createDefaultView();
 
index 319f8a4..015b619 100644 (file)
@@ -74,14 +74,14 @@ async function start(device) {
 
     const size = Int32Array.BYTES_PER_ELEMENT * 1;
 
-    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.TRANSFER_SRC};
+    const bufferDescriptor = {size, usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC};
     const buffer = device.createBuffer(bufferDescriptor);
     const bufferArrayBuffer = await buffer.mapWriteAsync();
     const bufferFloat32Array = new Int32Array(bufferArrayBuffer);
     bufferFloat32Array[0] = 0;
     buffer.unmap();
 
-    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ};
+    const resultsBufferDescriptor = {size, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ};
     const resultsBuffer = device.createBuffer(resultsBufferDescriptor);
 
     const bufferBinding = {buffer: resultsBuffer, size};
index b6a930f..a86a2f4 100644 (file)
@@ -46,7 +46,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 4223bf1..2eff357 100644 (file)
@@ -46,7 +46,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 9c24c1f..219bb0a 100644 (file)
@@ -26,7 +26,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
     
     const attribute0 = {shaderLocation: 0, format: "float4"};
index fbf45f0..ba3f796 100644 (file)
@@ -62,7 +62,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index 7ff70d6..f036f84 100644 (file)
@@ -45,7 +45,7 @@ async function start(device) {
     const rasterizationState = {frontFace: "cw", cullMode: "none"};
     const alphaBlend = {};
     const colorBlend = {};
-    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWriteBits.ALL
+    const colorStates = [{format: "rgba8unorm", alphaBlend, colorBlend, writeMask: 15}]; // GPUColorWrite.ALL
     const depthStencilState = null;
 
     const attribute0 = {shaderLocation: 0, format: "float4", offset: 0};
index f1030a2..8262be6 100644 (file)
@@ -477,7 +477,7 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/webgpu/GPUCanvasContext.idl
     Modules/webgpu/GPUColor.idl
     Modules/webgpu/GPUColorStateDescriptor.idl
-    Modules/webgpu/GPUColorWriteBits.idl
+    Modules/webgpu/GPUColorWrite.idl
     Modules/webgpu/GPUCompareFunction.idl
     Modules/webgpu/GPUDepthStencilStateDescriptor.idl
     Modules/webgpu/GPUErrorFilter.idl
@@ -487,7 +487,7 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/webgpu/GPUOutOfMemoryError.idl
     Modules/webgpu/GPURequestAdapterOptions.idl
     Modules/webgpu/GPUSamplerDescriptor.idl
-    Modules/webgpu/GPUShaderStageBit.idl
+    Modules/webgpu/GPUShaderStage.idl
     Modules/webgpu/GPUStoreOp.idl
     Modules/webgpu/GPUTextureDescriptor.idl
     Modules/webgpu/GPUTextureFormat.idl
@@ -517,7 +517,7 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/webgpu/WebGPUPipelineDescriptorBase.idl
     Modules/webgpu/WebGPUPipelineLayout.idl
     Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl
-    Modules/webgpu/WebGPUPipelineStageDescriptor.idl
+    Modules/webgpu/WebGPUProgrammableStageDescriptor.idl
     Modules/webgpu/WebGPUProgrammablePassEncoder.idl
     Modules/webgpu/WebGPUQueue.idl
     Modules/webgpu/WebGPURenderPassDescriptor.idl
index 007eff3..2a8071a 100644 (file)
@@ -1,3 +1,86 @@
+2019-09-06  Justin Fan  <justin_fan@apple.com>
+
+        [WebGPU] Update several interface and enum names to match spec
+        https://bugs.webkit.org/show_bug.cgi?id=201564
+
+        Reviewed by Dean Jackson.
+
+        Rename GPUShaderStageBit -> GPUShaderStage.
+        Rename GPUColorWriteBits -> GPUColorWrite.
+        Rename TRANSFER_SRC/DST -> COPY_SRC/DST.
+        Rename GPUPipelineStageDescriptor -> GPUProgrammableStageDescriptor.
+
+        Existing tests trivially updated to match.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Modules/webgpu/GPUBindGroupLayoutBinding.h:
+        * Modules/webgpu/GPUBufferUsage.idl:
+        * Modules/webgpu/GPUColorStateDescriptor.idl:
+        * Modules/webgpu/GPUColorWrite.idl: Renamed from Source/WebCore/Modules/webgpu/GPUColorWriteBits.idl.
+        * Modules/webgpu/GPUShaderStage.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.h.
+        * Modules/webgpu/GPUShaderStage.idl: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.idl.
+        * Modules/webgpu/GPUTextureUsage.idl:
+        * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp:
+        (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
+        * Modules/webgpu/WebGPUComputePipelineDescriptor.h:
+        * Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
+        * Modules/webgpu/WebGPUDevice.cpp:
+        * Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.cpp.
+        (WebCore::WebGPUProgrammableStageDescriptor::tryCreateGPUProgrammableStageDescriptor const):
+        * Modules/webgpu/WebGPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h.
+        * Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl.
+        * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
+        (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
+        * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
+        * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * platform/graphics/gpu/GPUBuffer.h:
+        (WebCore::GPUBuffer::isCopySource const):
+        (WebCore::GPUBuffer::isCopyDestination const):
+        (WebCore::GPUBuffer::isTransferSource const): Deleted.
+        (WebCore::GPUBuffer::isTransferDestination const): Deleted.
+        * platform/graphics/gpu/GPUBufferUsage.h:
+        * platform/graphics/gpu/GPUColorStateDescriptor.h:
+        * platform/graphics/gpu/GPUColorWrite.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUColorWriteBits.h.
+        * platform/graphics/gpu/GPUComputePipelineDescriptor.h:
+        (WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
+        * platform/graphics/gpu/GPUPipelineDescriptorBase.h:
+        * platform/graphics/gpu/GPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUPipelineStageDescriptor.h.
+        (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):
+        * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
+        (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
+        * platform/graphics/gpu/GPUTexture.h:
+        (WebCore::GPUTexture::isCopySource const):
+        (WebCore::GPUTexture::isCopyDestination const):
+        (WebCore::GPUTexture::isReadOnly const):
+        (WebCore::GPUTexture::isTransferSource const): Deleted.
+        (WebCore::GPUTexture::isTransferDestination const): Deleted.
+        * platform/graphics/gpu/GPUTextureUsage.h:
+        * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
+        (WebCore::GPUBindGroupLayout::tryCreate):
+        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
+        (WebCore::GPUBindGroup::tryCreate):
+        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
+        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
+        (WebCore::GPUCommandBuffer::copyBufferToBuffer):
+        (WebCore::GPUCommandBuffer::copyBufferToTexture):
+        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
+        (WebCore::GPUCommandBuffer::copyTextureToTexture):
+        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
+        (WebCore::trySetFunctions):
+        * platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp:
+        (WebCore::convertShaderStageFlags):
+        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
+        (WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
+        (WebCore::trySetFunctions):
+        * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
+        (WebCore::mtlTextureUsageForGPUTextureUsageFlags):
+
 2019-09-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction
index cca4c55..beac9f5 100644 (file)
@@ -330,6 +330,7 @@ $(PROJECT_DIR)/Modules/webgpu/GPUBufferUsage.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUCanvasContext.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUColor.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUColorStateDescriptor.idl
+$(PROJECT_DIR)/Modules/webgpu/GPUColorWrite.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUColorWriteBits.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUCompareFunction.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUDepthStencilStateDescriptor.idl
@@ -341,6 +342,7 @@ $(PROJECT_DIR)/Modules/webgpu/GPUOrigin3D.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUOutOfMemoryError.idl
 $(PROJECT_DIR)/Modules/webgpu/GPURequestAdapterOptions.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUSamplerDescriptor.idl
+$(PROJECT_DIR)/Modules/webgpu/GPUShaderStage.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUShaderStageBit.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUStoreOp.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUTextureDescriptor.idl
@@ -375,6 +377,7 @@ $(PROJECT_DIR)/Modules/webgpu/WebGPUPipelineLayout.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUPipelineStageDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUProgrammablePassEncoder.idl
+$(PROJECT_DIR)/Modules/webgpu/WebGPUProgrammableStageDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUQueue.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPURenderPassDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPURenderPassEncoder.idl
index 6757794..c79a245 100644 (file)
@@ -603,6 +603,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColor.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColor.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColorStateDescriptor.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColorStateDescriptor.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColorWrite.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColorWrite.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColorWriteBits.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUColorWriteBits.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUCompareFunction.cpp
@@ -625,6 +627,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSamplerDescriptor.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSamplerDescriptor.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUShaderStage.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUShaderStage.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUShaderStageBit.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUShaderStageBit.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUStoreOp.cpp
@@ -929,10 +933,10 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSLongRange.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSLongRange.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMallocStatistics.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMallocStatistics.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElement.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElement.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLMathElement.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLMathElement.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilities.cpp
@@ -1979,6 +1983,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUPipelineStageDescriptor.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUPipelineStageDescriptor.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUProgrammablePassEncoder.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUProgrammablePassEncoder.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUProgrammableStageDescriptor.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUProgrammableStageDescriptor.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUQueue.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUQueue.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPURenderPassDescriptor.cpp
index e442dbf..9705f77 100644 (file)
@@ -379,7 +379,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/webgpu/GPUCanvasContext.idl \
     $(WebCore)/Modules/webgpu/GPUColor.idl \
     $(WebCore)/Modules/webgpu/GPUColorStateDescriptor.idl \
-    $(WebCore)/Modules/webgpu/GPUColorWriteBits.idl \
+    $(WebCore)/Modules/webgpu/GPUColorWrite.idl \
     $(WebCore)/Modules/webgpu/GPUBindGroupLayoutBinding.idl \
     $(WebCore)/Modules/webgpu/GPUBindGroupLayoutDescriptor.idl \
     $(WebCore)/Modules/webgpu/GPUBlendDescriptor.idl \
@@ -394,7 +394,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/webgpu/GPUOutOfMemoryError.idl \
     $(WebCore)/Modules/webgpu/GPURequestAdapterOptions.idl \
     $(WebCore)/Modules/webgpu/GPUSamplerDescriptor.idl \
-    $(WebCore)/Modules/webgpu/GPUShaderStageBit.idl \
+    $(WebCore)/Modules/webgpu/GPUShaderStage.idl \
     $(WebCore)/Modules/webgpu/GPUStoreOp.idl \
     $(WebCore)/Modules/webgpu/GPUTextureDescriptor.idl \
     $(WebCore)/Modules/webgpu/GPUTextureFormat.idl \
@@ -425,7 +425,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/webgpu/WebGPUPipelineDescriptorBase.idl \
     $(WebCore)/Modules/webgpu/WebGPUPipelineLayout.idl \
     $(WebCore)/Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl \
-    $(WebCore)/Modules/webgpu/WebGPUPipelineStageDescriptor.idl \
+    $(WebCore)/Modules/webgpu/WebGPUProgrammableStageDescriptor.idl \
     $(WebCore)/Modules/webgpu/WebGPUProgrammablePassEncoder.idl \
     $(WebCore)/Modules/webgpu/WebGPURenderPassDescriptor.idl \
     $(WebCore)/Modules/webgpu/WebGPURenderPassEncoder.idl \
index 1e1474c..fed0edf 100644 (file)
@@ -27,7 +27,7 @@
 
 #if ENABLE(WEBGPU)
 
-#include "GPUShaderStageBit.h"
+#include "GPUShaderStage.h"
 
 namespace WebCore {
 
index c073ff3..890aefb 100644 (file)
@@ -35,8 +35,8 @@ typedef unsigned long u32;
     const u32 NONE = 0;
     const u32 MAP_READ = 1;
     const u32 MAP_WRITE = 2;
-    const u32 TRANSFER_SRC = 4;
-    const u32 TRANSFER_DST = 8;
+    const u32 COPY_SRC = 4;
+    const u32 COPY_DST = 8;
     const u32 INDEX = 16;
     const u32 VERTEX = 32;
     const u32 UNIFORM = 64;
index d629a68..3833d9d 100644 (file)
@@ -34,5 +34,5 @@ typedef unsigned long GPUColorWriteFlags;
 
     required GPUBlendDescriptor alphaBlend;
     required GPUBlendDescriptor colorBlend;
-    GPUColorWriteFlags writeMask; // GPUColorWriteBits.ALL
+    GPUColorWriteFlags writeMask; // GPUColorWrite.ALL
 };
@@ -31,7 +31,7 @@ typedef unsigned long u32;
     DoNotCheckConstants,
     EnabledAtRuntime=WebGPU,
     ImplementationLacksVTable
-] interface GPUColorWriteBits {
+] interface GPUColorWrite {
     const u32 NONE = 0;
     const u32 RED = 1;
     const u32 GREEN = 2;
@@ -33,7 +33,7 @@ namespace WebCore {
 
 using GPUShaderStageFlags = unsigned;
 
-class GPUShaderStageBit : public RefCounted<GPUShaderStageBit> {
+class GPUShaderStage : public RefCounted<GPUShaderStage> {
 public:
     enum Flags : GPUShaderStageFlags {
         None = 0,
@@ -31,7 +31,7 @@ typedef unsigned long u32;
     DoNotCheckConstants,
     EnabledAtRuntime=WebGPU,
     ImplementationLacksVTable
-] interface GPUShaderStageBit {
+] interface GPUShaderStage {
     const u32 NONE = 0;
     const u32 VERTEX = 1;
     const u32 FRAGMENT = 2;
index 3d479a8..02e890c 100644 (file)
@@ -33,8 +33,8 @@ typedef unsigned long u32;
     ImplementationLacksVTable
 ] interface GPUTextureUsage {
     const u32 NONE = 0;
-    const u32 TRANSFER_SRC = 1;
-    const u32 TRANSFER_DST = 2;
+    const u32 COPY_SRC = 1;
+    const u32 COPY_DST = 2;
     const u32 SAMPLED = 4;
     const u32 STORAGE = 8;
     const u32 OUTPUT_ATTACHMENT = 16;
index e1d2acc..d273deb 100644 (file)
@@ -37,9 +37,9 @@ Optional<GPUComputePipelineDescriptor> WebGPUComputePipelineDescriptor::tryCreat
 {
     auto pipelineLayout = layout ? makeRefPtr(layout->pipelineLayout()) : nullptr;
 
-    auto compute = computeStage.tryCreateGPUPipelineStageDescriptor();
+    auto compute = computeStage.tryCreateGPUProgrammableStageDescriptor();
     if (!compute) {
-        errorScopes.generateError("GPUDevice::createComputePipeline(): Invalid GPUPipelineStageDescriptor!");
+        errorScopes.generateError("GPUDevice::createComputePipeline(): Invalid GPUProgrammableStageDescriptor!");
         return WTF::nullopt;
     }
 
index 5c333ea..440405c 100644 (file)
@@ -28,7 +28,7 @@
 #if ENABLE(WEBGPU)
 
 #include "WebGPUPipelineDescriptorBase.h"
-#include "WebGPUPipelineStageDescriptor.h"
+#include "WebGPUProgrammableStageDescriptor.h"
 #include <wtf/Optional.h>
 
 namespace WebCore {
@@ -40,7 +40,7 @@ struct GPUComputePipelineDescriptor;
 struct WebGPUComputePipelineDescriptor : WebGPUPipelineDescriptorBase {
     Optional<GPUComputePipelineDescriptor> tryCreateGPUComputePipelineDescriptor(GPUErrorScopes&) const;
 
-    WebGPUPipelineStageDescriptor computeStage;
+    WebGPUProgrammableStageDescriptor computeStage;
 };
 
 } // namespace WebCore
index bd4611d..e6b17c9 100644 (file)
@@ -28,5 +28,5 @@
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU
 ] dictionary WebGPUComputePipelineDescriptor : WebGPUPipelineDescriptorBase {
-    required WebGPUPipelineStageDescriptor computeStage;
+    required WebGPUProgrammableStageDescriptor computeStage;
 };
index c0f05fd..b613b5a 100644 (file)
@@ -40,7 +40,7 @@
 #include "GPUBufferDescriptor.h"
 #include "GPUCommandBuffer.h"
 #include "GPUComputePipelineDescriptor.h"
-#include "GPUPipelineStageDescriptor.h"
+#include "GPUProgrammableStageDescriptor.h"
 #include "GPURenderPipelineDescriptor.h"
 #include "GPUSampler.h"
 #include "GPUSamplerDescriptor.h"
@@ -62,7 +62,7 @@
 #include "WebGPUComputePipelineDescriptor.h"
 #include "WebGPUPipelineLayout.h"
 #include "WebGPUPipelineLayoutDescriptor.h"
-#include "WebGPUPipelineStageDescriptor.h"
+#include "WebGPUProgrammableStageDescriptor.h"
 #include "WebGPUQueue.h"
 #include "WebGPURenderPipeline.h"
 #include "WebGPURenderPipelineDescriptor.h"
  */
 
 #include "config.h"
-#include "WebGPUPipelineStageDescriptor.h"
+#include "WebGPUProgrammableStageDescriptor.h"
 
 #if ENABLE(WEBGPU)
 
 namespace WebCore {
 
-Optional<GPUPipelineStageDescriptor> WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor() const
+Optional<GPUProgrammableStageDescriptor> WebGPUProgrammableStageDescriptor::tryCreateGPUProgrammableStageDescriptor() const
 {
     if (!module || !module->module() || entryPoint.isEmpty())
         return WTF::nullopt;
 
-    return GPUPipelineStageDescriptor { makeRef(*module->module()), *this };
+    return GPUProgrammableStageDescriptor { makeRef(*module->module()), *this };
 }
 
 } // namespace WebCore
 
 #if ENABLE(WEBGPU)
 
-#include "GPUPipelineStageDescriptor.h"
+#include "GPUProgrammableStageDescriptor.h"
 #include "WebGPUShaderModule.h"
 #include <wtf/Optional.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
 
-struct WebGPUPipelineStageDescriptor : GPUPipelineStageDescriptorBase {
-    Optional<GPUPipelineStageDescriptor> tryCreateGPUPipelineStageDescriptor() const;
+struct WebGPUProgrammableStageDescriptor : GPUProgrammableStageDescriptorBase {
+    Optional<GPUProgrammableStageDescriptor> tryCreateGPUProgrammableStageDescriptor() const;
 
     RefPtr<const WebGPUShaderModule> module;
 };
@@ -29,7 +29,7 @@ typedef unsigned long WebGPUShaderStageEnum;
 [
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU
-] dictionary WebGPUPipelineStageDescriptor {
+] dictionary WebGPUProgrammableStageDescriptor {
     required WebGPUShaderModule module;
     required DOMString entryPoint;
 };
index e428b65..49f8390 100644 (file)
@@ -36,14 +36,14 @@ Optional<GPURenderPipelineDescriptor> WebGPURenderPipelineDescriptor::tryCreateG
 {
     auto pipelineLayout = layout ? makeRefPtr(layout->pipelineLayout()) : nullptr;
 
-    auto vertex = vertexStage.tryCreateGPUPipelineStageDescriptor();
+    auto vertex = vertexStage.tryCreateGPUProgrammableStageDescriptor();
 
-    Optional<GPUPipelineStageDescriptor> fragment;
+    Optional<GPUProgrammableStageDescriptor> fragment;
     if (fragmentStage)
-        fragment = fragmentStage->tryCreateGPUPipelineStageDescriptor();
+        fragment = fragmentStage->tryCreateGPUProgrammableStageDescriptor();
 
     if (!vertex || (fragmentStage && !fragment)) {
-        errorScopes.generatePrefixedError("Invalid GPUPipelineStageDescriptor!");
+        errorScopes.generatePrefixedError("Invalid GPUProgrammableStageDescriptor!");
         return WTF::nullopt;
     }
 
index b880190..5539c10 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "GPURenderPipelineDescriptor.h"
 #include "WebGPUPipelineDescriptorBase.h"
-#include "WebGPUPipelineStageDescriptor.h"
+#include "WebGPUProgrammableStageDescriptor.h"
 #include <wtf/Optional.h>
 
 namespace WebCore {
@@ -39,8 +39,8 @@ class GPUErrorScopes;
 struct WebGPURenderPipelineDescriptor : WebGPUPipelineDescriptorBase, GPURenderPipelineDescriptorBase {
     Optional<GPURenderPipelineDescriptor> tryCreateGPURenderPipelineDescriptor(GPUErrorScopes&) const;
 
-    WebGPUPipelineStageDescriptor vertexStage;
-    Optional<WebGPUPipelineStageDescriptor> fragmentStage;
+    WebGPUProgrammableStageDescriptor vertexStage;
+    Optional<WebGPUProgrammableStageDescriptor> fragmentStage;
 };
 
 } // namespace WebCore
index ad096b5..6016458 100644 (file)
@@ -38,8 +38,8 @@
     Conditional=WEBGPU,
     EnabledAtRuntime=WebGPU
 ] dictionary WebGPURenderPipelineDescriptor : WebGPUPipelineDescriptorBase {
-    required WebGPUPipelineStageDescriptor vertexStage;
-    WebGPUPipelineStageDescriptor? fragmentStage = null;
+    required WebGPUProgrammableStageDescriptor vertexStage;
+    WebGPUProgrammableStageDescriptor? fragmentStage = null;
 
     required GPUPrimitiveTopology primitiveTopology;
     required sequence<GPUColorStateDescriptor> colorStates;
index 1d2fd00..c9accc0 100644 (file)
@@ -372,7 +372,7 @@ Modules/webgpu/WebGPUDeviceErrorScopes.cpp
 Modules/webgpu/WebGPUQueue.cpp
 Modules/webgpu/WebGPUPipelineLayout.cpp
 Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp
-Modules/webgpu/WebGPUPipelineStageDescriptor.cpp
+Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp
 Modules/webgpu/WebGPUProgrammablePassEncoder.cpp
 Modules/webgpu/WebGPURenderPassDescriptor.cpp
 Modules/webgpu/WebGPURenderPassEncoder.cpp
@@ -2813,7 +2813,7 @@ JSFontFaceSet.cpp
 JSGPUCanvasContext.cpp
 JSGPUColor.cpp
 JSGPUColorStateDescriptor.cpp
-JSGPUColorWriteBits.cpp
+JSGPUColorWrite.cpp
 JSGPUBindGroupLayoutBinding.cpp
 JSGPUBindGroupLayoutDescriptor.cpp
 JSGPUBlendDescriptor.cpp
@@ -2828,7 +2828,7 @@ JSGPUOrigin3D.cpp
 JSGPUOutOfMemoryError.cpp
 JSGPURequestAdapterOptions.cpp
 JSGPUSamplerDescriptor.cpp
-JSGPUShaderStageBit.cpp
+JSGPUShaderStage.cpp
 JSGPUStoreOp.cpp
 JSGPUTextureDescriptor.cpp
 JSGPUTextureFormat.cpp
@@ -3398,7 +3398,7 @@ JSWebGPUQueue.cpp
 JSWebGPUPipelineDescriptorBase.cpp
 JSWebGPUPipelineLayout.cpp
 JSWebGPUPipelineLayoutDescriptor.cpp
-JSWebGPUPipelineStageDescriptor.cpp
+JSWebGPUProgrammableStageDescriptor.cpp
 JSWebGPUProgrammablePassEncoder.cpp
 JSWebGPURenderPassDescriptor.cpp
 JSWebGPURenderPassEncoder.cpp
index d732426..b8d27fc 100644 (file)
                312FF91121A4C36500EB199D /* GPUCommandBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8BD21A4C2F100EB199D /* GPUCommandBuffer.h */; };
                312FF91221A4C36500EB199D /* GPUDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8BE21A4C2F100EB199D /* GPUDevice.h */; };
                312FF91321A4C36500EB199D /* GPUPipelineDescriptorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8C421A4C2F400EB199D /* GPUPipelineDescriptorBase.h */; };
-               312FF91421A4C36500EB199D /* GPUPipelineStageDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8C221A4C2F300EB199D /* GPUPipelineStageDescriptor.h */; };
+               312FF91421A4C36500EB199D /* GPUProgrammableStageDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8C221A4C2F300EB199D /* GPUProgrammableStageDescriptor.h */; };
                312FF91521A4C36500EB199D /* GPUQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8C121A4C2F200EB199D /* GPUQueue.h */; };
                312FF91621A4C36500EB199D /* GPURenderPipeline.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8B921A4C2EF00EB199D /* GPURenderPipeline.h */; };
                312FF91721A4C36500EB199D /* GPURenderPipelineDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 312FF8BC21A4C2F000EB199D /* GPURenderPipelineDescriptor.h */; };
                312FF8BF21A4C2F100EB199D /* GPUDevice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDevice.cpp; sourceTree = "<group>"; };
                312FF8C021A4C2F200EB199D /* GPUShaderModuleDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUShaderModuleDescriptor.h; sourceTree = "<group>"; };
                312FF8C121A4C2F200EB199D /* GPUQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUQueue.h; sourceTree = "<group>"; };
-               312FF8C221A4C2F300EB199D /* GPUPipelineStageDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUPipelineStageDescriptor.h; sourceTree = "<group>"; };
+               312FF8C221A4C2F300EB199D /* GPUProgrammableStageDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUProgrammableStageDescriptor.h; sourceTree = "<group>"; };
                312FF8C321A4C2F300EB199D /* GPUTextureFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUTextureFormat.h; sourceTree = "<group>"; };
                312FF8C421A4C2F400EB199D /* GPUPipelineDescriptorBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUPipelineDescriptorBase.h; sourceTree = "<group>"; };
                312FF8C521A4C2F400EB199D /* GPUTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUTexture.h; sourceTree = "<group>"; };
                D087CE4021ACA94200BDE174 /* GPUShaderModuleMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUShaderModuleMetal.mm; sourceTree = "<group>"; };
                D08903342240601D00F3F440 /* WebGPUComputePipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUComputePipelineDescriptor.h; sourceTree = "<group>"; };
                D08903352240601D00F3F440 /* WebGPUComputePipelineDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUComputePipelineDescriptor.idl; sourceTree = "<group>"; };
-               D0890337224061AC00F3F440 /* WebGPUPipelineStageDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUPipelineStageDescriptor.cpp; sourceTree = "<group>"; };
+               D0890337224061AC00F3F440 /* WebGPUProgrammableStageDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUProgrammableStageDescriptor.cpp; sourceTree = "<group>"; };
                D08903382240628900F3F440 /* WebGPUComputePipelineDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUComputePipelineDescriptor.cpp; sourceTree = "<group>"; };
                D08903392240642D00F3F440 /* GPUComputePipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUComputePipelineDescriptor.h; sourceTree = "<group>"; };
                D089033A224179B500F3F440 /* GPUComputePipeline.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUComputePipeline.h; sourceTree = "<group>"; };
                D0B0556709C6700100307E43 /* CreateLinkCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CreateLinkCommand.cpp; sourceTree = "<group>"; };
                D0B56EAA224EC6240061049C /* GPUBlendDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBlendDescriptor.h; sourceTree = "<group>"; };
                D0B56EAB224EC6240061049C /* GPUBlendDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUBlendDescriptor.idl; sourceTree = "<group>"; };
-               D0B56EAD224ECE200061049C /* GPUColorWriteBits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUColorWriteBits.h; sourceTree = "<group>"; };
-               D0B56EAE224ECE200061049C /* GPUColorWriteBits.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUColorWriteBits.idl; sourceTree = "<group>"; };
+               D0B56EAD224ECE200061049C /* GPUColorWrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUColorWrite.h; sourceTree = "<group>"; };
+               D0B56EAE224ECE200061049C /* GPUColorWrite.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUColorWrite.idl; sourceTree = "<group>"; };
                D0B8BB0121C46E78000C7681 /* GPUBindGroupLayoutBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBindGroupLayoutBinding.h; sourceTree = "<group>"; };
                D0BC54481443AC4A00E105DA /* CachedStyleSheetClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedStyleSheetClient.h; sourceTree = "<group>"; };
                D0BD4F5A1408850F006839B6 /* DictationCommandIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DictationCommandIOS.cpp; sourceTree = "<group>"; };
                D0BE106021E6C0EB00E42A89 /* WebGPUBindGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroup.h; sourceTree = "<group>"; };
                D0BE106121E6C0EB00E42A89 /* WebGPUBindGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUBindGroup.cpp; sourceTree = "<group>"; };
                D0BE106221E6C0EB00E42A89 /* WebGPUBindGroup.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroup.idl; sourceTree = "<group>"; };
-               D0C419EB2183CFA2009EC1DE /* WebGPUPipelineStageDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPipelineStageDescriptor.h; sourceTree = "<group>"; };
-               D0C419EC2183CFA2009EC1DE /* WebGPUPipelineStageDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUPipelineStageDescriptor.idl; sourceTree = "<group>"; };
+               D0C419EB2183CFA2009EC1DE /* WebGPUProgrammableStageDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUProgrammableStageDescriptor.h; sourceTree = "<group>"; };
+               D0C419EC2183CFA2009EC1DE /* WebGPUProgrammableStageDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUProgrammableStageDescriptor.idl; sourceTree = "<group>"; };
                D0C419F02183EB31009EC1DE /* WebGPUPipelineDescriptorBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPipelineDescriptorBase.h; sourceTree = "<group>"; };
                D0C419F12183EB31009EC1DE /* WebGPUPipelineDescriptorBase.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUPipelineDescriptorBase.idl; sourceTree = "<group>"; };
                D0C419F22183EFEC009EC1DE /* WebGPURenderPipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPipelineDescriptor.h; sourceTree = "<group>"; };
                D0DA0BE4217930E2007FE2AC /* WebGPUSwapChain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUSwapChain.h; sourceTree = "<group>"; };
                D0DA0BE5217930E2007FE2AC /* WebGPUSwapChain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUSwapChain.cpp; sourceTree = "<group>"; };
                D0DA0BE6217930E2007FE2AC /* WebGPUSwapChain.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUSwapChain.idl; sourceTree = "<group>"; };
-               D0DE8FB8222E09E200882550 /* GPUShaderStageBit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUShaderStageBit.h; sourceTree = "<group>"; };
-               D0DE8FB9222E09E200882550 /* GPUShaderStageBit.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUShaderStageBit.idl; sourceTree = "<group>"; };
+               D0DE8FB8222E09E200882550 /* GPUShaderStage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUShaderStage.h; sourceTree = "<group>"; };
+               D0DE8FB9222E09E200882550 /* GPUShaderStage.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUShaderStage.idl; sourceTree = "<group>"; };
                D0EACF7621937228000FA75C /* WebGPUCommandEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUCommandEncoder.h; sourceTree = "<group>"; };
                D0EACF7721937228000FA75C /* WebGPUCommandEncoder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUCommandEncoder.cpp; sourceTree = "<group>"; };
                D0EACF7821937228000FA75C /* WebGPUCommandEncoder.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUCommandEncoder.idl; sourceTree = "<group>"; };
                                D01B811D2213636E00627B6C /* GPUBufferUsage.h */,
                                D001D9AB21B0C7BF0023B9BC /* GPUColor.h */,
                                D0ADB28B2237842E00A22935 /* GPUColorStateDescriptor.h */,
-                               D0B56EAD224ECE200061049C /* GPUColorWriteBits.h */,
+                               D0B56EAD224ECE200061049C /* GPUColorWrite.h */,
                                312FF8BD21A4C2F100EB199D /* GPUCommandBuffer.h */,
                                D03C849C21FFC7FC0002227F /* GPUCompareFunction.h */,
                                D089033F2241CE4600F3F440 /* GPUComputePassEncoder.h */,
                                D003288721C9A4E500622AA6 /* GPUPipelineLayout.cpp */,
                                D003288621C9A4E500622AA6 /* GPUPipelineLayout.h */,
                                D003288421C9A20D00622AA6 /* GPUPipelineLayoutDescriptor.h */,
-                               312FF8C221A4C2F300EB199D /* GPUPipelineStageDescriptor.h */,
                                D003914122248D400098998C /* GPUProgrammablePassEncoder.cpp */,
                                D03211CF21AC954E00763CF2 /* GPUProgrammablePassEncoder.h */,
+                               312FF8C221A4C2F300EB199D /* GPUProgrammableStageDescriptor.h */,
                                312FF8C121A4C2F200EB199D /* GPUQueue.h */,
                                D03211D021AC954F00763CF2 /* GPURenderPassDescriptor.h */,
                                D03211CE21AC954E00763CF2 /* GPURenderPassEncoder.h */,
                AACC83D92316578600EB6BF5 /* MATHML */ = {
                        isa = PBXGroup;
                        children = (
-                               AACC83DB2316583200EB6BF5 /* JSMathMLElement.cpp */,
-                               AACC83DA231657EC00EB6BF5 /* JSMathMLElement.h */,
                                AA11C04D2316973D009D9831 /* JSMathMLMathElement.cpp */,
                                AA11C04E23169782009D9831 /* JSMathMLMathElement.h */,
                        );
                                D093D227217951D400329217 /* GPUCanvasContext.idl */,
                                D01B811222125AFC00627B6C /* GPUColor.idl */,
                                D0ADB28C2237842E00A22935 /* GPUColorStateDescriptor.idl */,
-                               D0B56EAE224ECE200061049C /* GPUColorWriteBits.idl */,
+                               D0B56EAE224ECE200061049C /* GPUColorWrite.idl */,
                                D03C849E21FFCF000002227F /* GPUCompareFunction.idl */,
                                D03C84A221FFD7230002227F /* GPUDepthStencilStateDescriptor.idl */,
                                D09AFB0622D417B300C4538C /* GPUErrorFilter.idl */,
                                D09AFB1722D6694E00C4538C /* GPUOutOfMemoryError.idl */,
                                D02C26922181416D00D818E4 /* GPURequestAdapterOptions.idl */,
                                D0ADB26322309D7600A22935 /* GPUSamplerDescriptor.idl */,
-                               D0DE8FB8222E09E200882550 /* GPUShaderStageBit.h */,
-                               D0DE8FB9222E09E200882550 /* GPUShaderStageBit.idl */,
+                               D0DE8FB8222E09E200882550 /* GPUShaderStage.h */,
+                               D0DE8FB9222E09E200882550 /* GPUShaderStage.idl */,
                                D08AA031220D0CE60058C502 /* GPUStoreOp.idl */,
                                D026F48B220A5B0B00AC5F49 /* GPUTextureDescriptor.idl */,
                                D0EACFAE219E30FD000FA75C /* GPUTextureFormat.idl */,
                                D00487D222457BEA00EED7D9 /* WebGPUPipelineLayoutDescriptor.cpp */,
                                D05A99E121C9B50F00032B75 /* WebGPUPipelineLayoutDescriptor.h */,
                                D05A99E221C9B50F00032B75 /* WebGPUPipelineLayoutDescriptor.idl */,
-                               D0890337224061AC00F3F440 /* WebGPUPipelineStageDescriptor.cpp */,
-                               D0C419EB2183CFA2009EC1DE /* WebGPUPipelineStageDescriptor.h */,
-                               D0C419EC2183CFA2009EC1DE /* WebGPUPipelineStageDescriptor.idl */,
                                D0EACF9221940A5B000FA75C /* WebGPUProgrammablePassEncoder.cpp */,
                                D0EACF9121940A5B000FA75C /* WebGPUProgrammablePassEncoder.h */,
                                D0EACF9321940A5B000FA75C /* WebGPUProgrammablePassEncoder.idl */,
+                               D0890337224061AC00F3F440 /* WebGPUProgrammableStageDescriptor.cpp */,
+                               D0C419EB2183CFA2009EC1DE /* WebGPUProgrammableStageDescriptor.h */,
+                               D0C419EC2183CFA2009EC1DE /* WebGPUProgrammableStageDescriptor.idl */,
                                312FF93C21A61CA100EB199D /* WebGPUQueue.cpp */,
                                312FF93921A61C9F00EB199D /* WebGPUQueue.h */,
                                312FF93B21A61CA000EB199D /* WebGPUQueue.idl */,
                                FABE72EE1059C1EB00D888CC /* MathMLAnnotationElement.h */,
                                FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */,
                                FABE72EE1059C1EB00D999DD /* MathMLElement.h */,
-                               AACC83D42316568700EB6BF5 /* MathMLElement.idl */,
                                0BCF83EF1059C1EB00D999DD /* MathMLFractionElement.cpp */,
                                0BCF83F01059C1EB00D999DD /* MathMLFractionElement.h */,
                                FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
                                312FF91121A4C36500EB199D /* GPUCommandBuffer.h in Headers */,
                                312FF91221A4C36500EB199D /* GPUDevice.h in Headers */,
                                312FF91321A4C36500EB199D /* GPUPipelineDescriptorBase.h in Headers */,
-                               312FF91421A4C36500EB199D /* GPUPipelineStageDescriptor.h in Headers */,
+                               312FF91421A4C36500EB199D /* GPUProgrammableStageDescriptor.h in Headers */,
                                312FF91521A4C36500EB199D /* GPUQueue.h in Headers */,
                                312FF91621A4C36500EB199D /* GPURenderPipeline.h in Headers */,
                                312FF91721A4C36500EB199D /* GPURenderPipelineDescriptor.h in Headers */,
index 1f08dc8..16f6501 100644 (file)
@@ -88,7 +88,7 @@ namespace WebCore {
     macro(GPUBuffer) \
     macro(GPUBufferUsage) \
     macro(GPUCanvasContext) \
-    macro(GPUColorWriteBits) \
+    macro(GPUColorWrite) \
     macro(GPUCommandBuffer) \
     macro(GPUCommandEncoder) \
     macro(GPUComputePassEncoder) \
@@ -102,7 +102,7 @@ namespace WebCore {
     macro(GPURenderPipeline) \
     macro(GPUSampler) \
     macro(GPUShaderModule) \
-    macro(GPUShaderStageBit) \
+    macro(GPUShaderStage) \
     macro(GPUSwapChain) \
     macro(GPUTexture) \
     macro(GPUTextureUsage) \
index 3256b4e..9ffdc26 100644 (file)
@@ -75,8 +75,8 @@ public:
 
     PlatformBuffer *platformBuffer() const { return m_platformBuffer.get(); }
     size_t byteLength() const { return m_byteLength; }
-    bool isTransferSource() const { return m_usage.contains(GPUBufferUsage::Flags::TransferSource); }
-    bool isTransferDestination() const { return m_usage.contains(GPUBufferUsage::Flags::TransferDestination); }
+    bool isCopySource() const { return m_usage.contains(GPUBufferUsage::Flags::CopySource); }
+    bool isCopyDestination() const { return m_usage.contains(GPUBufferUsage::Flags::CopyDestination); }
     bool isIndex() const { return m_usage.contains(GPUBufferUsage::Flags::Index); }
     bool isVertex() const { return m_usage.contains(GPUBufferUsage::Flags::Vertex); }
     bool isUniform() const { return m_usage.contains(GPUBufferUsage::Flags::Uniform); }
index 983db48..7de141e 100644 (file)
@@ -39,8 +39,8 @@ public:
         None = 0,
         MapRead = 1 << 0,
         MapWrite = 1 << 1,
-        TransferSource = 1 << 2,
-        TransferDestination = 1 << 3,
+        CopySource = 1 << 2,
+        CopyDestination = 1 << 3,
         Index = 1 << 4,
         Vertex = 1 << 5,
         Uniform = 1 << 6,
index 85c7124..fd55272 100644 (file)
@@ -28,7 +28,7 @@
 #if ENABLE(WEBGPU)
 
 #include "GPUBlendDescriptor.h"
-#include "GPUColorWriteBits.h"
+#include "GPUColorWrite.h"
 #include "GPUTextureFormat.h"
 
 namespace WebCore {
@@ -38,7 +38,7 @@ struct GPUColorStateDescriptor {
 
     GPUBlendDescriptor alphaBlend;
     GPUBlendDescriptor colorBlend;
-    GPUColorWriteFlags writeMask { static_cast<GPUColorWriteFlags>(GPUColorWriteBits::Flags::All) };
+    GPUColorWriteFlags writeMask { static_cast<GPUColorWriteFlags>(GPUColorWrite::Flags::All) };
 };
 
 } // namespace WebCore
@@ -33,7 +33,7 @@ namespace WebCore {
 
 using GPUColorWriteFlags = unsigned;
 
-class GPUColorWriteBits : public RefCounted<GPUColorWriteBits> {
+class GPUColorWrite : public RefCounted<GPUColorWrite> {
 public:
     enum class Flags : GPUColorWriteFlags {
         None = 0,
index 3d74c11..3b39150 100644 (file)
 #if ENABLE(WEBGPU)
 
 #include "GPUPipelineDescriptorBase.h"
-#include "GPUPipelineStageDescriptor.h"
+#include "GPUProgrammableStageDescriptor.h"
 
 namespace WebCore {
 
 struct GPUComputePipelineDescriptor : GPUPipelineDescriptorBase {
-    GPUComputePipelineDescriptor(RefPtr<GPUPipelineLayout>&& layout, GPUPipelineStageDescriptor&& compute)
+    GPUComputePipelineDescriptor(RefPtr<GPUPipelineLayout>&& layout, GPUProgrammableStageDescriptor&& compute)
         : GPUPipelineDescriptorBase { WTFMove(layout) }
         , computeStage { WTFMove(compute) }
     {
     }
 
-    GPUPipelineStageDescriptor computeStage;
+    GPUProgrammableStageDescriptor computeStage;
 };
 
 } // namespace WebCore
index e32404e..5d122ba 100644 (file)
@@ -28,7 +28,7 @@
 #if ENABLE(WEBGPU)
 
 #include "GPUPipelineLayout.h"
-#include "GPUPipelineStageDescriptor.h"
+#include "GPUProgrammableStageDescriptor.h"
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 
 
 namespace WebCore {
 
-struct GPUPipelineStageDescriptorBase {
+struct GPUProgrammableStageDescriptorBase {
     String entryPoint;
 };
 
-struct GPUPipelineStageDescriptor : GPUPipelineStageDescriptorBase {
-    GPUPipelineStageDescriptor(Ref<const GPUShaderModule>&& module, const GPUPipelineStageDescriptorBase& base)
-        : GPUPipelineStageDescriptorBase(base)
+struct GPUProgrammableStageDescriptor : GPUProgrammableStageDescriptorBase {
+    GPUProgrammableStageDescriptor(Ref<const GPUShaderModule>&& module, const GPUProgrammableStageDescriptorBase& base)
+        : GPUProgrammableStageDescriptorBase(base)
         , module { WTFMove(module) }
     {
     }
index 8c3f37e..6728a73 100644 (file)
@@ -30,7 +30,7 @@
 #include "GPUColorStateDescriptor.h"
 #include "GPUDepthStencilStateDescriptor.h"
 #include "GPUPipelineDescriptorBase.h"
-#include "GPUPipelineStageDescriptor.h"
+#include "GPUProgrammableStageDescriptor.h"
 #include "GPUVertexInputDescriptor.h"
 #include <wtf/Optional.h>
 #include <wtf/Vector.h>
@@ -53,7 +53,7 @@ struct GPURenderPipelineDescriptorBase {
 };
 
 struct GPURenderPipelineDescriptor : GPUPipelineDescriptorBase, GPURenderPipelineDescriptorBase {
-    GPURenderPipelineDescriptor(RefPtr<GPUPipelineLayout>&& layout, GPUPipelineStageDescriptor&& vertex, Optional<GPUPipelineStageDescriptor>&& fragment, const GPURenderPipelineDescriptorBase& base)
+    GPURenderPipelineDescriptor(RefPtr<GPUPipelineLayout>&& layout, GPUProgrammableStageDescriptor&& vertex, Optional<GPUProgrammableStageDescriptor>&& fragment, const GPURenderPipelineDescriptorBase& base)
         : GPUPipelineDescriptorBase { WTFMove(layout) }
         , GPURenderPipelineDescriptorBase(base)
         , vertexStage(WTFMove(vertex))
@@ -61,8 +61,8 @@ struct GPURenderPipelineDescriptor : GPUPipelineDescriptorBase, GPURenderPipelin
     {
     }
 
-    GPUPipelineStageDescriptor vertexStage;
-    Optional<GPUPipelineStageDescriptor> fragmentStage;
+    GPUProgrammableStageDescriptor vertexStage;
+    Optional<GPUProgrammableStageDescriptor> fragmentStage;
 };
 
 } // namespace WebCore
index a25c410..ff7aab0 100644 (file)
@@ -50,10 +50,10 @@ public:
     static Ref<GPUTexture> create(PlatformTextureSmartPtr&&, OptionSet<GPUTextureUsage::Flags>);
 
     PlatformTexture *platformTexture() const { return m_platformTexture.get(); }
-    bool isTransferSource() const { return m_usage.contains(GPUTextureUsage::Flags::TransferSource); }
-    bool isTransferDestination() const { return m_usage.contains(GPUTextureUsage::Flags::TransferDestination); }
+    bool isCopySource() const { return m_usage.contains(GPUTextureUsage::Flags::CopySource); }
+    bool isCopyDestination() const { return m_usage.contains(GPUTextureUsage::Flags::CopyDestination); }
     bool isOutputAttachment() const { return m_usage.contains(GPUTextureUsage::Flags::OutputAttachment); }
-    bool isReadOnly() const { return m_usage.containsAny({ GPUTextureUsage::Flags::TransferSource, GPUTextureUsage::Flags::Sampled }); }
+    bool isReadOnly() const { return m_usage.containsAny({ GPUTextureUsage::Flags::CopySource, GPUTextureUsage::Flags::Sampled }); }
     bool isSampled() const { return m_usage.contains(GPUTextureUsage::Flags::Sampled); }
     bool isStorage() const { return m_usage.contains(GPUTextureUsage::Flags::Storage); }
     unsigned platformUsage() const { return m_platformUsage; }
index 6289f92..5c0ce61 100644 (file)
@@ -37,8 +37,8 @@ class GPUTextureUsage : public RefCounted<GPUTextureUsage> {
 public:
     enum class Flags : GPUTextureUsageFlags {
         None = 0,
-        TransferSource = 1 << 0,
-        TransferDestination = 1 << 1,
+        CopySource = 1 << 0,
+        CopyDestination = 1 << 1,
         Sampled = 1 << 2,
         Storage = 1 << 3,
         OutputAttachment = 1 << 4,
index a26badf..83ddb6b 100644 (file)
@@ -150,11 +150,11 @@ RefPtr<GPUBindGroupLayout> GPUBindGroupLayout::tryCreate(const GPUDevice& device
             }
             return true;
         };
-        if ((binding.visibility & GPUShaderStageBit::Flags::Vertex) && !addIndices(vertexArgs, vertexLengths))
+        if ((binding.visibility & GPUShaderStage::Flags::Vertex) && !addIndices(vertexArgs, vertexLengths))
             return nullptr;
-        if ((binding.visibility & GPUShaderStageBit::Flags::Fragment) && !addIndices(fragmentArgs, fragmentLengths))
+        if ((binding.visibility & GPUShaderStage::Flags::Fragment) && !addIndices(fragmentArgs, fragmentLengths))
             return nullptr;
-        if ((binding.visibility & GPUShaderStageBit::Flags::Compute) && !addIndices(computeArgs, computeLengths))
+        if ((binding.visibility & GPUShaderStage::Flags::Compute) && !addIndices(computeArgs, computeLengths))
             return nullptr;
     }
 
index 414f625..7c70d2b 100644 (file)
@@ -156,12 +156,12 @@ RefPtr<GPUBindGroup> GPUBindGroup::tryCreate(const GPUBindGroupDescriptor& descr
             return nullptr;
         }
         auto layoutBinding = layoutIterator->value;
-        if (layoutBinding.externalBinding.visibility == GPUShaderStageBit::Flags::None)
+        if (layoutBinding.externalBinding.visibility == GPUShaderStage::Flags::None)
             continue;
 
-        bool isForVertex = layoutBinding.externalBinding.visibility & GPUShaderStageBit::Flags::Vertex;
-        bool isForFragment = layoutBinding.externalBinding.visibility & GPUShaderStageBit::Flags::Fragment;
-        bool isForCompute = layoutBinding.externalBinding.visibility & GPUShaderStageBit::Flags::Compute;
+        bool isForVertex = layoutBinding.externalBinding.visibility & GPUShaderStage::Flags::Vertex;
+        bool isForFragment = layoutBinding.externalBinding.visibility & GPUShaderStage::Flags::Fragment;
+        bool isForCompute = layoutBinding.externalBinding.visibility & GPUShaderStage::Flags::Compute;
 
         if (isForVertex && !vertexEncoder) {
             LOG(WebGPU, "%s: No vertex argument encoder found for binding %u!", functionName, index);
index eadfebf..a9c743d 100644 (file)
@@ -40,7 +40,7 @@
 
 namespace WebCore {
 
-static constexpr auto readOnlyFlags = OptionSet<GPUBufferUsage::Flags> { GPUBufferUsage::Flags::Index, GPUBufferUsage::Flags::Vertex, GPUBufferUsage::Flags::Uniform, GPUBufferUsage::Flags::TransferSource };
+static constexpr auto readOnlyFlags = OptionSet<GPUBufferUsage::Flags> { GPUBufferUsage::Flags::Index, GPUBufferUsage::Flags::Vertex, GPUBufferUsage::Flags::Uniform, GPUBufferUsage::Flags::CopySource };
 
 
 bool GPUBuffer::validateBufferUsage(const GPUDevice& device, OptionSet<GPUBufferUsage::Flags> usage, GPUErrorScopes& errorScopes)
index 43a2650..691f9e6 100644 (file)
@@ -95,7 +95,7 @@ void GPUCommandBuffer::endBlitEncoding()
 
 void GPUCommandBuffer::copyBufferToBuffer(Ref<GPUBuffer>&& src, uint64_t srcOffset, Ref<GPUBuffer>&& dst, uint64_t dstOffset, uint64_t size)
 {
-    if (isEncodingPass() || !src->isTransferSource() || !dst->isTransferDestination()) {
+    if (isEncodingPass() || !src->isCopySource() || !dst->isCopyDestination()) {
         LOG(WebGPU, "GPUCommandBuffer::copyBufferToBuffer(): Invalid operation!");
         return;
     }
@@ -134,7 +134,7 @@ void GPUCommandBuffer::copyBufferToBuffer(Ref<GPUBuffer>&& src, uint64_t srcOffs
 
 void GPUCommandBuffer::copyBufferToTexture(GPUBufferCopyView&& srcBuffer, GPUTextureCopyView&& dstTexture, const GPUExtent3D& size)
 {
-    if (isEncodingPass() || !srcBuffer.buffer->isTransferSource() || !dstTexture.texture->isTransferDestination()) {
+    if (isEncodingPass() || !srcBuffer.buffer->isCopySource() || !dstTexture.texture->isCopyDestination()) {
         LOG(WebGPU, "GPUComandBuffer::copyBufferToTexture(): Invalid operation!");
         return;
     }
@@ -179,7 +179,7 @@ void GPUCommandBuffer::copyBufferToTexture(GPUBufferCopyView&& srcBuffer, GPUTex
 
 void GPUCommandBuffer::copyTextureToBuffer(GPUTextureCopyView&& srcTexture, GPUBufferCopyView&& dstBuffer, const GPUExtent3D& size)
 {
-    if (isEncodingPass() || !srcTexture.texture->isTransferSource() || !dstBuffer.buffer->isTransferDestination()) {
+    if (isEncodingPass() || !srcTexture.texture->isCopySource() || !dstBuffer.buffer->isCopyDestination()) {
         LOG(WebGPU, "GPUCommandBuffer::copyTextureToBuffer(): Invalid operation!");
         return;
     }
@@ -213,7 +213,7 @@ void GPUCommandBuffer::copyTextureToBuffer(GPUTextureCopyView&& srcTexture, GPUB
 
 void GPUCommandBuffer::copyTextureToTexture(GPUTextureCopyView&& src, GPUTextureCopyView&& dst, const GPUExtent3D& size)
 {
-    if (isEncodingPass() || !src.texture->isTransferSource() || !dst.texture->isTransferDestination()) {
+    if (isEncodingPass() || !src.texture->isCopySource() || !dst.texture->isCopyDestination()) {
         LOG(WebGPU, "GPUCommandBuffer::copyTextureToTexture(): Invalid operation!");
         return;
     }
index e01b75a..c61b8ad 100644 (file)
@@ -62,7 +62,7 @@ static bool trySetMetalFunctions(MTLLibrary *computeMetalLibrary, MTLComputePipe
     return true;
 }
 
-static Optional<WHLSL::ComputeDimensions> trySetFunctions(const GPUPipelineStageDescriptor& computeStage, const GPUDevice& device, MTLComputePipelineDescriptor* mtlDescriptor, Optional<WHLSL::ComputePipelineDescriptor>& whlslDescriptor, GPUErrorScopes& errorScopes)
+static Optional<WHLSL::ComputeDimensions> trySetFunctions(const GPUProgrammableStageDescriptor& computeStage, const GPUDevice& device, MTLComputePipelineDescriptor* mtlDescriptor, Optional<WHLSL::ComputePipelineDescriptor>& whlslDescriptor, GPUErrorScopes& errorScopes)
 {
     RetainPtr<MTLLibrary> computeLibrary;
     String computeEntryPoint;
index bd57688..231f1ab 100644 (file)
 #include "config.h"
 #include "GPUPipelineMetalConvertLayout.h"
 
-#include "GPUPipelineLayout.h"
-
 #if ENABLE(WEBGPU)
 
+#include "GPUPipelineLayout.h"
+#include "GPUShaderStage.h"
+
 namespace WebCore {
 
 static OptionSet<WHLSL::ShaderStage> convertShaderStageFlags(GPUShaderStageFlags flags)
 {
     OptionSet<WHLSL::ShaderStage> result;
-    if (flags & GPUShaderStageBit::Flags::Vertex)
+    if (flags & GPUShaderStage::Flags::Vertex)
         result.add(WHLSL::ShaderStage::Vertex);
-    if (flags & GPUShaderStageBit::Flags::Fragment)
+    if (flags & GPUShaderStage::Flags::Fragment)
         result.add(WHLSL::ShaderStage::Fragment);
-    if (flags & GPUShaderStageBit::Flags::Compute)
+    if (flags & GPUShaderStage::Flags::Compute)
         result.add(WHLSL::ShaderStage::Compute);
     return result;
 }
index f4a0371..6368d1a 100644 (file)
@@ -223,19 +223,19 @@ static bool trySetVertexInput(const GPUVertexInputDescriptor& descriptor, MTLRen
 
 static MTLColorWriteMask mtlColorWriteMaskForGPUColorWriteFlags(GPUColorWriteFlags flags)
 {
-    if (flags == static_cast<GPUColorWriteFlags>(GPUColorWriteBits::Flags::All))
+    if (flags == static_cast<GPUColorWriteFlags>(GPUColorWrite::Flags::All))
         return MTLColorWriteMaskAll;
 
-    auto options = OptionSet<GPUColorWriteBits::Flags>::fromRaw(flags);
+    auto options = OptionSet<GPUColorWrite::Flags>::fromRaw(flags);
 
     MTLColorWriteMask mask = MTLColorWriteMaskNone;
-    if (options & GPUColorWriteBits::Flags::Red)
+    if (options & GPUColorWrite::Flags::Red)
         mask |= MTLColorWriteMaskRed;
-    if (options & GPUColorWriteBits::Flags::Green)
+    if (options & GPUColorWrite::Flags::Green)
         mask |= MTLColorWriteMaskGreen;
-    if (options & GPUColorWriteBits::Flags::Blue)
+    if (options & GPUColorWrite::Flags::Blue)
         mask |= MTLColorWriteMaskBlue;
-    if (options & GPUColorWriteBits::Flags::Alpha)
+    if (options & GPUColorWrite::Flags::Alpha)
         mask |= MTLColorWriteMaskAlpha;
 
     return mask;
@@ -376,7 +376,7 @@ static bool trySetMetalFunctions(MTLLibrary *vertexMetalLibrary, MTLLibrary *fra
     return false;
 }
 
-static bool trySetFunctions(const GPUPipelineStageDescriptor& vertexStage, const Optional<GPUPipelineStageDescriptor>& fragmentStage, const GPUDevice& device, MTLRenderPipelineDescriptor* mtlDescriptor, Optional<WHLSL::RenderPipelineDescriptor>& whlslDescriptor, GPUErrorScopes& errorScopes)
+static bool trySetFunctions(const GPUProgrammableStageDescriptor& vertexStage, const Optional<GPUProgrammableStageDescriptor>& fragmentStage, const GPUDevice& device, MTLRenderPipelineDescriptor* mtlDescriptor, Optional<WHLSL::RenderPipelineDescriptor>& whlslDescriptor, GPUErrorScopes& errorScopes)
 {
     RetainPtr<MTLLibrary> vertexLibrary, fragmentLibrary;
     String vertexEntryPoint, fragmentEntryPoint;
index d8c1875..ac17cb2 100644 (file)
@@ -60,7 +60,7 @@ static Optional<MTLTextureUsage> mtlTextureUsageForGPUTextureUsageFlags(OptionSe
     UNUSED_PARAM(functionName);
 #endif
 
-    if (flags.containsAny({ GPUTextureUsage::Flags::TransferSource, GPUTextureUsage::Flags::Sampled }) && (flags & GPUTextureUsage::Flags::Storage)) {
+    if (flags.containsAny({ GPUTextureUsage::Flags::CopySource, GPUTextureUsage::Flags::Sampled }) && (flags & GPUTextureUsage::Flags::Storage)) {
         LOG(WebGPU, "%s: Texture cannot have both STORAGE and a read-only usage!", functionName);
         return WTF::nullopt;
     }