Commit 05fd3860 by Geoff Lang Committed by Commit Bot

Make sure non-multi-sampled EGL configs are always exposed.

It is possible for some hardware to not support multisampling on any texture formats which results in an empty sample set for all formats. BUG=angleproject:2242 Change-Id: I8148c781ec22ec02562b6a8b5d1b966c6f13915e Reviewed-on: https://chromium-review.googlesource.com/766568Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 491b0d60
...@@ -989,7 +989,7 @@ void Renderer11::populateRenderer11DeviceCaps() ...@@ -989,7 +989,7 @@ void Renderer11::populateRenderer11DeviceCaps()
SafeRelease(dxgiAdapter2); SafeRelease(dxgiAdapter2);
} }
gl::SupportedSampleSet Renderer11::generateSampleSetFromCaps( gl::SupportedSampleSet Renderer11::generateSampleSetForEGLConfig(
const gl::TextureCaps &colorBufferFormatCaps, const gl::TextureCaps &colorBufferFormatCaps,
const gl::TextureCaps &depthStencilBufferFormatCaps) const const gl::TextureCaps &depthStencilBufferFormatCaps) const
{ {
...@@ -1015,11 +1015,8 @@ gl::SupportedSampleSet Renderer11::generateSampleSetFromCaps( ...@@ -1015,11 +1015,8 @@ gl::SupportedSampleSet Renderer11::generateSampleSetFromCaps(
sampleCounts = depthStencilBufferFormatCaps.sampleCounts; sampleCounts = depthStencilBufferFormatCaps.sampleCounts;
} }
// In EGL, no multisampling is 0, in D3D its 1, so if 1 exists, insert 0 for EGL to match. // Always support 0 samples
if (sampleCounts.find(1) != sampleCounts.end()) sampleCounts.insert(0);
{
sampleCounts.insert(0);
}
return sampleCounts; return sampleCounts;
} }
...@@ -1091,7 +1088,7 @@ egl::ConfigSet Renderer11::generateConfigs() ...@@ -1091,7 +1088,7 @@ egl::ConfigSet Renderer11::generateConfigs()
const gl::Version &maxVersion = getMaxSupportedESVersion(); const gl::Version &maxVersion = getMaxSupportedESVersion();
const gl::SupportedSampleSet sampleCounts = const gl::SupportedSampleSet sampleCounts =
generateSampleSetFromCaps(colorBufferFormatCaps, depthStencilBufferFormatCaps); generateSampleSetForEGLConfig(colorBufferFormatCaps, depthStencilBufferFormatCaps);
for (GLuint sampleCount : sampleCounts) for (GLuint sampleCount : sampleCounts)
{ {
......
...@@ -497,7 +497,7 @@ class Renderer11 : public RendererD3D ...@@ -497,7 +497,7 @@ class Renderer11 : public RendererD3D
const gl::Offset &destOffset, const gl::Offset &destOffset,
RenderTargetD3D *destRenderTarget); RenderTargetD3D *destRenderTarget);
gl::SupportedSampleSet generateSampleSetFromCaps( gl::SupportedSampleSet generateSampleSetForEGLConfig(
const gl::TextureCaps &colorBufferFormatCaps, const gl::TextureCaps &colorBufferFormatCaps,
const gl::TextureCaps &depthStencilBufferFormatCaps) const; const gl::TextureCaps &depthStencilBufferFormatCaps) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment