diff options
author | Kenneth Graunke <[email protected]> | 2019-07-30 18:49:47 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-07-30 19:47:41 -0700 |
commit | 3a22a8bf495c68ea76417888bf6a6b0e6f486f72 (patch) | |
tree | 3a9faa1c33c48b47494b95485a8e3618d11e6e58 /src/gallium/drivers/iris/iris_state.c | |
parent | 665989d98b0ec88cff50f27cab21943193a828a1 (diff) |
iris: Skip repeated depth buffer disables.
Often times, the depth buffer is entirely disabled, but color render
targets change. For example, GenerateMipmaps will change the color
render target for each miplevel, but there is no depth buffer.
In the Civilization VI benchmark, this drops the median number of
3DSTATE_DEPTH_BUFFER etc. packets emitted per frame from 472 to 34.
Diffstat (limited to 'src/gallium/drivers/iris/iris_state.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index d32dc4995f8..dddf50bf921 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2336,6 +2336,10 @@ iris_set_framebuffer_state(struct pipe_context *ctx, ice->state.dirty |= IRIS_DIRTY_SF_CL_VIEWPORT; } + if (cso->zsbuf || state->zsbuf) { + ice->state.dirty |= IRIS_DIRTY_DEPTH_BUFFER; + } + util_copy_framebuffer_state(cso, state); cso->samples = samples; cso->layers = layers; @@ -2401,8 +2405,6 @@ iris_set_framebuffer_state(struct pipe_context *ctx, ice->state.null_fb.offset += iris_bo_offset_from_base_address(iris_resource_bo(ice->state.null_fb.res)); - ice->state.dirty |= IRIS_DIRTY_DEPTH_BUFFER; - /* Render target change */ ice->state.dirty |= IRIS_DIRTY_BINDINGS_FS; |