diff options
author | Marek Olšák <maraeo@gmail.com> | 2009-12-24 16:05:44 +0100 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-01-06 12:49:15 -0800 |
commit | 26f67a272b6668258fe3552a675414502e077dd9 (patch) | |
tree | 66de57576db7e4a5d2d937dc4b487dbb56d8a198 /src/gallium/drivers/r300/r300_state_derived.c | |
parent | bf60eb3fec844a7c3793aba0c70da56b74a17344 (diff) |
r300g: disable the rasterization of WPOS if it's unused by the FS
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_derived.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_derived.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 242716fccc..2a12a02e18 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -411,23 +411,13 @@ static void r300_update_rs_block(struct r300_context* r300, } /* Rasterize WPOS. */ - if (vs_outputs->wpos != ATTR_UNUSED) { - /* Always rasterize if it's written by the VS, - * otherwise it locks up. */ + /* If the FS doesn't need it, it's not written by the VS. */ + if (fs_inputs->wpos != ATTR_UNUSED) { rX00_rs_tex(rs, tex_count, tex_count, FALSE); + rX00_rs_tex_write(rs, tex_count, fp_offset); - /* Write it to the FS input register if it's used by the FS. */ - if (fs_inputs->wpos != ATTR_UNUSED) { - rX00_rs_tex_write(rs, tex_count, fp_offset); - fp_offset++; - } + fp_offset++; tex_count++; - } else { - /* Skip the FS input register, leave it uninitialized. */ - /* If we try to set it to (0,0,0,1), it will lock up. */ - if (fs_inputs->wpos != ATTR_UNUSED) { - fp_offset++; - } } /* Rasterize at least one color, or bad things happen. */ |