@@ -114,6 +114,7 @@ interface GPUDevice {
114114type GPUBindingResource =
115115
116116 | GPUSampler
117+ | GPUTexture
117118 | GPUTextureView
118119 | GPUBuffer
119120 | GPUBufferBinding
@@ -543,7 +544,7 @@ interface GPUBindGroupEntry {
543544 */
544545 binding : GPUIndex32 ;
545546 /**
546- * The resource to bind, which may be a {@link GPUSampler}, {@link GPUTextureView},
547+ * The resource to bind, which may be a {@link GPUSampler}, {@link GPUTexture}, { @link GPUTextureView},
547548 * {@link GPUBuffer}, {@link GPUBufferBinding}, or {@link GPUExternalTexture}.
548549 */
549550 resource : GPUBindingResource ;
@@ -571,29 +572,22 @@ interface GPUBindGroupLayoutEntry {
571572 */
572573 visibility : GPUShaderStageFlags ;
573574 /**
574- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
575- * is {@link GPUBufferBinding}.
576575 */
577576 buffer ?: GPUBufferBindingLayout ;
578577 /**
579- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
580- * is {@link GPUSampler}.
581578 */
582579 sampler ?: GPUSamplerBindingLayout ;
583580 /**
584- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
585- * is {@link GPUTextureView}.
586581 */
587582 texture ?: GPUTextureBindingLayout ;
588583 /**
589- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
590- * is {@link GPUTextureView}.
591584 */
592585 storageTexture ?: GPUStorageTextureBindingLayout ;
593586 /**
594- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
595- * is either {@link GPUExternalTexture} or {@link GPUTextureView}.
596- * External textures use several binding slots: see Exceeds the binding slot limits.
587+ * Exactly one of these members must be set, indicating the binding type.
588+ * The contents of the member specify options specific to that type.
589+ * The corresponding resource in {@link GPUDevice#createBindGroup} requires
590+ * the corresponding binding resource type for this binding.
597591 */
598592 externalTexture ?: GPUExternalTextureBindingLayout ;
599593}
@@ -1224,21 +1218,25 @@ interface GPURenderBundleEncoderDescriptor
12241218
12251219interface GPURenderPassColorAttachment {
12261220 /**
1227- * A { @link GPUTextureView} describing the texture subresource that will be output to for this
1228- * color attachment .
1221+ * Describes the texture subresource that will be output to for this color attachment.
1222+ * The subresource is determined by calling [$get as texture view$]({ @link GPURenderPassColorAttachment#view}) .
12291223 */
1230- view : GPUTextureView ;
1224+ view :
1225+ | GPUTexture
1226+ | GPUTextureView ;
12311227 /**
12321228 * Indicates the depth slice index of {@link GPUTextureViewDimension} `"3d"` {@link GPURenderPassColorAttachment#view}
12331229 * that will be output to for this color attachment.
12341230 */
12351231 depthSlice ?: GPUIntegerCoordinate ;
12361232 /**
1237- * A { @link GPUTextureView} describing the texture subresource that will receive the resolved
1238- * output for this color attachment if {@link GPURenderPassColorAttachment#view} is
1239- * multisampled .
1233+ * Describes the texture subresource that will receive the resolved output for this color
1234+ * attachment if {@link GPURenderPassColorAttachment#view} is multisampled.
1235+ * The subresource is determined by calling [$get as texture view$]({ @link GPURenderPassColorAttachment#resolveTarget}) .
12401236 */
1241- resolveTarget ?: GPUTextureView ;
1237+ resolveTarget ?:
1238+ | GPUTexture
1239+ | GPUTextureView ;
12421240 /**
12431241 * Indicates the value to clear {@link GPURenderPassColorAttachment#view} to prior to executing the
12441242 * render pass. If not map/exist|provided, defaults to `{r: 0, g: 0, b: 0, a: 0}`. Ignored
@@ -1263,10 +1261,13 @@ interface GPURenderPassColorAttachment {
12631261
12641262interface GPURenderPassDepthStencilAttachment {
12651263 /**
1266- * A {@link GPUTextureView} describing the texture subresource that will be output to
1267- * and read from for this depth/stencil attachment.
1264+ * Describes the texture subresource that will be output to and read from for this
1265+ * depth/stencil attachment.
1266+ * The subresource is determined by calling [$get as texture view$]({@link GPURenderPassDepthStencilAttachment#view}).
12681267 */
1269- view : GPUTextureView ;
1268+ view :
1269+ | GPUTexture
1270+ | GPUTextureView ;
12701271 /**
12711272 * Indicates the value to clear {@link GPURenderPassDepthStencilAttachment#view}'s depth component
12721273 * to prior to executing the render pass. Ignored if {@link GPURenderPassDepthStencilAttachment#depthLoadOp}
0 commit comments