aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_blorp.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-17 01:06:36 -0700
committerJason Ekstrand <[email protected]>2016-08-17 14:46:22 -0700
commitc097160463c678c5544bfa8cda9cc3ef67361f4e (patch)
tree65624ddb149660c9c006237d146db526ed261af2 /src/mesa/drivers/dri/i965/brw_blorp.c
parent2095f932ef9e7ef7307a39694a89ebd772a19868 (diff)
i965/blorp: Get rid of brw_blorp_surface_info::width/height
Instead, we manually mutate the surface size as needed. Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_blorp.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 0f45a6ae394..78707ca8fd8 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -203,8 +203,6 @@ brw_blorp_surface_info_init(struct brw_context *brw,
info->level = level;
info->layer = layer;
- info->width = minify(mt->physical_width0, level - mt->first_level);
- info->height = minify(mt->physical_height0, level - mt->first_level);
if (format == MESA_FORMAT_NONE)
format = mt->format;
@@ -373,19 +371,6 @@ brw_blorp_emit_surface_state(struct brw_context *brw,
struct isl_surf surf = surface->surf;
- /* Stomp surface dimensions and tiling (if needed) with info from blorp */
- surf.logical_level0_px.width = surface->width;
- surf.logical_level0_px.height = surface->height;
-
- if (brw->gen == 6 && surf.samples > 1) {
- /* Since gen6 uses INTEL_MSAA_LAYOUT_IMS, width and height are measured
- * in samples. But SURFACE_STATE wants them in pixels, so we need to
- * divide them each by 2.
- */
- surf.logical_level0_px.width /= 2;
- surf.logical_level0_px.height /= 2;
- }
-
union isl_color_value clear_color = { .u32 = { 0, 0, 0, 0 } };
const struct isl_surf *aux_surf = NULL;
@@ -619,16 +604,13 @@ gen6_blorp_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
* prevents the clobbering.
*/
params.dst.surf.samples = MAX2(mt->num_samples, 1);
- if (params.depth.surf.samples > 1) {
- params.depth.width = ALIGN(mt->logical_width0, 8);
- params.depth.height = ALIGN(mt->logical_height0, 4);
- } else {
- params.depth.width = ALIGN(params.depth.width, 8);
- params.depth.height = ALIGN(params.depth.height, 4);
- }
+ params.depth.surf.logical_level0_px.width =
+ ALIGN(params.depth.surf.logical_level0_px.width, 8);
+ params.depth.surf.logical_level0_px.height =
+ ALIGN(params.depth.surf.logical_level0_px.height, 4);
- params.x1 = params.depth.width;
- params.y1 = params.depth.height;
+ params.x1 = params.depth.surf.logical_level0_px.width;
+ params.y1 = params.depth.surf.logical_level0_px.height;
assert(intel_miptree_level_has_hiz(mt, level));