Mesa (8.0): meta: Detect currently-unsupported integer CopyTexSubImage and complain.
Eric Anholt
anholt at kemper.freedesktop.org
Fri Jan 27 19:41:58 UTC 2012
Module: Mesa
Branch: 8.0
Commit: 9a33b5a269d8407872a9cc86cb0ce36a1c510e21
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a33b5a269d8407872a9cc86cb0ce36a1c510e21
Author: Eric Anholt <eric at anholt.net>
Date: Fri Jan 20 13:59:37 2012 -0800
meta: Detect currently-unsupported integer CopyTexSubImage and complain.
This code is unprepared for handling integer (particularly, the
baseFormat of the TexFormat comes out as GL_RGBA, not GL_RGBA_INTEGER,
so the direct call of Driver.ReadPixels crashes due to the int vs
non-int error checking not having happened). I'm frankly tempted to
convert this code to MapRenderbuffer/MapTexImage rather than doing it
as meta ops, now that we have that support.
Improves the remaining crash in Intel oglconform for int-textures to
just a rendering failure.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit 6bf0f6ae86dae14ed0348e5fccf75c43302ad502)
---
src/mesa/drivers/common/meta.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index dca3613..8cc7cf2 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3126,6 +3126,11 @@ copy_tex_sub_image(struct gl_context *ctx,
format = GL_RGBA;
}
+ if (_mesa_is_format_integer_color(texImage->TexFormat)) {
+ _mesa_problem(ctx, "unsupported integer color copyteximage");
+ return;
+ }
+
type = get_temp_image_type(ctx, format);
bpp = _mesa_bytes_per_pixel(format, type);
if (bpp <= 0) {
More information about the mesa-commit
mailing list