Update RenderbufferStorage EPs to new style.
This will facilitate changes for WebGL compatibility.
BUG=angleproject:747
BUG=angleproject:1708
Change-Id: I62e5d684ca10a843b5e958afe9954c1065bfeb19
Reviewed-on: https://chromium-review.googlesource.com/442093
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index e12f5c2..5804c56 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -1927,7 +1927,7 @@
return true;
}
-bool ValidateRenderbufferStorageParametersBase(gl::Context *context,
+bool ValidateRenderbufferStorageParametersBase(ValidationContext *context,
GLenum target,
GLsizei samples,
GLenum internalformat,
@@ -1982,42 +1982,6 @@
return true;
}
-bool ValidateRenderbufferStorageParametersANGLE(gl::Context *context,
- GLenum target,
- GLsizei samples,
- GLenum internalformat,
- GLsizei width,
- GLsizei height)
-{
- ASSERT(samples == 0 || context->getExtensions().framebufferMultisample);
-
- // ANGLE_framebuffer_multisample states that the value of samples must be less than or equal
- // to MAX_SAMPLES_ANGLE (Context::getCaps().maxSamples) otherwise GL_INVALID_VALUE is
- // generated.
- if (static_cast<GLuint>(samples) > context->getCaps().maxSamples)
- {
- context->handleError(Error(GL_INVALID_VALUE));
- return false;
- }
-
- // ANGLE_framebuffer_multisample states GL_OUT_OF_MEMORY is generated on a failure to create
- // the specified storage. This is different than ES 3.0 in which a sample number higher
- // than the maximum sample number supported by this format generates a GL_INVALID_VALUE.
- // The TextureCaps::getMaxSamples method is only guarenteed to be valid when the context is ES3.
- if (context->getClientMajorVersion() >= 3)
- {
- const TextureCaps &formatCaps = context->getTextureCaps().get(internalformat);
- if (static_cast<GLuint>(samples) > formatCaps.getMaxSamples())
- {
- context->handleError(Error(GL_OUT_OF_MEMORY));
- return false;
- }
- }
-
- return ValidateRenderbufferStorageParametersBase(context, target, samples, internalformat,
- width, height);
-}
-
bool ValidateFramebufferRenderbufferParameters(gl::Context *context,
GLenum target,
GLenum attachment,