I haven't actually seen this bug in the wild, but it's possible that
someone could ask to do a S3TC PBO download or something. This protects us
from accidentally creating a render target with a compressed or otherwise
non-renderable format.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
perf_debug("Bad PBO alignment; fallback to CPU mapping\n");
return false;
}
+
+ if (!brw->format_supported_as_render_target[image->TexFormat]) {
+ perf_debug("Non-renderable PBO format; fallback to CPU mapping\n");
+ return false;
+ }
}
assert(intel_texobj->mt == NULL);