diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-06-24 03:52:45 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-06-24 06:10:47 +0200 |
commit | a2f14153cc2bcf0b2364e035dc788d65ea0fcd35 (patch) | |
tree | 826224e727a0c2ade4669fc0aa57f93c182538f2 /src/gallium/drivers/r300/r300_fs.c | |
parent | 6b15a8d2afa1cdf8577d48b1f1644358f1e47b47 (diff) | |
download | external_mesa3d-a2f14153cc2bcf0b2364e035dc788d65ea0fcd35.zip external_mesa3d-a2f14153cc2bcf0b2364e035dc788d65ea0fcd35.tar.gz external_mesa3d-a2f14153cc2bcf0b2364e035dc788d65ea0fcd35.tar.bz2 |
r300g: reorder and cleanup register writes everywhere
Diffstat (limited to 'src/gallium/drivers/r300/r300_fs.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_fs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index e585394..424f831 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -288,11 +288,16 @@ static void r300_emit_fs_code_to_buffer( struct r300_fragment_program_code *code = &generic_code->code.r300; shader->cb_code_size = 19 + + (r300->screen->caps.is_r400 ? 2 : 0) + code->alu.length * 4 + (code->tex.length ? (1 + code->tex.length) : 0) + imm_count * 5; NEW_CB(shader->cb_code, shader->cb_code_size); + + if (r300->screen->caps.is_r400) + OUT_CB_REG(R400_US_CODE_BANK, 0); + OUT_CB_REG(R300_US_CONFIG, code->config); OUT_CB_REG(R300_US_PIXSIZE, code->pixsize); OUT_CB_REG(R300_US_CODE_OFFSET, code->code_offset); |