r300: Hook up clear, set it to fallback.

This commit is contained in:
Corbin Simpson
2009-01-24 05:44:01 -08:00
parent 57b062f775
commit 188f61d43a
4 changed files with 26 additions and 3 deletions
+2
View File
@@ -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);
+1
View File
@@ -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"
+16 -2
View File
@@ -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;
+7 -1
View File
@@ -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