summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-03-30 13:55:00 -0700
committerCorbin Simpson <[email protected]>2009-03-30 13:55:46 -0700
commit458bfe7e8dd429b9dcb980013ac7979689db1367 (patch)
treec4895c20d133cb6cff1b7ebe777ed0e6bc42d028 /src/gallium/drivers
parent37fb2d9b23eab5dbbb43a212c3475cb8016837d8 (diff)
r300-gallium: Handful of small leftovers.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_state_invariant.c2
-rw-r--r--src/gallium/drivers/r300/r300_surface.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c
index 3705ff98db5..421f01e62ec 100644
--- a/src/gallium/drivers/r300/r300_state_invariant.c
+++ b/src/gallium/drivers/r300/r300_state_invariant.c
@@ -86,7 +86,7 @@ void r300_emit_invariant_state(struct r300_context* r300)
END_CS;
/* XXX unsorted stuff from surface_fill */
- BEGIN_CS(91 + (caps->has_tcl ? 26 : 0));
+ BEGIN_CS(81 + (caps->has_tcl ? 26 : 0));
/* Flush PVS. */
OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0);
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index 96b63986ea7..b2e0cef0b94 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -88,6 +88,7 @@ static void r300_surface_fill(struct pipe_context* pipe,
float r, g, b, a, depth;
unsigned pixpitch = tex->stride / tex->tex.block.size;
+ a = (float)((color >> 24) & 0xff) / 255.0f;
r = (float)((color >> 16) & 0xff) / 255.0f;
g = (float)((color >> 8) & 0xff) / 255.0f;
b = (float)((color >> 0) & 0xff) / 255.0f;
@@ -158,11 +159,12 @@ static void r300_surface_fill(struct pipe_context* pipe,
OUT_CS_PKT3(R200_3D_DRAW_IMMD_2, 8);
OUT_CS(R300_PRIM_TYPE_POINT | R300_PRIM_WALK_RING |
(1 << R300_PRIM_NUM_VERTICES_SHIFT));
+ /* Position */
OUT_CS_32F(w / 2.0);
OUT_CS_32F(h / 2.0);
- /* XXX this should be the depth value to clear to */
OUT_CS_32F(1.0);
OUT_CS_32F(1.0);
+ /* Color */
OUT_CS_32F(r);
OUT_CS_32F(g);
OUT_CS_32F(b);