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);
#include "pipe/p_context.h"
#include "util/u_memory.h"
+#include "r300_clear.h"
#include "r300_screen.h"
#include "r300_winsys.h"
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:
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)
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;
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;
/* 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