diff options
author | Eric Anholt <[email protected]> | 2014-02-13 15:58:21 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-02-18 09:56:32 -0800 |
commit | bbd85ad27c0051697b49260348c686a1b947e884 (patch) | |
tree | 45e91ed28f4b576699f525d91a58f5baf204ad6e /src/mesa/drivers/dri/i965 | |
parent | af4f758a4422aaf80fc5c2eda306485961eaf1be (diff) |
i965: Don't try to use the ctx->ReadBuffer when asked to blorp miptrees.
So far it's happened to be that we're only ever calling
intel_miptree_blit() (up/downsampling) from the ReadBuffer, but I stumbled
over a null ReadBuffer case when debugging later parts of the series.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index c23504f0da8..0aeb651cefd 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -1974,7 +1974,6 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw, bool mirror_x, bool mirror_y) { struct gl_context *ctx = &brw->ctx; - const struct gl_framebuffer *read_fb = ctx->ReadBuffer; src.set(brw, src_mt, src_level, src_layer, false); dst.set(brw, dst_mt, dst_level, dst_layer, true); @@ -2127,8 +2126,10 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw, y0 = wm_push_consts.dst_y0 = dst_y0; x1 = wm_push_consts.dst_x1 = dst_x1; y1 = wm_push_consts.dst_y1 = dst_y1; - wm_push_consts.rect_grid_x1 = read_fb->Width * wm_prog_key.x_scale - 1.0; - wm_push_consts.rect_grid_y1 = read_fb->Height * wm_prog_key.y_scale - 1.0; + wm_push_consts.rect_grid_x1 = (minify(src_mt->logical_width0, src_level) * + wm_prog_key.x_scale - 1.0); + wm_push_consts.rect_grid_y1 = (minify(src_mt->logical_height0, src_level) * + wm_prog_key.y_scale - 1.0); wm_push_consts.x_transform.setup(src_x0, src_x1, dst_x0, dst_x1, mirror_x); wm_push_consts.y_transform.setup(src_y0, src_y1, dst_y0, dst_y1, mirror_y); |