mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
OpenGL: skip depth and stencil tests if readback is unsupported.
Add appropriate toggles. Change-Id: I99906d1622f4c30b364ba8a9d7d808faa0203e1d Bug: dawn:667 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88360 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
2fb28e008d
commit
a734f81922
@@ -71,6 +71,12 @@ namespace dawn::native::opengl {
|
||||
bool supportsSnormRead =
|
||||
gl.IsAtLeastGL(4, 4) || gl.IsGLExtensionSupported("GL_EXT_render_snorm");
|
||||
|
||||
bool supportsDepthRead =
|
||||
gl.IsAtLeastGL(3, 0) || gl.IsGLExtensionSupported("GL_NV_read_depth");
|
||||
|
||||
bool supportsStencilRead =
|
||||
gl.IsAtLeastGL(3, 0) || gl.IsGLExtensionSupported("GL_NV_read_stencil");
|
||||
|
||||
bool supportsDepthStencilRead =
|
||||
gl.IsAtLeastGL(3, 0) || gl.IsGLExtensionSupported("GL_NV_read_depth_stencil");
|
||||
|
||||
@@ -100,6 +106,8 @@ namespace dawn::native::opengl {
|
||||
SetToggle(Toggle::DisableBaseInstance, !supportsBaseInstance);
|
||||
SetToggle(Toggle::DisableIndexedDrawBuffers, !supportsIndexedDrawBuffers);
|
||||
SetToggle(Toggle::DisableSnormRead, !supportsSnormRead);
|
||||
SetToggle(Toggle::DisableDepthRead, !supportsDepthRead);
|
||||
SetToggle(Toggle::DisableStencilRead, !supportsStencilRead);
|
||||
SetToggle(Toggle::DisableDepthStencilRead, !supportsDepthStencilRead);
|
||||
SetToggle(Toggle::DisableBGRARead, !supportsBGRARead);
|
||||
SetToggle(Toggle::DisableSampleVariables, !supportsSampleVariables);
|
||||
|
||||
Reference in New Issue
Block a user