Getting these out of the way so more stuff can be put in.
r300_init_state_functions(r300);
+ r300->dirty_state = R300_NEW_KITCHEN_SINK;
+ r300->dirty_hw++;
+
return &r300->context;
}
};
struct r300_rs_state {
+ uint32_t vap_control_status; /* R300_VAP_CNTL_STATUS: 0x2140 */
uint32_t depth_scale_front; /* R300_SU_POLY_OFFSET_FRONT_SCALE: 0x42a4 */
uint32_t depth_offset_front; /* R300_SU_POLY_OFFSET_FRONT_OFFSET: 0x42a8 */
uint32_t depth_scale_back; /* R300_SU_POLY_OFFSET_BACK_SCALE: 0x42ac */
/* Bitmask of dirty state objects. */
uint32_t dirty_state;
+ /* Flag indicating whether or not the HW is dirty. */
+ uint32_t dirty_hw;
};
/* Convenience cast wrapper. */
struct r300_screen* r300screen = (struct r300_screen*)r300->context.screen;
CS_LOCALS(r300);
+ if (!(r300->dirty_state) && !(r300->dirty_hw)) {
+ return;
+ }
+
/* XXX check size */
if (r300->dirty_state & R300_NEW_BLEND) {
if (r300->dirty_state & R300_NEW_RS) {
struct r300_rs_state* rs = r300->rs_state;
+ OUT_CS_REG(R300_VAP_CNTL_STATUS, rs->vap_control_status);
/* XXX next six are contiguous regs */
OUT_CS_REG(R300_SU_POLY_OFFSET_FRONT_SCALE, rs->depth_scale_front);
OUT_CS_REG(R300_SU_POLY_OFFSET_FRONT_OFFSET, rs->depth_offset_front);
struct pipe_surface* surface,
unsigned flags)
{
- /* XXX this is not quite right */
char* map = pipe_buffer_map(screen, surface->buffer, flags);
if (!map) {
pack_float_32(state->offset_scale);
}
+ /* XXX this is part of HW TCL */
+ /* XXX endian control */
+ rs->vap_control_status = R300_VAP_TCL_BYPASS;
+
return (void*)rs;
}