[Mesa-dev] [PATCH 13/16] mesa: Adds check for integer internal formal and num samples in glRenderbufferStorageMultisample
Eduardo Lima Mitev
elima at igalia.com
Thu Dec 11 14:34:19 PST 2014
Per GLES3 specification, section 4.4 Framebuffer objects page 198, "If
internalformat is a signed or unsigned integer format and samples is greater
than zero, then the error INVALID_OPERATION is generated.".
Fixes 1 dEQP test:
* dEQP-GLES3.functional.negative_api.buffer.renderbuffer_storage_multisample
---
src/mesa/main/fbobject.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 7e1ff1b..a18f11c 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1814,6 +1814,15 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
samples = 0;
}
else {
+ if (_mesa_is_gles3(ctx) && _mesa_is_enum_format_integer(internalFormat)) {
+ /* Per GLES3 specification, section 4.4 Framebuffer objects page 198, "If
+ * internalformat is a signed or unsigned integer format and samples is greater
+ * than zero, then the error INVALID_OPERATION is generated.".
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(samples)", func);
+ return;
+ }
+
/* check the sample count;
* note: driver may choose to use more samples than what's requested
*/
--
2.1.3
More information about the mesa-dev
mailing list