winrt: Remove depth/stencil from the default window format

After the last ANGLE upgrade, some hardware fails to render proper
QtQuick scenes when using a depth buffer (which is present in the default
window format). As the batched renderer no longer requires a depth
buffer, this workaround can be safely applied.

Task-number: QTBUG-40649
Change-Id: Id0f6e418aa5c6346186678728f88a6c18af5fb74
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
This commit is contained in:
Andrew Knight 2014-08-18 08:44:25 +03:00
parent c26d5cf6ef
commit 636d2e3402

View File

@ -512,8 +512,6 @@ QWinRTScreen::QWinRTScreen()
d->surfaceFormat.setRenderableType(QSurfaceFormat::OpenGLES); d->surfaceFormat.setRenderableType(QSurfaceFormat::OpenGLES);
d->surfaceFormat.setSamples(1); d->surfaceFormat.setSamples(1);
d->surfaceFormat.setSwapBehavior(QSurfaceFormat::DoubleBuffer); d->surfaceFormat.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
d->surfaceFormat.setDepthBufferSize(24);
d->surfaceFormat.setStencilBufferSize(8);
hr = d->coreWindow->add_KeyDown(Callback<KeyHandler>(this, &QWinRTScreen::onKeyDown).Get(), &d->windowTokens[&ICoreWindow::remove_KeyDown]); hr = d->coreWindow->add_KeyDown(Callback<KeyHandler>(this, &QWinRTScreen::onKeyDown).Get(), &d->windowTokens[&ICoreWindow::remove_KeyDown]);
Q_ASSERT_SUCCEEDED(hr); Q_ASSERT_SUCCEEDED(hr);