这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 13 additions & 60 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -9721,31 +9721,15 @@ dictionary GPUCommandEncoderDescriptor
[=Device timeline=] steps:

1. [$Validate the encoder state$] of |this|. If it returns false, stop.
1. Let |aligned| be `true`.
1. Let |dataLength| be |source|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/size}}.
1. If any of the following conditions are unsatisfied, make |this| [=invalid=] and stop.

<div class=validusage>
- Let |dstTexture| be |destination|.{{GPUImageCopyTexture/texture}}.
- [$validating GPUImageCopyBuffer$](|source|) returns `true`.
- |source|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/usage}} contains {{GPUBufferUsage/COPY_SRC}}.
- [$validating GPUImageCopyTexture$](|destination|, |copySize|) returns `true`.
- |dstTexture|.{{GPUTexture/usage}} contains {{GPUTextureUsage/COPY_DST}}.
- |dstTexture|.{{GPUTexture/sampleCount}} is 1.
- Let |aspectSpecificFormat| = |dstTexture|.{{GPUTexture/format}}.
- If |dstTexture|.{{GPUTexture/format}} is a [=depth-or-stencil format=]:
- |destination|.{{GPUImageCopyTexture/aspect}} must refer to a single aspect of
|dstTexture|.{{GPUTexture/format}}.
- That aspect must be a valid image copy destination according to [[#depth-formats]].
- Set |aspectSpecificFormat| to the [=aspect-specific format=] according to [[#depth-formats]].
- [=validating texture copy range=](|destination|, |copySize|) return `true`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step seems to be missing now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that. I tried so hard to make sure everything got pulled over, but with as much rearranging as it required I guess I'm not too surprised I missed a step.

- If |dstTexture|.{{GPUTexture/format}} is not a [=depth-or-stencil format=]:
- |source|.{{GPUImageDataLayout/offset}} is a multiple of the
[=texel block copy footprint=] of |dstTexture|.{{GPUTexture/format}}.
- If |dstTexture|.{{GPUTexture/format}} is a [=depth-or-stencil format=]:
- |source|.{{GPUImageDataLayout/offset}} is a multiple of 4.
- [$validating linear texture data$](|source|,
|source|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/size}},
|aspectSpecificFormat|,
|copySize|) succeeds.
- |source|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/usage}} contains
{{GPUBufferUsage/COPY_SRC}}.
- [$validating texture buffer copy$](|destination|, |source|, |dataLength|, |copySize|, {{GPUTextureUsage/COPY_DST}}, |aligned|) returns `true`.
</div>

1. [$Enqueue a command$] on |this| which issues the subsequent steps on the
Expand Down Expand Up @@ -9788,32 +9772,15 @@ dictionary GPUCommandEncoderDescriptor
[=Device timeline=] steps:

1. [$Validate the encoder state$] of |this|. If it returns false, stop.
1. Let |aligned| be `true`.
1. Let |dataLength| be |destination|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/size}}.
1. If any of the following conditions are unsatisfied, make |this| [=invalid=] and stop.

<div class=validusage>
- Let |srcTexture| be |source|.{{GPUImageCopyTexture/texture}}.
- [$validating GPUImageCopyTexture$](|source|, |copySize|) returns `true`.
- |srcTexture|.{{GPUTexture/usage}} contains {{GPUTextureUsage/COPY_SRC}}.
- |srcTexture|.{{GPUTexture/sampleCount}} is 1.
- Let |aspectSpecificFormat| = |srcTexture|.{{GPUTexture/format}}.
- If |srcTexture|.{{GPUTexture/format}} is a [=depth-or-stencil format=] format:
- |source|.{{GPUImageCopyTexture/aspect}} must refer to a single aspect of
|srcTexture|.{{GPUTexture/format}}.
- That aspect must be a valid image copy source according to [[#depth-formats]].
- Set |aspectSpecificFormat| to the [=aspect-specific format=] according to [[#depth-formats]].
- [$validating GPUImageCopyBuffer$](|destination|) returns `true`.
- |destination|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/usage}} contains
{{GPUBufferUsage/COPY_DST}}.
- [=validating texture copy range=](|source|, |copySize|) returns `true`.
- If |srcTexture|.{{GPUTexture/format}} is not a [=depth-or-stencil format=]:
- |destination|.{{GPUImageDataLayout/offset}} is a multiple of the
[=texel block copy footprint=] of |srcTexture|.{{GPUTexture/format}}.
- If |srcTexture|.{{GPUTexture/format}} is a [=depth-or-stencil format=]:
- |destination|.{{GPUImageDataLayout/offset}} is a multiple of 4.
- [$validating linear texture data$](|destination|,
|destination|.{{GPUImageCopyBuffer/buffer}}.{{GPUBuffer/size}},
|aspectSpecificFormat|,
|copySize|) succeeds.
- [$validating texture buffer copy$](|source|, |destination|, |dataLength|, |copySize|, {{GPUTextureUsage/COPY_SRC}}, |aligned|) returns `true`.
</div>

1. [$Enqueue a command$] on |this| which issues the subsequent steps on the
Expand Down Expand Up @@ -9874,8 +9841,6 @@ dictionary GPUCommandEncoderDescriptor
- |source|.{{GPUImageCopyTexture/aspect}} and |destination|.{{GPUImageCopyTexture/aspect}}
must both refer to all aspects of |srcTexture|.{{GPUTexture/format}}
and |dstTexture|.{{GPUTexture/format}}, respectively.
- [=validating texture copy range=](|source|, |copySize|) returns `true`.
- [=validating texture copy range=](|destination|, |copySize|) returns `true`.
- The [$set of subresources for texture copy$](|source|, |copySize|) and
the [$set of subresources for texture copy$](|destination|, |copySize|) are disjoint.
</div>
Expand Down Expand Up @@ -12620,32 +12585,21 @@ GPUQueue includes GPUObjectBase;
<div data-timeline=device>
[=Device timeline=] steps:

1. Let |texture| be |destination|.{{GPUImageCopyTexture/texture}}.
1. Let |aligned| be `false`.
1. Let |dataLength| be |dataBytes|.[=byte sequence/length=].
1. If any of the following conditions are unsatisfied,
[$generate a validation error$] and stop.

<div class=validusage>
- |texture|.{{GPUTexture/[[destroyed]]}} is `false`.
- [$validating GPUImageCopyTexture$](|destination|, |size|) returns `true`.
- |texture|.{{GPUTexture/usage}} includes {{GPUTextureUsage/COPY_DST}}.
- |texture|.{{GPUTexture/sampleCount}} is 1.
- [=validating texture copy range=](|destination|, |size|) return `true`.
- |destination|.{{GPUImageCopyTexture/aspect}} must refer to a single aspect of
|texture|.{{GPUTexture/format}}.
- That aspect must be a valid image copy destination according to [[#depth-formats]].
- Let |aspectSpecificFormat| = |texture|.{{GPUTexture/format}}.
- If |texture|.{{GPUTexture/format}} is a [=depth-or-stencil format=]:
- Set |aspectSpecificFormat| to the [=aspect-specific format=] of |texture|.{{GPUTexture/format}} according to [[#depth-formats]].
- [$validating linear texture data$](|dataLayout|,
|dataBytes|.[=byte sequence/length=],
|aspectSpecificFormat|,
|size|) succeeds.
- |destination|.{{GPUImageCopyTexture/texture}}.{{GPUTexture/[[destroyed]]}} is `false`.
- [$validating texture buffer copy$](|destination|, |dataLayout|, |dataLength|, |size|, {{GPUTextureUsage/COPY_DST}}, |aligned|) returns `true`.

Note: unlike
{{GPUCommandEncoder}}.{{GPUCommandEncoder/copyBufferToTexture()}},
there is no alignment requirement on either
|dataLayout|.{{GPUImageDataLayout/bytesPerRow}} or |dataLayout|.{{GPUImageDataLayout/offset}}.
</div>

1. Let |contents| be the contents of the [=images=] seen by
viewing |dataBytes| with |dataLayout| and |size|.

Expand Down Expand Up @@ -12741,7 +12695,6 @@ GPUQueue includes GPUObjectBase;
- |texture|.{{GPUTexture/[[destroyed]]}} must be `false`.
- |texture| must be [$valid to use with$] |this|.
- [$validating GPUImageCopyTexture$](destination, copySize) must return `true`.
- [=validating texture copy range=](destination, copySize) must return `true`.
- |texture|.{{GPUTexture/usage}} must include both
{{GPUTextureUsage/RENDER_ATTACHMENT}} and {{GPUTextureUsage/COPY_DST}}.
- |texture|.{{GPUTexture/dimension}} must be {{GPUTextureDimension/"2d"}}.
Expand Down
Loading