diff options
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 1087649f99e..bf2dff289a4 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -889,14 +889,27 @@ iris_resource_configure_aux(struct iris_screen *screen, * "CCS surface does not require initialization. Illegal CCS * [values] are treated as uncompressed memory." * - * Even if we wanted to, we can't initialize the CCS via CPU map. So, - * we choose an aux state which describes the current state and helps - * avoid ambiguating (something not currently supported for STC_CCS). + * The above quote is from the render target section, but we assume + * it applies to CCS in general (e.g., STC_CCS). The uninitialized + * CCS may be in any aux state. We choose the one which is most + * convenient. + * + * We avoid states with CLEAR because stencil does not support it. + * Those states also create a dependency on the clear color, which + * can have negative performance implications. Even though some + * blocks may actually be encoded with CLEAR, we can get away with + * ignoring them - there are no known issues that require fast + * cleared blocks to be tracked and avoided. + * + * We specifically avoid the AUX_INVALID state because it could + * trigger an ambiguate. BLORP does not have support for ambiguating + * stencil. Also, ambiguating some LODs of mipmapped 8bpp surfaces + * seems to stomp on neighboring miplevels. + * + * There is only one remaining aux state which can give us correct + * behavior, COMPRESSED_NO_CLEAR. */ - assert(isl_aux_usage_has_compression(res->aux.usage)); - initial_state = isl_aux_usage_has_fast_clears(res->aux.usage) ? - ISL_AUX_STATE_COMPRESSED_CLEAR : - ISL_AUX_STATE_COMPRESSED_NO_CLEAR; + initial_state = ISL_AUX_STATE_COMPRESSED_NO_CLEAR; } else { assert(res->aux.surf.size_B > 0); /* When CCS is used, we need to ensure that it starts off in a valid |