Multisampling value of 1 Setting a multisampling values of 0 or 1 are apparently 2 different cases, so I tried removing the even number check to fix this. It didn't break any tests, but I'm not sure how well this is covered by the tests. Change-Id: I0e7de9b153288f0c07bde9a2f104ea1d2bf230ac Reviewed-on: https://swiftshader-review.googlesource.com/3622 Tested-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGL/Context.cpp b/src/OpenGL/libGL/Context.cpp index 8a3847e..0285baa 100644 --- a/src/OpenGL/libGL/Context.cpp +++ b/src/OpenGL/libGL/Context.cpp
@@ -1414,7 +1414,7 @@ } break; case GL_SAMPLES: - *params = samples & ~1; + *params = samples; break; } } @@ -2687,14 +2687,14 @@ int Context::getSupportedMultiSampleDepth(sw::Format format, int requested) { - if(requested <= 1) + if(requested <= 0) { - return 1; + return 0; } - if(requested == 2) + if(requested <= 2) { - return 2; + return requested; } return 4;
diff --git a/src/OpenGL/libGL/Renderbuffer.cpp b/src/OpenGL/libGL/Renderbuffer.cpp index 95887b5..458a69f 100644 --- a/src/OpenGL/libGL/Renderbuffer.cpp +++ b/src/OpenGL/libGL/Renderbuffer.cpp
@@ -358,7 +358,7 @@ mHeight = height; this->format = format; internalFormat = requestedFormat; - mSamples = supportedSamples & ~1; + mSamples = supportedSamples; } Colorbuffer::~Colorbuffer() @@ -418,7 +418,7 @@ mHeight = height; format = GL_DEPTH24_STENCIL8_EXT; internalFormat = sw::FORMAT_D24S8; - mSamples = supportedSamples & ~1; + mSamples = supportedSamples; } DepthStencilbuffer::~DepthStencilbuffer()