Skip to content

Commit 591a2a2

Browse files
Editorial review: Update property info to mention GPUTexture as shortcut for default GPUTextureView (mdn#41600)
* Update property info to mention GPUTexture as shortcut for default GPUTextureView * Use argument in place of descriptor object
1 parent 04a955e commit 591a2a2

File tree

2 files changed

+10
-3
lines changed
  • files/en-us/web/api

2 files changed

+10
-3
lines changed

files/en-us/web/api/gpucommandencoder/beginrenderpass/index.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ Color attachment objects can have the following properties:
7070
- `"discard"`: Discards the resulting value of the render pass for this attachment.
7171
- `"store"`: Stores the resulting value of the render pass for this attachment.
7272
- `resolveTarget` {{optional_inline}}
73-
- : A {{domxref("GPUTextureView")}} object representing the texture subresource that will receive the resolved output for this color attachment if `view` is multisampled.
73+
- : An object representing the texture subresource that will receive the resolved output for this color attachment if `view` is multisampled. This can be one of the following:
74+
- {{domxref("GPUTextureView")}}
75+
- {{domxref("GPUTexture")}}: Can be used in place of a `GPUTextureView`, provided a default view is desired. When used in this context, `GPUTexture` is equivalent to a `GPUTextureView` object created using a {{domxref("GPUTexture.createView()")}} call with no argument specified.
7476
- `view`
75-
- : A {{domxref("GPUTextureView")}} object representing the texture subresource that will be output to for this color attachment.
77+
- : An object representing the texture subresource that will be output to for this color attachment. This can be one of the following:
78+
- {{domxref("GPUTextureView")}}
79+
- {{domxref("GPUTexture")}}: Can be used in place of a `GPUTextureView`, provided a default view is desired. When used in this context, `GPUTexture` is equivalent to a `GPUTextureView` object created using a {{domxref("GPUTexture.createView()")}} call with no argument specified.
7680

7781
> [!NOTE]
7882
> Each color or depth/stencil attachment must be a unique texture subresource, and texture subresources used as attachments cannot be used inside the render pass.
@@ -120,7 +124,9 @@ The `depthStencilAttachment` object can have the following properties:
120124
- `"discard"`: Discards the resulting value of the render pass for this attachment.
121125
- `"store"`: Stores the resulting value of the render pass for this attachment.
122126
- `view`
123-
- : A {{domxref("GPUTextureView")}} object representing the texture subresource that will be output to and read from for this depth/stencil attachment.
127+
- : An object representing the texture subresource that will be output to and read from for this depth/stencil attachment. This can be one of the following:
128+
- {{domxref("GPUTextureView")}}
129+
- {{domxref("GPUTexture")}}: Can be used in place of a `GPUTextureView`, provided a default view is desired. When used in this context, `GPUTexture` is equivalent to a `GPUTextureView` object created using a {{domxref("GPUTexture.createView()")}} call with no argument specified.
124130

125131
### Return value
126132

files/en-us/web/api/gpudevice/createbindgroup/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ createBindGroup(descriptor)
3131
- {{domxref("GPUBuffer")}}: Can be used directly rather than being wrapped in a `GPUBufferBinding`, provided the default [`offset`](#offset) and [`size`](#size) values are being used.
3232
- {{domxref("GPUExternalTexture")}}
3333
- {{domxref("GPUTextureView")}}: Can be used in place of a `GPUExternalTexture` provided it is compatible (a 2D format with a single subresource, that is, [`dimension: "2d"`](/en-US/docs/Web/API/GPUTexture/createView#dimension)).
34+
- {{domxref("GPUTexture")}}: Can be used in place of a `GPUTextureView`, provided a default view is desired. When used in this context, `GPUTexture` is equivalent to a `GPUTextureView` object created using a {{domxref("GPUTexture.createView()")}} call with no argument specified.
3435
- {{domxref("GPUSampler")}}
3536
- `label` {{optional_inline}}
3637
- : A string providing a label that can be used to identify the object, for example in {{domxref("GPUError")}} messages or console warnings.

0 commit comments

Comments
 (0)