summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-05-05 09:20:56 -0700
committerKenneth Graunke <kenneth@whitecape.org>2017-05-07 20:55:31 -0700
commit1456da91c8a14f77dd347981e2bc95e0644e0fd2 (patch)
tree4e6fd919b72aaf49fe6c833a1b59b5a3d78d0d72
parent1f743a0edff14a338ca53b6c60c3b5d5c85c29d5 (diff)
Revert "mesa: Require mipmap completeness for glCopyImageSubData(), sometimes."
This reverts commit c5bf7cb52942cb7df9f5d73746ffbf3c102d12cc. This broke rendering in "Total War: WARHAMMER", which uses a single level RGBA_UINT32 texture and the default filter modes of GL_LINEAR and GL_NEAREST_MIPMAP_LINEAR. However, the texture max level is 0, so it is actually mipmap complete - it's the integer + linear rule that causes the error. I'm working with Khronos to find a real solution. However it turns out, this patch is not correct and breaks real programs, so let's revert it for now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100690 Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224 Cc: "17.1" <mesa-stable@lists.freedesktop.org>
-rw-r--r--src/mesa/main/copyimage.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
index 877c8ac246..cf25159e88 100644
--- a/src/mesa/main/copyimage.c
+++ b/src/mesa/main/copyimage.c
@@ -149,30 +149,9 @@ prepare_target(struct gl_context *ctx, GLuint name, GLenum target,
return false;
}
- /* The ARB_copy_image specification says:
- *
- * "INVALID_OPERATION is generated if either object is a texture and
- * the texture is not complete (as defined in section 3.9.14)"
- *
- * The cited section says:
- *
- * "Using the preceding definitions, a texture is complete unless any
- * of the following conditions hold true: [...]
- *
- * * The minification filter requires a mipmap (is neither NEAREST
- * nor LINEAR), and the texture is not mipmap complete."
- *
- * This imposes the bizarre restriction that glCopyImageSubData requires
- * mipmap completion at times, which dEQP mandates, and other drivers
- * appear to implement. We don't have any texture units here, so we
- * can't look at any bound separate sampler objects...it appears that
- * you're supposed to use the sampler object which is built-in to the
- * texture object.
- *
- * See https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224.
- */
_mesa_test_texobj_completeness(ctx, texObj);
- if (!_mesa_is_texture_complete(texObj, &texObj->Sampler)) {
+ if (!texObj->_BaseComplete ||
+ (level != 0 && !texObj->_MipmapComplete)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyImageSubData(%sName incomplete)", dbg_prefix);
return false;