GLenum *internalFormat,
GLuint *width,
GLuint *height,
+ GLuint *num_samples,
const char *dbg_prefix)
{
if (name == 0) {
*internalFormat = rb->InternalFormat;
*width = rb->Width;
*height = rb->Height;
+ *num_samples = rb->NumSamples;
*tex_image = NULL;
} else {
struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, name);
*internalFormat = (*tex_image)->InternalFormat;
*width = (*tex_image)->Width;
*height = (*tex_image)->Height;
+ *num_samples = (*tex_image)->NumSamples;
}
return true;
GLenum srcIntFormat, dstIntFormat;
GLuint src_w, src_h, dst_w, dst_h;
GLuint src_bw, src_bh, dst_bw, dst_bh;
+ GLuint src_num_samples, dst_num_samples;
int dstWidth, dstHeight, dstDepth;
int i;
if (!prepare_target(ctx, srcName, srcTarget, srcLevel, srcZ, srcDepth,
&srcTexImage, &srcRenderbuffer, &srcFormat,
- &srcIntFormat, &src_w, &src_h, "src"))
+ &srcIntFormat, &src_w, &src_h, &src_num_samples, "src"))
return;
if (!prepare_target(ctx, dstName, dstTarget, dstLevel, dstZ, srcDepth,
&dstTexImage, &dstRenderbuffer, &dstFormat,
- &dstIntFormat, &dst_w, &dst_h, "dst"))
+ &dstIntFormat, &dst_w, &dst_h, &dst_num_samples, "dst"))
return;
_mesa_get_format_block_size(srcFormat, &src_bw, &src_bh);
return;
}
- if (srcTexImage && dstTexImage &&
- srcTexImage->NumSamples != dstTexImage->NumSamples) {
+ if (src_num_samples != dst_num_samples) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyImageSubData(number of samples mismatch)");
return;