gen4_vertex.h \
gen5_render.c \
gen5_render.h \
+ gen6_common.c \
+ gen6_common.h \
gen6_render.c \
gen6_render.h \
gen7_render.c \
--- /dev/null
+/*
+ * Copyright © 2011-2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ * Chris Wilson <chris@chris-wilson.co.uk>
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gen6_common.h"
+#include "gen4_vertex.h"
+
+void gen6_render_flush(struct sna *sna)
+{
+ gen4_vertex_close(sna);
+
+ assert(sna->render.vb_id == 0);
+ assert(sna->render.vertex_offset == 0);
+}
+
+void
+gen6_render_context_switch(struct kgem *kgem,
+ int new_mode)
+{
+ if (kgem->nbatch) {
+ DBG(("%s: from %d to %d, submit batch\n", __FUNCTION__, kgem->mode, new_mode));
+ _kgem_submit(kgem);
+ }
+
+ if (kgem->nexec) {
+ DBG(("%s: from %d to %d, reset incomplete batch\n", __FUNCTION__, kgem->mode, new_mode));
+ kgem_reset(kgem);
+ }
+
+ assert(kgem->nbatch == 0);
+ assert(kgem->nreloc == 0);
+ assert(kgem->nexec == 0);
+
+ kgem->ring = new_mode;
+}
+
+void
+gen6_render_retire(struct kgem *kgem)
+{
+ struct sna *sna;
+
+ if (kgem->ring && (kgem->has_semaphores || !kgem->need_retire))
+ kgem->ring = kgem->mode;
+
+ sna = container_of(kgem, struct sna, kgem);
+ if (kgem->nbatch == 0 && sna->render.vbo && !kgem_bo_is_busy(sna->render.vbo)) {
+ DBG(("%s: resetting idle vbo\n", __FUNCTION__));
+ sna->render.vertex_used = 0;
+ sna->render.vertex_index = 0;
+ }
+}
+
+void
+gen6_render_expire(struct kgem *kgem)
+{
+ struct sna *sna;
+
+ sna = container_of(kgem, struct sna, kgem);
+ if (sna->render.vbo && !sna->render.vertex_used) {
+ DBG(("%s: discarding vbo\n", __FUNCTION__));
+ kgem_bo_destroy(kgem, sna->render.vbo);
+ sna->render.vbo = NULL;
+ sna->render.vertices = sna->render.vertex_data;
+ sna->render.vertex_size = ARRAY_SIZE(sna->render.vertex_data);
+ sna->render.vertex_used = 0;
+ sna->render.vertex_index = 0;
+ }
+}
--- /dev/null
+/*
+ * Copyright © 2011-2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ * Chris Wilson <chris@chris-wilson.co.uk>
+ *
+ */
+
+#ifndef GEN6_COMMON_H
+#define GEN6_COMMON_H
+
+#include "sna.h"
+
+#define NO_RING_SWITCH 0
+#define PREFER_RENDER 0
+
+static inline bool is_uncached(struct sna *sna,
+ struct kgem_bo *bo)
+{
+ return bo->scanout && !sna->kgem.has_wt;
+}
+
+inline static bool can_switch_to_blt(struct sna *sna,
+ struct kgem_bo *bo,
+ unsigned flags)
+{
+ if (sna->kgem.ring != KGEM_RENDER)
+ return true;
+
+ if (NO_RING_SWITCH)
+ return false;
+
+ if (!sna->kgem.has_semaphores)
+ return false;
+
+ if (flags & COPY_LAST)
+ return true;
+
+ if (bo && RQ_IS_BLT(bo->rq))
+ return true;
+
+ return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
+}
+
+inline static bool can_switch_to_render(struct sna *sna,
+ struct kgem_bo *bo)
+{
+ if (sna->kgem.ring == KGEM_RENDER)
+ return true;
+
+ if (NO_RING_SWITCH)
+ return false;
+
+ if (!sna->kgem.has_semaphores)
+ return false;
+
+ if (bo && !RQ_IS_BLT(bo->rq) && !is_uncached(sna, bo))
+ return true;
+
+ return !kgem_ring_is_idle(&sna->kgem, KGEM_RENDER);
+}
+
+static inline bool untiled_tlb_miss(struct kgem_bo *bo)
+{
+ if (kgem_bo_is_render(bo))
+ return false;
+
+ return bo->tiling == I915_TILING_NONE && bo->pitch >= 4096;
+}
+
+static int prefer_blt_bo(struct sna *sna, struct kgem_bo *bo)
+{
+ if (bo->rq)
+ return RQ_IS_BLT(bo->rq);
+
+ if (sna->flags & SNA_POWERSAVE)
+ return true;
+
+ return bo->tiling == I915_TILING_NONE || is_uncached(sna, bo);
+}
+
+inline static bool force_blt_ring(struct sna *sna)
+{
+ if (sna->flags & SNA_POWERSAVE)
+ return true;
+
+ if (sna->kgem.mode == KGEM_RENDER)
+ return false;
+
+ if (sna->render_state.gt < 2)
+ return true;
+
+ return false;
+}
+
+inline static bool prefer_blt_ring(struct sna *sna,
+ struct kgem_bo *bo,
+ unsigned flags)
+{
+ assert(!force_blt_ring(sna));
+ assert(!kgem_bo_is_render(bo));
+
+ return can_switch_to_blt(sna, bo, flags);
+}
+
+inline static bool prefer_render_ring(struct sna *sna,
+ struct kgem_bo *bo)
+{
+ if (sna->flags & SNA_POWERSAVE)
+ return false;
+
+ if (sna->render_state.gt < 2)
+ return false;
+
+ return can_switch_to_render(sna, bo);
+}
+
+inline static bool
+prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp)
+{
+ if (untiled_tlb_miss(tmp->dst.bo) ||
+ untiled_tlb_miss(tmp->src.bo))
+ return true;
+
+ if (force_blt_ring(sna))
+ return true;
+
+ if (kgem_bo_is_render(tmp->dst.bo) ||
+ kgem_bo_is_render(tmp->src.bo))
+ return false;
+
+ if (prefer_render_ring(sna, tmp->dst.bo))
+ return false;
+
+ if (!prefer_blt_ring(sna, tmp->dst.bo, 0))
+ return false;
+
+ return prefer_blt_bo(sna, tmp->dst.bo) || prefer_blt_bo(sna, tmp->src.bo);
+}
+
+static inline bool prefer_blt_fill(struct sna *sna,
+ struct kgem_bo *bo,
+ unsigned flags)
+{
+ if (PREFER_RENDER)
+ return PREFER_RENDER < 0;
+
+ if (flags & (FILL_POINTS | FILL_SPANS) &&
+ can_switch_to_blt(sna, bo, 0))
+ return true;
+
+ if (untiled_tlb_miss(bo))
+ return true;
+
+ if (force_blt_ring(sna))
+ return true;
+
+ if (kgem_bo_is_render(bo))
+ return false;
+
+ if (prefer_render_ring(sna, bo))
+ return false;
+
+ if (!prefer_blt_ring(sna, bo, 0))
+ return false;
+
+ return prefer_blt_bo(sna, bo);
+}
+
+void gen6_render_flush(struct sna *sna);
+void gen6_render_retire(struct kgem *kgem);
+void gen6_render_expire(struct kgem *kgem);
+void gen6_render_context_switch(struct kgem *kgem, int new_mode);
+
+#endif /* GEN6_COMMON_H */
#include "brw/brw.h"
#include "gen6_render.h"
+#include "gen6_common.h"
#include "gen4_source.h"
#include "gen4_vertex.h"
#define NO_FILL_ONE 0
#define NO_FILL_CLEAR 0
-#define NO_RING_SWITCH 0
-#define PREFER_RENDER 0
-
#define USE_8_PIXEL_DISPATCH 1
#define USE_16_PIXEL_DISPATCH 1
#define USE_32_PIXEL_DISPATCH 0
return true;
}
-inline static bool can_switch_to_blt(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
-{
- if (sna->kgem.ring != KGEM_RENDER)
- return true;
-
- if (NO_RING_SWITCH)
- return false;
-
- if (!sna->kgem.has_semaphores)
- return false;
-
- if (flags & COPY_LAST)
- return true;
-
- if (bo && RQ_IS_BLT(bo->rq))
- return true;
-
- return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
-}
-
-inline static bool can_switch_to_render(struct sna *sna,
- struct kgem_bo *bo)
-{
- if (sna->kgem.ring == KGEM_RENDER)
- return true;
-
- if (NO_RING_SWITCH)
- return false;
-
- if (!sna->kgem.has_semaphores)
- return false;
-
- if (bo && !RQ_IS_BLT(bo->rq) && !bo->scanout)
- return true;
-
- return !kgem_ring_is_idle(&sna->kgem, KGEM_RENDER);
-}
-
-static inline bool untiled_tlb_miss(struct kgem_bo *bo)
-{
- if (kgem_bo_is_render(bo))
- return false;
-
- return bo->tiling == I915_TILING_NONE && bo->pitch >= 4096;
-}
-
-static int prefer_blt_bo(struct sna *sna, struct kgem_bo *bo)
-{
- if (bo->rq)
- return RQ_IS_BLT(bo->rq);
-
- if (sna->flags & SNA_POWERSAVE)
- return true;
-
- return bo->tiling == I915_TILING_NONE || bo->scanout;
-}
-
-inline static bool force_blt_ring(struct sna *sna)
-{
- if (sna->flags & SNA_POWERSAVE)
- return true;
-
- if (sna->kgem.mode == KGEM_RENDER)
- return false;
-
- if (sna->render_state.gen6.info->gt < 2)
- return true;
-
- return false;
-}
-
-inline static bool prefer_blt_ring(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
-{
- assert(!force_blt_ring(sna));
- assert(!kgem_bo_is_render(bo));
-
- return can_switch_to_blt(sna, bo, flags);
-}
-
-inline static bool prefer_render_ring(struct sna *sna,
- struct kgem_bo *bo)
-{
- if (sna->flags & SNA_POWERSAVE)
- return false;
-
- if (sna->render_state.gen6.info->gt < 2)
- return false;
-
- return can_switch_to_render(sna, bo);
-}
-
static bool
try_blt(struct sna *sna,
PicturePtr dst, PicturePtr src,
}
static bool
-prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp)
-{
- if (untiled_tlb_miss(tmp->dst.bo) ||
- untiled_tlb_miss(tmp->src.bo))
- return true;
-
- if (force_blt_ring(sna))
- return true;
-
- if (kgem_bo_is_render(tmp->dst.bo) ||
- kgem_bo_is_render(tmp->src.bo))
- return false;
-
- if (prefer_render_ring(sna, tmp->dst.bo))
- return false;
-
- if (!prefer_blt_ring(sna, tmp->dst.bo, 0))
- return false;
-
- return prefer_blt_bo(sna, tmp->dst.bo) || prefer_blt_bo(sna, tmp->src.bo);
-}
-
-static bool
gen6_render_composite(struct sna *sna,
uint8_t op,
PicturePtr src,
gen6_emit_state(sna, op, offset | dirty);
}
-static inline bool prefer_blt_fill(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
-{
- if (PREFER_RENDER)
- return PREFER_RENDER < 0;
-
- if (flags & (FILL_POINTS | FILL_SPANS) &&
- can_switch_to_blt(sna, bo, 0))
- return true;
-
- if (untiled_tlb_miss(bo))
- return true;
-
- if (force_blt_ring(sna))
- return true;
-
- if (kgem_bo_is_render(bo))
- return false;
-
- if (prefer_render_ring(sna, bo))
- return false;
-
- if (!prefer_blt_ring(sna, bo, 0))
- return false;
-
- return prefer_blt_bo(sna, bo);
-}
-
static bool
gen6_render_fill_boxes(struct sna *sna,
CARD8 op,
return true;
}
-static void gen6_render_flush(struct sna *sna)
-{
- gen4_vertex_close(sna);
-
- assert(sna->render.vb_id == 0);
- assert(sna->render.vertex_offset == 0);
-}
-
-static void
-gen6_render_context_switch(struct kgem *kgem,
- int new_mode)
-{
- if (kgem->nbatch) {
- DBG(("%s: from %d to %d, submit batch\n", __FUNCTION__, kgem->mode, new_mode));
- _kgem_submit(kgem);
- }
-
- if (kgem->nexec) {
- DBG(("%s: from %d to %d, reset incomplete batch\n", __FUNCTION__, kgem->mode, new_mode));
- kgem_reset(kgem);
- }
-
- assert(kgem->nbatch == 0);
- assert(kgem->nreloc == 0);
- assert(kgem->nexec == 0);
-
- kgem->ring = new_mode;
-}
-
-static void
-gen6_render_retire(struct kgem *kgem)
-{
- struct sna *sna;
-
- if (kgem->ring && (kgem->has_semaphores || !kgem->need_retire))
- kgem->ring = kgem->mode;
-
- sna = container_of(kgem, struct sna, kgem);
- if (kgem->nbatch == 0 && sna->render.vbo && !kgem_bo_is_busy(sna->render.vbo)) {
- DBG(("%s: resetting idle vbo handle=%d\n", __FUNCTION__, sna->render.vbo->handle));
- sna->render.vertex_used = 0;
- sna->render.vertex_index = 0;
- }
-}
-
-static void
-gen6_render_expire(struct kgem *kgem)
-{
- struct sna *sna;
-
- sna = container_of(kgem, struct sna, kgem);
- if (sna->render.vbo && !sna->render.vertex_used) {
- DBG(("%s: discarding vbo handle=%d\n", __FUNCTION__, sna->render.vbo->handle));
- kgem_bo_destroy(kgem, sna->render.vbo);
- assert(!sna->render.active);
- sna->render.vbo = NULL;
- sna->render.vertices = sna->render.vertex_data;
- sna->render.vertex_size = ARRAY_SIZE(sna->render.vertex_data);
- sna->render.vertex_used = 0;
- sna->render.vertex_index = 0;
- }
-}
-
static void gen6_render_reset(struct sna *sna)
{
sna->render_state.gen6.needs_invariant = true;
state->info = >1_info;
if (is_gt2(sna, devid))
state->info = >2_info; /* XXX requires GT_MODE WiZ disabled */
+ state->gt = state->info->gt;
sna_static_stream_init(&general);
#include "gen7_render.h"
#include "gen4_source.h"
#include "gen4_vertex.h"
+#include "gen6_common.h"
#define ALWAYS_INVALIDATE 0
#define ALWAYS_FLUSH 0
return true;
}
-inline static bool can_switch_to_blt(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
-{
- if (sna->kgem.ring != KGEM_RENDER)
- return true;
-
- if (NO_RING_SWITCH)
- return false;
-
- if (!sna->kgem.has_semaphores)
- return false;
-
- if (flags & COPY_LAST)
- return true;
-
- if (bo && RQ_IS_BLT(bo->rq))
- return true;
-
- return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
-}
-
-inline static bool can_switch_to_render(struct sna *sna,
- struct kgem_bo *bo)
-{
- if (sna->kgem.ring == KGEM_RENDER)
- return true;
-
- if (NO_RING_SWITCH)
- return false;
-
- if (!sna->kgem.has_semaphores)
- return false;
-
- if (bo && !RQ_IS_BLT(bo->rq) && !(bo->scanout && !sna->kgem.has_wt))
- return true;
-
- return !kgem_ring_is_idle(&sna->kgem, KGEM_RENDER);
-}
-
-static inline bool untiled_tlb_miss(struct kgem_bo *bo)
-{
- if (kgem_bo_is_render(bo))
- return false;
-
- return bo->tiling == I915_TILING_NONE && bo->pitch >= 4096;
-}
-
-static int prefer_blt_bo(struct sna *sna, struct kgem_bo *bo)
-{
- if (bo->rq)
- return RQ_IS_BLT(bo->rq);
-
- if (sna->flags & SNA_POWERSAVE)
- return true;
-
- return bo->tiling == I915_TILING_NONE || (bo->scanout && !sna->kgem.has_wt);
-}
-
-inline static bool force_blt_ring(struct sna *sna)
-{
- if (sna->flags & SNA_POWERSAVE)
- return true;
-
- if (sna->kgem.mode == KGEM_RENDER)
- return false;
-
- if (sna->render_state.gen7.info->gt < 2)
- return true;
-
- return false;
-}
-
-inline static bool prefer_blt_ring(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
-{
- assert(!force_blt_ring(sna));
- assert(!kgem_bo_is_render(bo));
-
- return can_switch_to_blt(sna, bo, flags);
-}
-
-inline static bool prefer_render_ring(struct sna *sna,
- struct kgem_bo *bo)
-{
- if (sna->flags & SNA_POWERSAVE)
- return false;
-
- if (sna->render_state.gen7.info->gt < 2)
- return false;
-
- return can_switch_to_render(sna, bo);
-}
-
static bool
try_blt(struct sna *sna,
PicturePtr dst, PicturePtr src,
}
static bool
-prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp)
-{
- if (untiled_tlb_miss(tmp->dst.bo) ||
- untiled_tlb_miss(tmp->src.bo))
- return true;
-
- if (force_blt_ring(sna))
- return true;
-
- if (kgem_bo_is_render(tmp->dst.bo) ||
- kgem_bo_is_render(tmp->src.bo))
- return false;
-
- if (prefer_render_ring(sna, tmp->dst.bo))
- return false;
-
- if (!prefer_blt_ring(sna, tmp->dst.bo, 0))
- return false;
-
- return prefer_blt_bo(sna, tmp->dst.bo) || prefer_blt_bo(sna, tmp->src.bo);
-}
-
-static bool
gen7_render_composite(struct sna *sna,
uint8_t op,
PicturePtr src,
gen7_emit_state(sna, op, offset);
}
-static inline bool prefer_blt_copy(struct sna *sna,
- struct kgem_bo *src_bo,
- struct kgem_bo *dst_bo,
- unsigned flags)
+static inline bool
+prefer_blt_copy(struct sna *sna,
+ struct kgem_bo *src_bo,
+ struct kgem_bo *dst_bo,
+ unsigned flags)
{
if (sna->kgem.mode == KGEM_BLT)
return true;
gen7_emit_state(sna, op, offset);
}
-static inline bool prefer_blt_fill(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
-{
- if (flags & (FILL_POINTS | FILL_SPANS) &&
- can_switch_to_blt(sna, bo, 0))
- return true;
-
- if (untiled_tlb_miss(bo))
- return true;
-
- if (force_blt_ring(sna))
- return true;
-
- if (kgem_bo_is_render(bo))
- return false;
-
- if (prefer_render_ring(sna, bo))
- return false;
-
- if (!prefer_blt_ring(sna, bo, 0))
- return false;
-
- return prefer_blt_bo(sna, bo);
-}
-
static bool
gen7_render_fill_boxes(struct sna *sna,
CARD8 op,
return true;
}
-
-static void gen7_render_flush(struct sna *sna)
-{
- gen4_vertex_close(sna);
-
- assert(sna->render.vb_id == 0);
- assert(sna->render.vertex_offset == 0);
-}
-
-static void
-gen7_render_context_switch(struct kgem *kgem,
- int new_mode)
-{
- if (kgem->nbatch) {
- DBG(("%s: from %d to %d, submit batch\n", __FUNCTION__, kgem->mode, new_mode));
- _kgem_submit(kgem);
- }
-
- if (kgem->nexec) {
- DBG(("%s: from %d to %d, reset incomplete batch\n", __FUNCTION__, kgem->mode, new_mode));
- kgem_reset(kgem);
- }
-
- assert(kgem->nbatch == 0);
- assert(kgem->nreloc == 0);
- assert(kgem->nexec == 0);
-
- kgem->ring = new_mode;
-}
-
-static void
-gen7_render_retire(struct kgem *kgem)
-{
- struct sna *sna;
-
- if (kgem->ring && (kgem->has_semaphores || !kgem->need_retire))
- kgem->ring = kgem->mode;
-
- sna = container_of(kgem, struct sna, kgem);
- if (kgem->nbatch == 0 && sna->render.vbo && !kgem_bo_is_busy(sna->render.vbo)) {
- DBG(("%s: resetting idle vbo\n", __FUNCTION__));
- sna->render.vertex_used = 0;
- sna->render.vertex_index = 0;
- }
-}
-
-static void
-gen7_render_expire(struct kgem *kgem)
-{
- struct sna *sna;
-
- sna = container_of(kgem, struct sna, kgem);
- if (sna->render.vbo && !sna->render.vertex_used) {
- DBG(("%s: discarding vbo\n", __FUNCTION__));
- kgem_bo_destroy(kgem, sna->render.vbo);
- sna->render.vbo = NULL;
- sna->render.vertices = sna->render.vertex_data;
- sna->render.vertex_size = ARRAY_SIZE(sna->render.vertex_data);
- sna->render.vertex_used = 0;
- sna->render.vertex_index = 0;
- }
-}
-
static void gen7_render_reset(struct sna *sna)
{
sna->render_state.gen7.emit_flush = false;
} else
return false;
+ state->gt = state->info->gt;
+
sna_static_stream_init(&general);
/* Zero pad the start. If you see an offset of 0x0 in the batchbuffer
if (!gen7_render_setup(sna, devid))
return backend;
- sna->kgem.context_switch = gen7_render_context_switch;
- sna->kgem.retire = gen7_render_retire;
- sna->kgem.expire = gen7_render_expire;
+ sna->kgem.context_switch = gen6_render_context_switch;
+ sna->kgem.retire = gen6_render_retire;
+ sna->kgem.expire = gen6_render_expire;
#if !NO_COMPOSITE
sna->render.composite = gen7_render_composite;
sna->render.clear = gen7_render_clear;
#endif
- sna->render.flush = gen7_render_flush;
+ sna->render.flush = gen6_render_flush;
sna->render.reset = gen7_render_reset;
sna->render.fini = gen7_render_fini;
uint32_t fill_alu;
} blt_state;
union {
+ unsigned gt;
struct gen2_render_state gen2;
struct gen3_render_state gen3;
struct gen4_render_state gen4;
};
struct gen6_render_state {
+ unsigned gt;
const struct gt_info *info;
struct kgem_bo *general_bo;
};
struct gen7_render_state {
+ unsigned gt;
const struct gt_info *info;
struct kgem_bo *general_bo;