summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_surface.c
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-03-06 09:44:21 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-03-06 10:30:15 -0800
commitd965c15777727fec34b11c253f2a0f50c4e8e89a (patch)
tree68698db5af6307531ff816356927a893cc942f54 /src/gallium/drivers/r300/r300_surface.c
parent0bbcb47901c16661e39a1c586c19b58e5eb73d45 (diff)
r300-gallium: Pick up a few more bits of rs_state.
Including two registers that already should have been covered...huh...
Diffstat (limited to 'src/gallium/drivers/r300/r300_surface.c')
-rw-r--r--src/gallium/drivers/r300/r300_surface.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index 9968fe0de0..eafcc12b7d 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -63,7 +63,16 @@ static void r300_surface_fill(struct pipe_context* pipe,
r300_emit_dsa_state(r300, &dsa_clear_state);
r300_emit_rs_state(r300, &rs_clear_state);
- BEGIN_CS(128 + (caps->has_tcl ? 2 : 0));
+ /* Fragment shader setup */
+ if (caps->is_r500) {
+ r500_emit_fragment_shader(r300, &r500_passthrough_fragment_shader);
+ r300_emit_rs_block_state(r300, &r500_rs_block_clear_state);
+ } else {
+ r300_emit_fragment_shader(r300, &r300_passthrough_fragment_shader);
+ r300_emit_rs_block_state(r300, &r300_rs_block_clear_state);
+ }
+
+ BEGIN_CS(126 + (caps->has_tcl ? 2 : 0));
/* Flush PVS. */
OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0);
@@ -99,9 +108,6 @@ static void r300_surface_fill(struct pipe_context* pipe,
OUT_CS_32F(1.0);
OUT_CS_REG(R300_GA_TRIANGLE_STIPPLE, 0x5 |
(0x5 << R300_GA_TRIANGLE_STIPPLE_Y_SHIFT_SHIFT));
- /* XXX should this be related to the actual point size? */
- OUT_CS_REG(R300_GA_POINT_MINMAX, 0x6 |
- (0x1800 << R300_GA_POINT_MINMAX_MAX_SHIFT));
/* XXX this big chunk should be refactored into rs_state */
OUT_CS_REG(R300_GA_LINE_S0, 0x00000000);
OUT_CS_REG(R300_GA_LINE_S1, 0x3F800000);
@@ -186,15 +192,6 @@ static void r300_surface_fill(struct pipe_context* pipe,
OUT_CS_REG(R300_SC_CLIP_RULE, 0xaaaa);
END_CS;
- /* Fragment shader setup */
- if (caps->is_r500) {
- r500_emit_fragment_shader(r300, &r500_passthrough_fragment_shader);
- r300_emit_rs_block_state(r300, &r500_rs_block_clear_state);
- } else {
- r300_emit_fragment_shader(r300, &r300_passthrough_fragment_shader);
- r300_emit_rs_block_state(r300, &r300_rs_block_clear_state);
- }
-
BEGIN_CS(7 + (caps->has_tcl ? 21 : 2));
OUT_CS_REG_SEQ(R300_US_OUT_FMT_0, 4);
OUT_CS(R300_C0_SEL_B | R300_C1_SEL_G | R300_C2_SEL_R | R300_C3_SEL_A);