aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_context.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-04-25 12:21:11 -0700
committerEric Anholt <[email protected]>2014-05-01 15:12:26 -0700
commit3a7a20752fb410075a26b4fa95de0a00e49742b1 (patch)
tree4eea65775888c251a1052e785e1baa0e33f74bf0 /src/mesa/drivers/dri/i965/brw_context.c
parent76932c0ded645e70ab25a1594e76252bdc5d28b4 (diff)
i965: Drop the global GEM name from regions.
Once a buffer has been named, drm_intel_bo_flink() is just a getter. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index cad83e24c88..2dbc327ffe5 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1259,7 +1259,16 @@ intel_process_dri2_buffer(struct brw_context *brw,
else
last_mt = rb->singlesample_mt;
- if (last_mt && last_mt->region->name == buffer->name)
+ /* Get the name for our previous RB mt. We know it had a name already (and
+ * thus the DRM call is just a getter), because it could only have been
+ * allocated by a previous intel_process_dri2_buffer(), so
+ * drm_intel_bo_flink() is just a getter.
+ */
+ uint32_t old_name = 0;
+ if (last_mt)
+ drm_intel_bo_flink(last_mt->region->bo, &old_name);
+
+ if (old_name == buffer->name)
return;
if (unlikely(INTEL_DEBUG & DEBUG_DRI)) {