aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-04-23 22:47:55 +0200
committermarha <marha@users.sourceforge.net>2014-04-23 22:47:55 +0200
commit24fb0da18f1c44dfa1f76d8cde8efbb958aa7659 (patch)
tree76157bb2f88c9383b0824476a9e3a9f9a1bff9fa /mesalib/src/mesa/main/teximage.c
parent6876c31f186414ce975180af79902314c8cdc82a (diff)
parentd26ea2f474c48afa7d3c261572da5d85b7b62bd8 (diff)
downloadvcxsrv-24fb0da18f1c44dfa1f76d8cde8efbb958aa7659.tar.gz
vcxsrv-24fb0da18f1c44dfa1f76d8cde8efbb958aa7659.tar.bz2
vcxsrv-24fb0da18f1c44dfa1f76d8cde8efbb958aa7659.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/include/GL/glext.h xorg-server/.gitignore xorg-server/glx/glxext.c
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 57a766f99..c7f301cbd 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -4374,7 +4374,7 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLboolean sizeOK, dimensionsOK;
+ GLboolean sizeOK, dimensionsOK, samplesOK;
mesa_format texFormat;
GLenum sample_count_error;
@@ -4411,7 +4411,17 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
sample_count_error = _mesa_check_sample_count(ctx, target,
internalformat, samples);
- if (sample_count_error != GL_NO_ERROR) {
+ samplesOK = sample_count_error == GL_NO_ERROR;
+
+ /* Page 254 of OpenGL 4.4 spec says:
+ * "Proxy arrays for two-dimensional multisample and two-dimensional
+ * multisample array textures are operated on in the same way when
+ * TexImage2DMultisample is called with target specified as
+ * PROXY_TEXTURE_2D_MULTISAMPLE, or TexImage3DMultisample is called
+ * with target specified as PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY.
+ * However, if samples is not supported, then no error is generated.
+ */
+ if (!samplesOK && !_mesa_is_proxy_texture(target)) {
_mesa_error(ctx, sample_count_error, "%s(samples)", func);
return;
}
@@ -4443,7 +4453,7 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
width, height, depth, 0);
if (_mesa_is_proxy_texture(target)) {
- if (dimensionsOK && sizeOK) {
+ if (samplesOK && dimensionsOK && sizeOK) {
init_teximage_fields_ms(ctx, texImage, width, height, depth, 0,
internalformat, texFormat,
samples, fixedsamplelocations);