@@ -114,6 +114,7 @@ interface GPUDevice {
114
114
type GPUBindingResource =
115
115
116
116
| GPUSampler
117
+ | GPUTexture
117
118
| GPUTextureView
118
119
| GPUBuffer
119
120
| GPUBufferBinding
@@ -543,7 +544,7 @@ interface GPUBindGroupEntry {
543
544
*/
544
545
binding : GPUIndex32 ;
545
546
/**
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},
547
548
* {@link GPUBuffer}, {@link GPUBufferBinding}, or {@link GPUExternalTexture}.
548
549
*/
549
550
resource : GPUBindingResource ;
@@ -571,29 +572,22 @@ interface GPUBindGroupLayoutEntry {
571
572
*/
572
573
visibility : GPUShaderStageFlags ;
573
574
/**
574
- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
575
- * is {@link GPUBufferBinding}.
576
575
*/
577
576
buffer ?: GPUBufferBindingLayout ;
578
577
/**
579
- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
580
- * is {@link GPUSampler}.
581
578
*/
582
579
sampler ?: GPUSamplerBindingLayout ;
583
580
/**
584
- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
585
- * is {@link GPUTextureView}.
586
581
*/
587
582
texture ?: GPUTextureBindingLayout ;
588
583
/**
589
- * When map/exist|provided, indicates the binding resource type for this {@link GPUBindGroupLayoutEntry}
590
- * is {@link GPUTextureView}.
591
584
*/
592
585
storageTexture ?: GPUStorageTextureBindingLayout ;
593
586
/**
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.
597
591
*/
598
592
externalTexture ?: GPUExternalTextureBindingLayout ;
599
593
}
@@ -1224,21 +1218,25 @@ interface GPURenderBundleEncoderDescriptor
1224
1218
1225
1219
interface GPURenderPassColorAttachment {
1226
1220
/**
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}) .
1229
1223
*/
1230
- view : GPUTextureView ;
1224
+ view :
1225
+ | GPUTexture
1226
+ | GPUTextureView ;
1231
1227
/**
1232
1228
* Indicates the depth slice index of {@link GPUTextureViewDimension} `"3d"` {@link GPURenderPassColorAttachment#view}
1233
1229
* that will be output to for this color attachment.
1234
1230
*/
1235
1231
depthSlice ?: GPUIntegerCoordinate ;
1236
1232
/**
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}) .
1240
1236
*/
1241
- resolveTarget ?: GPUTextureView ;
1237
+ resolveTarget ?:
1238
+ | GPUTexture
1239
+ | GPUTextureView ;
1242
1240
/**
1243
1241
* Indicates the value to clear {@link GPURenderPassColorAttachment#view} to prior to executing the
1244
1242
* render pass. If not map/exist|provided, defaults to `{r: 0, g: 0, b: 0, a: 0}`. Ignored
@@ -1263,10 +1261,13 @@ interface GPURenderPassColorAttachment {
1263
1261
1264
1262
interface GPURenderPassDepthStencilAttachment {
1265
1263
/**
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}).
1268
1267
*/
1269
- view : GPUTextureView ;
1268
+ view :
1269
+ | GPUTexture
1270
+ | GPUTextureView ;
1270
1271
/**
1271
1272
* Indicates the value to clear {@link GPURenderPassDepthStencilAttachment#view}'s depth component
1272
1273
* to prior to executing the render pass. Ignored if {@link GPURenderPassDepthStencilAttachment#depthLoadOp}
0 commit comments