summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-01-24 05:44:01 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-01 23:30:28 -0800
commit188f61d43ae82c63d557d25282e349926321e3d0 (patch)
tree37dc74d16b60eb81e3686011ebc708562a9246eb /src/gallium/drivers
parent57b062f77551f0111fd210a2d8dd44be6acfc818 (diff)
r300: Hook up clear, set it to fallback.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_context.c2
-rw-r--r--src/gallium/drivers/r300/r300_context.h1
-rw-r--r--src/gallium/drivers/r300/r300_state.c18
-rw-r--r--src/gallium/drivers/r300/r300_surface.c8
4 files changed, 26 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 314b2f0a11..e63e1278bf 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -47,6 +47,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.destroy = r300_destroy_context;
+ r300->context.clear = r300_clear;
+
r300->draw = draw_create();
r300->blend_color_state = CALLOC_STRUCT(r300_blend_color_state);
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 52ddfa1df9..f246c57f48 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -27,6 +27,7 @@
#include "pipe/p_context.h"
#include "util/u_memory.h"
+#include "r300_clear.h"
#include "r300_screen.h"
#include "r300_winsys.h"
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 1f6abc2385..907ebe5c75 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -204,6 +204,14 @@ static void r300_set_clip_state(struct pipe_context* pipe,
draw_set_clip_state(r300->draw, state);
}
+static void
+ r300_set_constant_buffer(struct pipe_context* pipe,
+ uint shader, uint index,
+ const struct pipe_constant_buffer* buffer)
+{
+ /* XXX */
+}
+
static uint32_t translate_depth_stencil_function(int zs_func) {
switch (zs_func) {
case PIPE_FUNC_NEVER:
@@ -367,6 +375,12 @@ static void r300_delete_dsa_state(struct pipe_context* pipe,
FREE(state);
}
+static void r300_set_edgeflags(struct pipe_context* pipe,
+ const unsigned* bitfield)
+{
+ /* XXX you know it's bad when i915 has this blank too */
+}
+
static void
r300_set_framebuffer_state(struct pipe_context* pipe,
const struct pipe_framebuffer_state* state)
@@ -762,13 +776,13 @@ void r300_init_state_functions(struct r300_context* r300)
r300->context.set_clip_state = r300_set_clip_state;
- /* XXX r300->context.set_constant_buffer = r300_set_constant_buffer; */
+ r300->context.set_constant_buffer = r300_set_constant_buffer;
r300->context.create_depth_stencil_alpha_state = r300_create_dsa_state;
r300->context.bind_depth_stencil_alpha_state = r300_bind_dsa_state;
r300->context.delete_depth_stencil_alpha_state = r300_delete_dsa_state;
- /* XXX r300->context.set_edgeflags = r300_set_edgeflags; */
+ r300->context.set_edgeflags = r300_set_edgeflags;
r300->context.set_framebuffer_state = r300_set_framebuffer_state;
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index dd1c8862a7..c9957a0af2 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