Skip to content

Commit c69dc57

Browse files
authored
Add proposed textureBindingViewDimension (#164)
This is not standardized, but there is no harm in the types allowing it because standard implementations will simply ignore it.
1 parent d699422 commit c69dc57

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Most or all of these should be fixed in the generator over time.
104104
The following differences are TODO: should be changed in the final result.
105105

106106
- Deprecated items should be removed.
107+
- Addition of Compatibility Mode items like `textureBindingViewDimension`.
107108

108109
The following differences will remain.
109110

dist/index.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,17 @@ interface GPUTextureDescriptor
16191619
* </div>
16201620
*/
16211621
viewFormats?: Iterable<GPUTextureFormat>;
1622+
/**
1623+
* **PROPOSED** addition for Compatibility Mode:
1624+
* <https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md#1-texture-view-dimension-may-be-specified>
1625+
*
1626+
* > [In compatibility mode,]
1627+
* > When specifying a texture, a textureBindingViewDimension property
1628+
* > determines the views which can be bound from that texture for sampling.
1629+
* > Binding a view of a different dimension for sampling than specified at
1630+
* > texture creation time will cause a validation error.
1631+
*/
1632+
textureBindingViewDimension?: GPUTextureViewDimension;
16221633
}
16231634

16241635
interface GPUTextureViewDescriptor

0 commit comments

Comments
 (0)