diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-25 22:21:29 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-03 12:26:12 +0100 |
commit | 5ff749727d3590368806508ac0d0fa8efd1d1d51 (patch) | |
tree | cfcd1c54f88f24a15cd2605522a545f104e14591 /src/sna/gen7_render.c | |
parent | cd028cad3dc9b059a3d83b818d581f86e16ec317 (diff) |
sna/gen7: Add constant variations and hookup a basic GT descriptor for Haswell
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen7_render.c')
-rw-r--r-- | src/sna/gen7_render.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 193de001..b4a92235 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -83,20 +83,29 @@ struct gt_info { } urb; }; -static const struct gt_info gt1_info = { +static const struct gt_info ivb_gt1_info = { .max_vs_threads = 36, .max_gs_threads = 36, - .max_wm_threads = (48-1) << GEN7_PS_MAX_THREADS_SHIFT, + .max_wm_threads = (48-1) << IVB_PS_MAX_THREADS_SHIFT, .urb = { 128, 512, 192 }, }; -static const struct gt_info gt2_info = { +static const struct gt_info ivb_gt2_info = { .max_vs_threads = 128, .max_gs_threads = 128, - .max_wm_threads = (172-1) << GEN7_PS_MAX_THREADS_SHIFT, + .max_wm_threads = (172-1) << IVB_PS_MAX_THREADS_SHIFT, .urb = { 256, 704, 320 }, }; +static const struct gt_info hsw_gt_info = { + .max_vs_threads = 8, + .max_gs_threads = 8, + .max_wm_threads = + (8 - 1) << HSW_PS_MAX_THREADS_SHIFT | + 1 << HSW_PS_SAMPLE_MASK_SHIFT, + .urb = { 128, 64, 64 }, +}; + static const uint32_t ps_kernel_packed[][4] = { #include "exa_wm_src_affine.g7b" #include "exa_wm_src_sample_argb.g7b" @@ -1363,6 +1372,8 @@ gen7_bind_bo(struct sna *sna, ss[5] = 0; ss[6] = 0; ss[7] = 0; + if (sna->kgem.gen == 75) + ss[7] |= HSW_SURFACE_SWIZZLE(RED, GREEN, BLUE, ALPHA); kgem_bo_set_binding(bo, format, offset); @@ -4234,9 +4245,14 @@ static bool gen7_render_setup(struct sna *sna) struct gen7_sampler_state *ss; int i, j, k, l, m; - state->info = >1_info; - if (DEVICE_ID(sna->PciInfo) & 0x20) - state->info = >2_info; /* XXX requires GT_MODE WiZ disabled */ + if (sna->kgem.gen == 70) { + state->info = &ivb_gt1_info; + if (DEVICE_ID(sna->PciInfo) & 0x20) + state->info = &ivb_gt2_info; /* XXX requires GT_MODE WiZ disabled */ + } else if (sna->kgem.gen == 75) { + state->info = &hsw_gt_info; + } else + return false; sna_static_stream_init(&general); |