* types for SNORM formats. Also, conversion to SNORM formats is not
* allowed by Table 3.2 on Page 110.
*/
- if(_mesa_is_enum_format_snorm(internalFormat)) {
+ if (_mesa_is_enum_format_snorm(internalFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%dD(internalFormat=%s)", dimensions,
_mesa_enum_to_string(internalFormat));
_mesa_dirty_texobj(ctx, texObj);
}
_mesa_unlock_texture(ctx, texObj);
-
}
}
static GLboolean
-formats_differ_in_component_sizes (mesa_format f1,
- mesa_format f2)
+formats_differ_in_component_sizes(mesa_format f1, mesa_format f2)
{
GLint f1_r_bits = _mesa_get_format_bits(f1, GL_RED_BITS);
GLint f1_g_bits = _mesa_get_format_bits(f1, GL_GREEN_BITS);
*/
if (rb->InternalFormat == GL_RGB10_A2) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexImage%uD(Reading from GL_RGB10_A2 buffer and"
- " writing to unsized internal format)", dims);
+ "glCopyTexImage%uD(Reading from GL_RGB10_A2 buffer"
+ " and writing to unsized internal format)", dims);
return;
}
}
if (!texObj)
return;
- if (compressed_subtexture_target_check(ctx, texObj->Target, 1, format,
- true,
+ if (compressed_subtexture_target_check(ctx, texObj->Target, 1, format, true,
"glCompressedTextureSubImage1D")) {
return;
}
if (!texObj)
return;
- if (compressed_subtexture_target_check(ctx, texObj->Target, 2, format,
- true,
+ if (compressed_subtexture_target_check(ctx, texObj->Target, 2, format, true,
"glCompressedTextureSubImage2D")) {
return;
}
if (!texObj)
return;
- if (compressed_subtexture_target_check(ctx, texObj->Target, 3, format,
- true,
+ if (compressed_subtexture_target_check(ctx, texObj->Target, 3, format, true,
"glCompressedTextureSubImage3D")) {
return;
}
return;
} else {
-
/* OpenGL 4.5 core spec (02.02.2015) says in Section 8.9 Buffer
* Textures (PDF page 254):
* "If buffer is zero, then any buffer object attached to the buffer
return;
} else {
-
/* OpenGL 4.5 core spec (02.02.2015) says in Section 8.9 Buffer
* Textures (PDF page 254):
* "If buffer is zero, then any buffer object attached to the buffer
return dims == 2;
case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
return dims == 2 && !dsa;
-
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
return dims == 3;
case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:
return dims == 3 && !dsa;
-
default:
return GL_FALSE;
}
else {
if (!dimensionsOK) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "%s(invalid width or height)", func);
+ "%s(invalid width or height)", func);
return;
}
if (!sizeOK) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY,
- "%s(texture too large)", func);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s(texture too large)", func);
return;
}
if (width > 0 && height > 0 && depth > 0) {
if (!ctx->Driver.AllocTextureStorage(ctx, texObj, 1,
- width, height, depth)) {
+ width, height, depth)) {
/* tidy up the texture image state. strictly speaking,
* we're allowed to just leave this in whatever state we
* like, but being tidy is good.