intel/blorp: Make the number of samples an explicit parameter

Previously, we always inferred it from params->dst which meant that
references to params->dst were scattered all throughout the state upload
code.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Jason Ekstrand
2016-10-21 10:40:58 -07:00
parent 6614234fc9
commit 1acebeb191
5 changed files with 19 additions and 9 deletions

View File

@@ -141,6 +141,7 @@ void
blorp_params_init(struct blorp_params *params)
{
memset(params, 0, sizeof(*params));
params->num_samples = 1;
params->num_draw_buffers = 1;
params->num_layers = 1;
}
@@ -265,6 +266,7 @@ blorp_gen6_hiz_op(struct blorp_batch *batch,
params.dst.surf.samples = params.depth.surf.samples;
params.dst.surf.logical_level0_px = params.depth.surf.logical_level0_px;
params.depth_format = isl_format_get_depth_format(surf->surf->format, false);
params.num_samples = params.depth.surf.samples;
batch->blorp->exec(batch, &params);
}