struct pipe_shader_state state;
struct tgsi_shader_info info;
+ /* Fallback shader, because Draw has issues */
+ struct draw_vertex_shader* draw;
+
/* Has this shader been translated yet? */
boolean translated;
}
}
}
+
+void r300_vs_dump(struct r300_vertex_shader* vs)
+{
+ int i;
+
+ for (i = 0; i < vs->instruction_count; i++) {
+ debug_printf("inst0: 0x%x\n", vs->instructions[i].inst0);
+ debug_printf("inst1: 0x%x\n", vs->instructions[i].inst1);
+ debug_printf("inst2: 0x%x\n", vs->instructions[i].inst2);
+ debug_printf("inst3: 0x%x\n", vs->instructions[i].inst3);
+ }
+}
#include "r300_reg.h"
#include "r300_state_shader.h"
+#include "r300_state_tcl.h"
void r500_fs_dump(struct r500_fragment_shader* fs);
+void r300_vs_dump(struct r300_vertex_shader* vs);
+
#endif /* R300_DEBUG_H */
rs->rs = *state;
+ /* If using HW TCL, tell Draw to not do its magic. */
+ if (r300_screen(pipe->screen)->caps->has_tcl) {
+ rs->rs.bypass_vs_clip_and_viewport = TRUE;
+ }
+
return (void*)rs;
}
tgsi_scan_shader(shader->tokens, &vs->info);
+ /* Appease Draw. */
+ vs->draw = draw_create_vertex_shader(r300->draw, shader);
+
return (void*)vs;
} else {
return draw_create_vertex_shader(r300->draw, shader);
r300_translate_vertex_shader(r300, vs);
}
+ draw_bind_vertex_shader(r300->draw, vs->draw);
r300->vs = vs;
r300->dirty_state |= R300_NEW_VERTEX_SHADER;
} else {
struct r300_context* r300 = r300_context(pipe);
if (r300_screen(pipe->screen)->caps->has_tcl) {
+ struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
+
+ draw_delete_vertex_shader(r300->draw, vs->draw);
FREE(shader);
} else {
draw_delete_vertex_shader(r300->draw,