Implement support for depth24stencil8 on OpenGL.
Covered by existing tests. Change-Id: Ibb6daf8cd195474560a306e830d69c484579ae1c Bug: dawn:1338 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85140 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
123761f40f
commit
b5c5df50ab
|
@ -244,6 +244,7 @@ namespace dawn::native::opengl {
|
||||||
supportsBPTC) {
|
supportsBPTC) {
|
||||||
mSupportedFeatures.EnableFeature(dawn::native::Feature::TextureCompressionBC);
|
mSupportedFeatures.EnableFeature(dawn::native::Feature::TextureCompressionBC);
|
||||||
}
|
}
|
||||||
|
mSupportedFeatures.EnableFeature(Feature::Depth24UnormStencil8);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -93,6 +93,7 @@ namespace dawn::native::opengl {
|
||||||
// Depth stencil formats
|
// Depth stencil formats
|
||||||
AddFormat(wgpu::TextureFormat::Depth32Float, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
|
AddFormat(wgpu::TextureFormat::Depth32Float, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
|
||||||
AddFormat(wgpu::TextureFormat::Depth24Plus, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
|
AddFormat(wgpu::TextureFormat::Depth24Plus, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, Type::DepthStencil);
|
||||||
|
AddFormat(wgpu::TextureFormat::Depth24UnormStencil8, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 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::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::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);
|
AddFormat(wgpu::TextureFormat::Stencil8, GL_STENCIL_INDEX8, GL_STENCIL, GL_UNSIGNED_BYTE, Type::DepthStencil);
|
||||||
|
|
Loading…
Reference in New Issue