iris: Fix fast-clearing of depth via glClearTex(Sub)Image
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Thu, 2 Jul 2020 08:39:25 +0000 (11:39 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Jul 2020 11:05:03 +0000 (11:05 +0000)
commit77844690be7ef8e6e2b24ff1acd85f908ec566f4
tree7b8cdf293831f0cf8d92ebd6bdf10883c705e11e
parent026615c0f9ed99896b58532587d7a149b471b4de
iris: Fix fast-clearing of depth via glClearTex(Sub)Image

If we clear depth only texture via glClearTex(Sub)Image it may cause:
../src/intel/blorp/blorp_genX_exec.h:1554: blorp_emit_surface_states: Assertion `params->depth.enabled || params->stencil.enabled' failed.

due to clear_depth_stencil calling blorp_clear_depth_stencil when
depth is already fast-cleared and there is no stencil.

Fixes piglit test: arb_clear_texture-depth

Fixes: 51638cf18a532510f9e1fd8f36207b56d38137b8
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5770>
src/gallium/drivers/iris/iris_clear.c