Fix OpenGL format table for GL_DEPTH_COMPONENT textures

GL_DEPTH is for calls like glEnable(GL_DEPTH) and
glClearBuffer(GL_DEPTH, ...). GL_DEPTH_COMPONENT is the
enum for the texture internal format.

Bug: dawn:367
Change-Id: I8f237e26148e3fd5a624a8bb4ed69e65fdd1acd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20822
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2020-05-06 21:17:04 +00:00 committed by Commit Bot service account
parent 5ffca2eb90
commit b7dbb48351
1 changed files with 2 additions and 2 deletions

View File

@ -90,8 +90,8 @@ namespace dawn_native { namespace opengl {
AddFormat(wgpu::TextureFormat::RGBA32Float, GL_RGBA32F, GL_RGBA, GL_FLOAT, Type::Float);
// Depth stencil formats
AddFormat(wgpu::TextureFormat::Depth32Float, GL_DEPTH_COMPONENT32F, GL_DEPTH, GL_FLOAT, Type::DepthStencil);
AddFormat(wgpu::TextureFormat::Depth24Plus, GL_DEPTH_COMPONENT32F, GL_DEPTH, 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::Depth24PlusStencil8, GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, Type::DepthStencil);
// Block compressed formats