Skip to content
Snippets Groups Projects
Commit 68155102 authored by Danylo Piliaiev's avatar Danylo Piliaiev :flag_ua: Committed by Eric Engestrom
Browse files

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: 51638cf1
Signed-off-by: default avatarDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <mesa/mesa!5770>
(cherry picked from commit 77844690)
parent f160966c
No related branches found
No related tags found
Loading
......@@ -706,7 +706,7 @@
"description": "iris: Fix fast-clearing of depth via glClearTex(Sub)Image",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "51638cf18a532510f9e1fd8f36207b56d38137b8"
},
......
......@@ -582,7 +582,7 @@ clear_depth_stencil(struct iris_context *ice,
/* At this point, we might have fast cleared the depth buffer. So if there's
* no stencil clear pending, return early.
*/
if (!(clear_depth || clear_stencil)) {
if (!(clear_depth || (clear_stencil && stencil_res))) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment