mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 18:05:31 +00:00
Implement the stencil8 format.
Rolled in changes made by cwallez@ as part of https://dawn-review.googlesource.com/c/dawn/+/75983, which was originally based on this change. Bug: dawn:666 Change-Id: I5d6ad592294ee8302f3b18f7f31bbfd982297251 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68280 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
cbdde604b8
commit
0bf63577d2
@@ -95,6 +95,7 @@ namespace dawn::native::opengl {
|
||||
AddFormat(wgpu::TextureFormat::Depth24Plus, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
|
||||
AddFormat(wgpu::TextureFormat::Depth24PlusStencil8, GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, Type::DepthStencil);
|
||||
AddFormat(wgpu::TextureFormat::Depth16Unorm, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, Type::DepthStencil);
|
||||
AddFormat(wgpu::TextureFormat::Stencil8, GL_STENCIL_INDEX8, GL_STENCIL, GL_UNSIGNED_BYTE, Type::DepthStencil);
|
||||
|
||||
// Block compressed formats
|
||||
AddFormat(wgpu::TextureFormat::BC1RGBAUnorm, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_RGBA, GL_UNSIGNED_BYTE, Type::Float);
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace dawn::native::opengl {
|
||||
GLint GetStencilMaskFromStencilFormat(wgpu::TextureFormat depthStencilFormat) {
|
||||
switch (depthStencilFormat) {
|
||||
case wgpu::TextureFormat::Depth24PlusStencil8:
|
||||
case wgpu::TextureFormat::Depth24UnormStencil8:
|
||||
case wgpu::TextureFormat::Depth32FloatStencil8:
|
||||
case wgpu::TextureFormat::Stencil8:
|
||||
return 0xFF;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user