summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 297768e5cf..b7ad6b2020 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -33,7 +33,9 @@ static void r300_blitter_save_states(struct r300_context* r300)
util_blitter_save_stencil_ref(r300->blitter, &(r300->stencil_ref));
util_blitter_save_rasterizer(r300->blitter, r300->rs_state.state);
util_blitter_save_fragment_shader(r300->blitter, r300->fs);
- util_blitter_save_vertex_shader(r300->blitter, r300->vs);
+ util_blitter_save_vertex_shader(r300->blitter, r300->vs_state.state);
+ util_blitter_save_viewport(r300->blitter, &r300->viewport);
+ util_blitter_save_clip(r300->blitter, &r300->clip);
util_blitter_save_vertex_elements(r300->blitter, r300->velems);
}
@@ -99,6 +101,8 @@ static void r300_hw_copy(struct pipe_context* pipe,
unsigned width, unsigned height)
{
struct r300_context* r300 = r300_context(pipe);
+ struct r300_textures_state* state =
+ (struct r300_textures_state*)r300->textures_state.state;
/* Yeah we have to save all those states to ensure this blitter operation
* is really transparent. The states will be restored by the blitter once
@@ -107,11 +111,11 @@ static void r300_hw_copy(struct pipe_context* pipe,
util_blitter_save_framebuffer(r300->blitter, r300->fb_state.state);
util_blitter_save_fragment_sampler_states(
- r300->blitter, r300->sampler_count, (void**)r300->sampler_states);
+ r300->blitter, state->sampler_count, (void**)state->sampler_states);
util_blitter_save_fragment_sampler_textures(
- r300->blitter, r300->texture_count,
- (struct pipe_texture**)r300->textures);
+ r300->blitter, state->texture_count,
+ (struct pipe_texture**)state->textures);
/* Do a copy */
util_blitter_copy(r300->blitter,
@@ -140,10 +144,10 @@ void r300_surface_copy(struct pipe_context* pipe,
new_format = PIPE_FORMAT_I8_UNORM;
break;
case 2:
- new_format = PIPE_FORMAT_A4R4G4B4_UNORM;
+ new_format = PIPE_FORMAT_B4G4R4A4_UNORM;
break;
case 4:
- new_format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ new_format = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
default:
debug_printf("r300: surface_copy: Unhandled format: %s. Falling back to software.\n"