diff options
author | Eric Anholt <[email protected]> | 2013-12-30 18:19:21 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-02-07 12:46:47 -0800 |
commit | 0f6279bab29614e3764a333242680ead78068d91 (patch) | |
tree | 4e687054afbe79b6f238c2121f15e6a7f4d0b89e /src/mesa/drivers | |
parent | b5e5f34dd2d47622a41ff9908088c37dfbcca4cd (diff) |
i965: Add some informative debug when the X Server botches DRI2 GetBuffers.
We've had various bug reports over the years where miptrees are missing,
and when I screwed it up while adding DRI2 to the modesetting driver, I
figured I should put the info necessary for debug here.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6a3a4f1972c..1879abe5605 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -1290,14 +1290,24 @@ intel_process_dri2_buffer(struct brw_context *brw, buffer->pitch, buffer->name, buffer_name); - if (!region) + if (!region) { + fprintf(stderr, + "Failed to make region for returned DRI2 buffer " + "(%dx%d, named %d).\n" + "This is likely a bug in the X Server that will lead to a " + "crash soon.\n", + drawable->w, drawable->h, buffer->name); return; + } rb->mt = intel_miptree_create_for_dri2_buffer(brw, buffer->attachment, intel_rb_format(rb), num_samples, region); + + assert(rb->mt); + intel_region_release(®ion); } |