ES31: Implement getMultisamplefv for D3D part.
Implement getMultisamplefv for d3d part.Because standard D3D sample
positions from https://msdn.microsoft.com/en-us/library/windows/
desktop/ff476218.aspx are fixed sample pattern,we put the sample
positions into a constant array in renderer11_utils.cpp with a
function to query it.
BUG=angleproject:1590
TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position
Change-Id: I6e6006ed1c4e22fe006522e9ffd3297247bee75e
Reviewed-on: https://chromium-review.googlesource.com/594970
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index cbf44e7..e4c118d 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -638,8 +638,9 @@
return false;
}
- GLint maxSamples = context->getCaps().maxSamples;
- if (index >= static_cast<GLuint>(maxSamples))
+ Framebuffer *framebuffer = context->getGLState().getDrawFramebuffer();
+
+ if (index >= static_cast<GLuint>(framebuffer->getSamples(context)))
{
context->handleError(InvalidValue() << "Index must be less than the value of SAMPLES.");
return false;