diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-01-21 17:01:25 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-01-21 17:01:25 -0500 |
commit | af7d81625a8cf873e6efc881489b3eda9861bd03 (patch) | |
tree | 9a7bfde2902dfb1f8d795f9ee146f760b911c56b | |
parent | 4817fac5f728b777939e2e2bee16b842c9e1367b (diff) |
evergreen: use vb_offset rather than vb_start_op for cbuf offset
-rw-r--r-- | src/evergreen_exa.c | 11 | ||||
-rw-r--r-- | src/evergreen_textured_videofuncs.c | 12 |
2 files changed, 8 insertions, 15 deletions
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index bb685776..93fa2675 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -281,6 +281,8 @@ EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) ps_const_conf.size_bytes = 256; ps_const_conf.type = SHADER_TYPE_PS; ps_alu_consts = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); + ps_const_conf.bo = accel_state->cbuf.vb_bo; + ps_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_offset; if (accel_state->dst_obj.bpp == 16) { r = (fg >> 11) & 0x1f; g = (fg >> 5) & 0x3f; @@ -306,9 +308,6 @@ EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) ps_alu_consts[3] = (float)a / 255; /* A */ } radeon_vbo_commit(pScrn, &accel_state->cbuf); - - ps_const_conf.bo = accel_state->cbuf.vb_bo; - ps_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_start_op; evergreen_set_alu_consts(pScrn, &ps_const_conf, RADEON_GEM_DOMAIN_GTT); if (accel_state->vsync) @@ -1412,16 +1411,14 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, vs_const_conf.size_bytes = 256; vs_const_conf.type = SHADER_TYPE_VS; cbuf = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); + vs_const_conf.bo = accel_state->cbuf.vb_bo; + vs_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_offset; EVERGREENXFormSetup(pSrcPicture, pSrc, 0, cbuf); if (pMask) EVERGREENXFormSetup(pMaskPicture, pMask, 1, cbuf); radeon_vbo_commit(pScrn, &accel_state->cbuf); - - /* VS alu constants */ - vs_const_conf.bo = accel_state->cbuf.vb_bo; - vs_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_start_op; evergreen_set_alu_consts(pScrn, &vs_const_conf, RADEON_GEM_DOMAIN_GTT); if (accel_state->vsync) diff --git a/src/evergreen_textured_videofuncs.c b/src/evergreen_textured_videofuncs.c index aa3c5271..d60d1949 100644 --- a/src/evergreen_textured_videofuncs.c +++ b/src/evergreen_textured_videofuncs.c @@ -452,6 +452,8 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) ps_const_conf.size_bytes = 256; ps_const_conf.type = SHADER_TYPE_PS; ps_alu_consts = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); + ps_const_conf.bo = accel_state->cbuf.vb_bo; + ps_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_offset; ps_alu_consts[0] = off[0]; ps_alu_consts[1] = off[1]; @@ -469,16 +471,14 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) ps_alu_consts[11] = 0.0; radeon_vbo_commit(pScrn, &accel_state->cbuf); - - /* PS alu constants */ - ps_const_conf.bo = accel_state->cbuf.vb_bo; - ps_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_start_op; evergreen_set_alu_consts(pScrn, &ps_const_conf, RADEON_GEM_DOMAIN_GTT); /* VS alu constants */ vs_const_conf.size_bytes = 256; vs_const_conf.type = SHADER_TYPE_VS; vs_alu_consts = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); + vs_const_conf.bo = accel_state->cbuf.vb_bo; + vs_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_offset; vs_alu_consts[0] = 1.0 / pPriv->w; vs_alu_consts[1] = 1.0 / pPriv->h; @@ -486,10 +486,6 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) vs_alu_consts[3] = 0.0; radeon_vbo_commit(pScrn, &accel_state->cbuf); - - /* VS alu constants */ - vs_const_conf.bo = accel_state->cbuf.vb_bo; - vs_const_conf.const_addr = accel_state->cbuf.vb_mc_addr + accel_state->cbuf.vb_start_op + 256; evergreen_set_alu_consts(pScrn, &vs_const_conf, RADEON_GEM_DOMAIN_GTT); if (pPriv->vsync) { |