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>
diff --git a/src/dawn_native/opengl/GLFormat.cpp b/src/dawn_native/opengl/GLFormat.cpp
index 35b129f..9e1a20c 100644
--- a/src/dawn_native/opengl/GLFormat.cpp
+++ b/src/dawn_native/opengl/GLFormat.cpp
@@ -90,8 +90,8 @@
         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