mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
r300g: initialize state & render functions before creating u_vbuf & u_blitter
This commit is contained in:
parent
da2123051c
commit
6bede55241
3 changed files with 15 additions and 11 deletions
|
|
@ -418,6 +418,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
|||
r300_init_query_functions(r300);
|
||||
r300_init_state_functions(r300);
|
||||
r300_init_resource_functions(r300);
|
||||
r300_init_render_functions(r300);
|
||||
r300_init_states(&r300->context);
|
||||
|
||||
r300->context.create_video_decoder = vl_create_decoder;
|
||||
r300->context.create_video_buffer = vl_video_buffer_create;
|
||||
|
|
@ -435,10 +437,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
|||
r300->blitter = util_blitter_create(&r300->context);
|
||||
if (r300->blitter == NULL)
|
||||
goto fail;
|
||||
|
||||
/* Render functions must be initialized after blitter. */
|
||||
r300_init_render_functions(r300);
|
||||
r300_init_states(&r300->context);
|
||||
r300->blitter->draw_rectangle = r300_blitter_draw_rectangle;
|
||||
|
||||
rws->cs_set_flush_callback(r300->cs, r300_flush_callback, r300);
|
||||
|
||||
|
|
|
|||
|
|
@ -705,6 +705,12 @@ void r300_plug_in_stencil_ref_fallback(struct r300_context *r300);
|
|||
/* r300_render.c */
|
||||
void r300_draw_flush_vbuf(struct r300_context *r300);
|
||||
void r500_emit_index_bias(struct r300_context *r300, int index_bias);
|
||||
void r300_blitter_draw_rectangle(struct blitter_context *blitter,
|
||||
unsigned x1, unsigned y1,
|
||||
unsigned x2, unsigned y2,
|
||||
float depth,
|
||||
enum blitter_attrib_type type,
|
||||
const union pipe_color_union *attrib);
|
||||
|
||||
/* r300_state.c */
|
||||
enum r300_fb_state_change {
|
||||
|
|
|
|||
|
|
@ -1165,12 +1165,12 @@ void r300_draw_flush_vbuf(struct r300_context *r300)
|
|||
* If we rendered a quad, the pixels on the main diagonal
|
||||
* would be computed and stored twice, which makes the clear/copy codepaths
|
||||
* somewhat inefficient. Instead we use a rectangular point sprite. */
|
||||
static void r300_blitter_draw_rectangle(struct blitter_context *blitter,
|
||||
unsigned x1, unsigned y1,
|
||||
unsigned x2, unsigned y2,
|
||||
float depth,
|
||||
enum blitter_attrib_type type,
|
||||
const union pipe_color_union *attrib)
|
||||
void r300_blitter_draw_rectangle(struct blitter_context *blitter,
|
||||
unsigned x1, unsigned y1,
|
||||
unsigned x2, unsigned y2,
|
||||
float depth,
|
||||
enum blitter_attrib_type type,
|
||||
const union pipe_color_union *attrib)
|
||||
{
|
||||
struct r300_context *r300 = r300_context(util_blitter_get_pipe(blitter));
|
||||
unsigned last_sprite_coord_enable = r300->sprite_coord_enable;
|
||||
|
|
@ -1309,7 +1309,6 @@ void r300_init_render_functions(struct r300_context *r300)
|
|||
}
|
||||
|
||||
r300->context.resource_resolve = r300_resource_resolve;
|
||||
r300->blitter->draw_rectangle = r300_blitter_draw_rectangle;
|
||||
|
||||
/* Plug in the two-sided stencil reference value fallback if needed. */
|
||||
if (!r300->screen->caps.is_r500)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue