intel/blorp: Use the hardware op for CCS ambiguate on gen10+
Cannonlake hardware adds a new resolve type in 3DSTATE_PS called FAST_CLEAR_0 which does an ambiguate. Now that the hardware can do it directly, we should use that instead of binding the CCS as a render target and doing it manually. This was tested with a full Vulkan CTS run on Cannonlake. Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:

committed by
Nanley Chery

parent
b31a31bba5
commit
5e43a75950
@@ -898,7 +898,11 @@ blorp_ccs_resolve(struct blorp_batch *batch,
|
|||||||
params.x1 = ALIGN(params.x1, x_scaledown) / x_scaledown;
|
params.x1 = ALIGN(params.x1, x_scaledown) / x_scaledown;
|
||||||
params.y1 = ALIGN(params.y1, y_scaledown) / y_scaledown;
|
params.y1 = ALIGN(params.y1, y_scaledown) / y_scaledown;
|
||||||
|
|
||||||
if (batch->blorp->isl_dev->info->gen >= 9) {
|
if (batch->blorp->isl_dev->info->gen >= 10) {
|
||||||
|
assert(resolve_op == ISL_AUX_OP_FULL_RESOLVE ||
|
||||||
|
resolve_op == ISL_AUX_OP_PARTIAL_RESOLVE ||
|
||||||
|
resolve_op == ISL_AUX_OP_AMBIGUATE);
|
||||||
|
} else if (batch->blorp->isl_dev->info->gen >= 9) {
|
||||||
assert(resolve_op == ISL_AUX_OP_FULL_RESOLVE ||
|
assert(resolve_op == ISL_AUX_OP_FULL_RESOLVE ||
|
||||||
resolve_op == ISL_AUX_OP_PARTIAL_RESOLVE);
|
resolve_op == ISL_AUX_OP_PARTIAL_RESOLVE);
|
||||||
} else {
|
} else {
|
||||||
@@ -1057,6 +1061,12 @@ blorp_ccs_ambiguate(struct blorp_batch *batch,
|
|||||||
struct blorp_surf *surf,
|
struct blorp_surf *surf,
|
||||||
uint32_t level, uint32_t layer)
|
uint32_t level, uint32_t layer)
|
||||||
{
|
{
|
||||||
|
if (ISL_DEV_GEN(batch->blorp->isl_dev) >= 10) {
|
||||||
|
/* On gen10 and above, we have a hardware resolve op for this */
|
||||||
|
return blorp_ccs_resolve(batch, surf, level, layer, 1,
|
||||||
|
surf->surf->format, ISL_AUX_OP_AMBIGUATE);
|
||||||
|
}
|
||||||
|
|
||||||
struct blorp_params params;
|
struct blorp_params params;
|
||||||
blorp_params_init(¶ms);
|
blorp_params_init(¶ms);
|
||||||
|
|
||||||
|
@@ -827,6 +827,12 @@ blorp_emit_ps_config(struct blorp_batch *batch,
|
|||||||
switch (params->fast_clear_op) {
|
switch (params->fast_clear_op) {
|
||||||
case ISL_AUX_OP_NONE:
|
case ISL_AUX_OP_NONE:
|
||||||
break;
|
break;
|
||||||
|
#if GEN_GEN >= 10
|
||||||
|
case ISL_AUX_OP_AMBIGUATE:
|
||||||
|
ps.RenderTargetFastClearEnable = true;
|
||||||
|
ps.RenderTargetResolveType = FAST_CLEAR_0;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#if GEN_GEN >= 9
|
#if GEN_GEN >= 9
|
||||||
case ISL_AUX_OP_PARTIAL_RESOLVE:
|
case ISL_AUX_OP_PARTIAL_RESOLVE:
|
||||||
ps.RenderTargetResolveType = RESOLVE_PARTIAL;
|
ps.RenderTargetResolveType = RESOLVE_PARTIAL;
|
||||||
|
Reference in New Issue
Block a user