원문: What's New in WebGPU (Chrome 155-156) — Chrome Developers 원문은 CC-BY-4.0 라이선스로 제공되며, 이 글은 한국어로 번역한 2차 저작물입니다.
WGSL fragment_depth 확장
기하학적 렌더링이 많은 렌더링 패스에서 early-Z 최적화는 개발자에게 매우 유용합니다. GPU가 비용이 많이 드는 fragment 셰이더를 실행하기 전에 숨겨진 픽셀을 버리도록 하여 성능을 크게 향상시킵니다. 래스터화된 깊이가 깊이 테스트를 통과하지 못하면, 셰이더에 다른 부작용이 없는 한 GPU는 fragment 셰이더를 완전히 건너뜁니다.
하드웨어가 이를 어떻게 처리하는지에 대해 더 자세히 알고 싶다면 MJP가 작성한 "When Does Early-Z Have to be Disabled?"를 참고하세요.
사용자 지정 깊이 조작은 유용하지만, fragment 셰이더에서 이를 수행하는 데는 숨겨진 비용이 따릅니다.
@builtin(frag_depth)에 fragment 셰이더 내에서 쓰는 것은 일반적으로 드라이버가 전체 draw call에 대해 early-Z 최적화를 비활성화하도록 강제합니다. 이는 드라이버의 휴리스틱이 셰이더의 계산된 출력 깊이가 래스터라이저가 보간한 깊이와 일치한다고 보장할 수 없기 때문입니다.이 성능 저하를 해결하기 위해 WGSL 확장
fragment_depth를 사용하면 @builtin(frag_depth)에 less 또는 greater 깊이 모드 이름을 지정하여 쓴 깊이가 보간된 깊이와 어떻게 비교되는지 명시적으로 나타낼 수 있으며, 이를 통해 GPU는 early-Z 최적화를 안전하게 적용할 수 있습니다.이 언어 확장은 JavaScript에서
navigator.gpu.wgslLanguageFeatures를 사용하여 기능 감지할 수 있습니다. requires fragment_depth;를 WGSL 셰이더 코드 상단에 사용하여 이식성이 없을 수 있음을 알리는 것이 좋습니다. 다음 예시와 "intent to ship"를 참조하세요.텍스처 압축 비정렬
"
texture-compression-unaligned" GPU 기능은 블록 크기의 정수 배수가 아닌 차원을 가진 압축 텍스처를 생성할 수 있도록 합니다 (BC, ETC2, ASTC 형식의 4x4 등). 이전에는 WebGPU에서 텍스처 크기가 이러한 블록 경계에 정렬되도록 엄격하게 요구했습니다. 이 기능은 텍스처를 패딩하거나 스케일링하여 블록 정렬에 맞출 필요성을 제거함으로써 스케일링 왜곡을 도입하지 않고 원래 압축 충실도를 유지합니다. "intent to ship"를 참조하세요.다음 코드 스니펫은 어댑터가 텍스처 압축 비정렬을 지원하는지 확인하고, 지원하는 경우 이를 사용하여 장치를 요청합니다.
이 기능을 추진하고, 사양 및 CTS 작업을 이끈 spark.js의 외부 기여자 Ignacio Castaño님께 감사드립니다!
srgb-linear 및 display-p3-linear 색 공간
"
srgb-linear" 및 "display-p3-linear" 사전 정의된 색 공간이 추가됨에 따라 WebGPU 캔버스 컨텍스트는 이제 와이드 색 영역 디스플레이를 지원하기 위해 확장된 범위의 선형 색 공간으로 직접 렌더링할 수 있습니다. 이러한 색 공간은 픽셀 값과 물리적 휘도 간의 선형 관계를 유지합니다. 따라서 게임에서 물리적 광선 렌더링뿐만 아니라 안티 앨리어싱, 보간 및 데시메이션과 같은 공간 처리 작업에 이상적입니다. "intent to ship" 및 "Particles (HDR) sample PR #574"를 참조하세요.추가 snorm10-10-10-2 정점 형식
"
snorm10-10-10-2" 정점 형식은 네 개의 부호 있는 정규화 값을 보유하는 32비트 압축 형식입니다: 세 개의 10비트 컴포넌트 (r, g, b) 및 하나의 2비트 컴포넌트 (a). 이 형식을 사용하면 3D 법선 벡터와 추가 2비트 스칼라 또는 정렬 플래그와 같은 속성을 효율적으로 저장하면서 메모리 대역폭을 절약할 수 있습니다. "spec PR 6491"를 참조하세요.Linux NVIDIA용 f16 지원
선택적 "
shader-f16" 기능은 WGSL에서 16비트 부동 소수점 값에 대한 지원을 제공합니다. 이제 최신 NVIDIA GPU 드라이버를 사용하는 Linux에서 지원됩니다. "issue chromium:42251215"를 참조하세요.Dawn 업데이트
이제
WGPUAdapterPropertiesD3D 구조체를 사용하여 특정 GPU 어댑터의 기본 DXGIAdapter의 LUID를 쿼리할 수 있습니다. "issue chromium:562849566"를 참조하세요.여기서는 몇 가지 주요 내용을 다루었습니다. 전체 "list of commits"를 확인하세요.
"What's New in WebGPU" 시리즈에서 다룬 모든 내용의 목록입니다.
Chrome 155-156
- WGSL fragment_depth 확장
- 텍스처 압축 비정렬
- srgb-linear 및 display-p3-linear 색 공간
- 추가 snorm10-10-10-2 정점 형식
- Linux NVIDIA용 f16 지원
- Dawn 업데이트
Chrome 153-154
Chrome 151-152
Chrome 149-150
Chrome 147-148
Chrome 146
Chrome 145
Chrome 144
- WGSL subgroup_id 확장
- WGSL uniform_buffer_standard_layout 확장
- WebGPU on Linux
- Faster writeBuffer and writeTexture
- Dawn 업데이트
Chrome 143
Chrome 142
Chrome 141
- Tint IR completed
- Integer range analysis in WGSL compiler
- SPIR-V 1.4 update for Vulkan backend
- Dawn 업데이트
Chrome 140
- Device requests consume adapter
- Shorthand for using texture where texture view is used
- WGSL textureSampleLevel supports 1D textures
- Deprecate bgra8unorm read-only storage texture usage
- Remove GPUAdapter isFallbackAdapter attribute
- Dawn 업데이트
Chrome 139
- 3D texture support for BC and ASTC compressed formats
- New "core-features-and-limits" feature
- Origin trial for WebGPU compatibility mode
- Dawn 업데이트
Chrome 138
- Shorthand for using buffer as a binding resource
- Size requirement changes for buffers mapped at creation
- Architecture report for recent GPUs
- Deprecate GPUAdapter isFallbackAdapter attribute
- Dawn 업데이트
Chrome 137
- Use texture view for externalTexture binding
- Buffers copy without specifying offsets and size
- WGSL workgroupUniformLoad using pointer to atomic
- GPUAdapterInfo powerPreference attribute
- Remove GPURequestAdapterOptions compatibilityMode attribute
- Dawn 업데이트
Chrome 136
- GPUAdapterInfo isFallbackAdapter attribute
- Shader compilation time improvements on D3D12
- Save and copy canvas images
- Lift compatibility mode restrictions
- Dawn 업데이트
Chrome 135
- Allow creating pipeline layout with null bind group layout
- Allow viewports to extend past the render targets bounds
- Easier access to the experimental compatibility mode on Android
- Remove maxInterStageShaderComponents limit
- Dawn 업데이트
Chrome 134
- Improve machine-learning workloads with subgroups
- Remove float filterable texture types support as blendable
- Dawn 업데이트
Chrome 133
- Additional unorm8x4-bgra and 1-component vertex formats
- Allow unknown limits to be requested with undefined value
- WGSL alignment rules changes
- WGSL performance gains with discard
- Use VideoFrame displaySize for external textures
- Handle images with non-default orientations using copyExternalImageToTexture
- Improving developer experience
- Enable compatibility mode with featureLevel
- Experimental subgroup features cleanup
- Deprecate maxInterStageShaderComponents limit
- Dawn 업데이트
Chrome 132
- Texture view usage
- 32-bit float textures blending
- GPUDevice adapterInfo attribute
- Configuring canvas context with invalid format throw JavaScript error
- Filtering sampler restrictions on textures
- Extended subgroups experimentation
- Improving developer experience
- Experimental support for 16-bit normalized texture formats
- Dawn 업데이트
Chrome 131
- Clip distances in WGSL
- GPUCanvasContext getConfiguration()
- Point and line primitives must not have depth bias
- Inclusive scan built-in functions for subgroups
- Experimental support for multi-draw indirect
- Shader module compilation option strict math
- Remove GPUAdapter requestAdapterInfo()
- Dawn 업데이트
Chrome 130
- Dual source blending
- Shader compilation time improvements on Metal
- Deprecation of GPUAdapter requestAdapterInfo()
- Dawn 업데이트
Chrome 129
Chrome 128
- Experimenting with subgroups
- Deprecate setting depth bias for lines and points
- Hide uncaptured error DevTools warning if preventDefault
- WGSL interpolate sampling first and either
- Dawn 업데이트
Chrome 127
- Experimental support for OpenGL ES on Android
- GPUAdapter info attribute
- WebAssembly interop improvements
- Improved command encoder errors
- Dawn 업데이트
Chrome 126
- Increase maxTextureArrayLayers limit
- Buffer upload optimization for Vulkan backend
- Shader compilation time improvements
- Submitted command buffers must be unique
- Dawn 업데이트
Chrome 125
Chrome 124
- Read-only and read-write storage textures
- Service workers and shared workers support
- New adapter information attributes
- Bug fixes
- Dawn 업데이트
Chrome 123
- DP4a built-in functions support in WGSL
- Unrestricted pointer parameters in WGSL
- Syntax sugar for dereferencing composites in WGSL
- Separate read-only state for stencil and depth aspects
- Dawn 업데이트
Chrome 122
- Expand reach with compatibility mode (feature in development)
- Increase maxVertexAttributes limit
- Dawn 업데이트
Chrome 121
- Support WebGPU on Android
- Use DXC instead of FXC for shader compilation on Windows
- Timestamp queries in compute and render passes
- Default entry points to shader modules
- Support display-p3 as GPUExternalTexture color space
- Memory heaps info
- Dawn 업데이트
Chrome 120
- Support for 16-bit floating-point values in WGSL
- Push the limits
- Changes to depth-stencil state
- Adapter information updates
- Timestamp queries quantization
- Spring-cleaning features
Chrome 119
Chrome 118
- HTMLImageElement and ImageData support in
copyExternalImageToTexture() - Experimental support for read-write and read-only storage texture
- Dawn 업데이트
Chrome 117
- Unset vertex buffer
- Unset bind group
- Silence errors from async pipeline creation when device is lost
- SPIR-V shader module creation updates
- Improving developer experience
- Caching pipelines with automatically generated layout
- Dawn 업데이트
Chrome 116
- WebCodecs integration
- Lost device returned by GPUAdapter
requestDevice() - Keep video playback smooth if
is calledimportExternalTexture() - Spec conformance
- Improving developer experience
- Dawn 업데이트
Chrome 115
- Supported WGSL language extensions
- Experimental support for Direct3D 11
- Get discrete GPU by default on AC power
- Improving developer experience
- Dawn 업데이트
Chrome 114
- Optimize JavaScript
- getCurrentTexture() on unconfigured canvas throws InvalidStateError
- WGSL updates
- Dawn 업데이트





