summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_surface.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-01-24 05:44:01 -0800
committerCorbin Simpson <[email protected]>2009-02-01 23:30:28 -0800
commit188f61d43ae82c63d557d25282e349926321e3d0 (patch)
tree37dc74d16b60eb81e3686011ebc708562a9246eb /src/gallium/drivers/r300/r300_surface.c
parent57b062f77551f0111fd210a2d8dd44be6acfc818 (diff)
r300: Hook up clear, set it to fallback.
Diffstat (limited to 'src/gallium/drivers/r300/r300_surface.c')
-rw-r--r--src/gallium/drivers/r300/r300_surface.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index dd1c8862a73..c9957a0af25 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -30,6 +30,12 @@ static void r300_surface_fill(struct pipe_context* pipe,
unsigned w, unsigned h,
unsigned color)
{
+
+void *dst_map = pipe->screen->surface_map( pipe->screen, dest,
+PIPE_BUFFER_USAGE_CPU_WRITE );
+pipe_fill_rect(dst_map, &dest->block, dest->stride, x, y, w, h, color);
+pipe->screen->surface_unmap(pipe->screen, dest);
+return;
struct r300_context* r300 = r300_context(pipe);
CS_LOCALS(r300);
struct r300_capabilities* caps = r300_screen(r300->context.screen)->caps;
@@ -278,7 +284,7 @@ static void r300_surface_fill(struct pipe_context* pipe,
/* XXX might have to switch to 2D */
OUT_CS_REG_SEQ(R300_RB3D_COLOROFFSET0, 1);
- OUT_CS_RELOC(0, dest->buffer, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_CS_RELOC(dest->buffer, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
/* XXX this needs more TLC (or TCL, as it were) */
OUT_CS_REG(R300_RB3D_COLORPITCH0, R300_COLOR_FORMAT_ARGB8888);
#if 0