diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-03 23:45:28 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-03 23:45:28 +0100 |
commit | 83b8669abc7415202f9e0c764de675ffbcf45dac (patch) | |
tree | fa9fd1cf5bf4f539b2f8aa8d83ca5d8207e38f9b /src | |
parent | b71af5dc626adfdf7d753e8e61fb13e8b9290d17 (diff) |
sna/gen2: Setup invariant blend arguments
I thought these were completely specified via the LOAD_STATE_IMMEDIATE
commands we used whilst seting up the render pipeline. I was wrong.
Reported-by: Timo Kamph <timo@kamph.org>
References: https://bugs.freedesktop.org/show_bug.cgi?id=55455
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen2_render.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index d7980d46..cf3088be 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -505,6 +505,31 @@ static void gen2_emit_invariant(struct sna *sna) BATCH(_3DSTATE_STIPPLE); + BATCH(_3DSTATE_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | TEXOP_LAST_STAGE | + TEXBLENDOP_ARG1); + BATCH(_3DSTATE_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + BATCH(_3DSTATE_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_DIFFUSE); + BATCH(_3DSTATE_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_DIFFUSE); + sna->render_state.gen2.need_invariant = false; } @@ -513,9 +538,9 @@ gen2_get_batch(struct sna *sna) { kgem_set_mode(&sna->kgem, KGEM_RENDER); - if (!kgem_check_batch(&sna->kgem, 30+40)) { + if (!kgem_check_batch(&sna->kgem, 40+40)) { DBG(("%s: flushing batch: size %d > %d\n", - __FUNCTION__, 30+40, + __FUNCTION__, 40+40, sna->kgem.surface-sna->kgem.nbatch)); kgem_submit(&sna->kgem); _kgem_set_mode(&sna->kgem, KGEM_RENDER); |