void r300_init_debug(struct r300_context * ctx)
{
const char * options = debug_get_option("RADEON_DEBUG", 0);
- boolean printhint = false;
+ boolean printhint = FALSE;
size_t length;
struct debug_option * opt;
if (!opt->name) {
debug_printf("Unknown debug option: %s\n", options);
- printhint = true;
+ printhint = TRUE;
}
options += length;
}
if (!ctx->debug)
- printhint = true;
+ printhint = TRUE;
}
if (printhint || ctx->debug & DBG_HELP) {
{
struct r300_context* r300 = r300_context(pipe);
- draw_flush(r300->draw);
+ if (r300->draw) {
+ draw_flush(r300->draw);
+ }
r300->framebuffer_state = *state;
struct r300_context* r300 = r300_context(pipe);
struct r300_rs_state* rs = (struct r300_rs_state*)state;
- draw_flush(r300->draw);
- draw_set_rasterizer_state(r300->draw, &rs->rs);
+ if (r300->draw) {
+ draw_flush(r300->draw);
+ draw_set_rasterizer_state(r300->draw, &rs->rs);
+ }
r300->rs_state = rs;
+ /* XXX Clean these up when we move to atom emits */
r300->dirty_state |= R300_NEW_RASTERIZER;
r300->dirty_state |= R300_NEW_RS_BLOCK;
r300->dirty_state |= R300_NEW_SCISSOR;
r300->vertex_buffer_count = count;
- draw_flush(r300->draw);
- draw_set_vertex_buffers(r300->draw, count, buffers);
+ if (r300->draw) {
+ draw_flush(r300->draw);
+ draw_set_vertex_buffers(r300->draw, count, buffers);
+ }
}
static void r300_set_vertex_elements(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
- draw_flush(r300->draw);
- draw_set_vertex_elements(r300->draw, count, elements);
+ memcpy(r300->vertex_elements, elements,
+ sizeof(struct pipe_vertex_element) * count);
+
+ r300->vertex_element_count = count;
+
+ if (r300->draw) {
+ draw_flush(r300->draw);
+ draw_set_vertex_elements(r300->draw, count, elements);
+ }
}
static void* r300_create_vs_state(struct pipe_context* pipe,
struct tgsi_shader_info* info = &vs->info;
struct tgsi_parse_context parser;
struct tgsi_full_declaration * decl;
- boolean pointsize = false;
+ boolean pointsize = FALSE;
int out_colors = 0;
int colors = 0;
int out_generic = 0;
for (i = 0; i < info->num_outputs; i++) {
switch (info->output_semantic_name[i]) {
case TGSI_SEMANTIC_PSIZE:
- pointsize = true;
+ pointsize = TRUE;
break;
case TGSI_SEMANTIC_COLOR:
out_colors++;