diff options
author | Kenneth Graunke <[email protected]> | 2013-10-07 14:41:16 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-10-09 16:36:49 -0700 |
commit | 4b2e819e10138dba6961d44f07af6de13750a832 (patch) | |
tree | b4bc5a0319c7e186ea50498aa2def67c1575ef3c /src/mesa/drivers | |
parent | dbc1f3677c1deb32358a6a53f0ad3638a78c7c4f (diff) |
i965/blorp: Add an is_render_target parameter to surface_info::set.
This allows us to determine whether we're setting up a format for
the source (as a texture) or destination (as a render target).
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.cpp | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp index 1576ff2a384..e519cd91d8f 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp @@ -66,7 +66,8 @@ brw_blorp_mip_info::set(struct intel_mipmap_tree *mt, void brw_blorp_surface_info::set(struct brw_context *brw, struct intel_mipmap_tree *mt, - unsigned int level, unsigned int layer) + unsigned int level, unsigned int layer, + bool is_render_target) { brw_blorp_mip_info::set(mt, level, layer); this->num_samples = mt->num_samples; diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h index dceb4fcc41d..07ab80521b1 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.h +++ b/src/mesa/drivers/dri/i965/brw_blorp.h @@ -122,7 +122,8 @@ public: void set(struct brw_context *brw, struct intel_mipmap_tree *mt, - unsigned int level, unsigned int layer); + unsigned int level, unsigned int layer, + bool is_render_target); uint32_t compute_tile_offsets(uint32_t *tile_x, uint32_t *tile_y) const; diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index 12e76983833..ec70217f2c6 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -2063,8 +2063,8 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw, struct gl_context *ctx = &brw->ctx; const struct gl_framebuffer *read_fb = ctx->ReadBuffer; - src.set(brw, src_mt, src_level, src_layer); - dst.set(brw, dst_mt, dst_level, dst_layer); + src.set(brw, src_mt, src_level, src_layer, false); + dst.set(brw, dst_mt, dst_level, dst_layer, true); /* Even though we do multisample resolves at the time of the blit, OpenGL * specification defines them as if they happen at the time of rendering, diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 18a29fbc07c..d1933ced754 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -188,7 +188,7 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw, struct gl_context *ctx = &brw->ctx; struct intel_renderbuffer *irb = intel_renderbuffer(rb); - dst.set(brw, irb->mt, irb->mt_level, irb->mt_layer); + dst.set(brw, irb->mt, irb->mt_level, irb->mt_layer, true); /* Override the surface format according to the context's sRGB rules. */ gl_format format = _mesa_get_render_format(ctx, irb->mt->format); @@ -307,7 +307,7 @@ brw_blorp_rt_resolve_params::brw_blorp_rt_resolve_params( struct brw_context *brw, struct intel_mipmap_tree *mt) { - dst.set(brw, mt, 0 /* level */, 0 /* layer */); + dst.set(brw, mt, 0 /* level */, 0 /* layer */, true); /* From the Ivy Bridge PRM, Vol2 Part1 11.9 "Render Target Resolve": * |