"glTexImage3DMultisample");
}
+static bool
+valid_texstorage_ms_parameters(GLsizei width, GLsizei height, GLsizei depth,
+ GLsizei samples, unsigned dims)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!_mesa_valid_tex_storage_dim(width, height, depth)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexStorage%uDMultisample(width=%d,height=%d,depth=%d)",
+ dims, width, height, depth);
+ return false;
+ }
+ return true;
+}
void GLAPIENTRY
_mesa_TexStorage2DMultisample(GLenum target, GLsizei samples,
if (!texObj)
return;
+ if (!valid_texstorage_ms_parameters(width, height, 1, samples, 2))
+ return;
+
texture_image_multisample(ctx, 2, texObj, target, samples,
internalformat, width, height, 1,
fixedsamplelocations, GL_TRUE,
if (!texObj)
return;
+ if (!valid_texstorage_ms_parameters(width, height, depth, samples, 3))
+ return;
+
texture_image_multisample(ctx, 3, texObj, target, samples,
internalformat, width, height, depth,
fixedsamplelocations, GL_TRUE,
if (!texObj)
return;
+ if (!valid_texstorage_ms_parameters(width, height, 1, samples, 2))
+ return;
+
texture_image_multisample(ctx, 2, texObj, texObj->Target, samples,
internalformat, width, height, 1,
fixedsamplelocations, GL_TRUE,
if (!texObj)
return;
+ if (!valid_texstorage_ms_parameters(width, height, depth, samples, 3))
+ return;
+
texture_image_multisample(ctx, 3, texObj, texObj->Target, samples,
internalformat, width, height, depth,
fixedsamplelocations, GL_TRUE,