Lines Matching refs:intel

39 #include "intel.h"
48 static void intel_end_vertex(intel_screen_private *intel)
50 if (intel->vertex_bo) {
51 if (intel->vertex_used) {
52 dri_bo_subdata(intel->vertex_bo, 0, intel->vertex_used*4, intel->vertex_ptr);
53 intel->vertex_used = 0;
56 dri_bo_unreference(intel->vertex_bo);
57 intel->vertex_bo = NULL;
60 intel->vertex_id = 0;
63 void intel_next_vertex(intel_screen_private *intel)
65 intel_end_vertex(intel);
67 intel->vertex_bo =
68 dri_bo_alloc(intel->bufmgr, "vertex", sizeof (intel->vertex_ptr), 4096);
73 intel_screen_private *intel = intel_get_screen_private(scrn);
76 if (IS_I865G(intel))
78 return dri_bo_alloc(intel->bufmgr, "batch", size, 4096);
83 intel_screen_private *intel = intel_get_screen_private(scrn);
86 drm_intel_gem_bo_clear_relocs(intel->batch_bo, 0);
88 tmp = intel->last_batch_bo[mode];
89 intel->last_batch_bo[mode] = intel->batch_bo;
90 intel->batch_bo = tmp;
92 intel->batch_used = 0;
97 intel->last_3d = LAST_3D_OTHER;
102 intel_screen_private *intel = intel_get_screen_private(scrn);
104 intel->batch_emit_start = 0;
105 intel->batch_emitting = 0;
106 intel->vertex_id = 0;
108 intel->last_batch_bo[0] = bo_alloc(scrn);
109 intel->last_batch_bo[1] = bo_alloc(scrn);
111 intel->batch_bo = bo_alloc(scrn);
112 intel->batch_used = 0;
113 intel->last_3d = LAST_3D_OTHER;
118 intel_screen_private *intel = intel_get_screen_private(scrn);
121 for (i = 0; i < ARRAY_SIZE(intel->last_batch_bo); i++) {
122 if (intel->last_batch_bo[i] != NULL) {
123 dri_bo_unreference(intel->last_batch_bo[i]);
124 intel->last_batch_bo[i] = NULL;
128 if (intel->batch_bo != NULL) {
129 dri_bo_unreference(intel->batch_bo);
130 intel->batch_bo = NULL;
133 if (intel->vertex_bo) {
134 dri_bo_unreference(intel->vertex_bo);
135 intel->vertex_bo = NULL;
138 while (!list_is_empty(&intel->batch_pixmaps))
139 list_del(intel->batch_pixmaps.next);
144 intel_screen_private *intel = intel_get_screen_private(scrn);
147 list_for_each_entry(priv, &intel->batch_pixmaps, batch)
153 intel_screen_private *intel = intel_get_screen_private(scrn);
166 OUT_RELOC(intel->wa_scratch_bo,
182 intel_screen_private *intel = intel_get_screen_private(scrn);
185 assert (!intel->in_batch_atomic);
188 if ((INTEL_INFO(intel)->gen >= 0100)) {
196 } else if ((INTEL_INFO(intel)->gen >= 060)) {
197 if (intel->current_batch == BLT_BATCH) {
205 if ((INTEL_INFO(intel)->gen == 060)) {
221 if (INTEL_INFO(intel)->gen >= 040)
233 intel_screen_private *intel = intel_get_screen_private(scrn);
236 assert (!intel->in_batch_atomic);
238 if (intel->vertex_flush)
239 intel->vertex_flush(intel);
240 intel_end_vertex(intel);
242 if (intel->batch_flush)
243 intel->batch_flush(intel);
245 if (intel->batch_used == 0)
248 if (intel->current_batch == I915_EXEC_BLT &&
249 INTEL_INFO(intel)->gen >= 060) {
262 if (intel->batch_used & 1)
268 fwrite (intel->batch_ptr, intel->batch_used*4, 1, file);
273 ret = dri_bo_subdata(intel->batch_bo, 0, intel->batch_used*4, intel->batch_ptr);
275 ret = drm_intel_bo_mrb_exec(intel->batch_bo,
276 intel->batch_used*4,
278 (HAS_BLT(intel) ?
279 intel->current_batch:
297 intel->force_fallback = TRUE;
302 while (!list_is_empty(&intel->batch_pixmaps)) {
305 entry = list_first_entry(&intel->batch_pixmaps,
314 if (intel->debug_flush & DEBUG_FLUSH_WAIT)
315 drm_intel_bo_wait_rendering(intel->batch_bo);
317 intel_next_batch(scrn, intel->current_batch == I915_EXEC_BLT);
319 if (intel->batch_commit_notify)
320 intel->batch_commit_notify(intel);
322 intel->current_batch = 0;
327 intel_screen_private *intel = intel_get_screen_private(scrn);
329 if (intel->debug_flush & DEBUG_FLUSH_CACHES)
332 if (intel->debug_flush & DEBUG_FLUSH_BATCHES)