summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_fs.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-06-24 03:52:45 +0200
committerMarek Olšák <maraeo@gmail.com>2010-06-24 06:10:47 +0200
commita2f14153cc2bcf0b2364e035dc788d65ea0fcd35 (patch)
tree826224e727a0c2ade4669fc0aa57f93c182538f2 /src/gallium/drivers/r300/r300_fs.c
parent6b15a8d2afa1cdf8577d48b1f1644358f1e47b47 (diff)
downloadexternal_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.c5
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);