Skip to content
Snippets Groups Projects
Commit 38bbb612 authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

mesa/main: remove bogus error for zero-sized images


The explanation quotes the spec on the following wording to justify the
error:

"An INVALID_VALUE error is generated if xoffset + width is greater than
 the texture’s width, yoffset + height is greater than the  texture’s
 height, or zoffset + depth is greater than the texture’s depth."

However, this shouldn't generate an error in the case where *all three*
of width, xoffset and the texture's width are zero. In this case, we end
up generating an unspecified error.

So let's remove this check, and instead make sure that we consider this
as an empty texture.

So let's not generate an error, there's non mandated in the spec in
xoffset/yoffset/zoffset = 0 case. We already avoid doing any work in
this case, because of the final, non-error generating check in this
function.

Fixes: b37b35a5 "getteximage: assume texture image is empty for non defined levels"
Signed-off-by: default avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: default avatarJuan A. Suarez <jasuarez@igalia.com>
parent f1998e15
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment